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
Create a new week for a batch
@RequestMapping(value = "/week/new", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Long> createWeek( @RequestBody @Valid Week week ) { ResponseEntity<Long> returnEntity; try { returnEntity = new ResponseEntity<>(businessDelegate.createWeek(week), HttpStatus.CREATED); } catch (RuntimeException e) { returnEntity = new ResponseEntity<>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "private RepeatWeekdays() {}", "@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "public void createTempSpecialDayTrainSchedule(Timestamp date);", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "@Scheduled(cron = \"0 0 9-17 * * MON-FRI\")\n\tpublic void scheduleTaskWeekly() {\n\t\tlog.info(\"Cron Task :: Execution Time Every 9 - 17 O'clock Every Weekdays - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public Builder workweekStarts(DayOfWeek day) {\n\t\t\tworkweekStarts = day;\n\t\t\treturn this;\n\t\t}", "int getWeek();", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "public void createWeekScenarioBug10265_UpgradeAndParChange()\n throws Exception {\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-22 23:00:00\"));\n\n VOServiceDetails serviceDetails = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"BUG10265_UPG_PARCHG\", TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS2, 3,\n technicalServiceAsync, supplierMarketplace);\n\n setCutOffDay(basicSetup.getSupplierAdminKey(), 1);\n\n VOSubscriptionDetails subDetails = subscrSetup.subscribeToService(\n basicSetup.getCustomerAdminKey(), \"BUG10265_UPG_PARCHG\",\n serviceDetails, basicSetup.getCustomerUser1(),\n VOServiceFactory.getRole(serviceDetails, \"ADMIN\"));\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-23 00:00:00\"));\n subDetails = subscrSetup.completeAsyncSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-02-24 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"3\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-25 00:00:00\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n // Upgrade the subscription\n VOServiceDetails perUnitService = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"BUG10265_UPG_PARCHG_SERVICE2\",\n TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS3, 2,\n technicalServiceAsync, supplierMarketplace);\n\n serviceSetup.registerCompatibleServices(\n basicSetup.getSupplierAdminKey(), serviceDetails,\n perUnitService);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-27 23:00:00\"));\n VOSubscriptionDetails upgradedSubDetails = subscrSetup\n .copyParametersAndUpgradeSubscription(\n basicSetup.getCustomerAdminKey(), subDetails,\n perUnitService);\n // ASYNC - check this (upgrade hidden in method above)\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 00:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncUpgradeSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-02-28 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"5\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 00:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-03-01 06:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"7\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 07:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-03-02 11:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"4\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-02 12:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-03 07:00:00\"));\n subscrSetup\n .unsubscribeToService(upgradedSubDetails.getSubscriptionId());\n\n resetCutOffDay(basicSetup.getSupplierAdminKey());\n\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"BUG10265_UPG_PARCHG\", subDetails);\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"BUG10265_UPG_PARCHG\", upgradedSubDetails);\n }", "public void createWeekScenarioBug10265_ParChangeWithFreeP()\n throws Exception {\n long usageStartTime = DateTimeHandling\n .calculateMillis(\"2013-02-28 06:00:00\");\n BillingIntegrationTestBase.setDateFactoryInstance(usageStartTime);\n\n VOServiceDetails serviceDetails = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"RARCHANGE_WEEK_FREEP\", TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS_FREEP,\n technicalServiceAsync, supplierMarketplace);\n\n setCutOffDay(basicSetup.getSupplierAdminKey(), 1);\n\n VORoleDefinition role = VOServiceFactory.getRole(serviceDetails,\n \"ADMIN\");\n\n container.login(basicSetup.getCustomerAdminKey(),\n ROLE_ORGANIZATION_ADMIN);\n VOSubscriptionDetails subDetails = subscrSetup.subscribeToService(\n \"RARCHANGE_WEEK_FREEP\", serviceDetails,\n basicSetup.getCustomerUser1(), role);\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 07:00:00\"));\n subDetails = subscrSetup.completeAsyncSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 23:00:00\"));\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-02-28 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"7\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 00:00:00\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-03-01 01:00:01\"),\n \"MAX_FOLDER_NUMBER\", \"3\");\n // ASYNC - update one second later because not possible otherwise\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 01:00:02\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n long usageEndTime = DateTimeHandling\n .calculateMillis(\"2013-03-03 07:00:00\");\n BillingIntegrationTestBase.setDateFactoryInstance(usageEndTime);\n subscrSetup.unsubscribeToService(subDetails.getSubscriptionId());\n\n resetCutOffDay(basicSetup.getSupplierAdminKey());\n\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"RARCHANGE_WEEK_FREEP\", subDetails);\n }", "public static Week activateInstantiateWeek(LocalDate startDate){\n return InstantiateWeek.instantiateWeek(startDate);\n }", "public static void createWeeklyReminderAlarm(Context context) {\n String prefWeekStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_WEEK_START, context);\n int weekStartDay = DateUtils.weekdayFromPrefValue(prefWeekStart);\n int dayBeforeWeekStart = weekStartDay - 1 == 0 ? Calendar.SATURDAY : weekStartDay - 1;\n\n // Load evening start preference.\n String prefEveningStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_EVENING_START, context);\n int eveningStartHour = TimePreference.getHour(prefEveningStart);\n int eveningStartMinute = TimePreference.getMinute(prefEveningStart);\n\n // Set alarm time based on preference.\n Calendar alarmTime = getBaseCalendar();\n alarmTime.set(Calendar.HOUR_OF_DAY, eveningStartHour);\n alarmTime.set(Calendar.MINUTE, eveningStartMinute);\n alarmTime.set(Calendar.DAY_OF_WEEK, dayBeforeWeekStart);\n\n // Check if alarm should be in the next week.\n if (alarmTime.before(Calendar.getInstance())) {\n alarmTime.setTimeInMillis(alarmTime.getTimeInMillis() + 604800000);\n }\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.WEEKLY_REMINDER);\n\n // Cancel existing alarms.\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n alarmManager.cancel(alarmIntent);\n\n // Trigger the alarm weekly on the given time.\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, alarmTime.getTimeInMillis(), 604800000, alarmIntent);\n }", "public void setWeek(String week) {\r\n this.week = week;\r\n }", "public void createWeekScenarioBug10265_UpgradeAndParChange2()\n throws Exception {\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-22 23:00:00\"));\n\n VOServiceDetails serviceDetails = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"BUG10265_UPG_PARCHG2\", TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS2, 3,\n technicalServiceAsync, supplierMarketplace);\n\n setCutOffDay(basicSetup.getSupplierAdminKey(), 1);\n\n VOSubscriptionDetails subDetails = subscrSetup.subscribeToService(\n basicSetup.getCustomerAdminKey(), \"BUG10265_UPG_PARCHG2\",\n serviceDetails, basicSetup.getCustomerUser1(),\n VOServiceFactory.getRole(serviceDetails, \"ADMIN\"));\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-23 00:00:00\"));\n subDetails = subscrSetup.completeAsyncSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-02-24 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"3\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-25 00:00:00\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n // Upgrade the subscription\n VOServiceDetails perUnitService = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"BUG10265_UPG_PARCHG2_SERVICE2\",\n TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS3, 0,\n technicalServiceAsync, supplierMarketplace);\n\n serviceSetup.registerCompatibleServices(\n basicSetup.getSupplierAdminKey(), serviceDetails,\n perUnitService);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-27 23:00:00\"));\n VOSubscriptionDetails upgradedSubDetails = subscrSetup\n .copyParametersAndUpgradeSubscription(\n basicSetup.getCustomerAdminKey(), subDetails,\n perUnitService);\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 00:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncUpgradeSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-02-28 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"5\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 00:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-03-01 06:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"7\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 07:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n upgradedSubDetails = subscrSetup.modifyParameterForSubscription(\n upgradedSubDetails,\n DateTimeHandling.calculateMillis(\"2013-03-02 11:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"4\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-02 12:00:00\"));\n upgradedSubDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), upgradedSubDetails);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-03 07:00:00\"));\n subscrSetup\n .unsubscribeToService(upgradedSubDetails.getSubscriptionId());\n\n resetCutOffDay(basicSetup.getSupplierAdminKey());\n\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"BUG10265_UPG_PARCHG2\", subDetails);\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"BUG10265_UPG_PARCHG2\", upgradedSubDetails);\n }", "private Builder() {\n super(referential.store.v2.WeekPattern.SCHEMA$);\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "private static void test27(){\n LocalDateTime newWorkingDay = LocalDateTime.now().with((temporal) -> {\n LocalDateTime localDateTime = (LocalDateTime) temporal;\n DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();\n if(DayOfWeek.FRIDAY.equals(dayOfWeek)){\n return localDateTime.plusDays(1);\n }else if(DayOfWeek.SATURDAY.equals(dayOfWeek)) {\n return localDateTime.plusDays(2);\n }else {\n return localDateTime.plusDays(1);\n }\n });\n System.out.println(newWorkingDay);\n}", "private void startWeek(int amtTellers) {\n for (int i =0; i< amtTellers; i++) {\n employees.add(new Teller(i+1, this));\n }\n }", "public static final Function<Date,Date> addWeeks(final int amount) {\r\n return new Add(Calendar.WEEK_OF_YEAR, amount);\r\n }", "public static final Function<Date,Date> setWeek(final int value) {\r\n return new Set(Calendar.WEEK_OF_YEAR, value);\r\n }", "public static void SWM_GAME_7DaysWeek(String[][] SWM_table, int SWM_row_num, int SWM_col_num, String[][] organizedTable, String[][] organizedTable2, double[][] sessionDate_asNum, String[][] sessionDate,\n\t\t int sessionDate_row_num, int sessionDate_col_num, Workbook workbook_w)\n{\n\t\n\t//Finished SWM\n}", "private void weekDateUpdate(GregorianCalendar reference) {\n\t\treference = (GregorianCalendar) reference.clone();\n\t\tthis.weekdates.removeAll();\n\t\treference = DateCalc.startOf(reference, Calendar.WEEK_OF_YEAR);\n\t\tint day = 1;\n\t\tJLabel current;\n\t\twhile (day <= 7) {\n\t\t\tStringBuilder date = new StringBuilder();\n\t\t\tdate.append(reference.getDisplayName(Calendar.DAY_OF_WEEK,\n\t\t\t\t\tCalendar.SHORT, DEFAULT_LOCALE)\n\t\t\t\t\t+ \" \");\n\t\t\tdate.append(reference.get(Calendar.DAY_OF_MONTH));\n\t\t\tdate.append('.');\n\t\t\tdate.append((reference.get(Calendar.MONTH) + 1));\n\n\t\t\tcurrent = new JLabel(date.toString());\n\t\t\tthis.weekdates.add(current);\n\t\t\tthis.weekdates.addSeparator();\n\t\t\treference.add(Calendar.DAY_OF_WEEK, 1);\n\t\t\tday++;\n\t\t}\n\t}", "private void previousWeek() {\r\n tmp.setDay(tmp.getDay() - daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "public Builder setWeek6(boolean value) {\n bitField0_ |= 0x00000020;\n week6_ = value;\n onChanged();\n return this;\n }", "public Builder setWeek1(boolean value) {\n bitField0_ |= 0x00000001;\n week1_ = value;\n onChanged();\n return this;\n }", "public static void calcSpecificWeeks(JavaSparkContext context, SparkSession session, String input_batch, String input_assessment, String input_grade, String output) {\n\t\tStructField batch_id = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n StructField borderline_grade_threshold = DataTypes.createStructField(\"borderline_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField end_date = DataTypes.createStructField(\"end_date\", DataTypes.StringType, true);\n StructField good_grade_threshold = DataTypes.createStructField(\"good_grade_threshold\", DataTypes.DoubleType, true);\n\t\tStructField location = DataTypes.createStructField(\"location\", DataTypes.StringType, true);\n StructField skill_type = DataTypes.createStructField(\"skill_type\", DataTypes.StringType, true);\n\t\tStructField start_date = DataTypes.createStructField(\"start_date\", DataTypes.StringType, true);\n StructField training_name = DataTypes.createStructField(\"training_name\", DataTypes.StringType, true);\n\t\tStructField training_type = DataTypes.createStructField(\"training_type\", DataTypes.StringType, true);\n StructField number_of_weeks = DataTypes.createStructField(\"number_of_weeks\", DataTypes.DoubleType, true);\n StructField co_trainer_id = DataTypes.createStructField(\"co_trainer_id\", DataTypes.DoubleType, true);\n StructField trainer_id = DataTypes.createStructField(\"trainer_id\", DataTypes.DoubleType, true);\n StructField resource_id = DataTypes.createStructField(\"resource_id\", DataTypes.StringType, true);\n StructField address_id = DataTypes.createStructField(\"address_id\", DataTypes.DoubleType, true);\n StructField graded_weeks = DataTypes.createStructField(\"graded_weeks\", DataTypes.DoubleType, true);\n List<StructField> fields = new ArrayList<StructField>();\n fields.add(batch_id);\n fields.add(borderline_grade_threshold);\n fields.add(end_date);\n fields.add(good_grade_threshold);\n fields.add(location);\n fields.add(skill_type);\n fields.add(start_date);\n fields.add(training_name);\n fields.add(training_type);\n fields.add(number_of_weeks);\n fields.add(co_trainer_id);\n fields.add(trainer_id);\n fields.add(resource_id);\n fields.add(address_id);\n fields.add(graded_weeks);\n StructType schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_batch = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_batch);\n\t\tdata_batch.createOrReplaceTempView(\"caliber_batch\");\n\t\t\n\t\tStructField assessment_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField raw_score = DataTypes.createStructField(\"raw_score\", DataTypes.DoubleType, true);\n\t\tStructField assessment_title = DataTypes.createStructField(\"assessment_title\", DataTypes.StringType, true);\n StructField assessment_type = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField week_number = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n StructField batch_id2 = DataTypes.createStructField(\"batch_id\", DataTypes.DoubleType, true);\n\t\tStructField assessment_category = DataTypes.createStructField(\"assessment_category\", DataTypes.StringType, true);\n fields = new ArrayList<StructField>();\n fields.add(assessment_id);\n fields.add(raw_score);\n fields.add(assessment_title);\n fields.add(assessment_type);\n fields.add(week_number);\n fields.add(batch_id2);\n fields.add(assessment_category);\n schema = DataTypes.createStructType(fields);\n\t\tDataset<Row> data_assessment = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_assessment);\n\t\tdata_assessment.createOrReplaceTempView(\"caliber_assessment\");\n\t\t\n\t\tStructField grade_id = DataTypes.createStructField(\"assessment_id\", DataTypes.DoubleType, true);\n StructField date_received = DataTypes.createStructField(\"raw_score\", DataTypes.StringType, true);\n\t\tStructField score = DataTypes.createStructField(\"assessment_title\", DataTypes.DoubleType, true);\n StructField assessment_id2 = DataTypes.createStructField(\"assessment_type\", DataTypes.StringType, true);\n\t\tStructField trainee_id = DataTypes.createStructField(\"week_number\", DataTypes.DoubleType, true);\n fields = new ArrayList<StructField>();\n fields.add(grade_id);\n fields.add(date_received);\n fields.add(score);\n fields.add(assessment_id2);\n fields.add(trainee_id);\n schema = DataTypes.createStructType(fields);\t\t\n\t\tDataset<Row> data_grade = session.sqlContext().read().format(\"csv\").option(\"delimiter\", \"~\").option(\"header\", \"false\").schema(schema).load(input_grade);\n\t\tdata_grade.createOrReplaceTempView(\"caliber_grade\");\n\t\t\n //Executes SQL query to aggregate data\n\t\t\n\t\tDataset<Row> SpecificWeeksSubmittedTable = session.sqlContext().sql(\n\t\t \"SELECT temp.week_number_exam, temp2.week_number_verbal, caliber_batch.batch_id, caliber_batch.trainer_id FROM caliber_batch JOIN (SELECT caliber_assessment.week_number AS week_number_exam, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Exam' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp ON caliber_batch.batch_id = temp.batch_id FULL JOIN (SELECT caliber_assessment.week_number AS week_number_verbal, caliber_assessment.batch_id AS batch_id FROM caliber_assessment JOIN caliber_grade ON caliber_assessment.assessment_id=caliber_grade.assessment_id WHERE caliber_assessment.assessment_type = 'Verbal' GROUP BY caliber_assessment.batch_id, caliber_assessment.week_number) AS temp2 ON (caliber_batch.batch_id = temp2.batch_id and week_number_verbal = week_number_exam)\");\n\t\t\n\t\t//Write query results to S3\n\t\t\n\t\tSpecificWeeksSubmittedTable.coalesce(1).write().format(\"csv\").option(\"header\", \"true\").option(\"delimiter\", \"~\").mode(\"Overwrite\").save(output);\n\t}", "void onWeekNumberClick ( @NonNull MaterialCalendarView widget, @NonNull CalendarDay date );", "private void setProgramsForWeekTable()\r\n {\n long day = System.currentTimeMillis();\r\n long day2 = day + 1000 * 60 * 60 * 24; //seconds in day\r\n long day3 = day2 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day4 = day3 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day5 = day4 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day6 = day5 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day7 = day6 + 1000 * 60 * 60 * 24; //seconds in day\r\n\r\n String urlday = DownloadsManager.PROGRAMM_URL + day;\r\n String urlday2 = DownloadsManager.PROGRAMM_URL + day2;\r\n String urlday3 = DownloadsManager.PROGRAMM_URL + day3;\r\n String urlday4 = DownloadsManager.PROGRAMM_URL + day4;\r\n String urlday5 = DownloadsManager.PROGRAMM_URL + day5;\r\n String urlday6 = DownloadsManager.PROGRAMM_URL + day6;\r\n String urlday7 = DownloadsManager.PROGRAMM_URL + day7;\r\n\r\n String[] urls = {urlday, urlday2, urlday3, urlday4, urlday5, urlday6, urlday7};\r\n\r\n for (int i=0; i<urls.length; i++)\r\n {\r\n if(dataBase.getProgramsCount() == 0)\r\n setProgramsTable(urls[i]);\r\n else\r\n updateProgramsTable(urls[i]);\r\n }\r\n\r\n }", "@Test\n public void computeFactor_WinterTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-17 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-27 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-10-01 00:00:00\", \"2012-11-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "public void updateWeekday(){\n Date curDate=new Date(System.currentTimeMillis());\n SimpleDateFormat format=new SimpleDateFormat(\"EEEE\");\n String weekday1=format.format(curDate);\n int numberWeekday1=turnWeekdayToNumber(weekday1);\n updateSpecificDay(numberWeekday1);\n TextView TextWeekday=(TextView)this.findViewById(R.id.tv_weekday);\n TextWeekday.setText(weekday1);\n }", "public void displayNextWeek() {\n setDisplayedDateTime(currentDateTime.plusWeeks(1));\n }", "boolean getWeek6();", "public void simulate(int numberOfWeeks) {\n setChanged();\n notifyObservers(true);\n\n int finalWeek = weeksElapsed + numberOfWeeks;\n\n for (int i = weeksElapsed + 1; i <= finalWeek; i++) {\n ecosystem.simulateOneWeek(i);\n weeksElapsed++;\n //constructPoolList();\n constructPoolHashMap();\n }\n\n setChanged();\n notifyObservers(false);\n }", "public static int foodperWeek(){\n return 1;\n }", "protected void sequence_WEEKS(ISerializationContext context, WeekValue semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "private Week(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder setWeek7(boolean value) {\n bitField0_ |= 0x00000040;\n week7_ = value;\n onChanged();\n return this;\n }", "@FXML\n private void decrementWeek() {\n date = date.minusWeeks(1);\n updateDates();\n }", "public Week(LocalDate date) {\n days = new ArrayList<>();\n LocalDate monday = getStartOfWeek(date);\n days.add(monday);\n for (int i = 1; i < 7; i++) {\n days.add(monday.plusDays(i));\n }\n }", "DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();", "boolean getWeek1();", "public Weeks(BigDecimal numUnits) { super(numUnits); }", "public void setName(String n) {\r\n this.weekName = n;\r\n }", "private void fillWeek(Boolean canRepeatPoint) {\n Map<Long, List<Long>> workerPointMap = new LinkedHashMap<>();\n for (DayDTO day : week.getDays()) {\n // Generamos una lista con los trabajadores que ya han sido ocupados para este dia.\n List<Long> busyWorkersToday = checkBusyBreaks(day);\n for (TouristPointDTO touristPoint : touristPoints) {\n // Comprobamos que no existen turnos para este dia en este punto establecido ya.\n if (checkPointNotAssignedDay(day, touristPoint)) {\n // Comprobamos que existena algun trabajador con horas disponibles del equipo que necesitamos.\n if (haveAvailableHours(touristPoint)) {\n Iterator<Map.Entry<TouristInformerDTO, Double>> iterator = availableWorkersHours.entrySet().iterator();\n Map.Entry<TouristInformerDTO, Double> entry = iterator.next();\n // Si el trabajador no es correcto, busca el siguiente trabajador (si hay mas).\n while (iterator.hasNext()\n && !isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n entry = iterator.next();\n }\n // Si el trabajador es correcto lo asocia al punto ese dia.\n if (isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n associateShift(day, touristPoint, entry.getKey(), workerPointMap);\n // Actualizamos la lista de trabajadores ocupados para hoy\n busyWorkersToday.add(entry.getKey().getId());\n // Actualizamos las horas disponibles de esta semana para el trabajador\n entry.setValue(entry.getValue() - touristPoint.getTime());\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n }\n }\n orderByAvailableHours();\n }\n }", "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "boolean hasWeek6();", "int insert(AoD5e466WorkingDay record);", "private void nextDay() {\r\n tmp.setDay(tmp.getDay() + 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd++;\r\n if (nd > daysInWeek) nd -= daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }", "boolean hasWeek1();", "public void setNextWeek()\n\t{\n\t\tm_calendar.set(Calendar.WEEK_OF_MONTH,getWeekOfMonth()+1);\n\n\t}", "@Test\n public void testCreateAllocationScraperWorkerJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-25\");\n LocalDate endDate = LocalDate.parse( \"2018-10-06\" );\n while ( currentDate.isBefore( endDate ) ) {\n CloudbedsAllocationScraperWorkerJob workerJob = new CloudbedsAllocationScraperWorkerJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setAllocationScraperJobId( 440052 ); // dbpurge job (no recs)\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 7 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 7 ); // calendar page shows 2 weeks at a time\n }\n }", "public Builder setDayOfWeekStartingWithMonday1(final int dayOfWeekStartingWithMonday1) {\n this.dayOfWeekStartingWithMonday1 = dayOfWeekStartingWithMonday1;\n return this;\n }", "private void generateBreaks() {\n cexService.checkOrCreateBreakPoint();\n //Todos los dias menos el miercoles que es con el que va a compartir semana.\n List<DayOfWeek> dayRandomList = Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.THURSDAY,\n DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);\n TouristPointDTO randomBreakShift = new TouristPointDTO(touristPointRepository.findAll().stream()\n .filter(touristPoint -> touristPoint.getName().equals(\"Descanso Aleatorio\")).findFirst().get());\n //No deberiamos dar mas de x dias de bonus, porque podemos crear tantos descansos que no haya nadie para\n // trabajar en algun momento dado.\n if (lastWeekDatabase != null) {\n for (Day dayLastWeek : lastWeekDatabase.getDays()) {\n for (ShiftDTO shiftLastWeek : dayLastWeek.getShifts()\n .stream()\n .filter(shift -> shift.getPoint().getName().equals(\"Descanso\"))\n .map(ShiftDTO::new)\n .collect(Collectors.toList())) {\n ShiftDTO breakShift = new ShiftDTO();\n breakShift.setWorker(shiftLastWeek.getWorker());\n breakShift.setPoint(shiftLastWeek.getPoint());\n ShiftDTO breakShift2 = new ShiftDTO();\n breakShift2.setWorker(shiftLastWeek.getWorker());\n breakShift2.setPoint(shiftLastWeek.getPoint());\n ShiftDTO breakShift3 = new ShiftDTO();\n breakShift3.setWorker(shiftLastWeek.getWorker());\n breakShift3.setPoint(shiftLastWeek.getPoint());\n switch (dayLastWeek.getDayOfWeek()) {\n case MONDAY:\n addBreakDay(breakShift, DayOfWeek.WEDNESDAY);\n break;\n case TUESDAY:\n breakShift.setPoint(randomBreakShift);\n addBreakDay(breakShift, dayRandomList.stream()\n .skip((int) (dayRandomList.size() * Math.random()))\n .findFirst().get());\n break;\n case WEDNESDAY:\n addBreakDay(breakShift, DayOfWeek.THURSDAY);\n addBreakDay(breakShift3, DayOfWeek.FRIDAY);\n break;\n case THURSDAY:\n addBreakDay(breakShift, DayOfWeek.SATURDAY);\n break;\n case FRIDAY:\n addBreakDay(breakShift, DayOfWeek.SUNDAY);\n break;\n case SATURDAY:\n addBreakDay(breakShift, DayOfWeek.MONDAY);\n break;\n case SUNDAY:\n addBreakDay(breakShift, DayOfWeek.TUESDAY);\n break;\n }\n }\n }\n } else {\n List<TouristInformer> touristInformers = touristInformerRepository.findAll().stream()\n .filter(touristInformer -> touristInformer.getDismissDate() == null).collect(Collectors.toList());\n List<Team> teams = teamRepository.findAll();\n TouristPointDTO breakPoint = new TouristPointDTO(touristPointRepository.findAll().stream()\n .filter(touristPoint -> touristPoint.getName().equals(\"Descanso\")).findFirst().get());\n for (Team team : teams) {\n DayOfWeek lastStartBreak = DayOfWeek.MONDAY;\n for (TouristInformerDTO touristInformer : touristInformers.stream()\n .filter(touristInformer -> touristInformer.getTeam().equals(team))\n .map(TouristInformerDTO::new)\n .collect(Collectors.toList())) {\n ShiftDTO shift1 = new ShiftDTO();\n shift1.setWorker(touristInformer);\n shift1.setPoint(breakPoint);\n ShiftDTO shift2 = new ShiftDTO();\n shift2.setWorker(touristInformer);\n shift2.setPoint(breakPoint);\n switch (lastStartBreak) {\n case MONDAY:\n addBreakDay(shift1, DayOfWeek.WEDNESDAY);\n shift2.setPoint(randomBreakShift);\n addBreakDay(shift2, dayRandomList.stream()\n .skip((int) (dayRandomList.size() * Math.random()))\n .findFirst().get());\n lastStartBreak = DayOfWeek.WEDNESDAY;\n break;\n case WEDNESDAY:\n addBreakDay(shift1, DayOfWeek.THURSDAY);\n addBreakDay(shift2, DayOfWeek.FRIDAY);\n lastStartBreak = DayOfWeek.THURSDAY;\n break;\n case THURSDAY:\n addBreakDay(shift1, DayOfWeek.SATURDAY);\n addBreakDay(shift2, DayOfWeek.SUNDAY);\n lastStartBreak = DayOfWeek.SATURDAY;\n break;\n case SATURDAY:\n addBreakDay(shift1, DayOfWeek.MONDAY);\n addBreakDay(shift2, DayOfWeek.TUESDAY);\n lastStartBreak = DayOfWeek.MONDAY;\n break;\n }\n }\n }\n }\n }", "public Builder byWeekNo(Integer... weekNumbers) {\n\t\t\treturn byWeekNo(Arrays.asList(weekNumbers));\n\t\t}", "public Builder setWeekday(com.czht.face.recognition.Czhtdev.Week value) {\n if (weekdayBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n weekday_ = value;\n onChanged();\n } else {\n weekdayBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n return this;\n }", "public WeekPattern() {}", "public static void boarDay (Grid grid) {\n grid.weekday = dateArray[(int) (Math.random() * 7)];\n }", "boolean getWeek7();", "private int getWeekday() {\n Calendar cal = Calendar.getInstance();\n int i = cal.get(Calendar.DAY_OF_WEEK);\n int weekday = i == 1 ? 6 : (i - 2) % 7;\n myApplication.setWeekday(weekday);\n return weekday;\n }", "public PayPeriodCursor updateWeek(PayPeriod period) {\n\t\tString[] periodInfo = {period.getPayPeriod(), String.valueOf(period.getId())};\n\t\tCursor cursor = getWritableDatabase().rawQuery(UPDATE_WEEK, periodInfo);\n\t\treturn new PayPeriodCursor(cursor);\n\t}", "public static void main(String[] args) {\n\t\tWeekDay wd = new WeekDay();\n\t\t// 2\n\t\t\n\t\t// 4 확인\n\t\twd.input();\n\t\t// 4 확인\n\t\t\n\t\t// 6 확인\n\t\tString result = wd.week();\n\t\t\n\t\t// System.out.println(a);\n\t\t// 6 확인\n\t\t\n\t\twd.write(result);\n\t\t\n\n\t}", "boolean hasWeekday();", "public static String addWeeksToDate(String date, int numberOfWeeks) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\r\n\t\t\tDateTime dt = new DateTime((Date) sdf.parse(date));\r\n\t\t\tDateTime dt2 = dt.plusWeeks(numberOfWeeks);\r\n\t\t\treturn dt2.toString(\"yyyy-MM-dd\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn date;\r\n\t\t}\r\n\t}", "public void insertMilkWeight(LocalDate dateToSet, Integer milkWeight);", "@Test\n public void computeFactor_SummerTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-03-01 00:00:00\", \"2012-04-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "public static void writeWeek(String start, String end, Sheets service, String rangeStart, String rangeEnd) throws IOException {\n String total = start + \" - \" + end;\n List<List<Object>> values = Collections.singletonList(Collections.singletonList(total));\n ValueRange body = new ValueRange()\n .setValues(values);\n AppendValuesResponse result =\n service.spreadsheets().values().append(spreadsheetId, rangeStart + \":\" + rangeEnd, body)\n .setValueInputOption(\"USER_ENTERED\")\n .execute();\n }", "public int shiftWeekDay() {\r\n\t\treturn shiftWeekDay(this);\r\n\t}", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();", "@Override\r\n\tpublic void updateWorklow(Appointment a) throws DBAccessException {\n\t\tsteps = cr.getWorkflowSteps();\r\n\t\t\r\n\t\t// TODO Anhand des Termins die Objekte aus steps aktualisieren \r\n\t\t\r\n\t\t// da es bei Updates der App passieren kann, dass der Ablaufplan sich ändert, müssen vorherige Ablaufpläne gelöscht werden\r\n\t\tdb.deleteWorkflow();\r\n\t\t\r\n\t\tfor (Step step : steps) {\r\n\t\t\tint seperator = step.getTime().indexOf(\":\");\r\n\t\t\tString s = step.getTime().substring(0, seperator-1); // -1, damit das \":\" nicht dabei ist\r\n\t\t\tint hour = Integer.parseInt(s);\r\n\t\t\ts = step.getTime().substring(seperator+1); // +1, damit das \":\" nicht dabei ist\r\n\t\t\tint min = Integer.parseInt(s);\r\n\t\t\t// dieser Konstruktor ist zwar veraltet, aber für unseren Zweck perfekt\r\n\t\t\tstep.setTimestamp(new Timestamp(a.getYear(), a.getMonth(), a.getDay()-step.getDaysBefore(), hour, min, 0, 0));\r\n\t\t}\r\n\t\t\r\n\t\tdb.saveWorkflow(steps);\r\n\t\t\r\n\t}", "private void setWorkersWithConstraint(Map<Integer, DayWorkModel> workersCalendarWeek,\n\t\t\tEntry<Integer, List<WorkerModel>> workersByPossiblePostSize) throws FunctionalException {\n\n\t\tfor (WorkerModel worker : workersByPossiblePostSize.getValue()) {\n\t\t\t\n\t\t\tfor (Integer indexDay = 0; indexDay < 7; indexDay++) {\n\t\t\t\tDayWorkModel workersCalendarDay;\n\t\t\t\tif (workersCalendarWeek.containsKey(indexDay)) {\n\t\t\t\t\tworkersCalendarDay = workersCalendarWeek.get(indexDay);\n\t\t\t\t} else {\n\t\t\t\t\tworkersCalendarDay = new DayWorkModel(indexDay);\n\t\t\t\t}\n\t\t\t\tworkersCalendarDay.setWorker(worker, new ArrayList<>(workersCalendarWeek.values()));\n\t\t\t\n\t\t\t\tworkersCalendarWeek.put(indexDay, workersCalendarDay);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "boolean hasWeek7();", "public Builder byWeekNo(Collection<Integer> weekNumbers) {\n\t\t\tbyWeekNo.addAll(weekNumbers);\n\t\t\treturn this;\n\t\t}", "public Week() {\r\n for (int i = 0; i < 5; i++) {\r\n for (int j = 0; j < 13; j++) {\r\n weekData[i][j] = 0;\r\n }\r\n }\r\n }", "public void generateSchedule(){\n\t\t\n\t}", "public static Date addWeeks(final Date date, final int amount) {\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.add(Calendar.WEEK_OF_YEAR, amount);\n return calendar.getTime();\n }", "public void IncWeek(JLabel weeknoLabel)\r\n {\r\n weekNo += 1;\r\n if (weekNo > numberOfWeeks) { weekNo = 1; }\r\n weeknoLabel.setText(\" WEEK: \" + weekNo);\r\n }", "public Week getCopy() {\r\n Week w = new Week();\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n w.setOne(d, h, weekData[d][h]);\r\n w.setName(\"+Copy of \" + this.getName());\r\n }\r\n }\r\n return w;\r\n }", "public ItemWriter<WorkingHours> saveWorkingHours();", "void setUserVoteSalaryWeeklyDayOfWeek(DayOfWeek voteSalaryDayOfWeek);", "public com.czht.face.recognition.Czhtdev.Week.Builder getWeekdayBuilder() {\n bitField0_ |= 0x00000010;\n onChanged();\n return getWeekdayFieldBuilder().getBuilder();\n }", "public static void SetToNextDayOfWeek(int dayOfWeekToSet, Calendar c){\r\n c.add(Calendar.DAY_OF_YEAR, 1);\r\n int currentDayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n Log.d(\"currentDay\", String.valueOf(currentDayOfWeek));\r\n Log.d(\"setDay\", String.valueOf(dayOfWeekToSet));\r\n DateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy\");\r\n Log.d(\"addDay\", sdf.format(c.getTime()));\r\n //add 1 day to the current day until we get to the day we want\r\n while(currentDayOfWeek != dayOfWeekToSet){\r\n c.add(Calendar.DAY_OF_YEAR, 1);\r\n currentDayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n }\r\n }", "public static void addMealtime(Week w) {\n\t\tMealTime mt = null;\n\t\t\n\t\tint day = Utility.askInt(\"Which week day(1-7): \");\n\t\t\n\t\tCLI.printMealTitles();\n\t\t\n\t\tint mid = Utility.askInt(\"Select meal id: \");\n\t\t\n\t\tmt = amt.add(new MealTime(0, ameal.get(mid), 0, w.getDay(day).getId()));\n\t\t\n\t\tUtility.printString(\"Mealtime added\\n\");\n\t}", "public void addDailySteps(int steps) {\n totalSteps+=steps;day++;\n if (steps>=STEPS) activeDay++;\n }", "WeekdaySpec getStart();", "public void incrementDay(){\n //Step 1\n this.currentDate.incrementDay();\n //step2\n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementDay();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementDay();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementDay();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementDay();\n //step 3\n if (this.getDate().getDay() == 1) {\n \n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementMonth();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementMonth();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementMonth();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementMonth();\n }\n \n }", "@RequestMapping(value = \"/week/batchid/{batchId}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable(\"batchId\") int batchId) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByBatchId(batchId);\n\t\t\t\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "@FXML\n private void updateDates() {\n WeekFields weekFields = WeekFields.of(Locale.ENGLISH);\n weekNumber = date.get(weekFields.weekOfWeekBasedYear());\n weekNr.setText(\"\" + weekNumber);\n\n /* Update drawn events when changing week */\n drawEventsForWeek();\n \n\t\t/* Set current month/year */\n month_Year.setText(date.getMonth() + \" \" + date.getYear());\n\t\t\n\t\t/* Set date of weekday_labels */\n for (int i = 0; i < weekday_labels.size(); i++) {\n int date_value = date.with(DayOfWeek.MONDAY).plusDays(i).getDayOfMonth();\n weekday_labels.get(i).setText(\"\" + date_value + \".\");\n }\n }", "public void createRecurringFromFile(String name, String[] arr) {\n\t\t// TODO Auto-generated method stub\n\t\tchar[] days = arr[0].toCharArray();\n\t\tLocalTime stime = LocalTime.parse(arr[1]);\n\t\tLocalTime etime = LocalTime.parse(arr[2]);\n\t\tLocalDate sdate = LocalDate.parse(arr[3]);\n\t\tLocalDate edate = LocalDate.parse(arr[4]);\n\n\t\tint[] dayNum = new int[days.length];\n\t\tfor(int i = 0; i<days.length; i++) {\n\t\t\tif(days[i] == 'M') {\n\t\t\t\tdayNum[i] = 1;\n\t\t\t}\n\t\t\telse if(days[i] == 'T') {\n\t\t\t\tdayNum[i] = 2;\n\t\t\t}\n\t\t\telse if(days[i] == 'W') {\n\t\t\t\tdayNum[i] = 3;\n\t\t\t}\n\t\t\telse if(days[i] == 'R') {\n\t\t\t\tdayNum[i] = 4;\n\t\t\t}\n\t\t\telse if(days[i] == 'F') {\n\t\t\t\tdayNum[i] = 5;\n\t\t\t}\n\t\t\telse if(days[i] == 'A') {\n\t\t\t\tdayNum[i] = 6;\n\t\t\t}\n\t\t\telse if(days[i] == 'S') {\n\t\t\t\tdayNum[i] = 7;\n\t\t\t}\n\t\t}\n\n\t\tfor(LocalDate d = sdate; !d.isAfter(edate); d = d.plusDays(1)) {\n\t\t\tfor(int i = 0; i<dayNum.length; i++) {\n\t\t\t\tif(d.getDayOfWeek().getValue() == dayNum[i]) {\n\t\t\t\t\tEvent e = new Event(name, sdate, d, edate, stime, etime, arr[0]);\n\t\t\t\t\tcreateEvent(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEvent rEvent = new Event(name, sdate, null, edate, stime, etime, arr[0]);\n\t\trecurringEvents.add(rEvent);\n\t}", "private void setWorkersWithoutConstraint(Map<Integer, DayWorkModel> workersCalendarWeek,\n\t\t\tEntry<Integer, List<WorkerModel>> workersByPossiblePostSize) throws FunctionalException {\n\t\tfor (Integer indexDay = 0; indexDay < 7; indexDay++) {\n\t\t\tDayWorkModel workersCalendarDay;\n\t\t\tif (workersCalendarWeek.containsKey(indexDay)) {\n\t\t\t\tworkersCalendarDay = workersCalendarWeek.get(indexDay);\n\t\t\t} else {\n\t\t\t\tworkersCalendarDay = new DayWorkModel(indexDay);\n\t\t\t}\n\t\t\tfor (WorkerModel worker : workersByPossiblePostSize.getValue()) {\n\t\t\t\tworkersCalendarDay.setWorker(worker, new ArrayList<>(workersCalendarWeek.values()));\n\t\t\t}\n\t\t\t\n\t\t\tworkersCalendarWeek.put(indexDay, workersCalendarDay);\n\t\t}\n\t}", "public Builder clearWeek1() {\n bitField0_ = (bitField0_ & ~0x00000001);\n week1_ = false;\n onChanged();\n return this;\n }", "int calDateWeek(int mC,int yC,int mG,int yG){\n int x = 0,i,countW=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countW+=52;\n }\n\n countW -= mC;\n countW += mG;\n countW *= 4;\n return (countW);\n }", "boolean getWeek5();", "public int getCurrentWeek()\n {\n\n return sem.getCurrentWeek(startSemester,beginHoliday,endHoliday,endSemester);\n }", "protected void runEachDay() {\n \n }", "public static void activateProjectScheduling(Week week, NonFixedTask[] projectTasksToSchedule){\n//\n NonFixedTask[] projectTasksToPut = Scheduler.ScheduleProject(week, projectTasksToSchedule);\n Putter.putProject(projectTasksToPut[0].getName(), week, projectTasksToPut);\n }", "String addDay(String userName, int dayOfYear);" ]
[ "0.65875065", "0.6558347", "0.65580714", "0.6380558", "0.6037874", "0.6023578", "0.58379006", "0.5832478", "0.5749997", "0.5721655", "0.5639546", "0.56266546", "0.55719304", "0.55510587", "0.5527126", "0.5523246", "0.55103236", "0.5507955", "0.5492847", "0.5482466", "0.54736596", "0.54499495", "0.5441621", "0.53885996", "0.53755707", "0.5370684", "0.53549933", "0.5351577", "0.53348684", "0.533189", "0.5327075", "0.52918303", "0.528739", "0.5284441", "0.52759135", "0.52526945", "0.5237458", "0.5235703", "0.5229298", "0.5228258", "0.5216269", "0.5214888", "0.5212087", "0.52085066", "0.52033067", "0.5188246", "0.5185031", "0.51845056", "0.5182869", "0.518209", "0.5177226", "0.51549935", "0.514854", "0.5148388", "0.51370066", "0.51297677", "0.5126754", "0.5121493", "0.51191014", "0.5116342", "0.507967", "0.50794667", "0.5057088", "0.50565875", "0.50551456", "0.5048454", "0.50340086", "0.5030695", "0.50188076", "0.50132024", "0.50009775", "0.49982044", "0.49969286", "0.49752355", "0.49716645", "0.49647862", "0.49593616", "0.495261", "0.49502662", "0.49461067", "0.4929674", "0.4929035", "0.4928548", "0.4924688", "0.49210328", "0.49195772", "0.49155155", "0.49153417", "0.49151126", "0.4909752", "0.49080047", "0.48928952", "0.48839772", "0.48730665", "0.48635644", "0.48634967", "0.48522404", "0.48521063", "0.485115", "0.48497984" ]
0.6107663
4
Make sure popular links panel is on the homepage
@Override public void performTestCase() throws InterruptedException { assertTrue(waitAndGetElement(new ByXPath(popularLinksPanelId)).isDisplayed()); //click to UrlMaps page waitAndGetElement(new ByXPath(urlMapsLinkId)).click(); //validate urlMaps page contains data assertTrue(waitAndGetElement(new ByXPath(urlMapsPanelId)).isDisplayed()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHomeLinkPresent() {\r\n\t\treturn isElementPresent(groupListSideBar.replace(\"Group List\", \"Home\"), SHORTWAIT);\r\n\t}", "boolean hasHasInstitutionHomePage();", "public boolean hasLinkPanel(ItemStack page);", "public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }", "public boolean isSetHomepage() {\n return this.homepage != null;\n }", "public boolean isHomeCollection();", "public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}", "public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }", "@Test(priority = 1)\r\n\tpublic void testHomePage() {\r\n\t\tdriver.navigate().to(HomePage.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tHomePage.clickAnnouncementButton(driver);\r\n\t\tHomePage.clickCookiesButton(driver);\r\n\r\n\t\tHomePage.clickLogin(driver);\r\n\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}", "@Override\n\tpublic boolean goHomePage(PageContext context) {\n\t\treturn false;\n\t}", "public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }", "@Given(\"I am on Magalu HomePage\")\n\tpublic void i_am_on_the_homepage() {\n\t\tdriver.get(Homeurl);\n\t}", "public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}", "@Override\n\tpublic boolean shouldVisit(Page page, WebURL url) {\n\t\tString href = url.getURL().toLowerCase();\n\t\treturn !FILTERS.matcher(href).matches()\n\t\t\t\t&& (href.startsWith(\"http://www.amarujala.com/education\"));\n\t\t\t\t/*\n\t\t\t\t|| href.startsWith(\"http://www.amarujala.com/crime\"));\n\t\t\t\t*/\n\t}", "boolean hasLandingPageView();", "@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}", "String getOssHomepage();", "protected boolean titlePageNeeded(){\n return true;\n }", "boolean hasPage();", "boolean hasPage();", "@Test(priority = 4)\n\tpublic void homePageRedirection() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect(validate);\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the Hero Image Product Validation testing\");\n\n\t}", "@Override\n public boolean shouldVisit(Page referringPage, WebURL url) {\n\t String href = url.getURL();\n\t allUrlsObject.visitAllUrls(referringPage,url);\n\t // to keep track of all the urls extracted\n\t urlsExtracted++;\n\t uniqueUrlsExtracted.add(href);\n\t return href.startsWith(\"http://www.nytimes.com/\");\n}", "@Test(priority = 1)\n\tpublic void homePageRedirection() {\n\t\tlogger = extent.startTest(\"Flight Booking\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect();\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the homepage testing\");\n\t}", "boolean hasHadithUrl();", "@Override\n public boolean shouldVisit(Page referringPage, WebURL url) {\n String href = url.getURL().toLowerCase();\n LOGGER.trace(\"Determining if clear web crawler should visit: \" + href);\n return !FILTERS.matcher(href).matches() && url.getURL().toLowerCase().startsWith(\"https://www.reddit.com\");\n }", "@Given(\"^user is on the main page of website$\")\n public void userIsOnTheMainPageOfWebsite() {\n }", "@Test(priority =3)\n\t public void validatehomepage() throws InterruptedException \n\t {\n\t\t\n\t\tdriver.findElement(By.linkText(\"Unit and Extension test\")).isDisplayed(); \n\t\t\n\t }", "private boolean isConsumerHomePage() throws Exception {\n\n\t\tif (wh.isElementPresent(HomePageUI.verifyHomepage, 3) || \n\t\t\t\twh.isElementPresent(HomePageUI.verifyHomepage1, 3)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "public void verifyHhsLink() {\n dhhsFooterLink.assertState().enabled();\n dhhsFooterLink.assertContains().text(\"Department of Health & Human Services\");\n }", "private boolean isCurrent(){\n return (getPageTitle().size() > 0);\n }", "@Given(\"^user is on home page of website$\")\n public void userIsOnHomePageOfWebsite() {\n\n }", "protected boolean isHomeRefreshable()\r\n/* 92: */ {\r\n/* 93:178 */ return false;\r\n/* 94: */ }", "@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}", "@Test(priority=10)\n\tpublic void verifyOverviewLinIsHighlightedByDefaultAfterLogin() throws Exception {\n\t\tOverviewTradusPROPage overviewObj= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewObj.overviewLinkOnSideBar);\n\t Assert.assertTrue(getText(overviewObj.highlightedTab).equals(\"Overview\"),\n\t\t\t\t\"Overview link is not highlighted by default\");\n\t}", "public int numberOfOpenSites(){ return openSites; }", "public boolean hasLink() {\n return !links.isEmpty();\n }", "@Given(\"^User is on Home Page$\")\r\n\tpublic void user_is_on_Home_Page() throws Throwable {\n\t\tsetBrowser();\r\n\t\tsetBrowserConfig();\r\n\t\tdriver.get(\"http://demowebshop.tricentis.com/\");\r\n\t}", "public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "@When(\"I am on Home page\")\n public void homepage_i_am_on_home_page() {\n homePage = new HomePage(driver);\n homePage.check_page_title();\n }", "public void welComeLink()\r\n\t{\r\n\t\tboolean welcome = welComeLinkElement.isDisplayed();\r\n\t\tAssert.assertTrue(welcome);\r\n\t\t\r\n\t}", "HtmlPage clickSiteLink();", "private void getMarkAsTopNewsLinkPanel() {\n\t\ttry{\n\t\t\tMarkAsTopNewsLinkPanel asTopNewsLinkPanel = new MarkAsTopNewsLinkPanel(newsItem,feedNewsPresenter);\n\t\t\toptionPanel.add(asTopNewsLinkPanel);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }", "public abstract void pageDisplayed();", "@Feature(value = \"Site testing\")\n @Stories(value = {@Story(value = \"Main page functionality\"),\n @Story(value = \"Service page functionality\")})\n @Test(priority = 1)\n public void mainPageTitleBeforeLoginTest() {\n checkMainPageTitle(mainPage);\n }", "@Test(enabled = true)\n public void checkLink() {\n System.out.println(\"We Are Now Testing 20 Test Cases On: \" + driver.getCurrentUrl());\n System.out.println(\"*****************************************************************\");\n\n String expectedLink = \"https://www.expedia.com/\";\n String actualLink = driver.getCurrentUrl();\n\n //Validate Links\n Assert.assertEquals(actualLink, expectedLink, \"Test Failed, Link Does Not Match\");\n\n }", "@Override\n\tpublic void setDisplayShowHomeEnabled(boolean showHome) {\n\t\t\n\t}", "@Test\r\n public void testHomePageButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"HomePageButton\", false);\r\n tester.assertRenderedPage(GreenOMeterPage.class);\r\n }", "public int numberOfOpenSites() {\n return 0;\n }", "public void verifyCmsLink() {\n cmsFooterLink.assertState().enabled();\n cmsFooterLink.assertContains().text(\"CMS\");\n }", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }", "private boolean getLinks() {\n return false;\n }", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "boolean hasUrl();", "@Test(priority = 28)\r\n\tpublic void removalUserLinkCheckAnew() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}", "public void clickOnHome() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_home\");\n\t\twait.waitForElementToBeClickable(element(\"link_home\"));\n\t\texecuteJavascript(\"document.getElementById('doctor-home').getElementsByTagName('i')[0].click();\");\n//\t\t element(\"link_home\").click();\n\t\tlogMessage(\"user clicks on Home\");\n\t}", "public boolean isShowLinksToUi() {\r\n return this.getDefaultGroup() != null;\r\n }", "public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}", "private void checkToHome() {\n toolbar.setTitle(R.string.find_food);\n homeFragment = new HomeFragment();\n if (searchMenuItem != null) {\n searchMenuItem.setVisible(true);\n }\n displaySelectedFragment(homeFragment);\n }", "@Override\n public void verifyHomepageLandingForTestingOnly() {\n throw new UnimplementedTestException(\"Implement me!\");\n }", "@Override\n protected void isLoaded(){\n String url = driver.getCurrentUrl();\n Assert.assertTrue(url.contains(\"users\"), \"Not on Login page: \".concat(url));\n }", "private boolean isMenuPage(Document parsed) {\n boolean isCorrect = false;\n Element heading = parsed.getElementById(\"heading\");\n if (heading == null) {\n return false;\n }\n if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) {\n isCorrect = true;\n }\n Elements selected = parsed.getElementsByTag(\"article\");\n if (selected.size() != 1) {\n return false;\n } else {\n Attributes articleAttributes = selected.first().attributes();\n if (articleAttributes.size() != 2) {\n return false;\n }\n if (articleAttributes.asList().contains(new Attribute(\"id\", \"main\"))) {\n if ((articleAttributes.asList().contains(new Attribute(\"class\", \"wholePage\")))) {\n isCorrect = true;\n }\n }\n }\n Element menu = parsed.getElementById(\"sixItems\");\n if (menu == null) {\n return false;\n }\n return isCorrect;\n }", "protected boolean isHomeAsUpEnabled() {\n return true;\n }", "@Test\n\tpublic void homepage()\n\t{\n\t//WebDriver driver = null;\n\t\t//Welcome_MurcuryTours wt=PageFactory.initElements(driver,Welcome_MurcuryTours.class);\n\t\tWelcome_MurcuryTours wt=PageFactory.initElements(driver, Welcome_MurcuryTours.class);\n\twt.signOn();\n\tdriver.navigate().back();\n\twt.register();\n\t\n\t}", "@Test\n\tpublic void isGalleryLinkDisplayed() {\n\t\tboolean galleryLink = false;\n\n\t\ttry {\n\t\t\tgalleryLink = driver.findElement(By.xpath(\"//a[contains(text(),'Gallery')]\")).isDisplayed();\n\t\t} catch (NoSuchElementException e) {\n\t\t\tdriver.navigate().refresh();\n\t\t\tgalleryLink = driver.findElement(By.xpath(\"//a[contains(text(),'Gallery')]\")).isDisplayed();\n\t\t}\n\t\tAssert.assertEquals(galleryLink, true);\n\t}", "public static void main(String[] args) {\n\t\tWebDriver driver = new FirefoxDriver();\n\t\tdriver.navigate().to(\"https://www.infinitecampus.com/\");\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tWebElement HeaderBlock = driver.findElement(By.xpath(\".//*[@id='career_site_home_page']/header\"));\n\t\t\n\t\tList <WebElement> HeaderLinks = HeaderBlock.findElements(By.tagName(\"a\"));\n\t\tSystem.out.println(HeaderLinks.size());\n\t\t\n\t\tfor (int i=0; i<HeaderLinks.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(HeaderLinks.get(i).getText());\n\t\t\tString LinkName = HeaderLinks.get(i).getText();\n\t\t\tHeaderLinks.get(i).click();\n\t\t\tSystem.out.println(driver.getTitle());\n\t\t\tSystem.out.println(driver.getCurrentUrl());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tdriver.navigate().back();\n\t\t\t//Sleeper.sleepTight(10);\n\t\t\t\n\t\t\tHeaderBlock = driver.findElement(By.xpath(\".//*[@id='career_site_home_page']/header\"));\n\t\t\tHeaderLinks= HeaderBlock.findElements(By.tagName(\"a\"));\n\t\t} \n\t\t\n\t\tdriver.close();\n\t}", "public String getHomePageUrl()\n\t{\n\t\treturn elementUtils.getWebPageUrl();\n\t}", "public boolean isShowHomeLayout() {\n return isShowHomeLayout;\n }", "@Then(\"^User is redirect on home page$\")\n\tpublic void redirectToHomePage() throws Throwable {\n\t\tThread.sleep(2000);\n\t\tisElementPresent(driver, By.className(\"user-menu\"));\n\t}", "public void setDisplayFromSite(Site site)\r\n {\r\n this.displayFromSite = site;\r\n }", "public boolean isWebShowing();", "@Test(enabled = true)\n public void mainLogo() {\n WebElement element = driver.findElement(By.className(\"large-logo\"));\n element.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n //Variables\n String expectedLink = \"https://www.expedia.com/\";\n String actualLink = driver.getCurrentUrl();\n String expectedTitle = \"Expedia Travel: Vacation Homes, Hotels, Car Rentals, Flights & More\";\n String actualTitle = driver.getTitle();\n\n //Validate Links\n Assert.assertEquals(actualLink, expectedLink, \"Test Failed, Link Does Not Match\");\n Assert.assertEquals(actualTitle, expectedTitle, \"Title Does not match, Test Failed.\");\n }", "boolean hasPageHelper();", "boolean hasPageHelper();", "boolean hasPageHelper();", "private boolean checkSiteVisited(String url)\r\n\t{\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tif (webVisited[0][i].equals(url))\t\t\t//this url has been visited by user before\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "boolean hasExpandedLandingPageView();", "public void goHome() {\n shouldWork = false;\n }", "@Test\n public void userCanNotAccessHomePageWhenNotLoggedIn() {\n TestUtils.getHomePage(driver, appUrl);\n assertTrue(driver.getCurrentUrl().contains(LoginPage.LOGIN_PATH));\n LoginPage loginPage = new LoginPage(driver);\n assertTrue(loginPage.pageLoaded());\n }", "boolean isVisited();", "boolean isVisited();", "public boolean veirfyUserOnSummerDressesPage(){\n WebElement page = driver.findElement(By.cssSelector(\"div[class='cat_desc']\"));\n boolean pageStatus = page.isDisplayed();\n return pageStatus;\n }", "@Test\n public void clickFaqLink() {\n homePage.clickAboutLink().clickFaqLink();\n }", "public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}", "@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }", "public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }", "public void viewListofHomes() {\n\t\ttry {\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to get list of homes\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to get list of homes\");\n\t\t}\n\t}", "@Test\n public void testNumLinks()\n {\n String[] navLinks = {\"CS1632 D3 Home\", \"Factorial\", \"Fibonacci\", \"Hello\", \"Cathedral Pics\"};\n int numLinks = 0;\n\n for (int i = 0; i < navLinks.length; i++) {\n driver.findElement(By.linkText(navLinks[0])).click();\n List<WebElement> links = driver.findElements(By.tagName(\"a\"));\n assertEquals(5, links.size());\n }\n }", "public abstract boolean isLoggedIn(String url);", "public boolean clickMyWebinarsLink(){\n\t\tif(util.clickElementByLinkText(\"My Webinars\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> My Webinar link clicked successfully...............\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n \t\t\n \t}", "void addHasInstitutionHomePage(Object newHasInstitutionHomePage);", "@Test (groups = {\"Regression\"})\n public void verifyElementsOnHarrowWebsiteHomePageAreDisplayed() {\n homePage.isDisplayedServicesBtn();\n }", "public void checkOtherFooterLinks(String linkText,String url,String finder,String pageText){\n\t\tWebElement labelLink = driver.findElement(By.xpath(linkText));\n\t\tlabelLink.click();\n\t\tassertTrue(driver.getCurrentUrl().equals(url), \"Page is missing\");\n\t\t\n\t\tif(driver.getCurrentUrl().equals(url)){\n\t\t\tWebElement text = driver.findElement(By.xpath(finder));\n\t\t\tString ideaPageText = text.getText();\n\t\t\tassertEquals(ideaPageText,pageText,\"Text mismatch\");\n\t\t\t}\n\t\tdriver.navigate().back();\n\t\t}", "@Test(priority = 5)\n\tpublic void testHandScoreLinkEnabled(){\n\t\t\n\t\tdashBoardPage = loginPage.loginSuccess(unitytestdata.getProperty(\"testDomainTeacher\"),\n\t\t\t\tunitytestdata.getProperty(\"genericPassword\"));\n\t\tdashBoardPage.addTiles();\n\t\treportPage = dashBoardPage.goToReports();\n\t\twaitTime();\n\t\treportPage.filterReportByClassRoster(testrosterName);\n\t\twaitTime();\n\t\treportPage.filterReportByContentArea(\"N/A\");\n\t\twaitTime();\n\t\treportPage.openTestEventDetail(testName4);\n\t\tcustomeWaitTime(5);\n\t\tsoftAssert.assertTrue(reportPage.waitForElementVisible(reportPage.HandscoreThisTestButton));\n\n\t\t\n\t}", "private void getHomePage(final WebDriver webDriver) {\r\n\t\twebDriver.get(HTML_URL);\r\n\t\tcheckTitle(webDriver);\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}" ]
[ "0.6768518", "0.639202", "0.6329185", "0.6271072", "0.6158297", "0.61185116", "0.61052835", "0.6080955", "0.60260934", "0.59024435", "0.5855887", "0.5815508", "0.581216", "0.5786235", "0.57779056", "0.57753664", "0.57570004", "0.57506835", "0.57181036", "0.57181036", "0.5707819", "0.5668674", "0.56684715", "0.5625481", "0.5612874", "0.55914646", "0.5581635", "0.5541796", "0.5539117", "0.5509412", "0.5503914", "0.5471063", "0.5464911", "0.54505485", "0.5447581", "0.5446742", "0.54405856", "0.5438756", "0.54382145", "0.54286927", "0.5427484", "0.541732", "0.5414536", "0.54120654", "0.53961694", "0.5391369", "0.53913003", "0.53885204", "0.53665024", "0.53581685", "0.5342833", "0.53400683", "0.533534", "0.53273267", "0.5324514", "0.5324514", "0.5324514", "0.5324514", "0.5324514", "0.53207326", "0.5319679", "0.53191936", "0.53010106", "0.5293779", "0.52885175", "0.5273473", "0.52554643", "0.5250741", "0.5236037", "0.5219835", "0.52186865", "0.5209859", "0.5207002", "0.5202916", "0.5200538", "0.51972246", "0.5192455", "0.5191382", "0.5191382", "0.5191382", "0.51831216", "0.5172257", "0.5169678", "0.51686925", "0.5168086", "0.5168086", "0.51641864", "0.51641095", "0.51636577", "0.5161288", "0.5158305", "0.5156711", "0.5147699", "0.51406", "0.513551", "0.5135253", "0.51290005", "0.51283646", "0.51196975", "0.5119586", "0.511712" ]
0.0
-1
Tira ele dos grupos em que estah
public static void Remover(ChatSkeleton user) { for (Grupo b : ListaOnline.getGrupos()) { for (Usuario u : b.getGrupo()) { if (u.equals(user.getUser())) { b.getGrupo().remove(user.getUser()); } } } for (ChatSkeleton u : ListaOnline.getTodos()) { if (u.equals(user)) { ListaOnline.getTodos().remove(user); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "Gruppo getGruppo();", "private void armarGrupoEstado() {\n //se le agrega la logica para que solo se pueda seleccionar de a uno\n grupoEstado= new ToggleGroup();\n grupoEstado.getToggles().addAll(radSoltero,radCasado,radViudo,radDivorciado);\n grupoEstado.selectToggle(radSoltero);\n }", "private void idGrupos() {\n\t\tmyHorizontalListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tURL_BOOKS = \"http://tutoriapps.herokuapp.com/api/v1/groups/\"\n\t\t\t\t\t\t+ gid[position].toString() + \"/books.json?auth_token=\";\n\t\t\t\tposicionId = gid[position].toString();\n\t\t\t\tvalorUltimo = 0;\n\t\t\t\tnuevo = 0;\n\t\t\t\taa.clear();\n\t\t\t\tgetData();\n\t\t\t}\n\t\t});\n\t}", "private boolean setPermessiRicevuti(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"checkbox\").concat(utente)).equals(\"true\")) {\r\n if (!ricevuti.getGruppi().contains(g)) {\r\n ricevuti.getGruppi().add(g);\r\n }\r\n } else if (request.getParameter((\"checkbox\").concat(utente)).equals(\"false\")) {\r\n ricevuti.getGruppi().remove(g);\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "public void groupSelectedFurniture() {\n List<HomePieceOfFurniture> selectedFurniture = getMovableSelectedFurniture();\n if (!selectedFurniture.isEmpty()) {\n final boolean basePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n // Sort the grouped furniture in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> groupedFurnitureMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>>();\n int groupedFurnitureCount = 0;\n for (HomePieceOfFurniture piece : selectedFurniture) {\n HomeFurnitureGroup group = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomePieceOfFurniture> sortedMap = groupedFurnitureMap.get(group);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomePieceOfFurniture>();\n groupedFurnitureMap.put(group, sortedMap);\n }\n if (group == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(group.getFurniture().indexOf(piece), piece);\n }\n groupedFurnitureCount++;\n }\n final HomePieceOfFurniture [] groupedPieces = new HomePieceOfFurniture [groupedFurnitureCount]; \n final int [] groupedPiecesIndex = new int [groupedPieces.length];\n final Level [] groupedPiecesLevel = new Level [groupedPieces.length];\n final float [] groupPiecesElevation = new float [groupedPieces.length];\n final boolean [] groupPiecesVisible = new boolean [groupedPieces.length];\n final HomeFurnitureGroup [] groupedPiecesGroups = new HomeFurnitureGroup [groupedPieces.length];\n Level minLevel = this.home.getSelectedLevel();\n int i = 0;\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> sortedMapEntry : groupedFurnitureMap.entrySet()) {\n for (Map.Entry<Integer, HomePieceOfFurniture> pieceEntry : sortedMapEntry.getValue().entrySet()) {\n HomePieceOfFurniture piece = pieceEntry.getValue();\n groupedPieces [i] = piece;\n groupedPiecesIndex [i] = pieceEntry.getKey();\n groupedPiecesLevel [i] = piece.getLevel();\n groupPiecesElevation [i] = piece.getElevation();\n groupPiecesVisible [i] = piece.isVisible();\n groupedPiecesGroups [i] = sortedMapEntry.getKey();\n if (groupedPiecesLevel [i] != null) {\n if (minLevel == null\n || groupedPiecesLevel [i].getElevation() < minLevel.getElevation()) {\n minLevel = groupedPiecesLevel [i];\n }\n }\n i++;\n }\n } \n final HomeFurnitureGroup group;\n if (selectedFurniture.indexOf(this.leadSelectedPieceOfFurniture) > 0) {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces), this.leadSelectedPieceOfFurniture);\n } else {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces));\n }\n // Store piece elevation that could have been updated during grouping\n final float [] groupPiecesNewElevation = new float [groupedPieces.length];\n i = 0;\n for (HomePieceOfFurniture piece : groupedPieces) {\n groupPiecesNewElevation [i++] = piece.getElevation();\n }\n TreeMap<Integer, HomePieceOfFurniture> homeSortedMap = groupedFurnitureMap.get(null);\n final int groupIndex = homeSortedMap != null \n ? homeSortedMap.lastKey() + 1 - groupedPieces.length\n : homeFurniture.size();\n final boolean movable = group.isMovable();\n final Level groupLevel = minLevel;\n \n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doUngroupFurniture(new HomeFurnitureGroup [] {group}, groupedPieces, \n groupedPiecesGroups, groupedPiecesIndex, groupedPiecesLevel, basePlanLocked, allLevelsSelection);\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesElevation [i]);\n groupedPieces [i].setVisible(groupPiecesVisible [i]);\n }\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesNewElevation [i]);\n groupedPieces [i].setLevel(null);\n }\n group.setMovable(movable);\n group.setVisible(true);\n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoGroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "public String getListaGrupos () {\n String nomesGruposList = \"\";\n if(this.conversas != null && this.conversas.size() > 0){\n for(int i = 0; i < this.conversas.size(); i++){\n //nomesGruposList += conversas.get(i).nomeGrupo + \" \";\n }\n }\n return nomesGruposList;\n }", "private JPanel getPAbmGrupos() {\r\n if (pAbmGrupos == null) {\r\n lInfo = new JLabel();\r\n lInfo.setBounds(new Rectangle(0, 240, 370, 30));\r\n lInfo.setHorizontalAlignment(SwingConstants.CENTER);\r\n lInfo.setHorizontalTextPosition(SwingConstants.CENTER);\r\n \r\n lInfo.setText(\"\");\r\n lId = new JLabel();\r\n lId.setBounds(new Rectangle(10, 20, 90, 20));\r\n lId.setText(\"Id Grupo\");\r\n lNombre = new JLabel();\r\n lNombre.setBounds(new Rectangle(10, 45, 90, 20));\r\n lNombre.setText(\"Nombre\");\r\n pAbmGrupos = new JPanel();\r\n pAbmGrupos.setLayout(null);\r\n pAbmGrupos.add(lNombre);\r\n pAbmGrupos.add(getTNombre());\r\n pAbmGrupos.add(getBGuardar());\r\n pAbmGrupos.add(getBCancelar());\r\n pAbmGrupos.add(getBEliminar());\r\n pAbmGrupos.add(getPGrupos());\r\n pAbmGrupos.add(getTBuscar());\r\n pAbmGrupos.add(getBBuscar());\r\n pAbmGrupos.add(getBNuevo(), null);\r\n pAbmGrupos.add(lId, null);\r\n pAbmGrupos.add(getTId(), null);\r\n pAbmGrupos.add(lInfo, null);\r\n \r\n }\r\n return pAbmGrupos;\r\n }", "public void actualizarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(7);\n \tgrado.setDescripcionSeccion(\"Secundaria\");\n \tgrado.setNumGrado(6);\n \tgrado.setDescripcionUltimoGrado(\"SI\");\n \tString respuesta = negocio.actualizarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public void mezclarPorGrado() {\n\t\tint i = 0;\n\t\tint inicio = 0;\n\t\tint fin = 0;\n\t\tint grado = 0;\n\t\tNodo aux;\n\t\tRandom r = new Random();\n\t\tboolean[] mezclado = new boolean[cantNodos];\n\n\t\twhile (i < cantNodos) {\n\t\t\tinicio = i;\n\t\t\tgrado = nodos.get(i).getGrado();\n\t\t\twhile (i < cantNodos && nodos.get(i).getGrado() == grado)\n\t\t\t\ti++;\n\n\t\t\tfin = i;\n\n\t\t\tfor (int k = inicio; k < (fin - inicio); k++) {\n\t\t\t\tint res = r.nextInt(fin - inicio);\n\t\t\t\tif (mezclado[k])\n\t\t\t\t\tres = r.nextInt(fin - inicio);\n\t\t\t\taux = nodos.get(k);\n\t\t\t\tmezclado[k] = true;\n\t\t\t\tnodos.set(k, nodos.get(inicio + res));\n\t\t\t\tnodos.set(inicio + res, aux);\n\t\t\t}\n\t\t}\n\t\tvalidarMezcla();\n\t}", "private String agrupar(Grupo grupo) throws CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n grupo.setTipo(Juego.TGRUPO);\n for (Personaje p : this.getPersonajes()) {\n grupo.anhadirPersonaje(p);\n p.setGrupo(grupo);\n }\n // Una vez añadidos, restauro la lista de personajes de la celda y añado el grupo\n this.restartPersonajes();\n this.anhadePersonaje(grupo);\n this.setTipo();\n\n String s = \"Se ha creado el \" + grupo.getNombre() + \" de la civilización \" + Juego.getCivilizacionActiva() + \"\\n\" + grupo;\n return s;\n }", "public NavigableSet<Groupe> getGroupes(Utilisateur utilisateur);", "public ArrayList<Casella> getGrup()\n\t{\n\t\treturn grup;\n\t}", "public void contarEfectosPorGrupo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tString strEstado = JOptionPane.showInputDialog( this, \"Introduzca el grupo\" );\n\t\t\tJOptionPane.showMessageDialog(this,\t\"La cantidad de efectos encontrados del grupo \"+strEstado+\" es \"+mundo.contarEfectosPorGrupo(strEstado), \"Contar efectos por grupo\",JOptionPane.INFORMATION_MESSAGE);\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(this, e.getMessage(), \"Contar efectos por grupo\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\n\t}", "public void completarGrados() {\n\t\tint grado = 0;\n\t\tfor (int f = 0; f < cantNodos; f++) {\n\t\t\tgrado = 0;\n\t\t\tfor (int c = 0; c < cantNodos; c++) {\n\t\t\t\tif (getValor(f, c) == true)\n\t\t\t\t\tgrado++;\n\t\t\t}\n\t\t\tnodos.add(new Nodo(f + 1, 0, grado));\n\t\t}\n\t}", "public void insertarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdSeccion(38);\n \tgrado.setNumGrado(2);\n \tgrado.setUltimoGrado(0);\n \tString respuesta = negocio.insertarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public boolean tieneRepresentacionGrafica();", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public Vector listaGrupos(String asignatura)\n {\n try\n {\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM grupos \";\n query += \"WHERE asignasoc='\"+asignatura+\"' AND activa='s'\";\n\n //Se crea un vector de grupos\n Vector vectorGrupos = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n grupo grupo = new grupo();\n\n grupo.setCodigoLab(resultado.getInt(\"codigolab\"));\n grupo.setAsigAsoc(resultado.getString(\"asignasoc\"));\n grupo.setDia(resultado.getString(\"dia\"));\n grupo.setHora(resultado.getString(\"hora\"));\n grupo.setPlazas(resultado.getInt(\"plazas\"));\n grupo.setPlazasOcupadas(resultado.getInt(\"plazasocupadas\"));\n grupo.setObservaciones(resultado.getString(\"observaciones\"));\n\n //Se añade el grupo al vector de grupos\n vectorGrupos.add(grupo);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorGrupos;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a los grupos de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public boolean pertanyAlGrup( Casella casella )\n\t{\n\t\treturn grup.contains( casella );\n\t}", "private void grupoSeleccionado(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_grupoSeleccionado\n if (cbox4Grupo.getSelectedIndex() != 0) {\n grupoSeleccionado = true;\n buscarEvaluacion();\n vaciarTabla();\n } else {\n grupoSeleccionado = false;\n vaciarTabla();\n cbox3Evaluacion.removeAllItems();\n cbox3Evaluacion.addItem(\"Seleccione una opción\");\n } }", "public String getGruposToString(){\n\t\tif(null == grupos){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\tStringBuilder grupos = new StringBuilder();\n\t\t\tfor (int i = 0; i < this.grupos.size(); i++) {\n\t\t\t\tif(i == (this.grupos.size()-1)){\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo());\n\t\t\t\t}else{\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo()).append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grupos.toString();\n\t\t}\n\t}", "public NavigableSet<Groupe> getGroupes();", "public void postuler(int p_id,int g_id) throws RemoteException{\r\n\t\t\t\t\t\t\r\n\t\t String requete = \"SELECT p_maxGroup, p_minEtud, p_maxEtud FROM projet WHERE p_id=\"+p_id;\r\n\t\t\tSystem.out.println(\"requete :\" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t\t if (!data.hasMoreElements()) {\r\n\t\t\t\t System.out.println(\"Projet id inexistant\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t int maxGroup = Integer.parseInt(data.getColumnValue(\"p_maxGroup\"));\r\n\t\t\t int minEtud = Integer.parseInt(data.getColumnValue(\"p_minEtud\"));\r\n\t\t\t int maxEtud = Integer.parseInt(data.getColumnValue(\"p_maxEtud\"));\r\n\t\t\t \r\n\t\t\t //recuperation des membres du groupe\r\n\t\t\t int nbMembre = this.getMember(g_id).size();\r\n\t\t\t if(nbMembre>maxEtud || nbMembre < minEtud){\r\n\t\t\t\t System.out.println(\"Vous ne pouvez pas postuler\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //Recuparation du nombre de groupe qui ont deja postuler a ce projet\r\n\t\t\t requete = \"SELECT COUNT(a_idgroupe) as nbGroupe FROM association WHERE a_idProjet=\"+p_id;\r\n\t\t\t System.out.println(\"requete :\" + requete);\r\n\t\t\t data = database.executeQuery(requete);\r\n\t\t\t int nbGroupe = 0;\r\n\t\t\t if (data.hasMoreElements()) {\r\n\t\t\t \tnbGroupe = Integer.parseInt(data.getColumnValue(\"nbGroupe\"));\r\n\t\t\t }\r\n\t\t\t if(nbGroupe>maxGroup){\r\n\t\t\t\t System.out.println(\"Vous ne pouvez pas postuler Nbgroupe max atteint\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //Creation d'un nouveau groupe\r\n\t\t\t requete = \"INSERT INTO association VALUES (\" + g_id + \", \"+ p_id + \", DEFAULT)\";\r\n\t\t\t System.out.println(\"requete :\" + requete);\r\n\t\t\t database.executeUpdate(requete);\r\n\t\t\t System.out.println(\"Vous avez postuler\");\r\n\t\t\r\n\t\t}", "public void calcularGrados() {\n\t\tgrMax = 1;\n\t\tint temp;\n\t\tfor (int f = 0; f < cantNodos; f++) {\n\t\t\ttemp = 0;\n\t\t\tfor (int c = 0; c < cantNodos; c++) {\n\t\t\t\tif (getValor(f, c) == true)\n\t\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tif (temp > grMax)\n\t\t\t\tgrMax = temp;\n\t\t}\n\t\tgrMin = grMax;\n\t\tfor (int f = 0; f < cantNodos; f++) {\n\t\t\ttemp = 0;\n\t\t\tfor (int c = 0; c < cantNodos; c++) {\n\t\t\t\tif (getValor(f, c) == true)\n\t\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tif (temp < grMin)\n\t\t\t\tgrMin = temp;\n\t\t}\n\t\t\n\t}", "public void setGroupe(String groupe) {\r\n this.groupe = groupe;\r\n }", "public void determinarGanador() {\n\t\t\n\t\t if(valorManos[3]>21) {\n\n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }else if(((valorManos[0] <= valorManos[3]) && (valorManos[1] <= valorManos[3]) &&( valorManos[2] <= valorManos[3]))\n\t\t\t\t && valorManos[3] <= 21){\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t\t// numGanadores ++;\n\t\t }else if(valorManos[0]>21 && valorManos[1] >21 && valorManos[2]>21 && valorManos[3] <= 21) {\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t }\n\t\t else { \n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]>valorManos[3] && valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t \n\t\t if(valorManos[0] > 21 && valorManos[1] > 21 && valorManos[2] > 21 && \n\t\t\t\t valorManos[3] > 21){\n\t\t\t\n\t\t }else if(valorManos[3]<21 && ganador.size()==0){\n\t\t\t ganador.add(\"dealer\");\n\t\t }\n\t }", "void setGruppo(Gruppo gruppo);", "void onGroupeChange(Groupe groupe);", "public GruppoSanguigno getGruppo() {\n\t\treturn gruppo;\n\t}", "public int getGrado() {\n\t\treturn grado;\n\t}", "public void updateGrille() {\n\n Component[] contenu = this.getComponents();\n for (int i = 0; i < contenu.length; i++) {\n //Si le composant est une Case\n if (contenu[i].getClass().equals(CaseJeu.class)) {\n //Mise a jour de la case selon sa m�me position dans le plateau\n CaseJeu c = (CaseJeu) contenu[i];\n c.updateCase(fenetre.getJeu().getPlateau().getCase(c.getXTableau(), c.getYTableau()));\n }\n }\n }", "static void findGroups() {\n G2 = 0;\n while (group2()) {\n }\n\n // find group of size 3\n G3 = 0;\n while (group3()) {\n }\n }", "public void ungroupSelectedFurniture() {\n List<HomeFurnitureGroup> movableSelectedFurnitureGroups = new ArrayList<HomeFurnitureGroup>(); \n for (Selectable item : this.home.getSelectedItems()) {\n if (item instanceof HomeFurnitureGroup) {\n HomeFurnitureGroup group = (HomeFurnitureGroup)item;\n if (isPieceOfFurnitureMovable(group)) {\n movableSelectedFurnitureGroups.add(group);\n }\n }\n } \n if (!movableSelectedFurnitureGroups.isEmpty()) {\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n final boolean oldBasePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n // Sort the groups in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> groupsMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>>();\n int groupsCount = 0;\n for (HomeFurnitureGroup piece : movableSelectedFurnitureGroups) {\n HomeFurnitureGroup groupGroup = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = groupsMap.get(groupGroup);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomeFurnitureGroup>();\n groupsMap.put(groupGroup, sortedMap);\n }\n if (groupGroup == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(groupGroup.getFurniture().indexOf(piece), piece);\n }\n groupsCount++;\n }\n final HomeFurnitureGroup [] groups = new HomeFurnitureGroup [groupsCount]; \n final HomeFurnitureGroup [] groupsGroups = new HomeFurnitureGroup [groups.length];\n final int [] groupsIndex = new int [groups.length];\n final Level [] groupsLevels = new Level [groups.length];\n int i = 0;\n List<HomePieceOfFurniture> ungroupedPiecesList = new ArrayList<HomePieceOfFurniture>();\n List<Integer> ungroupedPiecesIndexList = new ArrayList<Integer>();\n List<HomeFurnitureGroup> ungroupedPiecesGroupsList = new ArrayList<HomeFurnitureGroup>();\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> sortedMapEntry : groupsMap.entrySet()) {\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = sortedMapEntry.getValue();\n int endIndex = sortedMap.lastKey() + 1 - sortedMap.size();\n for (Map.Entry<Integer, HomeFurnitureGroup> groupEntry : sortedMap.entrySet()) {\n HomeFurnitureGroup group = groupEntry.getValue();\n groups [i] = group;\n groupsGroups [i] = sortedMapEntry.getKey();\n groupsIndex [i] = groupEntry.getKey(); \n groupsLevels [i++] = group.getLevel();\n for (HomePieceOfFurniture groupPiece : group.getFurniture()) {\n ungroupedPiecesList.add(groupPiece);\n ungroupedPiecesGroupsList.add(sortedMapEntry.getKey());\n ungroupedPiecesIndexList.add(endIndex++);\n }\n }\n } \n final HomePieceOfFurniture [] ungroupedPieces = \n ungroupedPiecesList.toArray(new HomePieceOfFurniture [ungroupedPiecesList.size()]); \n final HomeFurnitureGroup [] ungroupedPiecesGroups = \n ungroupedPiecesGroupsList.toArray(new HomeFurnitureGroup [ungroupedPiecesGroupsList.size()]); \n final int [] ungroupedPiecesIndex = new int [ungroupedPieces.length];\n final Level [] ungroupedPiecesLevels = new Level [ungroupedPieces.length];\n boolean basePlanLocked = oldBasePlanLocked;\n for (i = 0; i < ungroupedPieces.length; i++) {\n ungroupedPiecesIndex [i] = ungroupedPiecesIndexList.get(i); \n ungroupedPiecesLevels [i] = ungroupedPieces [i].getLevel();\n // Unlock base plan if the piece is a part of it\n basePlanLocked &= !isPieceOfFurniturePartOfBasePlan(ungroupedPieces [i]);\n } \n final boolean newBasePlanLocked = basePlanLocked;\n\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doGroupFurniture(ungroupedPieces, groups, groupsGroups, groupsIndex, groupsLevels, oldBasePlanLocked, allLevelsSelection);\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoUngroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "public void llenarComboUltimoGrado() {\t\n \t\tString respuesta = negocio.llenarComboUltimoGrado(\"\");\n \t\tSystem.out.println(respuesta);\t\n \t}", "private void valoresSpinner(final ArrayList<String> listaGrupos) {\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_item, listaGrupos);\n spGrupos.setAdapter(adapter);\n\n // Cuando pulsemos el botón, vamos a borrar el grupo de las distintas ramas donde aparece\n btnDejarGrupo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n pd = ProgressDialog.show(getContext(),\"Salir del grupo\",\"Saliendo del grupo...\");\n\n mDatabase.child(\"Usuarios\").child(usuario.getUsuario()).child(\"Grupos\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot snapshot : dataSnapshot.getChildren()){\n\n // Buscamos si el grupo seleccionado esta dentro de los grupos a los que pertenece el usuario\n if(spGrupos.getSelectedItem().toString().equals(snapshot.getValue())){\n\n //Borramos el grupo de aquellos a los que pertenece el usuario\n snapshot.getRef().removeValue();\n\n //Borramos al usuario dentro del nodo Usuarios_por_grupo para ya no tenerlo disponible ni en el mapa ni en el chat\n mDatabase.child(\"Usuarios_por_grupo\").child(snapshot.getKey()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot data: dataSnapshot.getChildren())\n if(usuario.getUsuario().equals(data.getValue()))\n data.getRef().removeValue();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n\n // Borramos el grupo dentro del nodo de aquellos que ha creado el usuario por si acaso ese grupo lo haya creado\n mDatabase.child(\"Usuarios\").child(usuario.getUsuario()).child(\"Grupos_creados\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot data: dataSnapshot.getChildren())\n if(spGrupos.getSelectedItem().toString().equals(data.getValue()))\n data.getRef().removeValue();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n pd.dismiss();\n\n Toast.makeText(getContext(), \"Ha salido del grupo \" + spGrupos.getSelectedItem().toString() + \".\", Toast.LENGTH_SHORT).show();\n\n recargar();\n\n }\n\n });\n\n }", "public String getGroupe() {\r\n return groupe;\r\n }", "public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }", "public Map<Long, GrupoAtencion> getGruposAtentionGenerados(Integer accion, Long numeroProgramacion) {\n\t\tlogger.info(\" ### getGruposAtentionGenerados ### \");\n\t\t\n\t\tMap<Long, GrupoAtencion> mpGrupos = Collections.EMPTY_MAP;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tif(accion!=null && accion.equals(ConstantBusiness.ACCION_NUEVA_PROGRAMACION)){\n\t\t\t\tmpGrupos = new LinkedHashMap<Long, GrupoAtencion>();\n\t\t\t\tlogger.info(\" mostrando mostrando grupos temporales \");\n\t\t\t\t\n\t\t\t\tmpGrupos.putAll(mpGruposCached);\n\t\t\t\t\n\t\t\t}else if(accion!=null && accion.equals(ConstantBusiness.ACCION_EDITA_PROGRAMACION)){\n\t\t\t\tmpGrupos = new LinkedHashMap<Long, GrupoAtencion>();\n\t\t\t\tlogger.info(\" mostrando mostrando grupos bd \");\n\t\t\t\tList<GrupoAtencion> grupoAtencionLíst = grupoAtencionDao.getGruposAtencionPorProgramacion(numeroProgramacion);\n\t\t\t\tList<GrupoAtencion> _grupoAtencionLíst = new ArrayList<>();\n\t\t\t\t\n\t\t\t\tList<GrupoAtencionDetalle> _grupoDetalleAtencionLíst = new ArrayList<>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor (GrupoAtencion g : grupoAtencionLíst) {\n\t\t\t\t\tlogger.info(\" grupo generado :\"+g.getDescripcion());\n\t\t\t\t\t//clonando grupos \n\t\t\t\t\tlogger.info(\" ### clonando grupo : \"+g.getNumeroGrupoAtencion());\n\t\t\t\t\tGrupoAtencion grupoAtencion = (GrupoAtencion) g.clone();\n\t\t\t\t\tfor(GrupoAtencionDetalle d: g.getGrupoAtencionDetalles()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tlogger.info(\"### numero de solicitud :\"+d.getSolicitudServicio().getNumeroSolicitud());\n\t\t\t\t\t\t\n\t\t\t\t\t\t_grupoDetalleAtencionLíst.add((GrupoAtencionDetalle)d.clone());\n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t_grupoAtencionLíst.add(grupoAtencion);\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\" mapeando objetos clonados \");\n\t\t\t\tfor (GrupoAtencion g : _grupoAtencionLíst) {\n\t\t\t\t\tg.setGrupoAtencionDetalles(new ArrayList<GrupoAtencionDetalle>());\n\t\t\t\t\tfor (GrupoAtencionDetalle d : _grupoDetalleAtencionLíst) {\n\t\t\t\t\t\tif( d.getGrupoAtencion()!=null && \n\t\t\t\t\t\t\t\td.getGrupoAtencion().getNumeroGrupoAtencion()==g.getNumeroGrupoAtencion()){\n\t\t\t\t\t\t\tg.getGrupoAtencionDetalles().add(d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmpGrupos.put(g.getNumeroGrupoAtencion(), g);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthis.mpGruposCached = mpGrupos;\n\t\t\t\t\n\t\t\t\tmostrarGrupos(mpGrupos);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mpGrupos;\n\t}", "public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}", "public int grado() {\n \t//Paso 1: almacenar en un array los grados de todos los vertices\n \t//Paso 2: sacar el maximo grado de los vertices\n \t\n \tint[] v = getArrayGrados();\n \treturn maximo(v);\n \t\n \t\n }", "public CheckBoxPanelGroup(String pregunta, String[] respuesta){\n super(pregunta, respuesta);\n CheckboxGroup grupo = new CheckboxGroup();\n for (int i = 0; i < misCheckboxes.length; i++){\n misCheckboxes[i].setCheckboxGroup(grupo); // Notar que aqui va al reves\n }\n }", "public boolean gano() {\r\n\t\tboolean gano = false;\r\n\t\tint contador = 0;\r\n\t\tint c = (casillas.length * casillas[0].length) - cantidadMinas;\r\n\t\tfor(int i = 0; i< casillas.length && !gano; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[i].length && !gano; j++) {\r\n\t\t\t\tif(casillas[i][j].esMina() == false) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == true) {// si no es mina\r\n\t\t\t\t\tcontador++;\r\n\t\t\t\t\tif(contador == c) {// no ha sido seleccionada\r\n\t\t\t\t\t\tgano = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn gano;\r\n\t}", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "@Override\n\tpublic List<Grupo> obtenerGrupos() {\n\t\tSystem.out.println(\"Grupo Service\");\n\t\ttry {\n\t\t\t \n\t\t\t\tList<Grupo> tmp=this.grupoDao.obtenerGrupos();\n\t\t\t\tSystem.out.println(\"Lista de Grupos\"+tmp.size());\n\t\t\t\t\treturn tmp;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public Grupo getnomGrupo(String nomGrupo) {\n\t\tList<Grupo> grupos = gRepository.getNomGrupo(nomGrupo);\n\n\t\tGrupo grupo = new Grupo();\n\t\tgrupo = null;\n\n\t\tfor (Grupo grupo1 : grupos) {\n\n\t\t\tif (grupos.size() == 1) {\n\n\t\t\t\tgrupo = grupo1;\n\t\t\t}\n\n\t\t}\n\n\t\treturn grupo;\n\t}", "private static void generaGrupos(PrintWriter salida_grupos, PrintWriter salida_musicos, PrintWriter salida_discos, PrintWriter salida_canciones){\r\n boolean flagm = true;//Indica si el nº de integrantes de a es 10 para contrarestar en la siguiente generación\r\n int a, b;\r\n String nombre = \"nombre\";\r\n String titulo = \"www.web\";\r\n String dominio = \".com\";\r\n \r\n for (long i = 1; i <= num_grupos; i++){\r\n //Calculamos el numero de integrantes que tendrán los dos grupos que se generarán por loop\r\n // si el anterior loop no se han superado los 10 integrantes en la suma de a y b,\r\n // se permitirá la generación de 10 integrantes en el grupo a\r\n // si en el anterior loop se han generado en uno de los grupos 10 integrantes\r\n // debemos reducir el numero para contrarestar en este loop,\r\n // de forma que resulte una generación aleatoria dentro de los límites pedidos\r\n if (flagm){\r\n a = rand.nextInt(10) + 1;\r\n b = 10 - a;\r\n } else {\r\n a = rand.nextInt(8) + 1;\r\n b = 9 - a;\r\n flagm = true;\r\n }\r\n if (b == 0){ b++; flagm = false;}\r\n \r\n //Grupo A del loop\r\n salida_grupos.println(cod_grupo + \",\" + nombre + cod_grupo + \",\"\r\n + genero.getGenero() + \",\" + rand.nextInt(paises.length)\r\n + \",\" + titulo + cod_grupo + dominio);\r\n generaMusicos(salida_musicos, cod_grupo, a);\r\n generaDiscos(salida_discos, salida_canciones, cod_grupo);\r\n \r\n //Aumento de las variables usadas\r\n i++; cod_grupo++;\r\n //Grupo B del loop\r\n salida_grupos.println(cod_grupo + \",\" + nombre + cod_grupo + \",\"\r\n + genero.getGenero() + \",\" + rand.nextInt(paises.length)\r\n + \",\" + titulo + cod_grupo + dominio);\r\n generaMusicos(salida_musicos, cod_grupo, b);\r\n generaDiscos(salida_discos, salida_canciones, cod_grupo);\r\n \r\n cod_grupo++;\r\n }\r\n }", "public static void main(String[] args) {\n \n Grupo [] grupos = new Grupo[5]; \n Grupo grupo1=new Grupo();\n Grupo grupo2=new Grupo();\n Grupo grupo3=new Grupo();\n Grupo grupo4=new Grupo();\n Grupo grupo5=new Grupo();\n \n \n // le doy valores a los atributos\n \n grupo1.nombre=\"verde\";\n grupo2.nombre=\"amarillo\";\n grupo3.nombre=\"rojo\";\n grupo4.nombre=\"naranja\";\n grupo5.nombre=\"azul\";\n \n grupo1.descripcion=\"verde como las hojas\";\n grupo2.descripcion=\"amarillo como el sol\";\n grupo3.descripcion=\"rojo como el tomate\";\n grupo4.descripcion=\"naranja como la naranja\";\n grupo5.descripcion=\"azul como el cielo\";\n \n // asigno los elementos al vector \n \n grupos[0]=grupo1; \n grupos[1]=grupo2;\n grupos[2]=grupo3;\n grupos[3]=grupo4;\n grupos[4]=grupo5;\n \n System.out.println(\"Los elementos del vector son: \\n\"); \n // muestro los elementos del vector\n \n for(Grupo r: grupos){\n r.mostrar();\n }\n \n //b con array \n \n // creo un array Grupis de cinco elementos\n \n ArrayList<Grupo> Grupis = new ArrayList<>();\n Grupis.add(grupo1);\n Grupis.add(grupo2);\n Grupis.add(grupo3);\n Grupis.add(grupo4);\n Grupis.add(grupo5);\n \n System.out.println(\"\\n Los elementos del Array son: \\n\");\n // muestro los elementos del array\n \n for (Grupo f: Grupis){\n f.mostrar(); \n }\n \n }", "public List<Seance> listeSeances(Groupe g, Enseignant e);", "@Override\n public int getGroupCount() {\n return Grade.length;\n }", "public CtrlEditGrupos() {\n edEsc = EditEscenario.getInstance();\n try {\n cd = CtrlDomain.getInstance();\n } catch (Exception e) {\n System.out.println(\"ERROR EN LA CARGA DEL CONTROLADOR DE DOMINIO\");\n }\n planEstudiosFinal = edEsc.getPlanEstudiosFinal();\n asignaturasFinal = edEsc.getAsignaturasFinal();\n restriccionesFinal = edEsc.getRestriccionesFinal();\n }", "private GrupoAtencion getGrupoAtencion(Date fecPrgn, SolicitudServicio solicitudServicio){\n\t\t\n\t\tGrupoAtencion g = null;\t\t\n\t\tList<GrupoAtencionDetalle> detalles = Collections.EMPTY_LIST;\n\t\t\n\t\tif(mpGruposCached!=null && mpGruposCached.size()> 0){\n\n\t\t\tdetalles = new ArrayList<GrupoAtencionDetalle>();\n\t\t\tIterator<Long> it = mpGruposCached.keySet().iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\tLong numerogrupo = \tit.next();\n\t\t\t\t\n\t\t\tList<GrupoAtencionDetalle> _detalles = mpGruposCached.get(numerogrupo).getGrupoAtencionDetalles();\n\t\t\tdetalles.addAll(_detalles);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}else{\t\t\t\n\t\t\t\n\t\t\tdetalles = grupoAtencionDao.getDetallesGrupoAtencion(fecPrgn);\n\t\t\t\n\t\t\t\n\t\t}\n\n\t\t\n\t\tif(detalles!=null){\n\t\t\tfor (GrupoAtencionDetalle d : detalles) {\n\t\t\t\tif( d.getSolicitudServicio().equals(solicitudServicio)){\n\t\t\t\t\tg = d.getGrupoAtencion();\n\t\t\t\t\tbreak;\n\t\t\t\t};\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn g;\n\t}", "public Grille() {\n this.grille = new HashSet<>();\n\t\tscore=0;\n }", "private void getGroup() {\n\r\n if (mAuth.getCurrentUser().isAnonymous()){\r\n g.setGroup(\"guest\");\r\n u.setGroup(g.getGroup());\r\n //nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).set(g);\r\n }else{\r\n\r\n DocumentReference docRef = nFirestore.collection(\"usergroup\").document(mAuth.getCurrentUser().getUid());\r\n docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()){\r\n DocumentSnapshot document = task.getResult();\r\n g = document.toObject(Grupo.class);\r\n u.setGroup(g.getGroup());\r\n nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).update(\"group\",g.getGroup()).addOnSuccessListener(new OnSuccessListener<Void>() {\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n //Toast.makeText(MainActivity.this, \"Updateado\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }", "public List<BeanGrupo> getGrupos() {\n\t\treturn grupos;\n\t}", "public int getNumGruppoPacchetti();", "private static void generaGruposTocanConciertos(PrintWriter salida_grupos_tocan_conciertos){\r\n long i;\r\n cod_concierto = 0;\r\n \r\n for (i = 0; i < num_grupos; i++){\r\n for (int j = 0; j < 10; j++){//todos los grupos darán 10 conciertos\r\n if (cod_concierto == max_conciertos) cod_concierto = 0;\r\n salida_grupos_tocan_conciertos.println(i + \",\" + cod_concierto);\r\n cod_concierto++;\r\n }\r\n }\r\n }", "public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}", "public void quitterGroupe (int idGroupe, int idType) throws RemoteException{\r\n\t\t\t\r\n\t\t //Récupérer le propriétaire du groupe :\r\n\t\t String requete = \"Select g_idprop From groupe Where g_id = \" + idGroupe;\r\n\t\t System.out.println(\"requete quitterGroupe(1) : \" + requete);\r\n\t\t \r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t String[] line = null;\r\n\t\t int idProp=-1;\r\n\t\t \r\n\t\t \tif (data.hasMoreElements()) {\r\n\t\t \t\tline = data.nextElement();\r\n\t\t \t\tidProp = Integer.parseInt(line[1]);\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \trequete = \"DELETE FROM groupeassoc Where ga_idetudiant = \" + _etudiant.getId() +\r\n \t\t\t \" AND ga_idgroupe = \" + idGroupe;\t\r\n\t\t \tSystem.out.println(\"requete quitterGroupe(2) : \" + requete);\r\n\t\t \tdatabase.executeUpdate(requete);\r\n\t\t \t\r\n\t\t \tif (idProp == _etudiant.getId()){\r\n\t\t \t\trequete = \"Select ga_idetudiant From groupeassoc Where ga_idgroupe = \" + idGroupe;\r\n\t\t \t\tSystem.out.println(\"requete quitterGroupe(3) : \" + requete);\r\n\t\t \t\tdata = database.executeQuery(requete);\r\n\t\t \t\t\r\n\t\t \t\tint idFuturProp = -1;\r\n\t\t \t\tif (data.hasMoreElements()) {\r\n\t\t\t \t\tline = data.nextElement();\r\n\t\t\t \t\tidFuturProp = Integer.parseInt(line[1]);\r\n\t\t\t \t}\r\n\t\t \t\t\r\n\t\t \t\trequete = \"UPDATE groupe SET g_idprop = \" + idFuturProp + \" Where g_id = \" + idGroupe;\r\n\t\t \t\tSystem.out.println(\"requete quitterGroupe(4) : \" + requete);\r\n\t\t \t\tdatabase.executeUpdate(requete);\r\n\t\t \t}\r\n\t\t \t\r\n\t \t\trequete = \"INSERT INTO groupe VALUES ( DEFAULT, \" + _etudiant.getId() + \", \" + idType + \" )\"; \r\n\t \t\tSystem.out.println(\"requete quitterGroupe(5) : \" + requete);\r\n\t \t\tdatabase.executeUpdate(requete);\r\n\t \t\t\r\n\t \t\trequete = \"INSERT INTO groupeassoc ( Select g_id, g_idprop From groupe Where g_idprop = \" + _etudiant.getId() + \" AND g_idtype = \" + idType + \" )\";\r\n\t \t\tSystem.out.println(\"requete quitterGroupe(6) : \" + requete);\r\n\t \t\tdatabase.executeUpdate(requete);\r\n\t\t \t\t \r\n\t\t}", "private int countGrasses()//issues...see comment below in countTrees()\n {\n int grasses = 0;\n Field field = getField();\n Iterator<Location> it;\n List<Object> plantList = new List<>();\n while(it.hasNext()) {\n plantList.add(field.getObjectAt(currant));\n if(plant instanceof Grass) {\n grasses++;\n }\n }\n return grasses;\n }", "public void criaGrupo() {\n\t\tThread threadMain = Thread.currentThread(); // determina grupo raiz\n\t\tThreadGroup grupoRaiz = threadMain.getThreadGroup().getParent();\n\t\tThreadGroup newGroup = new ThreadGroup(grupoRaiz, \"Extra-\"\n\t\t\t\t+ gruposCriados++);\n\t\tnewGroup.setDaemon(true); // ajusta auto-remocao do grupo\n\t\tint quant = (int) (Math.random() * 10);\n\t\tfor (int i = 0; i < quant; i++) { // adiciona EmptyThreads ao grupo\n\t\t\tnew EmptyThread(newGroup, \"EmptyThread-\" + i).start();\n\t\t}\n\t\tbRefresh.doClick();\n\t}", "public String agrupar() throws ParametroIncorrectoException, NoAgrupableException, CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n if(this.getEdificio() != null){\n throw new NoAgrupableException(\"Dentro de un edificio no se puede agrupar\");\n }\n if (this.getPersonajes().size() <= 1) {\n throw new NoAgrupableException(\"No hay personajes suficientes para agrupar\");\n }\n // Crea e inicializa el grupo\n Grupo grupo = new Grupo();\n grupo.inicializaNombre(Juego.getCivilizacionActiva());\n Juego.getCivilizacionActiva().anhadeGrupo(grupo);\n return agrupar(grupo);\n }", "public boolean ganar(){\r\n\t\t\r\n\t\tboolean estadoVictoria = false;\r\n\t\t\r\n\t\tfor(int x = 0; x < palabras.size(); x++) \r\n\t\t{\r\n\t\t\tfor(int y = 0; y < palabras.get(x).size(); y++) \r\n\t\t\t{\r\n\t\t\t\tif (palabras.get(x).get(y).getEstado() == false) \r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.print(\"estoy aqui\");\r\n\t\t\t\t\tx = palabras.size()-1;\r\n\t\t\t\t\ty = palabras.get(x).size() - 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}else if (x+1 == palabras.size() && y+1 == palabras.get(x).size() && palabras.get(x).get(y).getEstado() == true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\testadoVictoria = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn estadoVictoria;\r\n\t}", "public void setGruppo(GruppoSanguigno gruppo) {\n\t\tthis.gruppo = gruppo;\n\t}", "private ArrayList<Groepen> mogelijkeGroepen(Spelers spelers, int groepen, int[] grootte, int byes, int nobyesmask) {\r\n\r\n\t\tArrayList<Groepen> result = new ArrayList<>();\r\n\t\tint max = (int) Math.pow(2, groepen);\r\n\t\tint mask = max - 1 - nobyesmask;\r\n\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\tint j = i & mask; \r\n\t\t\tint aantalbyes = Integer.bitCount(reversebits(j));\r\n\t\t\tif (aantalbyes == byes) {\r\n\t\t\t\tGroepen maakGroepen = maakGroepen(spelers, groepen, grootte, j);\r\n\t\t\t\tresult.add(maakGroepen);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\n public void testIterator() {\n System.out.println(\"iterator\");\n Goban g = createGoban();\n ArrayList<PierrePoint> groupeAttendu = new ArrayList<>();\n groupeAttendu.add(g.getPierre(0, 0));\n groupeAttendu.add(g.getPierre(0, 1));\n groupeAttendu.add(g.getPierre(1, 0));\n GroupeDePierres groupe = new GroupeDePierres(g.getPierre(0, 0), g);\n \n for( PierrePoint p : groupe)\n {\n assertTrue(groupeAttendu.contains(p));\n }\n \n assertEquals(groupeAttendu.size(),groupe.size());\n }", "public int gradoEntrada(int i) {\n \tint grado = 0;\n \tfor(int j = 0; j < numV; j++) {\n \t\tif(existeArista(j, i)) grado ++;\n \t}\n \treturn grado; //el grado es el valor del grado de entrada de i\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Grupoconta)) {\n return false;\n }\n Grupoconta other = (Grupoconta) object;\n if ((this.idgrupoConta == null && other.idgrupoConta != null) || (this.idgrupoConta != null && !this.idgrupoConta.equals(other.idgrupoConta))) {\n return false;\n }\n return true;\n }", "public Optional<Groep> geefGroep(String groepNaam, boolean isLeerGebied) {\r\n Optional<Groep> groepOpt;\r\n List<Groep> inTeZoekenList = getInTeZoekenGroepen(isLeerGebied);\r\n\r\n groepOpt = inTeZoekenList.stream().filter(s -> s.getGroep().equalsIgnoreCase(groepNaam)).findFirst();\r\n\r\n return groepOpt;\r\n }", "public void setGrupos(List<BeanGrupo> grupos) {\n\t\tthis.grupos = grupos;\n\t}", "private Map<Integer, Map<String,Object>> getCombinaciones( List<GrupoAtencion> grupos, List<Cuadrilla> cuadrillas){\n\t\t\n\n\t\tMap<Long, Map<String, Double>> mpgrupos = new LinkedHashMap<Long, Map<String, Double>>();\n\t\t// aplicando todos contra todos\n\t\t\n\t\tfor (GrupoAtencion g : grupos) {\n\t\t\t\n\t\t\tMap<String, Double>mpcants = getCantidadPorTipoSolicitudes(g);\n\t\t\t// añdiendo \n\t\t\tmpgrupos.put(g.getNumeroGrupoAtencion(), mpcants); \n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMap<Long, Map<String, Double>> mpcuadrillas = new LinkedHashMap<Long, Map<String, Double>>();\n\t\t\n\t\tfor(Cuadrilla c : cuadrillas){\n\t\t\tMap<String, Double> mpproms = getPromedioHabilidades(c);\n\t\t\tmpcuadrillas.put(c.getNumeroCuadrilla(),mpproms );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// todos contra todos;\n\t\t\n\t\tIterator<Long> it = mpgrupos.keySet().iterator();\n\t\t\n\t\t// combinaciones\n\t\tMap<Integer, Map<String,Object>> mpcomb = new LinkedHashMap<Integer, Map<String,Object>>();\n\t\tint idxcomb = 1; // indice de combinacion\n\t\twhile(it.hasNext()){\n\t\t\t\n\t\t\tLong ng = it.next();// número de grupos\n\t\t\tMap<String, Double> mpcants = mpgrupos.get(ng); // cantidades\n\t\t\t\n\t\t\tIterator<Long> itp = mpcuadrillas.keySet().iterator();\n\t\t\twhile(itp.hasNext()){\n\t\t\t\tLong nc = itp.next();// número de cuadrilla\n\t\t\t\tMap<String, Double> mpproms = mpcuadrillas.get(nc); // promedios\n\t\t\t\tMap<String,Object> mp = new LinkedHashMap<>();\n\t\t\t\t//System.out.println(mpproms.toString());\n\t\t\t\t\n\t\t\t\tmp.put(\"ng\",ng);// numero grupo\n\t\t\t\tmp.put(\"nc\",nc); // numero cuadrilla\n\t\t\t\t// añadiendo cantidades de tipos de solicitudes\n\t\t\t\tmp = addMap(mp, mpcants);\n\t\t\t\t// añadiendo promedio de habilidades\n\t\t\t\tmp = addMap(mp, mpproms);\n\t\t\t\t\n\t\t\t\tmpcomb.put(idxcomb, mp);\n\t\t\t\t//System.out.println(mp.toString());\n\t\t\t\tidxcomb++;\n\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn mpcomb ;\n\t}", "private void gradoSeleccionado(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gradoSeleccionado\n if (cbox2Grado.getSelectedIndex() != 0) {\n gradoSeleccionado = true;\n buscarEvaluacion();\n vaciarTabla();\n } else {\n gradoSeleccionado = false;\n vaciarTabla();\n cbox3Evaluacion.removeAllItems();\n cbox3Evaluacion.addItem(\"Seleccione una opción\");\n }\n\n }", "public NavigableSet<Utilisateur> getUtilisateurs(Groupe groupe);", "private JScrollPane getPGrupos() {\r\n listaGrupos = new DefaultListModel();\r\n lGrupos = new JList(listaGrupos);\r\n lGrupos.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n lGrupos.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\r\n public void valueChanged(javax.swing.event.ListSelectionEvent e) {\r\n if (lGrupos.getSelectedIndex()!=-1) {\r\n cargarGrupo();\r\n lInfo.setText(\"\");\r\n\r\n }\r\n }\r\n });\r\n if (pGrupos == null) {\r\n pGrupos = new JScrollPane(lGrupos); \r\n pGrupos.setBounds(new Rectangle(260, 40, 100, 120));\r\n cargarListaGrupos();\r\n }\r\n return pGrupos;\r\n }", "private void fillcbGrupo() {\n\t\tcbGrupoContable.setNullSelectionAllowed(false);\n\t\tcbGrupoContable.setInputPrompt(\"Seleccione Grupo Contable\");\n\t\tfor (GruposContablesModel grupo : grupoimpl.getalls()) {\n\t\t\tcbGrupoContable.addItem(grupo.getGRC_Grupo_Contable());\n\t\t\tcbGrupoContable.setItemCaption(grupo.getGRC_Grupo_Contable(), grupo.getGRC_Nombre_Grupo_Contable());\n\t\t}\n\t}", "public FaturamentoGrupo pesquisarGrupoImovel(Integer idImovel) {\r\n\t\tFaturamentoGrupo retorno = null;\r\n\r\n\t\ttry {\r\n\t\t\tretorno = repositorioImovel.pesquisarGrupoImovel(idImovel);\r\n\t\t} catch (ErroRepositorioException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "private boolean setPermessiPrivacy(HttpServletRequest request, HttpServletResponse response,\r\n String utente) {\r\n Gruppo g = new Gruppo();\r\n\r\n g.setRuolo(utente);\r\n if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"conFirma\".concat(utente))) {\r\n if (!conFirma.getGruppi().contains(g)) {\r\n conFirma.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n anonimi.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"anonimi\".concat(utente))) {\r\n if (!anonimi.getGruppi().contains(g)) {\r\n anonimi.getGruppi().add(g);\r\n noFeedback.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else if (request.getParameter((\"radio\").concat(utente)) != null\r\n && request.getParameter((\"radio\").concat(utente)).equals(\"noFeedback\".concat(utente))) {\r\n if (!noFeedback.getGruppi().contains(g)) {\r\n noFeedback.getGruppi().add(g);\r\n anonimi.getGruppi().remove(g);\r\n conFirma.getGruppi().remove(g);\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "Relations getGroupOfRelations();", "private synchronized void mudaGrupoToken() {\n posicaoProcurada++;\n if (posicaoProcurada == QTD_GRUPO) {\n posicaoProcurada = 0;\n }\n tabelaToken.remove(grupoToken[posicaoProcurada % QTD_GRUPO]);\n }", "public String agrupar(String nombreGrupo, Civilizacion civ) throws NoAgrupableException, ParametroIncorrectoException, CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n if(this.getEdificio() != null){\n throw new NoAgrupableException(\"Dentro de un edificio no se puede agrupar\");\n }\n if (this.getPersonajes().size() <= 1) {\n throw new NoAgrupableException(\"No hay personajes suficientes para agrupar\");\n }\n // Crea e inicializa el grupo\n Grupo grupo = new Grupo();\n grupo.inicializaNombre(civ);\n grupo.setNombre(nombreGrupo);\n civ.anhadeGrupo(grupo);\n return agrupar(grupo);\n }", "private GrupoAtencion asignar(Cuadrilla cuadrilla,int idx , Map<Long, GrupoAtencion> mpGrupos){\n\t\t\n\t\tSystem.out.println(mpGrupos.toString());\n\t\t\n\t\ttry{\n\t\t\tLong indexalt = Long.parseLong(gruposidx.get(idx).toString());\n\t\t\t// provisional\n\t\t\tGrupoAtencion grupoAtencion = mpGrupos.get(indexalt);\t\t\t\n\t\t\treturn grupoAtencion;\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t}", "private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}", "public List<Grupo> obtenerTodosLosGrupos() {\n return this.grupoFacade.findAll();\n }", "public boolean afegirCasella( Casella afegir )\n\t{\n\t\tif ( grup.contains( afegir ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tgrup.add( afegir );\n\t\treturn true;\n\t}", "private boolean existeDatosGrupoPuestos(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\"SELECT * FROM seleccion.datos_grupo_puesto where id_concurso_puesto_agr = \"\r\n\t\t\t\t+ concursoPuestoAgr.getIdConcursoPuestoAgr();\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "public GrupCaselles( TaulerHex tauler )\n\t{\n\t\tthis.tauler = tauler;\n\t\tgrup = new ArrayList<Casella>();\n\t}", "private Groepen bepaalOptimaleGroep(ArrayList<Groepen> mogelijkegroepen) {\r\n\t\tGroepen beste = null;\r\n\t\tint beste_spreiding = Integer.MAX_VALUE;\r\n\t\tint beste_groepverschil = 0;\r\n\t\tdouble beste_stddev = Double.MAX_VALUE;\r\n\t\tfor (Groepen groepen : mogelijkegroepen) {\r\n\t\t\t//if (groepen.getKleinsteGroep() >= 4) {\r\n\t\t\t\tif (groepen.getSpreidingTotaal() < beste_spreiding) {\r\n\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t} else if (groepen.getSpreidingTotaal() == beste_spreiding) {\r\n\t\t\t\t\tif (groepen.getSomGroepVerschil() > beste_groepverschil) {\r\n\t\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t\t} else if (groepen.getSomStdDev() < beste_stddev) {\r\n\t\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t}\r\n\t\treturn beste;\r\n\t}", "private ApexCharts crearGraficoDonutGastosMesActualPorCategoria() {\n\t\tList<Categoria> listaCategorias = categoriaService.obtenerTodasCategorias();\n\t\t// Obtenemos los nombres de las categorias\n\t\tString[] labes = obtenerLabes(listaCategorias);\n\n\t\t// Obtenemos el valor del gasto por cada categoria\n\t\tDouble[] serie = obtenerMovimientos(listaCategorias);\n\t\t\n\t\t// Obtenemos colores aleatorios para cada fragmento del grafico\n\t\tString[] colors = obtenerColores(listaCategorias);\n\t\t\n\t\treturn ApexChartsBuilder.get()\n .withChart(ChartBuilder.get().withType(Type.donut).build())\n .withLegend(LegendBuilder.get()\n .withPosition(Position.right)\n .build())\n .withSeries(serie)\n .withResponsive(ResponsiveBuilder.get()\n .withBreakpoint(480.0)\n .build())\n .withLabels(labes)\n \t\t.withColors(colors)\n .build();\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof GrupoScout)) {\n return false;\n }\n GrupoScout other = (GrupoScout) object;\n if ((this.id_grupo == null && other.id_grupo != null) || (this.id_grupo != null && !this.id_grupo.equals(other.id_grupo))) {\n return false;\n }\n return true;\n }", "public void carregar(DadosGrafico dados){\r\n \r\n }", "public int gradoSalida() {\n \t//crear e inicializar el array de contadores\n \tint[] cont = new int[numV];\n \tfor(int i = 0; i<numV; i++) {\n \t\t//actualizar el contador de grados con la talla de cada elemento del array \n \t\tListaConPI<Adyacente> v = elArray[i];\n \t\tcont[i] = v.talla();\n \t}\n \treturn maximo(cont);\n }", "public boolean addGroep(ICommandSender[] personen, String groepnaam, ICommandSender sender, int clanID){\r\n\t\tif (!groepen.containsKey(groepnaam)){\r\n\t\t\tfor(ICommandSender[] g : groepen.values()){\r\n\t\t\t\tfor(ICommandSender p : g){\r\n\t\t\t\t\tEntityPlayer player = (EntityPlayer) p;\r\n\t\t\t\t\tfor(ICommandSender check : personen){\r\n\t\t\t\t\t\tEntityPlayer checkPlayer = (EntityPlayer) check;\r\n\t\t\t\t\t\tif(player.getUniqueID().equals(checkPlayer.getUniqueID())){\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgroepen.put(groepnaam, personen);\r\n\t\t\tclanId.put(groepnaam, clanID);\r\n\t\t\tString text = color.prefix + \"U Have Bin Added To Group \" + color.groen + color.wit + \" By \" + color.groen + sender.getCommandSenderName();\r\n\t\t\tcolor.sendPrivateMessageToMultiple(personen, text);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void addValidItems(UiAirplaneModel plane, String[] grps) {\r\n\t\tfor(String str:grps){\r\n\t\t\t for(SelectItem item: uiAirplaneModel.getGroupList()){\r\n\t\t\t\tif(str.trim().equalsIgnoreCase(item.getLabel())){\r\n\t\t\t\t\tplane.getGroupIDs().add(item.getValue().toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public ArrayList<Integer> getIdGroupe (int idProjet) throws RemoteException {\r\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t String requete = \"Select a_idgroupe from association where a_idprojet = \" + idProjet;\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t String[] line = null;\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tline = data.nextElement();\r\n\t\t \tlist.add(Integer.parseInt(line[1]));\r\n\t\t }\r\n\r\n\t\t return list;\t\r\n\t\t}", "@Test\n\tpublic void testLecturaGroupBy(){\n\t\tassertEquals(esquemaEsperado.getExpresionesGroupBy().toString(), esquemaReal.getExpresionesGroupBy().toString());\n\t}", "public void setGiro( double gradosGiro ) {\r\n\t\t// De grados a radianes...\r\n\t\tmiGiro += gradosGiro;\r\n\t}", "@Override\n public Object getGroup(int groupPosition) {\n return Grade[groupPosition];\n }", "public List<PlanTrabajo> reasignarCuadrillasGrupos( Date fecPrgn, Map<Long, Long> _reasignados){\n\t\t\n\t\t// verificar que existan valores en las reasignacione \n\t\tif(_reasignados==null || \n\t\t\t( _reasignados!=null && _reasignados.size()==0)\n\t\t\t){\n\t\t\treturn null;\n\t\t}\n\t\tlogger.info(\" antes reasignados \"+_reasignados.toString());\n\t\tlogger.info(\" antes asignaciones \"+asignaciones.toString());\n\t\t// verificar que los grupos existan existan\n\t\tSet<Long> _grupos = _reasignados.keySet();\n\t\tfor (Long _grupo : _grupos) {\n\t\t\tLong cuadrilla = this.asignaciones.get(_grupo);\n\t\t\tif(cuadrilla==null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// verificando que existan dieferencias entre las reasignaciones y lo reasignados\n\t\tfor (Long _grupo : _grupos) {\n\t\t\tLong cuadrillanew = _reasignados.get(_grupo); // obteniendo nueva cuadrilla asignada\n\t\t\tLong cuadrillaold = this.asignaciones.get(_grupo); // obteniendo cuadrilla anterior\n\t\t\t// si no existen diferencia no se aplica el cambio\n\t\t\tif(cuadrillanew!=null && cuadrillaold!=null && cuadrillanew.equals(cuadrillaold)){\n\t\t\t\treturn null;\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// reasignando la cuadrilla de un grupo a otro\n\t\t\t\t//cambio {2=>1}\n\t\t\t\t//{3=>4, 2=>2, 1=>3, 4=>1}\n\t\t\t\t//{2=>1, 4=>2}\n\t\t\t\t//{3=>4, 2=>1, 1=>3, 4=>2}\n\t\t\t\t\n\t\t\t\tSet<Long> grupos = this.asignaciones.keySet();\n\t\t\t\tfor (Long grupo : grupos) {\n\t\t\t\t\tLong ncuadrilla = this.asignaciones.get(grupo); \n\t\t\t\t\tif(ncuadrilla!=null && cuadrillanew!=null && ncuadrilla.equals(cuadrillanew)){\n\t\t\t\t\t\t_reasignados.put(grupo, cuadrillaold);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tlogger.info(\" reasignaciones procesadas :\"+_reasignados.toString());\n\t\t_grupos = _reasignados.keySet();\n\t\t// aplicar cambios a las asignaciones\n\t\tfor (Long _grupo : _grupos) {\n\t\t\tthis.reasignaciones.put(_grupo, _reasignados.get(_grupo));\n\t\t\tthis.asignaciones.put(_grupo, _reasignados.get(_grupo));\n\t\t}\n\t\t\n\t\tlogger.info(\" despues \"+asignaciones.toString());\n\t\t\n\t\tList<Cuadrilla> cuadrillas = cuadrillaDao.getCuadrillaList(fecPrgn);\n\t\tList<PlanTrabajo> planTrabajoList = generarPlanesTrabajo(fecPrgn, cuadrillas, mpGruposCached, asignaciones);\n\t\n\t\tplanTrabajoCachedList = new ArrayList<PlanTrabajo>();\n\t\tplanTrabajoCachedList.addAll(planTrabajoList);\n\t\t\n\t\t\n\t\t\n\t\tlogger.info(\"#### reasignaciones finales :\"+reasignaciones.toString());\n\t\t\n\t\tplotPlanesTrabajo(planTrabajoCachedList);\n\t\t \n\t\treturn planTrabajoList;\n\t}" ]
[ "0.71384245", "0.6910704", "0.68548", "0.64479995", "0.6398929", "0.6303028", "0.62719953", "0.6225404", "0.6165996", "0.616413", "0.6126549", "0.6092096", "0.6061155", "0.60437083", "0.6040832", "0.60344577", "0.59764737", "0.59674376", "0.59265316", "0.59151405", "0.5898921", "0.58987015", "0.5892443", "0.5890607", "0.5880083", "0.5876155", "0.5873813", "0.58451635", "0.584506", "0.58407456", "0.58364725", "0.58346534", "0.58160806", "0.5807028", "0.5781344", "0.5777122", "0.57768583", "0.57544404", "0.57542557", "0.5751161", "0.5746069", "0.5743994", "0.5734066", "0.5719986", "0.57177204", "0.57152337", "0.56917405", "0.568153", "0.56814796", "0.5678173", "0.56757706", "0.56738776", "0.5672634", "0.5672174", "0.5654471", "0.5641897", "0.5635418", "0.5591305", "0.55864936", "0.556802", "0.5565692", "0.5557542", "0.5556881", "0.554871", "0.5544516", "0.55392575", "0.55391204", "0.552501", "0.5511599", "0.55110127", "0.55066293", "0.54961395", "0.5493023", "0.5491934", "0.54878736", "0.54829955", "0.54816484", "0.54786146", "0.5476444", "0.54719925", "0.5467693", "0.54664403", "0.5460578", "0.54575676", "0.54271525", "0.5411868", "0.541158", "0.5410801", "0.54065996", "0.5401728", "0.5394153", "0.53929996", "0.53883153", "0.53778374", "0.53778225", "0.537568", "0.5375342", "0.537028", "0.53641325", "0.5360615", "0.535901" ]
0.0
-1
Creates new form WCreateExam
public WCreateExam() { initComponents(); setLocationRelativeTo(null); this.setExamID(); this.updateTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "FORM createFORM();", "Paper addNewPaper(PaperForm form, Long courseId)throws Exception;", "@When(\"click on create exam button1\")\r\n\tpublic void click_on_create_exam_button1() throws Exception {\t\r\n\t\t\r\n\t}", "void save(Exam exam);", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "@PostMapping(produces = \"application/json\", consumes = \"application/json\")\n public ResponseEntity<Exam> create(@RequestBody @Valid CreateInput input, BindingResult result) {\n if (result.hasErrors()) {\n throw new BadRequestException(\"Input values are invalid.\", result.getAllErrors());\n }\n Exam exam = examsService.create(conversionService.convert(input, Exam.class));\n return ResponseEntity.accepted().body(exam);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\t\tnew Add_Lecturer();\n\t\t\t\t\t\n\t\t\t\t}", "private void createSubject(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // Formulareingaben prüfen\n String name = request.getParameter(\"name\");\n\n Subject subject = new Subject(name);\n List<String> errors = this.validationBean.validate(subject);\n\n // Neue Kategorie anlegen\n if (errors.isEmpty()) {\n this.subjectBean.saveNew(subject);\n }\n\n // Browser auffordern, die Seite neuzuladen\n if (!errors.isEmpty()) {\n FormValues formValues = new FormValues();\n formValues.setValues(request.getParameterMap());\n formValues.setErrors(errors);\n\n HttpSession session = request.getSession();\n session.setAttribute(\"subjects_form\", formValues);\n }\n\n response.sendRedirect(request.getRequestURI());\n }", "public static void create() {\n Application.currentUserCan( 1 );\n \n String author = session.get(\"userEmail\");\n String title = params.get( \"course[title]\", String.class );\n String content = params.get( \"course[content]\", String.class );\n \n if( title.length() > 0 && content.length() > 0 ) {\n Course course = new Course(title, content, author);\n course.save();\n }\n \n index();\n }", "public VivaExam() {\n initComponents();\n showDate();\n showTime();\n }", "public com.ms3.training.services.model.Course create(java.lang.String title);", "public void addTeacherWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 240, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 240, 100, 28);\n\n JLabel jLabelIdStudent = new JLabel(\"Saissisez l'ID du professeur à créer : \");\n jLabelIdStudent.setBounds(20, 20, 250, 28);\n\n JTextField jTextFieldId = new JTextField();\n jTextFieldId.setBounds(280, 20, 200, 28);\n\n JLabel jLabelEmail = new JLabel(\"Saissisez l'Email du professeur : \");\n jLabelEmail.setBounds(20, 48, 250, 28);\n\n JTextField jTextFielEmailPart1 = new JTextField();\n jTextFielEmailPart1.setBounds(280, 48, 100, 28);\n JTextField jTextFielEmailPart2 = new JTextField(\"@ece.fr\");\n jTextFielEmailPart2.setBounds(380, 48, 100, 28);\n\n JLabel jLabelPassword = new JLabel(\"Saissisez le mot de passe du professeur : \");\n jLabelPassword.setBounds(20, 80, 280, 28);\n\n JTextField jTextFieldPassword = new JTextField();\n jTextFieldPassword.setBounds(280, 80, 200, 28);\n\n JLabel jLabelLastName = new JLabel(\"Saissisez le nom du professeur : \");\n jLabelLastName.setBounds(20, 108, 250, 28);\n\n JTextField jTextFieldLastName = new JTextField();\n jTextFieldLastName.setBounds(280, 108, 200, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Saissisez le prénom du professeur : \");\n jLabelFirstName.setBounds(20, 140, 250, 28);\n\n JTextField jTextFieldFirstName = new JTextField();\n jTextFieldFirstName.setBounds(280, 140, 200, 28);\n\n JLabel jLabelSelectPromo = new JLabel(\"Selectionner une matière :\");\n jLabelSelectPromo.setBounds(20, 170, 250, 28);\n\n ArrayList<String> promotions = controllerAdmin.getAllIdCourse();\n String[] strCourse = new String[promotions.size()];\n for (int j = 0; j < promotions.size(); j++) {\n strCourse[j] = promotions.get(j);\n }\n JComboBox jComboBoxSelectCourse = new JComboBox(strCourse);\n jComboBoxSelectCourse.setBounds(280, 170, 100, 28);\n\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n addFrame.add(jLabelIdStudent);\n addFrame.add(jTextFieldId);\n addFrame.add(jLabelEmail);\n addFrame.add(jTextFielEmailPart1);\n addFrame.add(jTextFielEmailPart2);\n addFrame.add(jLabelPassword);\n addFrame.add(jTextFieldPassword);\n addFrame.add(jLabelLastName);\n addFrame.add(jTextFieldLastName);\n addFrame.add(jLabelFirstName);\n addFrame.add(jTextFieldFirstName);\n addFrame.add(jLabelSelectPromo);\n addFrame.add(jComboBoxSelectCourse);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n User user = new User();\n if (!jTextFieldId.getText().equals(\"\") && !jTextFielEmailPart1.getText().equals(\"\") && !jTextFieldFirstName.getText().equals(\"\") && !jTextFieldLastName.getText().equals(\"\")){\n if(!user.alreadyExist(jTextFieldId.getText())){\n Teacher teacher = new Teacher(jTextFieldId.getText(), jTextFielEmailPart1.getText() + jTextFielEmailPart2.getText(), jTextFieldPassword.getText(), jTextFieldLastName.getText(), jTextFieldFirstName.getText(), \"TEACHER\", Objects.requireNonNull(jComboBoxSelectCourse.getSelectedItem()).toString());\n teacher.createTeacher();\n }}\n else {\n addTeacherWindow(controllerAdmin);\n System.out.println(\"Erreur Id deja utilise\");\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n addFrame.dispose();\n }\n });\n\n addFrame.setTitle(\"Ajout d'un professeur\");\n addFrame.setSize(600,300);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "public academic() {\n initComponents();\n }", "@Test\n public void newTeacher() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for adding a new teacher. time: \" + LocalDateTime.now());\n\n //Button for opening teacher form\n WebElement buttonPlus = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/button\"));\n buttonPlus.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n Assertions.assertTrue(teacherForm.isInitialized());\n log.info(() -> \"Teacher form is initialized! time: \" + LocalDateTime.now());\n //I found save button with xpath\n teacherForm.setSaveButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button[1]\");\n teacherForm.newTeacher(\"Mirko\",\"Vukovic\", \"[email protected]\");\n\n ReceiptPage newTeacherForm = teacherForm.submitSave();\n log.info(() -> \"Submit new teacher was successfully! time: \" + LocalDateTime.now());\n Assertions.assertTrue(newTeacherForm.isInitialized());\n }", "private void addNewAssessment() {\n //instantiate converters object for LocalDate conversion\n Converters c = new Converters();\n\n //get UI fields\n int courseId = thisCourseId;\n String title = editTextAssessmentTitle.getText().toString();\n LocalDate dueDate = c.stringToLocalDate(textViewAssessmentDueDate.getText().toString());\n String status = editTextAssessmentStatus.getText().toString();\n String note = editTextAssessmentNote.getText().toString();\n String type = editTextAssessmentType.getText().toString();\n\n if (title.trim().isEmpty() || dueDate == null || status.trim().isEmpty() || type.trim().isEmpty()) {\n Toast.makeText(this, \"Please complete all fields\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //instantiate Assessment object\n Assessment assessment = new Assessment(courseId, title, dueDate, status, note, type);\n\n //add new assessment\n addEditAssessmentViewModel.insert(assessment);\n\n //notification\n Long longDue = c.localDateToMilliseconds(dueDate);\n makeAlarm(title+\" is due today.\", longDue);\n\n finish();\n }", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "@Override\n\tpublic boolean addExam(Exam exam) {\n\t\tString sql = \"insert into exam (name, edesc, edue, etype, lid, uid, ispractice) values (?,?,?,?,?,?,?)\";\n\t\tConnection connection = JDBCUtil.getConnection();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tps.setString(1, exam.getName());\n\t\t\tps.setString(2, exam.getEdesc());\n\t\t\tps.setTimestamp(3, new Timestamp(exam.getEdue().getTime()));\n\t\t\tps.setInt(4, exam.getEtype());\n\t\t\tps.setInt(5, exam.getLid());\n\t\t\tps.setInt(6, exam.getUid());\n\t\t\tps.setInt(7, exam.getIfPractice());\n\t\t\tint result = ps.executeUpdate();\n\t\t\treturn result > 0;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\tJDBCUtil.close(connection, ps);\n\t\t}\n\t}", "@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }", "public Student_ADD() {\n initComponents();\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "public StudentExamination() {\n initComponents();\n readExamSlip();\n readExamResult();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\tnew Lecturer();\n\t\t\t\t\n\t\t\t}", "public void AddQuestionToBank(ActionEvent actionEvent) throws IOException {\n QuestionModel questionModel = new QuestionModel();\n ArrayList<QuestionModel> questionBank = DBObject.getInstance().getQuestionBank();\n if(questionName.getText() != null && question.getText() != null && subjects.getValue() != null){\n if(className.getValue() != null && answer.getText() != null){\n if (easy.isSelected() || medium.isSelected() || hard.isSelected()) {\n questionModel.setQuestionName(questionName.getText());\n questionModel.setPointsPossible(Integer.parseInt(points.getText()));\n questionModel.setClassNumber(className.getValue().toString());\n questionModel.setSubject(subjects.getValue().toString());\n questionModel.setQuestion(question.getText());\n questionModel.getQuestionHelper().setAnswer(answer.getText());\n questionModel.setHint(hint.getText());\n if(easy.isSelected()){\n questionModel.setDifficulty(1);\n }\n else if(medium.isSelected()){\n questionModel.setDifficulty(2);\n }\n else if(hard.isSelected()){\n questionModel.setDifficulty(3);\n }\n SetUpNewView(questionBank, questionModel);\n }\n }\n }\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public frm_tutor_subida_prueba() {\n }", "@ModelAttribute(\"student\")\n public Student_gra_84 setupAddForm() {\n return new Student_gra_84();\n }", "public New_appointment() {\n initComponents();\n }", "public void setExam(java.lang.String exam) {\n this.exam = exam;\n }", "public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }", "public void createSurvey(int tid);", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }", "public void newRecord() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tdateTxt.setText(dateFormat.format(new Date()));\n\t\t//mark all students enrolled as attendant\n\t\tif (courseTable.getSelectedRow() != -1) {\n\t\t\tsetWarningMsg(\"\");\n\t\t\tupdateStudent(currentCourse);\n\t\t\tfor (int i = 0; i < studentTable.getRowCount(); i++) {\n\t\t\t\tstudentTable.setValueAt(new Boolean(true), i, 0);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse {\n\t\t\t//show message: choose course first\n\t\t\tsetWarningMsg(\"please select course first\");\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\tnew Add_Subjects();\n\t\t\t\t\n\t\t\t}", "public ExamHolder(MainController controller, Exam exam) {\n this(controller);\n setExam(exam);\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public boolean createLesson() {\n\t\treturn false;\n\t}", "public Create_Course() {\n initComponents();\n comboBoxLec();\n comboBoxDep();\n }", "public FormInserir() {\n initComponents();\n }", "private void setupCreateCourse() {\n\t\tmakeButton(\"Create Course\", (ActionEvent e) -> {\n\t\t\ttry {\n\t\t\t\tString[] inputs = getInputs(new String[] { \"Name:\", \"Number:\" });\n\t\t\t\tif (inputs == null)\n\t\t\t\t\treturn;\n\n\t\t\t\tint num = Integer.parseInt(inputs[1]);\n\t\t\t\tadCon.createCourse(inputs[0], num);\n\t\t\t\tupdateCourses();\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Course number must be a number\", \"Error\",\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t});\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Exit = new javax.swing.JLabel();\n createSubIdTxt = new javax.swing.JTextField();\n createSubId = new javax.swing.JLabel();\n createSubNameTxt = new javax.swing.JTextField();\n createSubName = new javax.swing.JLabel();\n createDepIdTxt = new javax.swing.JComboBox<>();\n createLecId = new javax.swing.JLabel();\n createDepId = new javax.swing.JLabel();\n createLecIdTxt = new javax.swing.JComboBox<>();\n sumbit = new javax.swing.JButton();\n noticeBack = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Create Course\");\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/exit.png\"))); // NOI18N\n Exit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Exit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ExitMouseClicked(evt);\n }\n });\n getContentPane().add(Exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 20, -1, -1));\n\n createSubIdTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 160, 150, 25));\n\n createSubId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubId.setForeground(new java.awt.Color(255, 255, 255));\n createSubId.setText(\"Subject ID\");\n getContentPane().add(createSubId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, -1, -1));\n\n createSubNameTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubNameTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 240, 300, 30));\n\n createSubName.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubName.setForeground(new java.awt.Color(255, 255, 255));\n createSubName.setText(\"Subject Name\");\n getContentPane().add(createSubName, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 240, -1, -1));\n\n getContentPane().add(createDepIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 60, -1, -1));\n\n createLecId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createLecId.setForeground(new java.awt.Color(255, 255, 255));\n createLecId.setText(\"Lecturer ID\");\n getContentPane().add(createLecId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 320, -1, -1));\n\n createDepId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createDepId.setForeground(new java.awt.Color(255, 255, 255));\n createDepId.setText(\"Department ID\");\n getContentPane().add(createDepId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 60, -1, -1));\n\n getContentPane().add(createLecIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 320, -1, -1));\n\n sumbit.setText(\"Submit\");\n sumbit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n sumbit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sumbitActionPerformed(evt);\n }\n });\n getContentPane().add(sumbit, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 410, -1, -1));\n\n noticeBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/interface1.jpg\"))); // NOI18N\n noticeBack.setPreferredSize(new java.awt.Dimension(600, 500));\n getContentPane().add(noticeBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n setLocationRelativeTo(null);\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "@GetMapping(\"/showFormForAdd\")\n\tpublic String showFormForAdd(Model theModel) {\n\t\tSkill theSkill = new Skill();\n\t\t\n\t\ttheModel.addAttribute(\"skill\", theSkill);\n\t\t\n\t\treturn \"skill-form\";\n\t}", "@RequestMapping(value = \"/studentJourney\", method = RequestMethod.POST)\r\n\tpublic ModelAndView studentStartExam(HttpServletRequest request, HttpServletResponse response,\r\n\t\t\t@ModelAttribute(\"studentTestForm\") StudentTestForm studentForm) throws Exception {\n\t\tModelAndView model;\r\n\t\tUser user = (User) request.getSession().getAttribute(\"user\");\r\n\t\tTest test = (Test) request.getSession().getAttribute(\"test\");\r\n\t\tif (test.getFullStackTest() != null && test.getFullStackTest()) {\r\n\t\t\tmodel = new ModelAndView(\"test_fstk\");\r\n\t\t} else {\r\n\t\t\tmodel = new ModelAndView(\"test_cognizant\");\r\n\t\t}\r\n\t\trequest.getSession().setAttribute(\"testStartDate\", new Date());\r\n\t\tList<Section> sections = sectionService.getSectionsForTest(test.getTestName(), test.getCompanyId());\r\n\r\n\t\tint count = 0;\r\n\t\tList<SectionInstanceDto> sectionInstanceDtos = new ArrayList<>();\r\n\t\tint totalQuestions = test.getTotalMarks();\r\n\t\tfor (Section section : sections) {\r\n\t\t\t// from the sections creating an instance of section mapping with test\r\n\t\t\tSectionInstanceDto sectionInstanceDto = new SectionInstanceDto();\r\n\t\t\tsectionInstanceDtos.add(sectionInstanceDto);\r\n\t\t\t// sectionInstanceDto.setCurrent(current);\r\n\t\t\tif (count == 0) {\r\n\t\t\t\tsectionInstanceDto.setCurrent(true);\r\n\r\n\t\t\t\tList<QuestionMapper> questionMappers = questionMapperService.getQuestionsForSection(\r\n\t\t\t\t\t\ttest.getTestName(), section.getSectionName(), user.getCompanyId());\r\n\t\t\t\tCollections.shuffle(questionMappers);\r\n\t\t\t\tList<QuestionMapper> questionMappersActual = questionMappers.subList(0,\r\n\t\t\t\t\t\tsection.getNoOfQuestionsToBeAsked());\r\n\t\t\t\tList<QuestionInstanceDto> questionMapperInstances = new ArrayList<QuestionInstanceDto>();\r\n\t\t\t\tint pos = 0;\r\n\t\t\t\tfor (QuestionMapper questionMapper : questionMappersActual) {\r\n\t\t\t\t\t// creating the instances of question mapper instance entity\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuestionInstanceDto questionInstanceDto = new QuestionInstanceDto();\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tquestionInstanceDto.setPosition(pos);\r\n\t\t\t\t\tQuestionMapperInstance questionMapperInstance = null;\r\n\t\t\t\t\tif (section.getPercentQuestionsAsked() == 100) {\r\n\t\t\t\t\t\tquestionMapperInstance = questionMapperInstanceRep\r\n\t\t\t\t\t\t\t\t.findUniqueQuestionMapperInstanceForUser(\r\n\t\t\t\t\t\t\t\t\t\tquestionMapper.getQuestion()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getQuestionText(),\r\n\t\t\t\t\t\t\t\t\t\ttest.getTestName(),\r\n\t\t\t\t\t\t\t\t\t\tsection.getSectionName(),\r\n\t\t\t\t\t\t\t\t\t\tuser.getEmail(), user.getCompanyId());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (questionMapperInstance == null) {\r\n\t\t\t\t\t\tquestionMapperInstance = new QuestionMapperInstance();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tquestionInstanceDto.setQuestionMapperInstance(questionMapperInstance);\r\n\t\t\t\t\tquestionMapperInstance.setQuestionMapper(questionMapper);\r\n\t\t\t\t\tquestionMapperInstances.add(questionInstanceDto);\r\n\t\t\t\t\tif (questionMapper.getQuestion().getQuestionType() != null && questionMapper.getQuestion()\r\n\t\t\t\t\t\t\t.getQuestionType().getType().equals(QuestionType.CODING.getType())) {\r\n\t\t\t\t\t\tquestionInstanceDto.setCode(questionMapper.getQuestion().getInputCode());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsectionInstanceDto.setFirst(true);\r\n\t\t\t\tsectionInstanceDto.setQuestionInstanceDtos(questionMapperInstances);\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * For only 1 Q and 1 section..adding this\r\n\t\t\t\t */\r\n\t\t\t\tif (sections.size() == 1) {\r\n\t\t\t\t\tif (questionMappersActual.size() == 1) {\r\n\t\t\t\t\t\tsectionInstanceDto.setLast(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * End For only 1 Q and 1 section..adding this\r\n\t\t\t\t */\r\n\r\n\t\t\t\tmodel.addObject(\"currentSection\", sectionInstanceDto);\r\n\t\t\t\tmodel.addObject(\"currentQuestion\", questionMapperInstances.get(0));\r\n\t\t\t\trequest.getSession().setAttribute(\"currentSection\", sectionInstanceDto);\r\n\t\t\t\t/**\r\n\t\t\t\t * Get the fullstack for Q if type is full stack.\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tif (!questionMapperInstances.get(0).getQuestionMapperInstance().getQuestionMapper().getQuestion()\r\n\t\t\t\t\t\t.getFullstack().getStack().equals(FullStackOptions.NONE.getStack())) {\r\n\t\t\t\t\tsetWorkspaceIDEForFullStackQ(request, questionMapperInstances.get(0));\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * End full stack check\r\n\t\t\t\t */\r\n\t\t\t}\r\n\t\t\tsectionInstanceDto.setNoOfQuestions(section.getNoOfQuestionsToBeAsked());\r\n\t\t\tsectionInstanceDto.setSection(section);\r\n\t\t\tcount++;\r\n\t\t\t// fetch the questions based on the associated sections\r\n\r\n\t\t}\r\n\r\n\t\trequest.getSession().setAttribute(\"sectionInstanceDtos\", sectionInstanceDtos);\r\n\t\tputMiscellaneousInfoInModel(model, request);\r\n\t\tmodel.addObject(\"sectionInstanceDtos\", sectionInstanceDtos);\r\n\t\tmodel.addObject(\"percentage\", \"0\");\r\n\t\tmodel.addObject(\"totalQuestions\", \"\" + totalQuestions);\r\n\t\tmodel.addObject(\"noAnswered\", \"0\");\r\n\t\tmodel.addObject(\"confidenceFlag\", test.getConsiderConfidence());\r\n\t\treturn model;\r\n\t}", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}", "private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "@PostMapping(\"/addFormation/{eid}\")\n\t\tpublic Formation createFormation(@PathVariable(value = \"eid\") Long Id, @Valid @RequestBody Formation formationDetails) {\n\n\t\t \n\t\t Formation me=new Formation();\n\t\t\t Domaine domaine = Domainev.findById(Id).orElseThrow(null);\n\t\t\t \n\t\t\t \n\t\t\t\t me.setDom(domaine);\n\t\t\t me.setTitre(formationDetails.getTitre());\n\t\t\t me.setAnnee(formationDetails.getAnnee());\n\t\t\t me.setNb_session(formationDetails.getNb_session());\n\t\t\t me.setDuree(formationDetails.getDuree());\n\t\t\t me.setBudget(formationDetails.getBudget());\n\t\t\t me.setTypeF(formationDetails.getTypeF());\n\t\t\t \n\t\t\t \n\n\t\t\t //User affecterUser= \n\t\t\t return Formationv.save(me);\n\t\t\t//return affecterUser;\n\t\t\n\n\t\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "public void createQuestion(int sid,int qid,String qtype,String qtitle,String answer_a,String answer_b,String answer_c,String answer_d);", "void addExamToModule(Module module, Exam exam);", "public PanelPhysicalExam() {\n initComponents();\n setLanguage(null);\n }", "@Override\r\n\tpublic boolean addExam(IExam exam) {\n\t\treturn false;\r\n\t}", "public Add_Lecture_Form() {\n initComponents();\n \n this.setVisible(true);\n this.pack();\n this.setLocationRelativeTo(null);\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public void createCourse(String courseName, int courseCode){}", "public EditCourseForm() {\n initComponents();\n }", "@RequestMapping(value = \"addQuestion\", method = RequestMethod.POST)\r\n\tpublic ModelAndView addQuestion(@ModelAttribute AdminFormBean formBean) {\r\n\t\tModelAndView modelAndView = new ModelAndView(\"questionPage\");\r\n\t\tquestionService.addQuestion(formBean.getQuestion());\r\n\t\tformBean.setQuestionList(questionService.getQuestionByCategoryId(formBean.getQuestion().getCategoryId()));\r\n\t\tmodelAndView.addObject(\"adminForm\", formBean);\r\n\t\treturn modelAndView;\r\n\t}", "CourseExam<OOPExamActivities> fullOopExam();", "@FXML\n private void newStudent() {\n System.out.println(\"trying to insert new student to database\");\n DBhandler db = new DBhandler();\n Student s = new Student(\n txfID.getText(),\n txfFirstName.getText(),\n txfLastName.getText(),\n txfAddress.getText(),\n txfZIP.getText(),\n txfZIPloc.getText(),\n txfEmail.getText(),\n txfPhone.getText()\n );\n System.out.println(s.toString());\n db.insertStudent(s);\n Cancel(new ActionEvent());\n }", "Exam(String examType, int maxMarks ,float contribution ,float obtainedMarks ,boolean proctored, String courseName){\n this.examType = examType;\n this.maxMarks = maxMarks;\n this.contribution = contribution;\n this.obtainedMarks = obtainedMarks;\n this.proctored = proctored;\n this.courseName = courseName;\n }", "public void actionPerformed(ActionEvent e){\n \t\t \tstudentsController.addStudent();\n \t\t }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(Model theModel) {\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t// add student object to the model\n\t\ttheModel.addAttribute(theStudent);\n\t\t\n\t\t// add the department options to the model \n\t theModel.addAttribute(\"departmentOptions\", departmentOptions); \n\t \n\t LinkedHashMap<String, String> favoriteLanguageOptions = new LinkedHashMap<String, String>();\n\t favoriteLanguageOptions.put(\"Java\", \"Java\");\n favoriteLanguageOptions.put(\"C#\", \"C#\");\n favoriteLanguageOptions.put(\"PHP\", \"PHP\");\n favoriteLanguageOptions.put(\"Ruby\", \"Ruby\"); \n\t theModel.addAttribute(\"favoriteLanguageOptions\", favoriteLanguageOptions); \n\n\t\treturn \"student-form\";\n\t}", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "public Project_Create() {\n initComponents();\n }", "public Team create(TeamDTO teamForm);", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "@GetMapping(\"/showFormForAdd\")\n public String showFormForAdd(Model theModel) {\n Associate a=new Associate();\n Skill b = new Skill();\n b.setAssociates(a);\n theModel.addAttribute(\"skill\", b);\n return \"skill-form\";\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Add_Lecturer = new javax.swing.JPanel();\n jPanel8 = new javax.swing.JPanel();\n jPanel13 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n lecturer_name = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n lecturer_employeeID = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n faculty_combo = new javax.swing.JComboBox();\n jLabel8 = new javax.swing.JLabel();\n department_combo = new javax.swing.JComboBox();\n jLabel9 = new javax.swing.JLabel();\n center_combo = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n building_combo = new javax.swing.JComboBox();\n jLabel11 = new javax.swing.JLabel();\n level_combo = new javax.swing.JComboBox();\n ADD_NEW_LECTURER_BUTTON = new javax.swing.JButton();\n CANCEL_BUTTON = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Add_Lecturer.setBackground(new java.awt.Color(204, 204, 255));\n\n jPanel8.setBackground(new java.awt.Color(0, 0, 51));\n\n jPanel13.setBackground(new java.awt.Color(204, 204, 255));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel2.setText(\"Name : \");\n\n lecturer_name.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel6.setText(\"Employee ID : \");\n\n lecturer_employeeID.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel7.setText(\"Faculty : \");\n\n faculty_combo.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n faculty_combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select Faculty\", \"Computing\", \"Engineering\", \"Business\", \"Humanities & Science\" }));\n faculty_combo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faculty_comboActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel8.setText(\"Department : \");\n\n department_combo.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n department_combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select Department\", \"Software Engineering\", \"Computer System Network\", \"Information Technology. Civil Engineering\", \"Electronic Engineering\", \"Material Engineering\", \"\" }));\n department_combo.setToolTipText(\"\");\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel9.setText(\"Center : \");\n\n center_combo.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n center_combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select Center\", \"Malabe\", \"Metro\", \"Matara\", \"Kandy\" }));\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel10.setText(\"Building : \");\n\n building_combo.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n building_combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select Building\", \"A-Block\", \"B-Block\", \"C-Block\", \"D-Block\", \"E-Block\" }));\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel11.setText(\"Level : \");\n\n level_combo.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n level_combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select Level\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\" }));\n\n ADD_NEW_LECTURER_BUTTON.setBackground(new java.awt.Color(51, 255, 0));\n ADD_NEW_LECTURER_BUTTON.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n ADD_NEW_LECTURER_BUTTON.setText(\"Add New Lecturer\");\n ADD_NEW_LECTURER_BUTTON.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ADD_NEW_LECTURER_BUTTONActionPerformed(evt);\n }\n });\n\n CANCEL_BUTTON.setBackground(new java.awt.Color(255, 51, 51));\n CANCEL_BUTTON.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n CANCEL_BUTTON.setText(\"Cancel\");\n CANCEL_BUTTON.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCEL_BUTTONActionPerformed(evt);\n }\n });\n\n jLabel5.setBackground(new java.awt.Color(0, 0, 0));\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel5.setText(\"Add New Lecturer\");\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel13.setText(\"( 1-Professor, 2-Assistant Professor, 3-Senior Lecturer(HG),\");\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel14.setText(\"4-Senior Lecturer, 5-Lecturer, 6-Assistant Lecturer, 7-Instructors )\");\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(58, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addComponent(CANCEL_BUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(ADD_NEW_LECTURER_BUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(building_combo, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(center_combo, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(department_combo, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(faculty_combo, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lecturer_employeeID, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lecturer_name, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(level_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(170, 170, 170)))\n .addContainerGap(57, 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()\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 36, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lecturer_name, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lecturer_employeeID, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(faculty_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(department_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(center_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(building_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(level_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(43, 43, 43)\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(CANCEL_BUTTON, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ADD_NEW_LECTURER_BUTTON, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel3.setBackground(new java.awt.Color(153, 153, 255));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/logo.png\"))); // NOI18N\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 .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)\n );\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 51));\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 .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 39, Short.MAX_VALUE)\n );\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 .addGap(10, 10, 10)\n .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 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 .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9)\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(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout Add_LecturerLayout = new javax.swing.GroupLayout(Add_Lecturer);\n Add_Lecturer.setLayout(Add_LecturerLayout);\n Add_LecturerLayout.setHorizontalGroup(\n Add_LecturerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n Add_LecturerLayout.setVerticalGroup(\n Add_LecturerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 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 .addGap(0, 688, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Add_Lecturer, javax.swing.GroupLayout.Alignment.TRAILING, 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 .addGap(0, 860, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Add_Lecturer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "public AttendanceForm() {\n super();\n initComponents();\n attendanceTableModel = new AttendanceTableModel();\n attendanceTable.setModel(attendanceTableModel);\n }", "@RequestMapping(value = \"/staff/programcreate\")\n\tpublic String redirectToProgramCreate(Model model) {\n\t\tProgram program = new Program();\n\t\tmodel.addAttribute(\"program\", program);\n\t\treturn \"staff/programcreate\";\n\t}", "public ExamIF newGeneratedExam(String version) {\n\t\treturn new Exam(false, version);\n\t}", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public long add(String name, String discipline, String grade) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return 0;\n }\n ContentValues row = new ContentValues();\n row.put(\"name\", name);\n row.put(\"discipline\", discipline);\n row.put(\"grade\", grade);\n long id = db.insert(\"Exams\", null, row);\n db.close();\n return id;\n }", "private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }", "public manage_employee_attendance() {\n initComponents();\n }", "@FXML\n private void goToCreateProgram(ActionEvent event) throws IOException {\n\n CreateProgramController createProgramController = new CreateProgramController();\n Program programEntity = createProgramController.openView(event);\n createProgram.setSelected(false);\n if (programEntity != null && programListController != null)\n {\n if (programListController.listOfPrograms != null)\n {\n programListController.listOfPrograms.add(programEntity);\n programListController.updateProgramList();\n UsermanagementUtilities.setFeedback(event,\"The program was created\",true);\n }\n } else {\n UsermanagementUtilities.setFeedback(event,\"The program was not created\",false);\n }\n }", "public void crearProgramaFormacion(String nombre, String descripcion, Date fechaI, Date fechaF, Date fechaA, String url) throws ProgramaFormacionExcepcion;", "private void teaInfoAddActionPerformed(ActionEvent evt) throws SQLException, Exception {//添加老师新信息\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n String teaID = this.teaIDText.getText();\n String teaName = this.teaNameText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaInterestText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null,\"教工号不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaName)){\n JOptionPane.showMessageDialog(null,\"姓名不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null,\"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null,\"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null,\"手机不能为空!\");\n return;\n }\n if(teaID.length() != 11){\n JOptionPane.showMessageDialog(null,\"教工号位数不为11位!\");\n return;\n } \n if(!StringUtil.isAllNumber(teaID)){\n JOptionPane.showMessageDialog(null,\"教工号不为纯数字!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null,\"手机号位数不为11位!\");\n return;\n } \n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null,\"手机号不为纯数字!\");\n return;\n }\n Connection con = null;\n con = dbUtil.getConnection();\n if(teacherInfo.checkExist(con, teaID)){\n JOptionPane.showMessageDialog(null,\"当前教工号已存在,请勿重复添加!\");\n return;\n }\n Teacher teacher = new Teacher(teaID,teaName,teaSex,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n try{\n con = dbUtil.getConnection();\n int result = teacherInfo.teacherInfoAdd(con, teacher);\n if(result == 1){\n JOptionPane.showMessageDialog(null,\"老师添加成功!\");\n resetTeaInfo();//重置老师信息所有栏\n return;\n }\n else{\n JOptionPane.showMessageDialog(null,\"老师添加失败!\");\n return;\n }\n }catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public TeacherForm() {\n initComponents();\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n String method = request.getParameter(\"method\");\r\n \r\n if(method.equals(\"insertExam\")){\r\n try{\r\n String name = request.getParameter(\"name\");\r\n\r\n DateFormat sourceFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n String expDateAsString = request.getParameter(\"expeditionDate\");\r\n Date expDate = sourceFormat.parse(expDateAsString);\r\n\r\n String realDateAsString = request.getParameter(\"realizationDate\");\r\n Date realDate = sourceFormat.parse(realDateAsString);\r\n\r\n String certDateAsString = request.getParameter(\"certificationDate\");\r\n Date certDate = sourceFormat.parse(certDateAsString);\r\n \r\n String description = request.getParameter(\"description\");\r\n \r\n ExamController examController = new ExamController();\r\n examController.insert(name, expDate, realDate, certDate, description);\r\n }catch(Exception e){\r\n \r\n }\r\n }\r\n if(method.equals(\"findExam\")){\r\n ExamController examController = new ExamController();\r\n int id = Integer.parseInt( request.getParameter(\"id\") );\r\n System.out.println(id);\r\n Exams exam = examController.findById(id);\r\n String examData = \"\";\r\n\r\n examData += exam.getName();\r\n \r\n int month = exam.getExpeditionDate().getMonth() + 1;\r\n \r\n if( month < 10 )\r\n examData += \",\"+exam.getExpeditionDate().getDate()+\"/0\"+month+\"/\"+(exam.getExpeditionDate().getYear()+1900);\r\n else\r\n examData += \",\"+exam.getExpeditionDate().getDate()+\"/\"+month+\"/\"+(exam.getExpeditionDate().getYear()+1900);\r\n\r\n month = exam.getRealizationDate().getMonth() + 1;\r\n if( month < 10 )\r\n examData += \",\"+exam.getRealizationDate().getDate()+\"/0\"+month+\"/\"+(exam.getRealizationDate().getYear()+1900);\r\n else\r\n examData += \",\"+exam.getRealizationDate().getDate()+\"/\"+month+\"/\"+(exam.getRealizationDate().getYear()+1900);\r\n\r\n month = exam.getCertificationDate().getMonth() + 1;\r\n if( month < 10 )\r\n examData += \",\"+exam.getCertificationDate().getDate()+\"/0\"+month+\"/\"+(exam.getCertificationDate().getYear()+1900);\r\n else\r\n examData += \",\"+exam.getCertificationDate().getDate()+\"/\"+month+\"/\"+(exam.getCertificationDate().getYear()+1900);\r\n \r\n examData += \",\"+exam.getDescription();\r\n \r\n PrintWriter out = response.getWriter();\r\n out.print(examData);\r\n }\r\n \r\n if(method.equals(\"updateExam\")){\r\n try{\r\n int examId = Integer.parseInt( request.getParameter(\"id\") );\r\n System.out.println(\"id : \" + examId);\r\n String name = request.getParameter(\"name\");\r\n\r\n DateFormat sourceFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n String expDateAsString = request.getParameter(\"expeditionDate\");\r\n Date expDate = sourceFormat.parse(expDateAsString);\r\n\r\n String realDateAsString = request.getParameter(\"realizationDate\");\r\n Date realDate = sourceFormat.parse(realDateAsString);\r\n\r\n String certDateAsString = request.getParameter(\"certificationDate\");\r\n Date certDate = sourceFormat.parse(certDateAsString);\r\n \r\n String description = request.getParameter(\"description\");\r\n \r\n ExamController examController = new ExamController();\r\n examController.update(examId, name, expDate, realDate, certDate, description);\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n if(method.equals(\"deleteExam\")){\r\n try{\r\n ExamController examController = new ExamController();\r\n int id = Integer.parseInt( request.getParameter(\"id\") );\r\n System.out.println(id);\r\n Exams exam = examController.findById(id);\r\n examController.deleteExam(exam);\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n if(method.equals(\"examResults\")){\r\n try{\r\n ExamController examController = new ExamController();\r\n Collection<ExamResult> examResults = examController.getResultsByExam();\r\n String results = \"\";\r\n for(ExamResult examResult: examResults){\r\n results += \"$$\" + examResult.getExam().getExamId() + \"&&\" + examResult.getExam().getName() + \"&&\" + examResult.getPassed() + \"&&\" + examResult.getFailed();\r\n }\r\n System.out.println(results);\r\n results = results.substring(2);\r\n PrintWriter out = response.getWriter();\r\n out.print(results);\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n processRequest(request, response);\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\tnew Add_StudentGroup();\n\t\t\t\t\n\t\t\t}", "public void createNewSchoolOnClick(View v){\n Intent intent = new Intent(this, CreateSchoolActivity.class);\n startActivity(intent);\n }", "@RequestMapping(\"/new\")\n public String newStudent(ModelMap view) {\n Student student = new Student();\n view.addAttribute(\"student\", student);\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString title = textTitle.getText();\n\t\t\t\tString producer = txtProducer.getText();\n\t\t\t\tString price = txtPricePerBox.getText();\n\t\t\t\tString quantity = txtQuantityPerBox.getText();\n\t\t\t\t\n\t\t\t\tif(title.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Title is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\tif(producer.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Producer is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(price.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Price is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(quantity.isEmpty()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Quntity is empty\");\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Pharmacy p = new Pharmacy(0, title, address);\n\t\t\t\tMedicine m = new Medicine(0,title,producer,Double.parseDouble(price),Integer.parseInt(quantity));\n\t\t\t\tboolean res = MedicineDataContext.getInstance().addMedicine(m);\n\t\t\t\t\n\t\t\t\tif(res){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"S U C C\");\n\t\t\t\t\tNewMedicineWindow.this.setVisible(false);\n\t\t\t\t\tNewMedicineWindow.this.dispose();\n\t\t\t\t}\n\t\t\t}" ]
[ "0.646293", "0.62106127", "0.60245466", "0.60163295", "0.59857255", "0.5913901", "0.5814856", "0.57741356", "0.5720033", "0.5711805", "0.5692251", "0.56665283", "0.5635106", "0.562927", "0.56092143", "0.55785084", "0.5569844", "0.55604005", "0.5507355", "0.5501129", "0.5500769", "0.5500294", "0.5491515", "0.5479229", "0.5476804", "0.5461393", "0.5460659", "0.5446599", "0.54265034", "0.5399118", "0.53971136", "0.5396369", "0.5396086", "0.53939265", "0.5384623", "0.5380654", "0.53753924", "0.53675276", "0.535708", "0.5328457", "0.53220046", "0.53186685", "0.5316333", "0.53069454", "0.5288001", "0.5285441", "0.52779657", "0.52743614", "0.5272524", "0.5261505", "0.5260184", "0.5253086", "0.5249767", "0.5246876", "0.5241415", "0.5238019", "0.5225825", "0.52220947", "0.52160436", "0.5212195", "0.5209329", "0.520331", "0.5203032", "0.51949054", "0.5187558", "0.51794666", "0.51776046", "0.5174159", "0.5170771", "0.5168682", "0.5168505", "0.51683813", "0.51679575", "0.5159018", "0.5153032", "0.51459515", "0.5140661", "0.51401955", "0.51396185", "0.5128391", "0.512628", "0.5121087", "0.5117481", "0.5109993", "0.5108707", "0.51081145", "0.51054925", "0.51016814", "0.5101608", "0.5091629", "0.5087849", "0.5087546", "0.5087483", "0.50837183", "0.5073647", "0.50699306", "0.50617105", "0.5058588", "0.505855", "0.50577086" ]
0.70548064
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); tfExamID = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jdtYear = new com.toedter.calendar.JYearChooser(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); cmbMonth = new mysd.C_CMBMonth(); cmbType = new mysd.C_CMBExamType(); jScrollPane1 = new javax.swing.JScrollPane(); tblExams = new javax.swing.JTable(); btnUpdate = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); tfStartDate = new acr.component.CDateField(); tfEndDate = new acr.component.CDateField(); jLabel6 = new javax.swing.JLabel(); tfExamIDED = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("Exam ID"); tfExamID.setFont(new java.awt.Font("Tahoma", 1, 18)); tfExamID.setHorizontalAlignment(javax.swing.JTextField.CENTER); tfExamID.setEnabled(false); jLabel2.setText("Exam Type"); jdtYear.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jdtYearPropertyChange(evt); } }); jLabel3.setText("Exam Month"); jLabel4.setText("Exam Year"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel1) .addComponent(jLabel4)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tfExamID, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) .addComponent(jdtYear, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cmbType, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) .addComponent(cmbMonth, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(19, 19, 19) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(tfExamID, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(cmbType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(cmbMonth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jLabel4)) .addGroup(jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jdtYear, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(16, Short.MAX_VALUE)) ); tblExams.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null} }, new String [] { "Exam ID", "Exam Type", "Month", "Year", "Start Date", "End Date" } )); tblExams.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tblExamsMouseClicked(evt); } }); jScrollPane1.setViewportView(tblExams); btnUpdate.setText("Update"); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); btnEdit.setText("Edit"); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); btnSave.setText("Save"); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); jLabel5.setText("Start Date"); jLabel6.setText("End Date"); tfExamIDED.setEditable(false); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnUpdate)) .addGroup(layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tfEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tfStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(27, 27, 27)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 605, Short.MAX_VALUE) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addComponent(tfExamIDED, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(451, Short.MAX_VALUE)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(62, 62, 62) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(tfStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6))) .addGroup(layout.createSequentialGroup() .addGap(15, 15, 15) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) .addComponent(tfExamIDED, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7321233", "0.72922724", "0.72922724", "0.72922724", "0.7287021", "0.7250113", "0.7214902", "0.7209478", "0.71973455", "0.71915394", "0.71855843", "0.71602577", "0.7149222", "0.70949143", "0.70813066", "0.70579875", "0.6988272", "0.6978623", "0.6956488", "0.6954857", "0.69464177", "0.6943629", "0.69367987", "0.6933018", "0.6929331", "0.69254756", "0.6925112", "0.6913102", "0.69126385", "0.6894097", "0.6893964", "0.68917936", "0.6891495", "0.68895847", "0.68845505", "0.688321", "0.6882532", "0.6878455", "0.68770224", "0.68752515", "0.6872487", "0.6861657", "0.6857395", "0.68569964", "0.6856607", "0.68555", "0.6854448", "0.6854003", "0.6854003", "0.68440473", "0.6838224", "0.6837637", "0.6829588", "0.6829244", "0.68277496", "0.68251204", "0.68236995", "0.68180907", "0.6817601", "0.681135", "0.680981", "0.680977", "0.68097097", "0.6807759", "0.6803703", "0.6795666", "0.67947936", "0.6793619", "0.6790796", "0.67902565", "0.67899716", "0.67888206", "0.67829174", "0.67670804", "0.6766693", "0.67661726", "0.6757112", "0.67564726", "0.67534983", "0.6751943", "0.67434925", "0.6739915", "0.6737868", "0.6737343", "0.673493", "0.6728943", "0.67285377", "0.672136", "0.6716568", "0.671613", "0.67153496", "0.67092025", "0.67079633", "0.6704689", "0.67022705", "0.6701755", "0.6700168", "0.66992295", "0.669491", "0.6692837", "0.6690047" ]
0.0
-1
dataimport menu choose file
public PIMPage()throws IOException { PageFactory.initElements(driver,this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getDataFromFileOptionsOpen(ActionEvent event) throws Exception {\n\n //file choose\n FileChooser fileChooser = new FileChooser();\n SelectFileButton.setOnAction(e -> {\n try {\n FileImportNameTxtF.clear();\n File selectedFile = fileChooser.showOpenDialog(null);\n //fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\".txt\"));//only shows .txt files to user\n FileImportNameTxtF.appendText(selectedFile.getPath());\n\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n //submit file\n SubmitFileButton.setOnAction(e -> {\n a[0] = FileImportNameTxtF.getText();\n\n });\n }", "private void openPressed(){\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showOpenDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\n\t\t\tSaveFile saveFile = null;\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectInputStream input = new ObjectInputStream(new FileInputStream(file));\n\t\t\t\tsaveFile = (SaveFile) input.readObject();\n\t\t\t\tinput.close();\n\t\t\t\tVariable.setList(saveFile.getVariables());\n\t\t\t\tUserFunction.setFunctions(saveFile.getFunctions());\n\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\tSystem.out.println(\"Open Success\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {\n\t\tCyFileFilter tempCFF = new CyFileFilter();\n\n\t\tFile file = FileUtil.getFile(\"Import Network Files\", FileUtil.LOAD);\n\n\t\tfileNameTextField.setText(file.getAbsolutePath());\n\t\trunButton.setEnabled(true);\n\t}", "public void getDataFromFileOptionsExport(ActionEvent event) throws Exception {}", "@FXML public void handleImportButton() {\n\t\tSystem.out.println(\"Import Button Clicked!\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"SENTA features selection\", \"*.sfs\"), new ExtensionFilter(\"All files\", \"*.*\"));\n\t\tfileChooser.setTitle(\"Please specify which file you want to import\");\n\t\ttry {\n\t\t\t\tString fileToOpen = fileChooser.showOpenDialog(Main.primaryStage).getPath();\n\t\t\t\tif (ConfirmBox.display(\"Import features configuration?\", \"Are you sure you want to import the selected set of features?\")) {\n\t\t\t\t\tReader.importFeatures(fileToOpen);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/SelectBasicFeaturesWindow.fxml\"));\n\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\tMain.primaryStage.show();\n\t\t\t\t\n\t\t} catch (NullPointerException exepction) {\n\t\t\tSystem.out.println(exepction.getMessage());\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void loadFile(){\n returnValue = this.showOpenDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n selected = new File(this.getSelectedFile().getAbsolutePath());\n Bank.customer=(new CustomerFileReader(selected)).readCustomer();\n }\n }", "public void chooseDatasetDescriptionFile() {\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDatasetDescriptionFile\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.FILES_AND_DIRECTORIES);\n FileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\n \"XML-filer\", \"xml\");\n fileChooser.setFileFilter(fileFilter);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n datasetDescriptionFile = fileChooser.getSelectedFile();\n\n datasetDescriptionFileTextField.setText(\n datasetDescriptionFile.getAbsolutePath());\n defaultDirectory = datasetDescriptionFile.getPath();\n }\n enableStartButton();\n }", "private void importObjFile()\r\n {\r\n int returnState = importObjFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = importObjFileChooser.getSelectedFile();\r\n importObjUriInBackground(file.toURI());\r\n } \r\n }", "private void processChooseFileButton() {\n try {\n dataOutputArea.setText(\"\");\n JFileChooser myFileChooser = new JFileChooser(\".\", FileSystemView.getFileSystemView());\n int returnValue = myFileChooser.showOpenDialog(null);\n if(returnValue == JFileChooser.APPROVE_OPTION) {\n selectedFile = myFileChooser.getSelectedFile();\n dataFileField.setText(selectedFile.getName());\n }\n } catch(Exception e) {\n System.out.println(\"There was an error with JFileChooser!\\n\\n\" + e.getMessage());\n } //end of catch()\n }", "protected void actionPerformedImport ()\n {\n System.out.println (\"Import selected\");\n if (chooser.showOpenDialog (PreferencesDialog.this) == JFileChooser.APPROVE_OPTION)\n {\n try\n {\n InputStream in = new FileInputStream (chooser.getSelectedFile ());\n Preferences.importPreferences (in);\n in.close ();\n this.invalidate ();\n this.jTableEdition.repaint ();\n this.jTreePreferences.repaint ();\n this.repaint ();\n }\n catch (Exception e)\n {\n e.printStackTrace ();\n JOptionPane.showMessageDialog (this, stringDatabase.getString (e.getMessage ()),\n stringDatabase.getString (e.getMessage ()),\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "private void choosefileBtnActionPerformed(ActionEvent evt) {\r\n JFileChooser filechooser = new JFileChooser();\r\n int returnValue = filechooser.showOpenDialog(panel);\r\n if(returnValue == JFileChooser.APPROVE_OPTION) {\r\n filename = filechooser.getSelectedFile().toString();\r\n fileTxtField.setText(filename);\r\n codeFile = filechooser.getSelectedFile();\r\n assemblyreader = new mipstoc.read.CodeReader(codeFile);\r\n inputTxtArea.setText(assemblyreader.getString());\r\n }\r\n \r\n }", "public void importFileClick() {\n\n //Lets the user choose a file location\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Open Resource File\");\n fileChooser.setInitialDirectory(new File(System.getProperty(\"user.dir\")));\n fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Run-length encoding\",\n \"*.rle\"));\n File file = fileChooser.showOpenDialog(new Stage());\n\n //If a file was chosen, will stop the game and set the generation to 0 and try to load the file.\n if (file != null) {\n timeline.stop();\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n try {\n fileHandler.readGameBoardFromDisk(file);\n } catch (IOException ie) {\n //Produces a warning if unsuccessful\n PopUpAlerts.ioAlertFromDisk();\n }\n }\n\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n isMovable = true;\n canvasArea.requestFocus();\n setFocusTraversable(false);\n\n //Resets offset to accommodate for the new pattern and calls draw().\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n }", "private void startFileSelection() {\n final Intent chooseFile = new Intent(Intent.ACTION_GET_CONTENT);\n chooseFile.setType(getString(R.string.file_type));\n startActivityForResult(chooseFile, PICK_FILE_RESULT_CODE);\n }", "public void openFile(ActionEvent e) {\r\n JFileChooser chooser = new JFileChooser();\r\n\r\n int returnVal = chooser.showOpenDialog(null);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) {\r\n this.is_alg_started = false;\r\n this.is_already_renumbered = false;\r\n if (e.getActionCommand().equals(\"nodelist\")) {\r\n this.nodefileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n if (e.getActionCommand().equals(\"edgelist\")) {\r\n this.edgeFileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n }\r\n }", "@Override\n public void actionPerformed(AnActionEvent event) {\n\n Project project = event.getData(PlatformDataKeys.PROJECT);\n\n DataContext dataContext = event.getDataContext();\n VirtualFile file = DataKeys.VIRTUAL_FILE.getData(dataContext);\n if(file != null){\n //获取选中的文件\n file = DataKeys.VIRTUAL_FILE.getData(dataContext);\n if(file == null){\n Messages.showErrorDialog(\"未选中文件\",\"error\");\n return;\n }\n }\n Module module = StringUtil.getModule(event.getProject(),dataContext,file.getPath());\n ExportDialog exportDialog = new ExportDialog(project,module,file);\n exportDialog.setTitle(\"Export Files\");\n exportDialog.show();\n }", "private void actionImport() {\n ImportPanel myPanel = new ImportPanel();\n int result = JOptionPane.showConfirmDialog(this, myPanel, \"Import\",\n JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxInhList].getText(),\n layoutPanel.inhNList, LayoutPanel.INH);\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxActList].getText(),\n layoutPanel.activeNList, LayoutPanel.ACT);\n readNeuronListFromFile(\n myPanel.tfields[ImportPanel.idxPrbList].getText(),\n layoutPanel.probedNList, LayoutPanel.PRB);\n\n Graphics g = layoutPanel.getGraphics();\n layoutPanel.writeToGraphics(g);\n }\n }", "void selectFile(){\n JLabel lblFileName = new JLabel();\n fc.setCurrentDirectory(new java.io.File(\"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showOpenDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n lblFileName.setText(fc.getSelectedFile().toString());\n }else {\n lblFileName.setText(\"the file operation was cancelled\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "public void handleImport(ActionEvent actionEvent) {\n\t}", "@FXML\n public void openFile(Event e) {\n String inputData = \"\";\n File file = chooser.showOpenDialog(open.getScene().getWindow());\n\n try {\n inputData = new String(Files.readAllBytes(file.toPath()));\n } catch (IOException error) {\n error.getSuppressed();\n }\n\n input.setFont(Font.font(\"monospaced\"));\n input.setText(inputData);\n\n Stage primary = (Stage) open.getScene().getWindow();\n primary.setTitle(file.getName());\n }", "public static void processOneFileSelecction()\n {\n int answer = JSoundsMainWindowViewController.jfcOneFile.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jfcOneFile.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jfcOneFile.getSelectedFile().getName();\n UtilFunctions.listOneFile(JSoundsMainWindowViewController.jfcOneFile.getSelectedFile());\n JSoundsMainWindowViewController.orderBy(true, false, false); \n }\n }", "public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SELECT_FILES:\n openFileDialog(fileUpload, true);\n break;\n\t case SELECT_FILE:\n default:\n openFileDialog(fileUpload, false);\n break;\n\t}\n }", "private void openFileChooser(FileType type) {\r\n\t\ttry {\r\n\t\t\tJFileChooser fc = new JFileChooser(\"C:\\\\\");\r\n\t\t\tint choice = fc.showDialog(this.view, \"Add File\");\r\n\t\t\tif(choice == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\tFileModel model = new FileModel(fc.getSelectedFile(), type);\r\n\t\t\t\tif(Validation.isModelValid(model)) {\r\n\t\t\t\t\tFileData.saveFileModel(model);\r\n\t\t\t\t\tthis.updateColumnSelections(type);\r\n\t\t\t\t\tthis.setButtonEnabled(type);\r\n\t\t\t\t\tthis.loadFileNames();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tJFileChooser jc=new JFileChooser();\n\t\t\t\t\tjc.setFileFilter(new FileNameExtensionFilter(\".xml\", \".xml\"));\n\t\t\t\t\tjc.setFileFilter(new FileNameExtensionFilter(\".json\", \".json\"));\n\t\t\t\t\tint resp=jc.showSaveDialog(null);\n\t\t\t\t\tString url=\"\";\n\t\t\t\t\tString name=\"\";\n\t\t\t\t\tif(resp==jc.APPROVE_OPTION){\n\t\t\t\t\t\tFile file=jc.getSelectedFile();\n\t\t\t\t\t\turl=file.getPath()+jc.getFileFilter().getDescription();\n\t\t\t\t\t\tname=file.getName()+jc.getFileFilter().getDescription();\n\t\t\t\t\tif(name.charAt(name.length()-1)=='l'){\n\t\t\t\t\t\tSaveAndLoadXml.save(url);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnew JasonSave().saveJson(url);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@FXML\n void loadButtonClicked(ActionEvent event) throws FileNotFoundException\n {\n FileChooser file = new FileChooser();\n\n file.setTitle(\"Load file (.txt)\");\n\n file.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Text Files\", \"*.txt\"));\n\n File selectedFile = file.showOpenDialog(listView.getScene().getWindow());\n\n // Create new file with all info on file, do this in a method\n loadFile(selectedFile);\n\n // Send all this info to the list in order to create new one\n for(int i=0; i<Item.getToDoList().size(); i++)\n {\n // Display items\n display();\n\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Excel Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"xls\"); // 파일 필터로 사용되는 확장자. *.xml 만 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tString readFilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을 알아온다.\t\t\t\t\r\n\t\t\t\tShowPatientInfo_K showPatientInfo = new ShowPatientInfo_K(readFilePath);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n\r\n if (e.getActionCommand() == \"BATCH_SOURCE_FOLDER\") { \r\n \t JFileChooser fc = new JFileChooser();\r\n\r\n\t\t fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\t\t int returnVal = fc.showDialog(RSMLGUI.this, \"Choose\");\r\n\t\t \r\n if (returnVal == JFileChooser.APPROVE_OPTION){ \r\n \t String fName = fc.getSelectedFile().toString();\r\n \t batchSourceFolder.setText(fName);\r\n }\r\n else SR.write(\"Choose folder cancelled.\"); \r\n }\r\n \r\n else if(e.getActionCommand() == \"BATCH_EXPORT\"){\r\n \t batchExport();\r\n }\r\n \r\n }", "public void setupImport() {\r\n\t\tmnuImport.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew ImportGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void browseInputFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tJFileChooser fc = new JFileChooser(\".\");\n\t\t\tfc.setDialogTitle(\"Please choose an XML file\");\n\t\t\tFileNameExtensionFilter xmldata = new FileNameExtensionFilter(\"XML\", \"xml\");\n\t\t\tfc.addChoosableFileFilter(xmldata);\n\n\t\t\tint returnVal = fc.showOpenDialog(this); // shows the dialog of the file browser\n\t\t\t// get name und path\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION)\n\t\t\t{\n\t\t\t\tcurFile = fc.getSelectedFile();\n\t\t\t\tinputfilepath = curFile.getAbsolutePath();\n\t\t\t\tmainframe.setInputFileText(inputfilepath);\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(new JFrame(),\n\t\t\t\t\t\t\t\"Please select a valid xml file downloaded from Pathway Interaction Database, or a converted SIF file.\",\n\t\t\t\t\t\t\t\"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "void loadArticleMenuItem_actionPerformed(ActionEvent e) {\n\n // Action from Open... Show the OpenFileDialog\n openFileDialog.show();\n String fileName = openFileDialog.getFile();\n\n if (fileName != null) {\n NewsArticle art = new NewsArticle(fileName);\n\n art.readArticle(fileName);\n articles.addElement(art);\n filterAgent.score(art, filterType); // score the article\n refreshTable();\n articleTextArea.setText(art.getBody());\n articleTextArea.setCaretPosition(0); // move cursor to start of article\n }\n }", "public void chooseFile(String fileName) {\n getQueueTool().waitEmpty();\n output.printTrace(\"Choose file by JFileChooser\\n : \" + fileName\n + \"\\n : \" + toStringSource());\n JTextFieldOperator fieldOper = new JTextFieldOperator(getPathField());\n fieldOper.copyEnvironment(this);\n fieldOper.setOutput(output.createErrorOutput());\n //workaround\n fieldOper.setText(fileName);\n //fieldOper.clearText();\n //fieldOper.typeText(fileName);\n //approveSelection();\n approve();\n }", "private void selectXmlFile() {\n\t\t JFileChooser chooser = new JFileChooser();\n\t\t // ask for a file to open\n\t\t int option = chooser.showSaveDialog(this);\n\t\t if (option == JFileChooser.APPROVE_OPTION) {\n\t\t\t // get pathname and stick it in the field\n\t\t\t xmlfileField.setText(\n chooser.getSelectedFile().getAbsolutePath());\n\t\t } \n }", "private void entryFileButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Entries File\");\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n entryFile = chooser.getSelectedFile();\n entryFileLabel.setText(getFileName(entryFile));\n pcs.firePropertyChange(\"ENTRY\", null, entryFile);\n }\n }", "private void saveDialog() {\n JFileChooser chooser = new JFileChooser();\n \n FileFilter ff = new FileFilter() {\n\n @Override\n public boolean accept(File f) {\n // TODO Auto-generated method stub\n return f.getName().endsWith(FILE_EXTENSION);\n }\n\n @Override\n public String getDescription() {\n return \"CSV\";\n }\n\n };\n chooser.addChoosableFileFilter(ff);\n chooser.setAcceptAllFileFilterUsed(true);\n chooser.setFileFilter(ff);\n chooser.showSaveDialog(null);\n this.file = chooser.getSelectedFile();\n //this.file = new File(chooser.getSelectedFile().getName() + INSTANCE.FILE_EXTENSION);\n\n\n try {\n\n if (file != null) {\n this.saveData();\n this.isModifed = false;\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error Saving File\", JOptionPane.ERROR_MESSAGE);\n\n }\n\n }", "public Menu createFileMenu();", "private void jCBListFoodActionPerformed(java.awt.event.ActionEvent evt) {\n int aux2 = jCBListFood.getSelectedIndex();\n if (aux2 != -1) {\n filePath = \"C:\\\\PGS\\\\nutricion\\\\\" + jCBListFood.getSelectedItem();\n controller.openDocument(filePath);\n } else {\n filePath = \"\";\n }\n }", "private void loadButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loadButtonMouseClicked\n // open file dialog\n FileDialog dialog = new FileDialog(this, \"Choisir le fichier dictionnaire\", FileDialog.LOAD);\n dialog.setFile(\"*.txt\");\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n filename = dialog.getDirectory() + filename;\n lexiNodeTrees = DictioFileOperations.loadListFromFile(filename);\n \n if(lexiNodeTrees != null) // if list was successfully retrieved\n {\n loadedDictionaryFilename = filename;\n refreshAllWordsList();\n \n // clear text area and search suggestion\n searchSuggestionList.setModel(new DefaultListModel());\n definitionTextArea.setText(\"\");\n searchField.setText(\"\");\n }\n \n else // if file could not be loaded, show error dialog\n JOptionPane.showMessageDialog(this, \"ERREUR: Le fichier n'a \"\n + \"pas pu être chargé!\\n\\nVérifiez que le fichier est \"\n + \"valid est contient <<mot & définition>> sur toutes \"\n + \"les lignes\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "void load_from_file(){\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a file\", FileDialog.LOAD);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"load path: \" + file_withpath);\t\n\t\t\n\t\t\t \n\t\t\t /**\n\t\t\t * read object from file \n\t\t\t */\n\t\t\t\ttry {\n\t\t\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(file_withpath));\n\n\t\t\t\t\tKey_Lists = Key_Lists.copy((key_lists) in.readObject());\n\n\t\t\t\t\tkeys_area.setText(Key_Lists.arraylist_tostring());\t\t\n\t\t\t\t\t\n\t\t\t\t\tin.close();\n\t\t\t\t\t\n\t\t\t\t\tinfo_label.setForeground(green);\n\t\t\t\t\tinfo_label.setText(\"file loaded :D\");\n\t\t\t\t\t\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tinfo_label.setForeground(white);\n\t\t\t\t\tinfo_label.setText(\"wrong file format\");\n\t\t\t\t\tSystem.out.println(\"io exception\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\n\t}", "public void run() {\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void jMenuItem_ShowClientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ShowClientActionPerformed\n File fClient = new File(\"Meilleurs_Client.csv\");\n try {\n Desktop.getDesktop().open(fClient);\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void openFile() {\n\t\t\n\t\n\t\t\t\n\t\tFile file = jfc.getSelectedFile();\n\t\tint a = -1;\n\t\tif(file==null&&!jta.getText().equals(\"\"))\n\t\t{\n\t\t\ta = JOptionPane.showConfirmDialog(this, \"저장?\");\n\t\t\n\t\t}\n\t\tswitch (a){\n\t\tcase 0:\n\t\t\ttry {\n\t\t\t\tint c = -1;\n\t\t\t\tif(file==null)\n\t\t\t\t{\n\t\t\t\t\tc = jfc.showSaveDialog(this);\n\t\t\t\t}\n\t\t\t\tif(file!= null || c ==0)\n\t\t\t\t{\t\n\t\t\t\t\tFileWriter fw = new FileWriter(jfc.getSelectedFile());\n\t\t\t\t\tfw.write(jta.getText());\n\t\t\t\t\tfw.close();\n\t\t\t\t\tSystem.out.println(\"파일을 저장하였습니다\");\n\t\t\t\t}\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t\tbreak;\n\t\tcase 1:\n\t\t\ttry {\n\t\t\t\tint j=-1;\n\t\t\t\tif(file==null)\n\t\t\t\t{\n\t\t\t\t\tj = jfc.showOpenDialog(this);\n\t\t\t\t}\n\t\t\t\tif(file!= null || j == 1)\n\t\t\t\t{\t\n\t\t\t\t\tFileReader fr = new FileReader(file);\n\n\t\t\t\t\tString str=\"\";\n\t\t\t\t\twhile((j=fr.read())!=-1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr = str+(char)j;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tjta.setText(str);\n\t\t\t\t\t\n\t\t\t\t\tsetTitle(file.getName());\n\t\t\t\t\t\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tcatch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tint d= jfc.showOpenDialog(this);\n\t\t\n\t\tif(d==0)\n\t\t\ttry {\n\t\t\t\tFileReader fr = new FileReader(jfc.getSelectedFile());\n\t\t\t\tint l;\n\t\t\t\tString str=\"\";\n\t\t\t\twhile((l=fr.read())!=-1)\n\t\t\t\t{\n\t\t\t\t\tstr = str+(char)l;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tjta.setText(str);\n\t\t\t\t\n\t\t\t\tfr.close();\n\t\n\t\t\t\t\t\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t}", "private void openJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openJMenuItemActionPerformed\n fromFileJButton.doClick();\n }", "private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoadActionPerformed\r\n\r\n int returnVal = getInChooser().showOpenDialog(this);\r\n \r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n try {\r\n blackWords.setText(Utils.loadFile(getInChooser().getSelectedFile()).trim());\r\n } catch (FileNotFoundException ex) {\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n \r\n putWizardData(\"blacksaved\", \"false\");\r\n }", "public void onMenuOpen() {\n String initialDirectory = getInitialDirectory();\n System.out.println(initialDirectory);\n File file = FileChooserHelper.showOpenDialog(initialDirectory, this);\n\n if (file == null || !file.exists() || !file.isFile()) {\n return;\n }\n\n handleMenuOpen(file.getAbsolutePath());\n }", "public void actionPerformed(ActionEvent event) {\n if (!fileFromWebsite.isEnabled())\n unSelectRightButtons();\n loadDataFromSource(fileFromWebsite);\n }", "public void chooseDataDirectory() {\n File file;\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDataDirectory\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.DIRECTORIES_ONLY);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n file = fileChooser.getSelectedFile();\n\n dataDirectoryTextField.setText(file.getAbsolutePath());\n defaultDirectory = file.getPath();\n }\n enableStartButton();\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void Open(){\n\tJFileChooser j = new JFileChooser(\"\"); \n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt\", \"TXT\");\n j.setFileFilter(filter); \n\n\t// Invoke the showsOpenDialog function to show the save dialog \n int r = j.showOpenDialog(null); \n\n\t// If the user selects a file \n\tif (r == JFileChooser.APPROVE_OPTION) { \n // Set the label to the path of the selected directory \n File fi = new File(j.getSelectedFile().getAbsolutePath()); \n\n try { \n\t\t// String \n\t\tString s1 = \"\", sl = \"\"; \n\n\t\t// File reader \n\t\tFileReader fr = new FileReader(fi); \n\n\t\t// Buffered reader \n\t\tBufferedReader br = new BufferedReader(fr); \n\n\t\t// Initilize sl \n\t\tsl = br.readLine(); \n\n\t\t// Take the input from the file \n\t\twhile ((s1 = br.readLine()) != null) { \n \t\tsl = sl + \"\\n\" + s1; \n\t\t} \n\n\t\t// Set the text \n\t\tt.setText(sl); \n } \n catch (Exception evt) { \n\t\tJOptionPane.showMessageDialog(f, evt.getMessage()); \n } \n\t} \n\t// If the user cancelled the operation \n\telse\n JOptionPane.showMessageDialog(f, \"the user cancelled the operation\"); \n\t\t\n }", "void loadProducts(String filename);", "private void loadFile(){\n\tint returnVal = fileChooser.showOpenDialog(this);\n\n\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t File file = fileChooser.getSelectedFile();\n\t SAXParserFactory spf = SAXParserFactory.newInstance();\n\t try {\n\t\tInputStream xmlInput = new FileInputStream(file);\n\t\tSAXParser saxParser = spf.newSAXParser();\n\t\tRoomXMLParser rxp = new RoomXMLParser();\n\t\tsaxParser.parse(xmlInput, rxp);\n\n\t\trooms = rxp.getRooms();\n\t\tnumPlayers = rxp.getPlayers();\n\t\tnumNPCs = rxp.getNPCs();\n\t\trevalidate();\n\t }\n\t catch(SAXException|ParserConfigurationException|IOException e){\n\t\te.printStackTrace();\n\t }\n\t}\n }", "@Override\n\tpublic void actionPerformed(ActionEvent event)\n\t{\n\t\tif (event.getSource() == selectFileButton)\n\t\t{\n\t\t\t//create a file chooser (only .ali files)\n\t\t\tfinal JFileChooser fc = new JFileChooser();\n\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Storyteller database files\", \"ali\");\n\t\t\tfc.setFileFilter(filter);\n\n\t\t\t//pop it up\n\t\t\tint returnVal = fc.showOpenDialog(this);\n\n\t\t\t//if the user selected a file\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION)\n\t\t\t{\n\t\t\t\t//this is the selected file\n\t\t\t\tselectedDatabaseFile = fc.getSelectedFile();\n\t\t\t\tselectedFileLabel.setText(\"Selected DB File: \" + selectedDatabaseFile.getAbsolutePath());\n\n\t\t\t\t//now that there is a db file fill the drop downs\n\t\t\t\tsetUpDropDowns();\n\n\t\t\t\tstartStopServerButton.setEnabled(true);\n\t\t\t}\n\t\t\t//else- they can choose another file later\n\t\t}\n\t\t//the user wants to start or stop the server\n\t\telse if (event.getSource() == startStopServerButton)\n\t\t{\n\t\t\t//if they are starting the server\n\t\t\tif (event.getActionCommand().equals(START_SERVER_BUTTON_TEXT))\n\t\t\t{\n\t\t\t\t//change the text on the button to stop the server\n\t\t\t\tstartStopServerButton.setText(STOP_SERVER_BUTTON_TEXT);\n\n\t\t\t\t//start the server\n\t\t\t\tsetUpServer();\n\t\t\t}\n\t\t\telse\n\t\t\t//stopping the server\n\t\t\t{\n\t\t\t\t//close the server\n\t\t\t\tstopServer();\n\t\t\t\t\n\t\t\t\t//disable the last input\n\t\t\t\tstartStopServerButton.setEnabled(false);\n\t\t\t}\n\t\t}\n\t}", "private void jMenuItemAbrirBDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAbrirBDActionPerformed\n LOG.trace(evt.paramString());\n jfc.showOpenDialog(this);\n File f = jfc.getSelectedFile();\n\n if (f != null) {\n LOG.info(\"Reading Sports database\");\n try (FileInputStream fis = new FileInputStream(f);\n ObjectInputStream ois = new ObjectInputStream(fis)) {\n\n listaDeportes = (ListaDeportes) ois.readObject();\n } catch (HeadlessException | IOException | ClassNotFoundException e) {\n LOG.error(e.getMessage(), e);\n }\n }\n}", "public void updateFileImportMenu(Menu importMenue) {\n\t\tMenuItem importDeviceLogItem;\n\n\t\tif (importMenue.getItem(importMenue.getItemCount() - 1).getText().equals(Messages.getString(gde.messages.MessageIds.GDE_MSGT0018))) {\t\t\t\n\t\t\tnew MenuItem(importMenue, SWT.SEPARATOR);\n\n\t\t\timportDeviceLogItem = new MenuItem(importMenue, SWT.PUSH);\n\t\t\timportDeviceLogItem.setText(Messages.getString(MessageIds.GDE_MSGT2550, GDE.MOD1));\n\t\t\timportDeviceLogItem.setAccelerator(SWT.MOD1 + Messages.getAcceleratorChar(MessageIds.GDE_MSGT2550));\n\t\t\timportDeviceLogItem.addListener(SWT.Selection, new Listener() {\n\t\t\t\tpublic void handleEvent(Event e) {\n\t\t\t\t\tlog.log(Level.FINEST, \"importDeviceLogItem action performed! \" + e); //$NON-NLS-1$\n\t\t\t\t\topen_closeCommPort();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void actionTimelapseImport ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tDataController.scenarioTimelapseImport(folderPath);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint re = jfc.showOpenDialog(f);\n\t\t\t\tfile = jfc.getSelectedFile();\n\t\t\t\tif (re == 0) {\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\t\t\tint ch;\n\t\t\t\t\t\tString str = \"\";\n\n\t\t\t\t\t\twhile ((ch = fr.read()) != -1) {\n\t\t\t\t\t\t\tstr += (char) ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tta.setText(str);\n\t\t\t\t\t\tfr.close();\n\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(path.getAbsolutePath().startsWith(Constants.getAppDirectory())) {\n\t\t\t\t\tshowToast(\"Not implemented for Home dir yet\");\n\t\t\t\t\t//open file browser\n\t\t\t\t}\n\t\t\t\telse {\n//\t\t\t\t\tCopyTask copyTask = new CopyTask();\n//\t\t\t\t\tcopyTask.destination = Constants.getAppDirectory();\n//\t\t\t\t\tcopyTask.execute(selList);\n\t\t\t\t\t// Just copy the files to home directory\n\t\t\t\t\tfor(File sel:selList) {\n\t\t\t\t\t\tUtils.copy(sel, Constants.getAppDirectory());\n\t\t\t\t\t}\n\t\t\t\t\tshowToast(\"Import complete\");\n\t\t\t\t}\n\t\t\t\t// Clean up\n\t\t\t\tcancelAction();\n\t\t\t}", "public void widgetSelected(SelectionEvent event) {\n if (lists.getSelectionCount() > 0) {\n fileName = lists.getSelection()[0];\n } else {\n fileName = \"\";\n }\n setReturnValue(fileName);\n shell.close();\n }", "public void btn_action_abrirArchivo() {\n FileChooser fileChooser = new FileChooser();\n\n //Set extension filter\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n fileChooser.getExtensionFilters().add(extFilter);\n\n //Show save file dialog\n File file = fileChooser.showOpenDialog(miPrimaryStage);\n //File file = new File(\"fichero.txt\");\n if(file != null){\n // ta_insertar_texto_id.setText(readFile(file));\n ca_insertar_texto_id.replaceText(readFile(file));\n }\n }", "public static void setUpMenuItems( JMenu Menuu , JDataTree tree , \n IObserver IOBs ){\n \n int nSavedFiles = SharedData.getintProperty( \"NSavedFiles\",\"\"+NSavedFiles);\n if(nSavedFiles <=0)\n return;\n Preferences pref = null;\n try{\n pref = Preferences.userNodeForPackage( \n Class.forName( \"DataSetTools.retriever.Retriever\" ) );\n }catch( Exception s1 ){\n JOptionPane.showMessageDialog( null , \n \"No Preferences \" + s1 );\n return;\n }\n \n \n \n boolean shortMange = SharedData.getbooleanProperty(\"ShortSavedFileName\",\"false\");\n if( nSavedFiles > 0)\n Menuu.addSeparator();\n \n for( int i = 0 ; i < nSavedFiles ; i++ ){\n\n String filname = pref.get( \"File\" + i , NO_SUCH_FILE );\n \n if( (filname != NO_SUCH_FILE) &&( (new File(filname)).exists()) ){\n\n JMenuItem jmi = new JMenuItem( Mangle( filname,shortMange ) );\n Menuu.add( jmi );\n MyActionListener actList =new MyActionListener( tree , filname , \n IOBs ) ;\n jmi.addActionListener(actList );\n }\n }\n \n }", "private void fileChooser(){\n JFileChooser chooser = new JFileChooser();\n // Note: source for ExampleFileFilter can be found in FileChooserDemo,\n // under the demo/jfc directory in the JDK.\n //ExampleFileFilter filter = new ExampleFileFilter();\n// filter.addExtension(\"jpg\");\n// filter.addExtension(\"gif\");\n// filter.setDescription(\"JPG & GIF Images\");\n // chooser.setFileFilter(new javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter());\n int returnVal = chooser.showOpenDialog(this.getContentPane());\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n System.out.println(\"You chose to open this file: \" +\n chooser.getSelectedFile().getName());\n try{\n this.leerArchivo(chooser.getSelectedFile());\n\n }\n catch (Exception e){\n System.out.println(\"Imposible abrir archivo \" + e);\n }\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tJFileChooser jfc=new JFileChooser();\n\t\t\n\t\t//显示文件和目录\n\t\tjfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );\n\t\tjfc.showDialog(new JLabel(), \"选择\");\n\t\tFile file=jfc.getSelectedFile();\n\t\t\n\t\t//file.getAbsolutePath()获取到的绝对路径。\n\t\tif(file.isDirectory()){\n\t\t\tSystem.out.println(\"文件夹:\"+file.getAbsolutePath());\n\t\t}else if(file.isFile()){\n\t\t\tSystem.out.println(\"文件:\"+file.getAbsolutePath());\n\t\t}\n\t\t\n\t\t//jfc.getSelectedFile().getName() 获取到文件的名称、文件名。\n\t\tSystem.out.println(jfc.getSelectedFile().getName());\n\t\t\n\t}", "ActionImport()\n {\n super(\"Import\");\n this.setShortcut(UtilGUI.createKeyStroke('I', true));\n }", "private void selectPDFFile() {\n JFileChooser jfc = new JFileChooser();\n jfc.setFileFilter(new PDFFilter());\n jfc.setMultiSelectionEnabled(false);\n int ret = jfc.showDialog(this, \"Open\");\n if (ret == 0) {\n readFile = jfc.getSelectedFile();\n inputField.setText(readFile.getAbsolutePath());\n String outString = readFile.getAbsolutePath();\n outString = outString.substring(0, outString.length() - 3);\n outString = outString + \"txt\";\n outputField.setText(outString);\n progressLabel.setBackground(INFO);\n progressLabel.setText(PRESS_EXTRACT);\n } else {\n System.out.println(NO_FILE_SELECTED);\n progressLabel.setBackground(WARNING);\n progressLabel.setText(SELECT_FILE);\n }\n }", "public void widgetSelected(SelectionEvent event) {\n fileName = textBox.getText();\n setReturnValue(fileName);\n shell.close();\n }", "public void loadSongFile(File selection) {\n if (selection == null) {\n println(\"Window was closed or the user hit cancel.\");\n } else {\n println(\"User selected \" + selection.getAbsolutePath());\n EventQueue.getInstance().loadStringEventsFile(selection);\n ackEvent();\n }\n }", "private void jMenuItem_ShowProspectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ShowProspectActionPerformed\n File fProspect = new File(\"Propsect_Relance.csv\");\n try {\n Desktop.getDesktop().open(fProspect);\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void selectFile(String file) {\n clickOnFile(file);\n }", "private void loadDataFromFile(File file) {\n\t\tString fileName = file.getName();\n\t\tQuickParser test = new QuickParser();\n\n\t\tif(fileName.trim().toUpperCase().startsWith(\"INV\")) {\n\t\t\tfileType = FileType.INVENTORY;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInventoryData.clear();\n\t\t\tmasterInventoryData = test.Parse(file, fileType);\n\t\t\tpresentationInventoryData.clear();\n\t\t\tpresentationInventoryData.addAll(masterInventoryData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End if statement\n\t\telse if(fileName.toUpperCase().startsWith(\"INI\")) {\n\t\t\tfileType = FileType.INITIAL;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInitialData.clear();\n\t\t\tmasterInitialData = test.Parse(file, fileType);\n\t\t\tpresentationInitialData.clear();\n\t\t\tpresentationInitialData.addAll(masterInitialData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End else if statement \n\t\telse {\n\t\t\tfileType = FileType.UNASSIGNED;\n\t\t} // End else statement\n\t\tchangeToScanTable();\n\t}", "public void loadFile() {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tString filename = JOptionPane.showInputDialog(null,\"Enter the filename.\");\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\n\t\t\tMinLFile nminl = new MinLFile(filename);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\n\t\t\t\t\n\t\t\t\tnminl.CodeArea.setText(\"\");\n\t\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tDocument doc = nminl.CodeArea.getDocument();\n\t\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), str, null);\n\t\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\n\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\n\t\t\t\n\t\t\tJComponent panel = nminl;\n\t\t\t\n\t\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\t\tfilename);\t\t\n\t\t\ttabbedPane.setMnemonicAt(0, 0);\n\t\t}\t\n\t}", "private void processData(boolean option, Set<String> selections) {\n CSVReader reader = null;\n try {\n if (!option) {\n //If the user wants to use the locally processed file\n boolean file_check = isFileExist();\n if (file_check) {\n File user_file = getFilesDir();\n File[] file_array = user_file.listFiles();\n for (File current : file_array) {\n //Find the file name of the user processed file\n if (isValidName(current.getName())) {\n //This will be the user processed file\n FileInputStream fis = getApplicationContext().openFileInput(current.getName());\n reader = new CSVReader(new InputStreamReader(fis),';');\n }\n }\n }else{\n displayToast(\"No user selected file found, please process a file if you wish to use this option.\");\n return;\n }\n }else{\n //Use the default static file\n AssetManager manager = getAssets();\n InputStream inputStream = manager.open(FILE_NAME);\n reader = new CSVReader(new InputStreamReader(inputStream), ';');\n }\n /*\n After opening appropriate file get the data associated with the user choice\n */\n List<String[]> data = null;\n if (reader != null) {\n data = reader.readAll();\n reader.close();\n }\n List<String[]> subset = new ArrayList<>();\n //Loop to get all the data for the graph\n if (data != null) {\n for (String[] line : data) {\n //Comparison of where we are in the file versus the user request\n int compare_choice = line[0].compareTo(user_choice);\n if (compare_choice == 0) {\n //We are at the users requested data\n subset.add(line);\n } else if (compare_choice > 0 && (!line[0].equals(\"Country\"))) {\n //We have passed our country alphabetically so we can stop comparing\n break;\n }\n }\n }\n if (subset.size() == 0) {\n //Refresh activity and display message\n displayToast(\"No data found for \" + user_choice);\n return;\n } else {\n prepareData(subset, selections);\n }\n }catch(IOException e){\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString s=e.getActionCommand();\r\n\t\r\n\t\tif(s.equalsIgnoreCase(\"open\"))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\r\n\t\t{\r\n\t\t\tstr=\"\";msg=\"\";\r\n\t\t\tFileDialog fd=new FileDialog(this,\"openfile\",FileDialog.LOAD);\r\n\t\t//to be added\r\n\t\t\tfd.setVisible(true);\r\n\t\t\tdir=fd.getDirectory();\r\n\t\t\t//path is got by directory\r\n\t\t\tfname=fd.getFile();\r\n\t\t\t//fname will get the name of the file so together we get teh full location\r\n\t\t\tFileInputStream fis=new FileInputStream(dir+fname);\r\n\t\t\t//file inputstream reader class obj is fis \r\n\t\t\tDataInputStream dis=new DataInputStream(fis);\r\n\t\t\t//here input it to datastream reader it is must\r\n\t\t\tstr=dis.readLine();\r\n\t\t\twhile(str!=null)\r\n\t\t\t{\r\n\t\t\t\tmsg=msg+str+\"\\n\";\r\n\t\t\t\tstr=dis.readLine();\r\n\t\t\t}\r\n\t\t\tta1.setText(msg);\r\n\t\t\tdis.close();\r\n\t\t\tfis.close();\r\n\t\t}\r\n\t\tcatch(Exception a)\r\n\t\t{\r\n\t\t\ta.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\t}\r\n\t\tif(s.equalsIgnoreCase(\"save\"))\r\n\t\t{\ttry\r\n\t\t{\r\n\t\t\tFileDialog fd=new FileDialog(this,\"savefile\",FileDialog.SAVE);\r\n\t\t//to be added\r\n\t\t\tfd.setVisible(true);\r\n\t\t\ttxt=ta1.getText();\r\n\t\t\tdir=fd.getDirectory();\r\n\t\t\t//path is got by directory\r\n\t\t\tfname=fd.getFile();\r\n\t\t\t//fname will get the name of the file so together we get teh full location\r\n\t\t\tFileOutputStream fis=new FileOutputStream(dir+fname);\r\n\t\t\t//file inputstream reader class obj is fis \r\n\t\t\tDataOutputStream dis=new DataOutputStream(fis);\r\n\t\t\t//here input it to datastream reader it is must\r\n\t\t\t//str=dis.readLine();\r\n\t\t\t/*while(str!=null)\r\n\t\t\t{\r\n\t\t\t\tmsg=msg+str+\"\\n\";\r\n\t\t\t\tstr=dis.readLine();\r\n\t\t\t}\r\n\t\t\tta1.setText(msg);*/\r\n\t\t\tdis.writeBytes(txt);\r\n\t\t\tdis.close();\r\n\t\t\tfis.close();\r\n\t\t}\r\n\t\tcatch(Exception a)\r\n\t\t{\r\n\t\t\ta.printStackTrace();\r\n\t\t}\r\n\t\r\n\r\n\t\t}\r\n\t\r\n\tif (s.equalsIgnoreCase(\"cut\"))\r\n\t{\r\n\t\tmsg=ta1.getSelectedText();\r\n\t\tif(msg==null)\r\n\t\t\tJOptionPane.showMessageDialog(this,\"select text\");\r\n\t\telse\r\n\t\t\tta1.replaceRange(\"\", ta1.getSelectionStart(), ta1.getSelectionEnd());\r\n\t\t\t\t\r\n\t}\r\n\r\n\tif (s.equalsIgnoreCase(\"copy\"))\r\n\t{\r\n\t\tmsg=ta1.getSelectedText();\r\n\t\tif(msg==null)\r\n\t\t\tJOptionPane.showMessageDialog(this,\"select text\");\r\n\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t}\r\n\t\r\n\tif (s.equalsIgnoreCase(\"paste\"))\r\n\t{\r\n\t\t\r\n\t\tta1.replaceRange(msg, ta1.getSelectionStart(), ta1.getSelectionEnd());\r\n\t\t\t\r\n\t\t\t\t\r\n\t}\r\n\t\r\n\t\r\n}", "@FXML\r\n protected void setDatafile() throws Exception {\r\n boolean hasHeader = cbHeader.isSelected();\r\n String sep = \"\\t\";\r\n if (rbSemicolon.isSelected()) {\r\n sep = \";\";\r\n } else if (rbComma.isSelected()) {\r\n sep = \",\";\r\n } else if (rbOther.isSelected()) {\r\n String aux = tfSeparator.getCharacters().toString();\r\n if (aux.length() > 0) {\r\n sep = aux;\r\n } else {\r\n throw new Exception(\"Invalid Separator\");\r\n }\r\n }\r\n if (!tfFilename.getText().trim().isEmpty()) {\r\n ScanlineAnalysisFile file = new ScanlineAnalysisFile();\r\n file.setFilename(tfFilename.getText());\r\n file.setSep(sep);\r\n file.setApColumn(0);\r\n file.setSpColumn(1);\r\n file.setHeader(hasHeader);\r\n if (hasHeader) {\r\n file.setHeaderStrings(DatasetUtils.getHeaders(file.getFileName(), sep));\r\n } else {\r\n ArrayList<String> al = new ArrayList<>(file.getColumnsCount());\r\n for (int i = 0; i < file.getColumnsCount(); i++) {\r\n if (i == 0) {\r\n al.add(\"Ap\");\r\n }\r\n if (i == 1) {\r\n al.add(\"Sp\");\r\n }\r\n if (i > 1) {\r\n al.add(\"Column \" + String.valueOf(i));\r\n }\r\n }\r\n file.setHeaderStrings(al);\r\n }\r\n Scanline sl = OpenScanlineData.openCSVFileToScanline(tfFilename.getText(),\r\n sep, 0, 1, hasHeader);\r\n file.setScanLine(sl);\r\n file.setRowsCount(sl.getFracCount());//TODO fix this\r\n Stage s = (Stage) tfFilename.getScene().getWindow();\r\n s.close();\r\n MainStage.setSclAnalysisFile(file);\r\n MainStage.refreshStats();\r\n MainStage.enableButtons();\r\n }\r\n }", "public void load() {\n\t\tif (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)\n\t\t\tload(jfc.getSelectedFile().getAbsolutePath());\n\t}", "@FXML\r\n protected void dialogOpen() throws IOException {\r\n final FileChooser fileChooser = new FileChooser();\r\n File file = fileChooser.showOpenDialog(FracGenApplication.getInstance().stageOpenData);\r\n if (file != null) {\r\n if (file.exists()) {\r\n if (file.getAbsolutePath() != null) {\r\n tfFilename.setText(file.getAbsolutePath());\r\n }\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\tDocument doc = new Document(\"Sample.txt\");\n\t\tFileMenuOptions fileOptions = new FileMenuOptions(doc);\n\t\tfileOptions.doCommand(\"open\");\n\t\tfileOptions.doCommand(\"save\");\n\t\tfileOptions.doCommand(\"close\");\n\t\tfileOptions.doCommand(\"exit\");\n\n\t}", "private void itemFileButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Raffle Items File\");\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n itemFile = chooser.getSelectedFile();\n itemFileLabel.setText(getFileName(itemFile));\n pcs.firePropertyChange(\"ITEM\" , null, itemFile);\n }\n }", "public SelecioneTipoImportacao() {\n initComponents();\n }", "public void fileChooser() {\n\t\tWindow stage = mediaView.getScene().getWindow();\n// configureFileChooser(fileChooser);\n\t\tfileChooser.setTitle(\"Open Resource File\");\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"Video Files\", \"*.mp4\", \"*.mpeg\"),\n\t\t\t\tnew ExtensionFilter(\"Audio Files\", \"*.mp3\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tFile selectedFile = fileChooser.showOpenDialog(stage);\n\t\tif (selectedFile != null) {\n\t\t\ttry {\n\t\t\t\tif(arrayList.size() != 0) {\n\t\t\t\t\tmp.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdesktop.open(selectedFile);\n\t\t\t\tdirectory = selectedFile.getAbsolutePath();\n\t\t\t\t\n\t\t\t\tplayMedia(directory);\n\t\t\t\t\n\t\t\t\tarrayList.add(new File(directory));\n//\t\t\t\tSystem.out.println(arrayList.get(i).getName());\n\t\t\t\ti++;\n\t\t\t\t\n\n\t\t\t} catch (IOException ex) {\n\t\t\t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\t}", "private void importSettings() {\n\t\tfinal JFileChooser chooser = new JFileChooser(currentPath);\n\t chooser.setFileFilter(new FileNameExtensionFilter(\"Text Files\", \"txt\"));\n\t int returnVal = chooser.showOpenDialog(null);\n\t \n\t if(returnVal == JFileChooser.APPROVE_OPTION) {\n\t \tcurrentPath = chooser.getCurrentDirectory().getAbsolutePath();\n\t\t\ttry (FileReader fr = new FileReader(chooser.getSelectedFile());\n\t BufferedReader br = new BufferedReader(fr)) {\n\t\t\t\tpcs.firePropertyChange(\"Import Settings\", null, br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: file could not be read.\");\n\t\t\t}\n\t }\n\t}", "public void seleccionarFichero(){\n JFileChooser fileChooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"xml\", \"xml\");\n fileChooser.setFileFilter(filter);\n fileChooser.setCurrentDirectory(new java.io.File(\"./ficheros\"));\n int seleccion = fileChooser.showOpenDialog(vista_principal);\n if (seleccion == JFileChooser.APPROVE_OPTION){\n fichero = fileChooser.getSelectedFile();\n vista_principal.getTxtfield_nombre_fichero().\n setText(fichero.getName().substring(0, fichero.getName().length()-4));\n }\n }", "private void browseInputButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputButtonActionPerformed\n JFileChooser chooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"XLS file\", new String[]{\"xls\", \"xlsx\"});\n chooser.setFileFilter(filter);\n chooser.setCurrentDirectory(new java.io.File(\".\"));\n chooser.setDialogTitle(\"Select a file\");\n chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n chooser.setAcceptAllFileFilterUsed(false);\n\n if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n FILEPATH.setText(chooser.getSelectedFile().getPath());\n }\n }", "private File selectImportExportFile(String title, String[] filter,\n\t\t\tString description, String approveButtonText, String prefString) {\n\t\tPreferences prefs = Preferences\n\t\t\t\t.userNodeForPackage(CredentialManagerUI.class);\n\t\tString keyPairDir = prefs.get(prefString,\n\t\t\t\tSystem.getProperty(\"user.home\"));\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.addChoosableFileFilter(new CryptoFileFilter(filter,\n\t\t\t\tdescription));\n\t\tfileChooser.setDialogTitle(title);\n\t\tfileChooser.setMultiSelectionEnabled(false);\n\t\tfileChooser.setCurrentDirectory(new File(keyPairDir));\n\n\t\tif (fileChooser.showDialog(this, approveButtonText) != APPROVE_OPTION)\n\t\t\treturn null;\n\n\t\tFile selectedFile = fileChooser.getSelectedFile();\n\t\tprefs.put(prefString, fileChooser.getCurrentDirectory().toString());\n\t\treturn selectedFile;\n\t}", "private void menuSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuSaveActionPerformed\n saveDataToFile();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String src;\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n int result = fileChooser.showOpenDialog(getParent());\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fileChooser.getSelectedFile();\n textSalida.append(\"\\nAutómata seleccionado \" + selectedFile.getAbsolutePath() );\n automa = null;\n automataready = false;\n compilar.setEnabled(false);\n try {\n src = selectedFile.getAbsolutePath();\n automa = new AFDVault(src);\n automataready = automa.allready();\n if (automataready){\n compilar.setEnabled(true);\n textSalida.append(\"\\nAutomata cargado\");\n //automa.PrintAFD();\n }else{\n compilar.setEnabled(false);\n textSalida.append(\"\\nAutomata no cargado verifique el archivo\");\n }\n }catch (IOException|ParserException ex){\n textSalida.append(ex.getMessage()+\"\\n\");\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t int returnVal = fc.showOpenDialog(GenerateWindow.this);\n\n\t\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t File goodsoundfile = fc.getSelectedFile();\n\t\t goodSoundTF.setText(\"sounds/\"+goodsoundfile.getName());\n\t\t }}", "@Override\n public void actionPerformed(ActionEvent e) {\n File selectedFile;\n JFileChooser fileChooser = new JFileChooser();\n int reply = fileChooser.showOpenDialog(null);\n if (reply == JFileChooser.APPROVE_OPTION) {\n selectedFile = fileChooser.getSelectedFile();\n geefBestandTextField1.setText(selectedFile.getAbsolutePath());\n }\n\n }", "@Override\n public ImportCommand parse(String args) throws ParseException {\n if (args.isEmpty()) {\n return parseFile(getFileFromFileBrowser());\n } else {\n return parseFile(getFileFromArgs(args));\n }\n }", "private void fixFileOption() {\n\t\t\n\t\tnewFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CreateFileFrame(main, true , controller);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\topenFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser fileSelector = new JFileChooser();\n\t\t\t\tFileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\"ASM , IN, OUT\", \"asm\", \"in\",\"out\");\n\t\t\t\tfileSelector.setFileFilter(fileFilter);\n\t\t\t\t\n\t\t\t\tint option = fileSelector.showOpenDialog(openFileOption);\n\t\t\t\t\n\t\t\t\tif(option == JFileChooser.APPROVE_OPTION){\n\t\t\t\t\tString path = fileSelector.getSelectedFile().getPath();\n\t\t\t\t\tString extension = path.substring(path.lastIndexOf('.') + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (extension.equalsIgnoreCase(\"in\")) {\n\t\t\t\t\t\tcontroller.changeIn(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"out\")) {\n\t\t\t\t\t\tcontroller.changeOut(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"asm\")) {\n\t\t\t\t\t\tcontroller.changeProgram(path);\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\t\n\t\texitOption.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\toptionExit();\n\t\t\t}\n\t\t});\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.import_book) {\n Intent intent = new Intent(NavUserBookActivity.this, FileChooserActivity.class);\n startActivity(intent);\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void fromFileJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fromFileJButtonActionPerformed\n //load new database\n JFileChooser chooser = new JFileChooser(\"src/Cities\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\n \"text Files\", \"txt\");\n chooser.setFileFilter(filter);\n int choice = chooser.showOpenDialog(null);\n if(choice == JFileChooser.APPROVE_OPTION)\n {\n namesArray = new ArrayList<>();\n tempArray = new ArrayList<>();\n File chosenFile = chooser.getSelectedFile();\n fileName = \"src/Cities/\" + chosenFile.getName();\n //read file into array list\n myReader.readFromFile(fileName);\n namesArray = myReader.getStringArr();\n tempArray = myReader.getNumberArr();\n \n \n if(namesArray == null || tempArray == null) //if try to open an empty file\n {\n JOptionPane.showMessageDialog(null, \"File you are trying to \"\n + \"open is empty\", \" File Error\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n else\n {\n //make list of edges\n makeEdgeList(namesArray, tempArray);\n //make weighted graph object\n graph = new WeightedGraph(namesArray, edgeArray);\n loadJList();\n checkEnabled();\n clearStats();\n calculateJButton.doClick();\n //check what should be selected\n }\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Unable to open file\", \" File \"\n + \"Input Error\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tif (e.getSource() == buttonImport) {\r\n\t\t\t/**\r\n\t\t\t * Close this dialog if the profile names are globally unique.\r\n\t\t\t */\r\n\t\t\timportButtonAction();\r\n\t\t} else if (e.getSource() == buttonCancel) {\r\n\t\t\t/**\r\n\t\t\t * Nothing will be used from this import view. Set all available\r\n\t\t\t * profiles to null.\r\n\t\t\t */\r\n\t\t\tparsedProfiles.clear();\r\n\t\t\t/**\r\n\t\t\t * consume an empty set of profiles.\r\n\t\t\t */\r\n\t\t\tthis.setVisible(false);\r\n\t\t} else if (e.getSource() == cbContainsHeader) {\r\n\t\t\t/**\r\n\t\t\t * Skip header option changed. The same actions are needed as in the\r\n\t\t\t * previous delimiter case.\r\n\t\t\t */\r\n\t\t\tparseAction();\r\n\t\t} else if (e.getSource() == cbEnableLenCorrect) {\r\n\t\t\tif (cbEnableLenCorrect.isSelected()) {\r\n\t\t\t\tlabelLengthCorrecton.setEnabled(false);\r\n\t\t\t\ttextfieldLenCorrection.setEnabled(true);\r\n\t\t\t} else {\r\n\t\t\t\tlabelLengthCorrecton.setEnabled(true);\r\n\t\t\t\ttextfieldLenCorrection.setEnabled(false);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t/**\r\n\t\t\t * Default output if a action event occurs and no case covers the\r\n\t\t\t * action.\r\n\t\t\t */\r\n\t\t\tDebug.out\r\n\t\t\t\t\t.println(\"Undefined source in video data selection actionPerformed() ...\");\r\n\t\t}\r\n\t}", "private JMenuItem getJMenuItemImport() {\r\n if (jMenuItemImport == null) {\r\n jMenuItemImport = new JMenuItem();\r\n jMenuItemImport.setText(\"Import...\");\r\n jMenuItemImport.setMnemonic(KeyEvent.VK_I);\r\n jMenuItemImport.setAccelerator(KeyStroke.getKeyStroke(\r\n KeyEvent.VK_I, ActionEvent.CTRL_MASK));\r\n jMenuItemImportListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n importFile();\r\n }\r\n };\r\n jMenuItemImport.addActionListener(jMenuItemImportListener);\r\n }\r\n return jMenuItemImport;\r\n }", "public void newDataFile(Stage primaryStage) {\n String title = \"Upload Data File\";\n\n VBox vbox = vboxFormat();\n\n Label title1 = new Label(\"Input CSV File Name\");\n title1.setFont(new Font(\"Arial\", 15));\n Label direction2 = new Label(\"enter file name, hit enter, then done\");\n direction2.setFont(new Font(\"Arial\", 10));\n TextField userInput = new TextField(\"file name with .csv extension\");\n // TODO program text field event, this is where the file name will be collected,\n // send to another class to handle!\n // Input file class called to check syntax of file name and read.\n userInput.setOnAction(e -> {\n new InputFile(userInput.getText(), report);\n updateTable();\n }); // working\n\n // Add done button\n Button done = buttonFormat(\"Done\", 3);\n\n vbox.getChildren().addAll(title1, userInput, direction2, done);\n showDialogWindow(primaryStage, vbox, title, done);\n updateTable();\n }", "private void actionAddFile ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tJFileChooser fileChooserDriver = new JFileChooser();\r\n\r\n\t\t\tint isFileSelected = fileChooserDriver.showOpenDialog(fileChooserDriver);\r\n\r\n\t\t\tif (isFileSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString filePath = fileChooserDriver.getSelectedFile().getPath();\r\n\t\t\t\tDataController.scenarioAddFile(filePath);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\r\n\t}", "public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "private void abrirFichero() {\r\n\t\tJFileChooser abrir = new JFileChooser();\r\n\t\tFileNameExtensionFilter filtro = new FileNameExtensionFilter(\"obj\",\"obj\");\r\n\t\tabrir.setFileFilter(filtro);\r\n\t\tif(abrir.showOpenDialog(abrir) == JFileChooser.APPROVE_OPTION){\r\n\t\t\ttry {\r\n\t\t\t\tGestion.liga = (Liga) Gestion.abrir(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setAbierto(true);\r\n\t\t\t\tGestion.setFichero(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setModificado(false);\r\n\t\t\t\tfrmLigaDeFtbol.setTitle(Gestion.getFichero().getName());\r\n\t\t\t} catch (ClassNotFoundException | IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se ha podido abrir el fichero\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private File getFile()\n\t{\n\t\tFile file = null;\n\t\tString dirName = org.compiere.Compiere.getCompiereHome() + File.separator + \"data\" + File.separator + \"import\";\n\t\tlog.config(dirName);\n\t\tJFileChooser chooser = new JFileChooser(dirName);\n\t\tchooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tchooser.setDialogTitle(Msg.translate(Env.getCtx(), \"LoadAccountingValues\"));\n\t\tchooser.addChoosableFileFilter(new ExtensionFileFilter(\"csv\", Msg.getMsg(Env.getCtx(), \"FileCSV\")));\n\t\t// Try selecting file\n\t\tfile = new File(dirName + File.pathSeparator + \"AccountingUS.csv\");\n\t\tif (file.exists())\n\t\t\tchooser.setSelectedFile(file);\n\n\t\t// Show it\n\t\tif (chooser.showOpenDialog(this.getParent()) == JFileChooser.APPROVE_OPTION)\n\t\t\tfile = chooser.getSelectedFile();\n\t\telse\n\t\t\tfile = null;\n\t\tchooser = null;\n\n\t\tif (file == null)\n\t\t\tbuttonLoadAcct.setText(Msg.translate(Env.getCtx(), \"LoadAccountingValues\"));\n\t\telse\n\t\t\tbuttonLoadAcct.setText(file.getAbsolutePath());\n\t\tconfirmPanel.getOKButton().setEnabled(file != null);\n\t\tm_frame.pack();\n\t\treturn file;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"HALTING Files\", EXT);\n\t\t\t\tchooser.setFileFilter(filter);\n\t\t\t\tint choice = chooser.showOpenDialog(MainWindow.this);\n\t\t\t\tif (choice != JFileChooser.APPROVE_OPTION)\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t// attempt to read from file\n\t\t\t\tString filename = chooser.getSelectedFile().getAbsolutePath();\n\t\t\t\ttry {\n\t\t\t\t\treadFromFile(filename);\n\t\t\t\t}\n\t\t\t\t// warn the user about a failure\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\n\t\t\t\t\t// if already a builtin Exception, just report it\n\t\t\t\t\tif (e.getClass().getSimpleName().equals(\"FileError\"))\n\t\t\t\t\t\treportException(e);\n\t\t\t\t\t\t\n\t\t\t\t\t// build an Exception message and report it\n\t\t\t\t\telse {\n\t\t\t\t\t\tString msg = e.getClass().getSimpleName() + \": \";\n\t\t\t\t\t\tmsg += e.getMessage() == null ? filename : e.getMessage();\n\t\t\t\t\t\treportException(new FileError(filename, msg));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException 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\n\t\t\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n\n JFileChooser chooser = new JFileChooser(); ////apabila merah -> ALT+ENTER -> j file chooser -> TOP\n chooser.showOpenDialog(null);\n File f = chooser.getSelectedFile();\n String filename = f.getAbsolutePath();\n vpath.setText(filename);\n }", "public void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tFile file = new File(Environment.getExternalStorageDirectory().toString() + \"/学生会/学生会.xls\");\n\t\t\t\tString s = String.valueOf(file.exists());\n\t\t\t\t\n\t\t\t\tToast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tSystem.out.println(Environment.getExternalStorageDirectory().getAbsolutePath().toString());\n\t\t\t\t\n\t\t\t\tToast.makeText(MainActivity.this, \"信息初始化...\", Toast.LENGTH_SHORT).show();\n\t\t\t\tinit();\n\t\t\t\tToast.makeText(MainActivity.this, \"初始化完成\", Toast.LENGTH_SHORT).show();\n\t\t\t\tIntent begin = new Intent(MainActivity.this, SelectLevel.class);\n\t\t\t\tbegin.putExtra(\"union\", union);\n\t\t\t\tstartActivity(begin);\n//\t\t\t\t m\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n//\t\t\t\tFile file = new File(Environment.getExternalStorageDirectory().toString());\n//\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\t\n\t\t\t}" ]
[ "0.6715237", "0.6604768", "0.6521698", "0.64338666", "0.63294756", "0.6301105", "0.6294575", "0.6255624", "0.6253851", "0.62528974", "0.6196753", "0.61965793", "0.61751175", "0.6173541", "0.6164892", "0.6161224", "0.6152054", "0.6083292", "0.60170025", "0.6002604", "0.5990654", "0.5972244", "0.5969409", "0.59362817", "0.59324855", "0.5926825", "0.5923646", "0.59220123", "0.5921499", "0.5916815", "0.5908021", "0.5901483", "0.58987767", "0.58943486", "0.5893924", "0.5893768", "0.5873466", "0.5872494", "0.5866688", "0.5862767", "0.58595026", "0.58518326", "0.58462757", "0.5839738", "0.5816084", "0.580965", "0.5808794", "0.58053607", "0.579787", "0.5789011", "0.5782689", "0.57802486", "0.57794666", "0.5764803", "0.5759678", "0.5759093", "0.5755433", "0.5749309", "0.5748348", "0.5741768", "0.57345134", "0.57335925", "0.57242113", "0.57167906", "0.571517", "0.57109815", "0.57073975", "0.5705728", "0.57031643", "0.57012874", "0.56983316", "0.5697892", "0.56886435", "0.56882507", "0.5688116", "0.56692225", "0.5662664", "0.5655194", "0.565213", "0.56474286", "0.5645908", "0.5643566", "0.56397116", "0.5638764", "0.5629509", "0.5629398", "0.5628858", "0.5625589", "0.5617443", "0.561595", "0.56136435", "0.5610042", "0.56054264", "0.56048244", "0.5603792", "0.5591116", "0.55893034", "0.5585022", "0.5576922", "0.5573662", "0.5572948" ]
0.0
-1
public T value; // OBSOLETE
public UnitObject(TimeInterval _interval, T _value) { this.interval = _interval; // this.value = _value; fun = new ConstantFunction<T>(_value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getValue()\n {\n return value;\n }", "T value();", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public T value() {\n\t\treturn value;\n\t}", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public Object getValue() { return _value; }", "Object value();", "public T getRawValue(){\n return mValue;\n }", "public T get() {\n return value;\n }", "public T getValue() {\r\n return value;\r\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "public T getValue();", "public Object getValue() { return this.value; }", "public abstract T getValue();", "public abstract T getValue();", "public T getValue() {\n return value;\n }", "public S getValue() { return value; }", "public Object getVal()\n { return val; }", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\n\t\treturn value;\n\t}", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "T getNewValue();", "public Object getValue()\n {\n\treturn value;\n }", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public Object getValue(){\n \treturn this.value;\n }", "public interface Value {\n\t}", "@NotNull\n T getValue();", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "@Override\n public T getValue(T object) {\n return object;\n }", "public Object getValue()\n {\n return value;\n }", "public abstract O value();", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public Value() {}", "public static <T> T getValue(T value){\n return value;\n }", "public /* @Nullable */ T getValue() {\n return value;\n }", "@Override\n public N value() {\n return value;\n }", "public T getValue() {\n return this.value;\n }", "public Value(){}", "public V get() {\n return value;\n }", "public T value()\r\n {\r\n return data;\r\n }", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public A getValue() { return value; }", "ValueType getValue();", "public Value getValue(){\n return this.value;\n }", "public Object getValue() {\r\n return value;\r\n }", "void setValue(T value) throws YangException;", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "public Holder(/* @Nullable */ final T value) {\n this.value = value;\n }", "V getValue() {\n return value;\n }", "private Value() {\n\t}", "void setValue(T value);", "void setValue(T value);", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public V getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public abstract ValueType getValueType();", "public T getVal()\n\t{\n\n\t\treturn val;\n\t}", "public Object getValue() {\r\n return oValue;\r\n }", "public V getValue();", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "protected T getValue0() {\n\t\treturn value;\n\t}", "private synchronized T val() {\n\t\t\treturn val;\n\t\t}", "public E getValue()\n {\n return value;\n }", "public abstract Value getValue();", "public ValueWrapper(Object value) {\n\t\tsuper();\n\t\tthis.value = value;\n\t}", "V getValue();" ]
[ "0.775646", "0.7708808", "0.7702368", "0.7684134", "0.7591462", "0.7555517", "0.7555517", "0.7541886", "0.7488189", "0.7401372", "0.7393616", "0.7380875", "0.735833", "0.734874", "0.734874", "0.734874", "0.734874", "0.7342023", "0.7321606", "0.72581214", "0.72581214", "0.72581214", "0.72581214", "0.72581214", "0.72581214", "0.72539026", "0.72440815", "0.71962243", "0.71962243", "0.71820575", "0.71704006", "0.71418947", "0.7139906", "0.7139906", "0.7139906", "0.71214104", "0.71214104", "0.71214104", "0.71214104", "0.71214104", "0.71214104", "0.71214104", "0.7115978", "0.7115978", "0.7115978", "0.7115978", "0.7115978", "0.7113123", "0.710393", "0.70896435", "0.70896435", "0.70896435", "0.7055936", "0.7054138", "0.70510125", "0.70247597", "0.70247597", "0.7023305", "0.7012369", "0.6975054", "0.69655365", "0.69507545", "0.69441926", "0.6925329", "0.6919555", "0.6914097", "0.6909727", "0.6891179", "0.6885755", "0.6878055", "0.6871208", "0.68691427", "0.68578804", "0.6856188", "0.6855787", "0.68502456", "0.6839478", "0.68376833", "0.6819982", "0.68102854", "0.68102854", "0.677798", "0.677798", "0.677798", "0.677798", "0.67627513", "0.67627513", "0.67627513", "0.67627513", "0.67627513", "0.67603564", "0.67570364", "0.6754377", "0.67470485", "0.6733628", "0.6731648", "0.6726327", "0.67085373", "0.670649", "0.6704277", "0.67033535" ]
0.0
-1
/ A default getValue function this can be overridden to modify behaviour
public T getValue(float time) { return fun.getValue(new TimeInstant(time)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public abstract T getValue();", "public abstract T getValue();", "E getValue();", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public Object getValue() { return _value; }", "public Object getValue() { return this.value; }", "Object getValueFrom();", "protected V getValue() {\n return this.value;\n }", "public S getValue() { return value; }", "public Object getValue(){\n \treturn this.value;\n }", "V getValue();", "V getValue();", "V getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "public T getValue();", "@Override\n public V getValue() {\n return m_value;\n }", "public Object getValue()\n {\n\treturn value;\n }", "public abstract V getValue();", "public abstract String getValue();", "public abstract String getValue();", "public abstract String getValue();", "public Value getValue(){\n return this.value;\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public abstract int getValue();", "public abstract int getValue();", "public abstract int getValue();", "public V getValue();", "ValueType getValue();", "public abstract R getValue();", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "@Override\n public T getValue() {\n return entry.getValue().getValue();\n }", "@Override\n public double getValue()\n {\n return value;\n }", "public Object getValue()\n {\n return value;\n }", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "V getValue() {\n return value;\n }", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "public final Object getValue()\n {\n return m_Value;\n }", "public Integer getValue();", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public Object getValue() {\r\n return value;\r\n }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "@Override\n public int getValue() {\n return super.getValue();\n }", "@Override\n\tpublic double getValue() {\n\t\treturn value;\n\t}", "public T getValue() {\r\n return value;\r\n }", "public abstract M getValue();", "public T getValue()\n {\n return value;\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public A getValue() { return value; }", "public int getValue();", "public int getValue();", "public E getValue()\n {\n return value;\n }" ]
[ "0.8434523", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8408343", "0.8408343", "0.8408343", "0.8220053", "0.8220053", "0.8220053", "0.8220053", "0.8220053", "0.8103474", "0.8103474", "0.7997813", "0.79549587", "0.7933974", "0.793349", "0.7932601", "0.7916132", "0.7901457", "0.78565806", "0.7830668", "0.7823101", "0.7814031", "0.7782769", "0.7782769", "0.7782769", "0.77690464", "0.77690464", "0.77690464", "0.77690464", "0.77690464", "0.77690464", "0.77678037", "0.7767393", "0.7749652", "0.7710842", "0.7709396", "0.7709396", "0.7709396", "0.7698972", "0.76784", "0.76784", "0.7675803", "0.7675803", "0.7675803", "0.7646024", "0.7645899", "0.76372766", "0.7612588", "0.7612197", "0.76029015", "0.7594052", "0.75879556", "0.75879556", "0.75879556", "0.75879556", "0.75879556", "0.75879556", "0.75713134", "0.75638866", "0.75638866", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7556414", "0.7546492", "0.75307745", "0.75306445", "0.752192", "0.752192", "0.752192", "0.752192", "0.752192", "0.752192", "0.752192", "0.752192", "0.752192", "0.7495033", "0.7487388", "0.74865496", "0.74842674", "0.74837136", "0.74765337", "0.7475489", "0.7473621", "0.7472433", "0.7472276", "0.7472276", "0.7462115" ]
0.0
-1
/ A default getValue function this can be overridden to modify behaviour. This function is only useful for constant unit objects.
public T getValue() { return getValue(interval.start); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract double getValue();", "public abstract int getValue();", "public abstract int getValue();", "public abstract int getValue();", "double getBasedOnValue();", "public abstract T getValue();", "public abstract T getValue();", "@Override\n public double getValue()\n {\n return value;\n }", "ValueType getValue();", "V getValue();", "V getValue();", "V getValue();", "public S getValue() { return value; }", "public int getValue() { return 42; }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public abstract V getValue();", "@VTID(14)\r\n double getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "@Override\n\tpublic double getValue() {\n\t\treturn value;\n\t}", "public int getValue();", "public int getValue();", "public double getValue();", "double getValue();", "double getValue();", "double getValue();", "public abstract M getValue();", "public abstract String getValue();", "public abstract String getValue();", "public abstract String getValue();", "E getValue();", "private double getValue() {\n return value;\n }", "protected V getValue() {\n return this.value;\n }", "public Object getValue() { return _value; }", "public Value getValue(){\n return this.value;\n }", "String getVal();", "public V getValue();", "float getValue();", "float getValue();", "float getValue();", "public double getValue(){\n return value;\n }", "public Object getValue() { return this.value; }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "public Object getValue(){\n \treturn this.value;\n }", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "public abstract float getValue();", "Object getValueFrom();", "Double getValue();", "public T getValue();", "public int getValue(){\n return this.value;\n }", "public Integer getValue();", "protected T getValue0() {\n\t\treturn value;\n\t}", "@Override\n public int getValue() {\n return super.getValue();\n }", "V getValue() {\n return value;\n }", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "public int getValue(){\n return value;\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "public final Object getValue()\n {\n return m_Value;\n }", "public V getCValue();" ]
[ "0.72602445", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71321476", "0.71321476", "0.71321476", "0.70573914", "0.69670343", "0.69670343", "0.69670343", "0.69561344", "0.6903985", "0.6903985", "0.6897375", "0.6880957", "0.6872119", "0.6872119", "0.6872119", "0.68563354", "0.68561774", "0.6855831", "0.6855831", "0.6855831", "0.6855831", "0.6855831", "0.6791154", "0.67869055", "0.6774633", "0.6774633", "0.6774633", "0.6774633", "0.6774633", "0.67730147", "0.6772796", "0.6772796", "0.67430615", "0.6731943", "0.6731943", "0.6731943", "0.67226213", "0.6720533", "0.6720533", "0.6720533", "0.6716078", "0.6714389", "0.6672334", "0.6661596", "0.6660447", "0.665722", "0.6652287", "0.66460913", "0.66460913", "0.66460913", "0.6640353", "0.66312754", "0.6630667", "0.6628138", "0.6626414", "0.6626414", "0.6626414", "0.6626414", "0.6626414", "0.6626414", "0.6610518", "0.65862614", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.6583903", "0.65713793", "0.65684474", "0.6561089", "0.65438515", "0.65398717", "0.6538967", "0.65370387", "0.65337586", "0.6525315", "0.6523946", "0.65185404", "0.65017843", "0.6495169", "0.6494335", "0.6494335", "0.6494335", "0.6494335", "0.6494335", "0.6494335", "0.64937276", "0.6492595" ]
0.0
-1
/ Method that merges two unit elements if possible. Result is stored in this element, second element remains unchanged. It is assumed that the interval of the second element comes after the interval of the first element. Note: should maybe return boolean, true if merge actually happened
public void merge(UnitObject<T> unit) { // placeholder }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Interval mergeInterval(Interval first, Interval second){\n Interval result = new Interval();\n result.start = Math.min(first.start,second.start);\n result.end = Math.max(first.end,second.end);\n return result;\n }", "private static boolean merge(int[] a, int[] b) {\n if (b[1] < a[0] || a[1] < b[0]) {\n return false;\n }\n\n a[0] = Math.min(a[0], b[0]);\n a[1] = Math.max(a[1], b[1]);\n return true;\n }", "public List<Interval> checkMerge (Interval interval1, List<Interval> mergedIntervals) {\r\n\t\tInterval mergeInterval = mergedIntervals.get(mergedIntervals.size() - 1);\r\n\t\tif (interval1.getValue1() <= mergeInterval.getValue2() && interval1.getValue2() > mergeInterval.getValue2()) {\r\n\t\t\tInterval intervally = combine(mergeInterval.getValue1(), interval1.getValue2());\r\n\t\t\tmergedIntervals.set(mergedIntervals.size() - 1, intervally);\r\n\t\t\treturn mergedIntervals;\r\n\t\t}else if (interval1.getValue2() <= mergeInterval.getValue2()){\r\n\t\t\treturn mergedIntervals;\r\n\t\t}else {\r\n\t\t\tmergedIntervals.add(interval1);\r\n\t\t\treturn mergedIntervals;\r\n\t\t}\r\n\t}", "private void merge(List<Interval> list) {\n if(list == null) {\n return;\n }\n \n // first sort the list on their start time\n Collections.sort(list, new Comparator<Interval>() {\n\n @Override\n public int compare(Interval i1, Interval i2) {\n if(i1 == null && i2 == null) {\n return 0;\n } else if(i1 != null && i2 != null) {\n if(i1.start > i2.start) {\n return 1;\n } else if(i1.start == i2.start) {\n return 0;\n } else {\n return -1;\n }\n } else if(i1 != null) {\n return 1;\n } else {\n return -1;\n }\n }\n \n });\n \n int index = 0;\n \n // ensure there are at least 2 elements left\n while(index < list.size() - 1) {\n // get the next 2 consecutive elements from the list\n Interval a = list.get(index++);\n Interval b = list.get(index);\n \n\n if(a.start <= b.start && b.end <= a.end) {\n // a completely covers b then delete b\n list.remove(index--);\n } else if(a.start <= b.start && b.start < a.end) {\n // a and b overlaps some \n list.remove(index--);\n list.remove(index);\n \n // replace with the merged one\n list.add(index, new Interval(a.start, b.end));\n }\n }\n }", "public static Interval union(Interval in1, Interval in2){\r\n if (Interval.intersection(in1, in2).isEmpty())\r\n return new Interval();\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n double fe, se;\r\n char ai = in1.getFEincluded();\r\n char bi = in1.getSEincluded();\r\n char ci = in2.getFEincluded();\r\n char di = in2.getSEincluded();\r\n char fei, sei;\r\n if (a<c){\r\n fe = a;\r\n fei = ai;\r\n }\r\n else if (a>c){\r\n fe = c;\r\n fei = ci;\r\n }\r\n else{\r\n fe = a;\r\n fei = ai==ci?ai:'(';\r\n }\r\n if (d<b){\r\n se = b;\r\n sei = bi;\r\n }\r\n else if (d>b){\r\n se = d;\r\n sei = di;\r\n }\r\n else{\r\n se = b;\r\n sei = bi==di?bi:')';\r\n }\r\n return new Interval(fe,se,fei,sei);\r\n }", "private static MyList Merge(MyList L1, MyList L2)\n\t{\n\t\t//however, one assumption is that the length of L1>L2, because of our mid algorithm\n\t\tMyList merged = new MyList(0);//its next is the resulting merged list\n\t\tMyList current = merged;//current points where we are at the time of merging\n\t\tint turn = 1;//we define a turn to know which list element to be merged per loop cycle\n\t\twhile(L1!=null && L2!=null)\n\t\t{\n\t\t\tif(turn==1)//pick from L1\n\t\t\t{\n\t\t\t\tcurrent.next = L1;\n\t\t\t\tL1 = L1.next;//update L1's index to right\n\t\t\t\tturn = 2;//next loop we pick from L2\n\t\t\t}\n\t\t\telse//pick from L2\n\t\t\t{\n\t\t\t\tcurrent.next = L2;\n\t\t\t\tL2 = L2.next;//update L1's index to right\n\t\t\t\tturn = 1;//back to L1 next cycle\n\t\t\t}\n\t\t\tcurrent = current.next;//update the current pointer\n\t\t}\n\t\t//as we said L1's length may be longer than L2 considering size of array\n\t\tif(L1!=null)//we merge the remaining L1 to our current.next\n\t\t\tcurrent.next = L1;\n\n\t\treturn merged.next;\n\t}", "protected void add(Interval addition) {\n\t\tif (readonly)\n\t\t\tthrow new IllegalStateException(\"can't alter readonly IntervalSet\");\n\t\t// System.out.println(\"add \"+addition+\" to \"+intervals.toString());\n\t\tif (addition.b < addition.a) {\n\t\t\treturn;\n\t\t}\n\t\t// find position in list\n\t\t// Use iterators as we modify list in place\n\t\tfor (ListIterator<Interval> iter = intervals.listIterator(); iter.hasNext();) {\n\t\t\tInterval r = iter.next();\n\t\t\tif (addition.equals(r)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (addition.adjacent(r) || !addition.disjoint(r)) {\n\t\t\t\t// next to each other, make a single larger interval\n\t\t\t\tInterval bigger = addition.union(r);\n\t\t\t\titer.set(bigger);\n\t\t\t\t// make sure we didn't just create an interval that\n\t\t\t\t// should be merged with next interval in list\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tInterval next = iter.next();\n\t\t\t\t\tif (!bigger.adjacent(next) && bigger.disjoint(next)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if we bump up against or overlap next, merge\n\t\t\t\t\titer.remove(); // remove this one\n\t\t\t\t\titer.previous(); // move backwards to what we just set\n\t\t\t\t\titer.set(bigger.union(next)); // set to 3 merged ones\n\t\t\t\t\titer.next(); // first call to next after previous duplicates\n\t\t\t\t\t\t\t\t\t// the result\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (addition.startsBeforeDisjoint(r)) {\n\t\t\t\t// insert before r\n\t\t\t\titer.previous();\n\t\t\t\titer.add(addition);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if disjoint and after r, a future iteration will handle it\n\t\t}\n\t\t// ok, must be after last interval (and disjoint from last interval)\n\t\t// just add it\n\t\tintervals.add(addition);\n\t}", "Node merge(Node first, Node second) {\n // If first linked list is empty\n if (first == null) {\n return second;\n }\n \n // If second linked list is empty\n if (second == null) {\n return first;\n }\n \n // Pick the smaller value\n if (first.data < second.data) {\n first.next = merge(first.next, second);\n first.next.prev = first;\n first.prev = null;\n return first;\n } else {\n second.next = merge(first, second.next);\n second.next.prev = second;\n second.prev = null;\n return second;\n }\n }", "private List<Interval> merge(Interval interval, Interval dnd) {\n if (dnd.a <= interval.a && dnd.b >= interval.b) {\n return Collections.emptyList();\n }\n // [ dnd [ ] interval ]\n if (dnd.a <= interval.a && dnd.b >= interval.a) {\n return Collections.singletonList(new Interval(dnd.b, interval.b, IntervalType.E));\n }\n // [ interval [ dnd ] ]\n if (interval.a <= dnd.a && dnd.b <= interval.b) {\n return Arrays.asList(\n new Interval(interval.a, dnd.a, IntervalType.E),\n new Interval(dnd.b, interval.b, IntervalType.E)\n );\n }\n // [ interval [ ] dnd ]\n if (interval.a <= dnd.a && interval.b >= dnd.a) {\n return Collections.singletonList(new Interval(interval.a, dnd.a, IntervalType.E));\n }\n // else\n // [ int ] [ dnd ]\n // [dnd] [int]\n // return int\n return Collections.singletonList(interval);\n }", "private List<Integer> merge(List<Integer> firstList, List<Integer> secondList) {\n List<Integer> resultList = new ArrayList<>();\n\n if (firstList.size() == 1 && secondList.size() == 1) {\n resultList.add(Math.min(firstList.get(0), secondList.get(0)));\n resultList.add(Math.max(firstList.get(0), secondList.get(0)));\n return resultList;\n }\n\n int firstIndex = 0;\n int secondIndex = 0;\n\n while (firstIndex < firstList.size() && secondIndex < secondList.size()) {\n if (firstList.get(firstIndex) < secondList.get(secondIndex)) {\n resultList.add(firstList.get(firstIndex));\n firstIndex++;\n } else {\n resultList.add(secondList.get(secondIndex));\n secondIndex++;\n }\n }\n\n if (firstIndex < firstList.size()) {\n for (int i = firstIndex; i < firstList.size(); i++) {\n resultList.add(firstList.get(i));\n }\n }\n\n if (secondIndex < secondList.size()) {\n for (int i = secondIndex; i < secondList.size(); i++) {\n resultList.add(secondList.get(i));\n }\n }\n\n return resultList;\n }", "public static GcResult merge(GcResult a, GcResult b) {\n\t\treturn a.compareTo(b) < 0 ? a : b;\n\t}", "public Pair<Outbox, Boolean> mergeAdjacent(Outbox new_ob, Outbox last_ob) {\n\n int dim = new_ob.adjacent(last_ob);\n if ((dim != -1) && (!new_ob.sameSize(last_ob, dim))) dim = -1;\n if (dim != -1) new_ob.merge(last_ob, dim); //merge the two objects\n// if (dim!=-1) System.out.println(\"after merge:\"+new_ob);\n\n return new Pair<>(new_ob, dim != -1);\n\n }", "Node merge(Node first, Node second) {\r\n\t\t// If first linked list is empty\r\n\t\tif (first == null) {\r\n\t\t\treturn second;\r\n\t\t}\r\n\r\n\t\t// If second linked list is empty\r\n\t\tif (second == null) {\r\n\t\t\treturn first;\r\n\t\t}\r\n\r\n\t\t// Pick the smaller value\r\n\t\tif (first.data < second.data) {\r\n\t\t\tfirst.next = merge(first.next, second);\r\n\t\t\tfirst.next.prev = first;\r\n\t\t\tfirst.prev = null;\r\n\t\t\treturn first;\r\n\t\t} else {\r\n\t\t\tsecond.next = merge(first, second.next);\r\n\t\t\tsecond.next.prev = second;\r\n\t\t\tsecond.prev = null;\r\n\t\t\treturn second;\r\n\t\t}\r\n\t}", "public void add(Interval<T> interval) {\n ArrayList<Interval<T>> that = new ArrayList<Interval<T>>();\n that.add(interval);\n\n /*\n * The following algorithm works with any size ArrayList<Interval<T>>.\n * We do only one interval at a time to do an insertion sort like adding of intervals, so that they don't need to be sorted.\n */\n int pos1 = 0, pos2 = 0;\n Interval<T> i1, i2, i1_2;\n\n for (; pos1 < this.size() && pos2 < that.size(); ++pos2) {\n i1 = this.intervals.get(pos1);\n i2 = that.get(pos2);\n\n if (i1.is(IntervalRelation.DURING_INVERSE, i2) || i1.is(IntervalRelation.START_INVERSE, i2) || i1.is(IntervalRelation.FINISH_INVERSE, i2) || i1.is(IntervalRelation.EQUAL, i2)) {//i1 includes i2\n //ignore i2; do nothing\n } else if (i1.is(IntervalRelation.DURING, i2) || i1.is(IntervalRelation.START, i2) || i1.is(IntervalRelation.FINISH, i2)) {//i2 includes i1\n this.intervals.remove(pos1);//replace i1 with i2\n --pos2;\n } else if (i1.is(IntervalRelation.OVERLAP, i2) || i1.is(IntervalRelation.MEET, i2)) {//i1 begin < i2 begin < i1 end < i2 end; i1 end = i2 begin\n i1_2 = new Interval<T>(i1.begin(), i2.end());//merge i1 and i2\n this.intervals.remove(pos1);\n that.add(pos2 + 1, i1_2);\n } else if (i1.is(IntervalRelation.OVERLAP_INVERSE, i2) || i1.is(IntervalRelation.MEET_INVERSE, i2)) {//i2 begin < i1 begin < i2 end < i1 end; i2 end = i1 begin\n i1_2 = new Interval<T>(i2.begin(), i1.end());//merge i2 and i1\n this.intervals.remove(pos1);\n this.intervals.add(pos1, i1_2);\n } else if (i1.is(IntervalRelation.BEFORE, i2)) {//i1 < i2 < (next i1 or next i2)\n ++pos1;\n --pos2;\n } else if (i1.is(IntervalRelation.AFTER, i2)) {//i2 < i1 < (i1 or next i2)\n this.intervals.add(pos1, i2);\n ++pos1;\n }\n }\n\n //this finishes; just append the rest of that\n if (pos2 < that.size()) {\n for (int i = pos2; i < that.size(); ++i) {\n this.intervals.add(that.get(i));\n }\n }\n }", "public void union(int first, int second){\n int firstId = find(first);\n int secondId = find(second);\n //Check if these are already connected\n if(firstId == secondId){\n return;\n }\n if(size[firstId] < size[secondId]){\n size[secondId]+=size[firstId];\n grid[first] = secondId;\n }\n else {\n size[firstId]+=size[secondId];\n grid[second] = firstId;\n }\n --numOfComponents;\n }", "public static LinkedList MergeList(LinkedList element_A, LinkedList element_B) {\n\t\tLinkedList merged = new LinkedList();\n\t\tif (element_B.size() == 0) {\n\t\t\treturn element_A;\n\t\t}\n\t\tif (element_A.size() == 0) {\n\t\t\treturn element_B;\n\t\t}\n\t\tIterator itr = element_A.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tCOMPOUND compound_A = (COMPOUND)itr.next();\n\t\t\tIterator itr2 = element_B.iterator();\n\t\t\twhile (itr2.hasNext()) {\n\t\t\t\tCOMPOUND compound_B = (COMPOUND)itr2.next();\t\t\t\t\n\t\t\t\tCOMPOUND new_compound = merge_compound(compound_A, compound_B);\n\t\t\t\t\n\t\t\t\t// add whether to save this value\n\t\t\t\tif (isGreater(new_compound.TOTALPROB, cutoff)) {\n\t\t\t\t\tmerged.add(new_compound);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn merged;\n\t}", "public static ListNode merge2(ListNode l1,ListNode l2){\n if(l1==null) return l2;\n if(l2==null) return l1;\n if(l1.getVal()<l2.getVal()){\n l1.next=merge2(l1.next,l2);\n return l1;\n }else{\n l2.next=merge2(l1,l2.next);\n return l2;\n }\n }", "public static double merge(final double value1, final double value2) {\n return 1 - (1 - value1) * (1 - value2);\n }", "static List<Interval> merge(List<Interval> intervals) {\n intervals.sort((Interval interval1, Interval interval2) -> Integer.compare(interval1.start, interval2.start));\n\n Iterator<Interval> itr = intervals.iterator();\n\n List<Interval> result = new ArrayList<>();\n Interval first = itr.next();\n int start = first.start;\n int end = first.end;\n\n while (itr.hasNext()) {\n Interval currentInterval = itr.next();\n //overlap\n if (end > currentInterval.start) {\n // change the end value to take the max of the two\n // TIP: changing max to min gives us mutually exclusive intervals , ie, it gets rid if the overlapping intervals\n end = Math.max(end, currentInterval.end);\n // Not adding to final list here cause the next interval could also be overlapped\n } else {\n //add s,e to final list here as we know current interval end < start\n result.add(new Interval(start, end));\n // last pair will not be added in this loop as hasNext will return false\n start = currentInterval.start;\n end = currentInterval.end;\n }\n }\n\n result.add(new Interval(start, end));\n return result;\n\n }", "public Item merge(Item other);", "public boolean merge(Case from, Case to)\n {\n if (from.getValue() == to.getValue() && from.getValue() != 0)\n {\n to.setValue(to.getValue()+from.getValue());\n from.setValue(0);\n return true;\n }\n return false;\n }", "private static int[] merge( int[] a, int[] b )\n {\n int[] ans = new int[(a.length + b.length)]; //create new array with the combined lengths\n int a1 = 0; //counter for a's position\n int b1 = 0; //counter for b's position\n while (a1 < a.length || b1 < b.length) { //iterates while either counter is not at the end of each array\n\t if (a1 == a.length) { //if you finished with all of a add the remaining b elements\n\t ans[a1 + b1] = b[b1]; \n\t b1 += 1;\n\t }\n\t else if (b1 == b.length) { //if you finished with all of b add the remaining a elements\n\t ans[a1 + b1] = a[a1];\n\t a1 += 1;\n\t }\n\t else if (a[a1] > b[b1]) { //if the current element at position a1 is larger than the one at b1, add the lower b1 to the new array and move to next b position\n\t ans[a1 + b1] = b[b1];\n\t b1 += 1;\n\t }\n\t else {\n\t ans[a1 + b1] = a[a1]; //otherwise add the element at a1 and move to next a position \n\t a1 += 1;\n\t }\n }\n return ans; //return the sorted merged array\t \t \n }", "private static <T extends Comparable<? super T>> void merge(List<T> list, int firstBegin, int firstFinish, int secondBegin, int secondFinish, T[] auxiliaryArray){\n int firstIndex = firstBegin;\n int secondIndex = secondBegin;\n int auxiliaryIndex = 0;\n while(firstIndex <= firstFinish && secondIndex <= secondFinish){\n if(list.get(firstIndex).compareTo(list.get(secondIndex)) <= 0){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n }else{\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n }\n auxiliaryIndex++;\n }\n while(firstIndex <= firstFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n auxiliaryIndex++;\n }\n while(secondIndex <= secondFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n auxiliaryIndex++;\n }\n auxiliaryIndex = 0;\n for(int i = firstBegin; i <= secondFinish; i++){\n list.set(i, auxiliaryArray[auxiliaryIndex]);\n auxiliaryIndex++;\n }\n }", "@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode dummyHead = new ListNode(0);\n ListNode endOfSortedList = dummyHead;\n\n while (l1 != null && l2 != null) {\n if (l1.val < l2.val) {\n endOfSortedList.next = l1;\n l1 = l1.next;\n } else {\n endOfSortedList.next = l2;\n l2 = l2.next;\n }\n\n endOfSortedList = endOfSortedList.next;\n }\n\n if (l1 != null) {\n endOfSortedList.next = l1;\n }\n\n if (l2 != null) {\n endOfSortedList.next = l2;\n }\n\n return dummyHead.next;\n }", "protected boolean union(int id1, int id2) \n\t{\n\t\t// Find the parents of both nodes.\n\t\tint root1 = find(id1);\n\t\tint root2 = find(id2);\n\t\t\n\t\t// No union needed.\n\t\tif (root1 == root2)\n\t\t{\n\t\t //Return that the two values were already in the same tree\n\t\t return false;\n\t\t}\n\t\t\n\t\t//Combine the trees with these two roots\n\t\tparents[root1] = root2;\n\t\t\n\t\t// We successfully did a union.\n\t\treturn true;\n\t}", "@Override\n public void union(int root1, int root2) {\n // TODO: Implement the union-by-rank algorithm for disjoint set\n if (s[root1]>-1 || s[root2]>-1 ) throw new IllegalArgumentException(\"Impossible to union because one of the roots is already dependant\");\n if( s[root2] < s[root1]){ // root2 is deeper\n s[root1] = root2;// Make root2 new root\n } \n else{\n if(s[root1] == s[root2]) s[ root1 ]--; // Update height if same\n s[root2] = root1; // Make root1 new root\n }\n }", "public void merge(int[] inputArray, int start, int mid, int end) {\n int s1 = mid - start + 1;\n int s2 = end - mid;\n\n //Create a left and right array\n int L[] = new int [s1];\n int R[] = new int [s2];\n\n //Copy elements into two separate arrays\n for (int i=0; i<s1; ++i)\n L[i] = inputArray[start + i];\n for (int j=0; j<s2; ++j)\n R[j] = inputArray[mid + 1+ j];\n\n\n int i = 0, j = 0;\n int k = start;\n\n //Start your comparision\n while (i < s1 && j < s2)\n {\n if (L[i] <= R[j])\n {\n inputArray[k] = L[i];\n i++;\n }\n else\n {\n inputArray[k] = R[j];\n j++;\n }\n k++;\n }\n\n //Copy the remaining elements\n while (i < s1)\n {\n inputArray[k] = L[i];\n i++;\n k++;\n }\n while (j < s2)\n {\n inputArray[k] = R[j];\n j++;\n k++;\n }\n }", "public static void merge (int[] result, int[] a1, int[] a2) {\r\n\t\tint len1 = a1.length;\r\n\t\tint len2 = a2.length;\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\t\r\n\t\twhile (i < len1 && j < len2) {\r\n\t\t\tif (a1[i] < a2[j]) {\r\n\t\t\t\tresult[k] = a1[i];\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tresult[k] = a2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < len1) {\r\n\t\t\tresult[k] = a1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < len2) {\r\n\t\t\tresult[k] = a2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}", "public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }", "public List<Integer> merge(List<Integer> S1, List<Integer> S2) {\n\t\tList<Integer> S = new ArrayList<Integer>();\n\t\twhile(!(S1.isEmpty() || S2.isEmpty())){\n\t\t\tif(comps(S1.get(0), S2.get(0)) && S1.get(0) < S2.get(0)) {\t\t\t\t\t\n\t\t\t\tS.add(S1.remove(0));\n\t\t\t} else {\n\t\t\t\tS.add(S2.remove(0));\n\t\t\t}\n\t\t}\n\t\twhile(!(S1.isEmpty())){\n\t\t\tS.add(S1.remove(0));\n\t\t}while(!(S2.isEmpty())){\n\t\t\tS.add(S2.remove(0));\n\t\t}\n\t\treturn S;\n\t}", "private void merge(int lb, int mid, int ub, int[] ar){\n\t\tint i = lb ,j = lb + mid, k = 0;\n\t\tint[] out = new int[ub - lb + 1];\n\t\twhile( (i <= lb + mid - 1) && (j <= ub)){\n\t\t if(ar[i] <= ar[j]) out[k++] = ar[i++];\n\t\t else out[k++] = ar[j++];\n\t\t}\n\t\twhile(i <= lb + mid - 1) out[k++] = ar[i++];\n\t\twhile(j <= ub) \t out[k++] = ar[j++];\n\t\tfor(int l = 0; l < k; l++) ar[lb + l] = out[l];\n\t}", "public void merge() {\n\t\tfor(int i = 1;i<crystalQuantity.length;i++) {\n\t\t\tif (crystalQuantity[i] >= 2) { \n\t\t\t\tcrystalQuantity[i] -= 2; // remove two of the current tier\n\t\t\t\tcrystalQuantity[i+1] += 1; // add one of the new tier\n\t\t\t}\n\t\t}\n\t\tfor(int i = 1;i<dustQuantity.length;i++) {\n\t\t\tif (dustQuantity[i] >= 2) { \n\t\t\t\tdustQuantity[i] -= 2; // remove two of the current tier\n\t\t\t\tcrystalQuantity[i+1] += 1; // add one of the new tier\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(!automerge) {\n\t\t\tcollection();\n\t\t}\n\t\t\n\t}", "@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public ListNode mergeTwoLists(ListNode a, ListNode b) {\r\n\t\tListNode merged = new ListNode(0);\r\n\r\n\t\tListNode first = a;\r\n\t\tListNode second = b;\r\n\t\tListNode third = merged;\r\n\r\n\t\twhile (first != null && second != null) {\r\n\t\t\tif (first.val <= second.val) {\r\n\t\t\t\tthird.next = first;\r\n\t\t\t\tfirst = first.next;\r\n\t\t\t} else {\r\n\t\t\t\tthird.next = second;\r\n\t\t\t\tsecond = second.next;\r\n\t\t\t}\r\n\t\t\tthird = third.next;\r\n\t\t}\r\n\r\n\t\tif (first != null) {\r\n\t\t\tthird.next = first;\r\n\t\t}\r\n\t\tif (second != null) {\r\n\t\t\tthird.next = second;\r\n\t\t}\r\n\r\n\t\treturn merged.next;\r\n\t}", "static void mergeWithoutExtraSpace(int[] arr1, int[] arr2) {\n int lastIndexOfArr1 = arr1.length - 1;\n int firstIndexOfArr2 = 0;\n\n while (lastIndexOfArr1 >= 0 && firstIndexOfArr2 < arr2.length) {\n if (arr1[lastIndexOfArr1] > arr2[firstIndexOfArr2]) {\n int temp = arr1[lastIndexOfArr1];\n arr1[lastIndexOfArr1] = arr2[firstIndexOfArr2];\n arr2[firstIndexOfArr2] = temp;\n lastIndexOfArr1--;\n firstIndexOfArr2++;\n } else\n\n /*This is the condition when arr1[lastIndexOfArr1] > arr2[firstIndexOfArr2], that means after this\n * situation, Arr1's all left to current elements would be smaller then right elements of arr2 so we are\n * breaking this loop here.\n * */\n break;\n\n }\n\n //Now arr1 has all element lower than any element of arr2 so now sort them individually and print them\n Arrays.sort(arr1);\n Arrays.sort(arr2);\n\n for (int t : arr1) {\n System.out.print(t + \" \");\n }\n System.out.println(\"*\");\n for (int t : arr2) {\n System.out.print(t + \" \");\n }\n System.out.println(\"*\");\n\n StringBuilder sb = new StringBuilder();\n for (int value : arr1) {\n sb.append(value).append(\" \");\n }\n\n for (int value : arr2) {\n sb.append(value).append(\" \");\n }\n System.out.println(sb);\n }", "public Set Union(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> unionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < 10; i++) {\n\t\t\tif (firstArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(firstArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (secondArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(secondArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet unionReturn = new Set(unionOfBoth); // Initiate a Set object from out final ArrayList\n\t\t\n\t\treturn unionReturn; // Return the final Set Object\n\t}", "public void union(int id1, int id2) {\n\t\tint root_v1 = find(id1); // Find the representative of the first items\n\t\tint root_v2 = find(id2);\t// Find the representative of the second item\n\n\t\tif (root_v1 != root_v2) {\t// If the 2 items are not equal\n\t\t\tG.addEdge(root_v1, root_v2);\t// Add an edge from root1 --> root2 (Union)\n\t\t}\n\t}", "public boolean mergeIfPossible(Line other) {\n\t\tif (hasConnection(other)) {\n\t\t\tthis.xEndValue = xEndValue > other.xEndValue ? xEndValue : other.xEndValue;\n\t\t\tthis.xStartValue = xStartValue < other.xStartValue ? xStartValue : other.xStartValue;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static Node merge(Node a, Node b)\n {\n // Base cases\n if (a == null) {\n return b;\n }\n\n if (b == null) {\n return a;\n }\n\n // Pick either a or b, and recur\n if (a.data.getEmp_No() <= b.data.getEmp_No())\n {\n a.next = merge(a.next, b);\n a.next.prev = a;\n a.prev = null;\n return a;\n }\n else\n {\n b.next = merge(a, b.next);\n b.next.prev = b;\n b.prev = null;\n return b;\n }\n }", "public static Block mergeBlocks(Block a, Block b) {\n if(a == null || b == null)return null;\n\n // left merge\n if(b.start + b.length == a.start) {\n return new Block(b.start, a.length + b.length);\n }\n\n // right merge\n if (b.start == a.start + a.length) {\n return new Block(a.start, a.length + b.length);\n }\n return null;\n }", "public static ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode dummy = new ListNode(-1), cur = dummy;\n while (l1 != null && l2 != null) {\n if (l1.val < l2.val) {\n cur.next = l1;\n l1 = l1.next;\n } else {\n cur.next = l2;\n l2 = l2.next;\n }\n cur = cur.next;\n }\n cur.next = (l1 != null) ? l1 : l2;\n return dummy.next;\n }", "public static int[] merge(int[] arr1, int[] arr2) {\n int[] merged = new int[arr1.length + arr2.length];\n\n int arr1Index = 0;\n int arr2Index = 0;\n int mergedIndex = 0;\n\n // Keep taking values from arr1 or arr2 until the merged array is full.\n while (mergedIndex < merged.length) {\n\n if (arr1Index < arr1.length && arr2Index < arr2.length) {\n /*\n * Still have values in both arr1 and arr2 that have not been\n * used, so take the smaller of the two and put it into merged.\n */\n if (arr1[arr1Index] < arr2[arr2Index]) {\n merged[mergedIndex] = arr1[arr1Index];\n arr1Index++;\n }\n else {\n merged[mergedIndex] = arr2[arr2Index];\n arr2Index++;\n }\n }\n else if (arr1Index < arr1.length) {\n /*\n * There are still values in arr1 that have not been used but\n * arr2 has been exhausted so take the next value from arr1.\n */\n merged[mergedIndex] = arr1[arr1Index];\n arr1Index++;\n }\n else {\n /*\n * There are still values in arr2 that have not been used but\n * arr1 has been exhausted so take the next value from arr2.\n */\n merged[mergedIndex] = arr2[arr2Index];\n arr2Index++;\n }\n\n mergedIndex++;\n }\n\n return merged;\n }", "static void merge(int arr[], int l, int m, int r) \n { \n // Sizes of the two subarrays\n int size1 = m - l + 1; \n int size2 = r - m; \n \n // Temporary arrays\n int left[] = new int [size1]; \n int right[] = new int [size2]; \n \n // Copy over to temps\n for (int i=0; i<size1; ++i) \n left[i] = arr[l + i]; \n for (int j=0; j<size2; ++j) \n right[j] = arr[m + 1+ j]; \n \n \n // Initial indexes of first and second subarrays \n int i = 0, j = 0; \n \n // Initial index of merged subarry array \n int k = l; \n while (i < size1 && j < size2) \n { \n if (left[i] <= right[j]) \n { \n arr[k] = left[i]; \n i++; \n } \n else\n { \n arr[k] = right[j]; \n j++; \n } \n k++; \n } \n \n // Copy rest of arrays\n while (i < size1) \n { \n arr[k] = left[i]; \n i++; \n k++; \n } \n \n // For the other array\n while (j < size2) \n { \n arr[k] = right[j]; \n j++; \n k++; \n } \n }", "public static void union(String a, String b) {\r\n int root1 = find(a);\r\n int root2 = find(b);\r\n if (root1 == root2)return;\r\n if(size.get(root1) < size.get(root2)){size.set(root2, size.get(root2)+size.get(root1)); position.set(root1, root2);}\r\n else {size.set(root1, size.get(root1)+size.get(root2)); position.set(root2, root1);}\r\n }", "public static ListNode mergeTwoLists2(ListNode l1, ListNode l2) {\n ListNode prehead = new ListNode(-1);\n\n ListNode prev = prehead;\n while (l1 != null && l2 != null) {\n if (l1.val <= l2.val) {\n prev.next = l1;\n l1 = l1.next;\n } else {\n prev.next = l2;\n l2 = l2.next;\n }\n prev = prev.next;\n }\n\n // exactly one of l1 and l2 can be non-null at this point, so connect\n // the non-null list to the end of the merged list.\n prev.next = l1 == null ? l2 : l1;\n\n return prehead.next;\n\n }", "private int[] mergeTwoSet(int[] firstSet, int[] secondSet){\n int threshold = firstSet.length + 1;\n\n int[] candidate = new int[threshold];\n\n int firstIndex = 0;\n int secondIndex = 0;\n int index = 0;\n\n while ((firstIndex < firstSet.length || secondIndex < secondSet.length) && index < threshold){\n if (firstIndex == firstSet.length){\n // The end of first set is reached\n candidate[index] = secondSet[secondIndex++];\n\n } else if (secondIndex == secondSet.length){\n // The end of second set is reached\n candidate[index] = firstSet[firstIndex++];\n } else {\n // Both sets still have candidates\n if (firstSet[firstIndex] == secondSet[secondIndex]){\n candidate[index] = firstSet[firstIndex++];\n secondIndex++;\n } else if (firstSet[firstIndex] < secondSet[secondIndex]){\n candidate[index] = firstSet[firstIndex++];\n } else{\n candidate[index] = secondSet[secondIndex++];\n }\n }\n index++;\n }\n\n if (firstIndex == firstSet.length && secondIndex == secondSet.length){\n // This is a valid candidate (contains all elements from first / second set)\n return candidate;\n }\n\n return null;\n }", "public static SinglyLinkedList merge(SinglyLinkedList list1, SinglyLinkedList list2)\n\t{\n\t\tSinglyLinkedList list3 = new SinglyLinkedList();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\twhile((i < list1.size()) && (j < list2.size()))\n\t\t{\n\t\t\tif(list1.getElementAt(i) < list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list1.getElementAt(i));\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if(list1.getElementAt(i) > list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\telse if(list1.getElementAt(i) == list2.getElementAt(j))\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tif(i == list1.size())\n\t\t{\n\t\t\tfor(int k = j; k < list2.size(); k++)\n\t\t\t{\n\t\t\t\tlist3.addLast(list2.getElementAt(k));\n\t\t\t}\n\t\t}\n\t\telse if(j == list2.size())\n\t\t{\n\t\t\tfor(int l = i; l < list1.size(); l++)\n\t\t\t{\n\t\t\t\tlist3.addLast(list1.getElementAt(l));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list3;\n\t}", "public void merge(List<Integer> a, List<Integer> l, List<Integer> r, int left, int right) \n {\n \n int i = 0, j = 0, k = 0;\n while (i < left && j < right) \n {\n if (l.get(i) < r.get(j)) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n else \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }\n \n while (i < left) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n while (j < right) \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }", "public ListNode merge(ListNode h1, ListNode h2){\r\n if(h1 == null){\r\n return h2;\r\n }\r\n if(h2 == null){\r\n return h1;\r\n }\r\n \r\n if(h1.val < h2.val){\r\n h1.next = merge(h1.next, h2);\r\n return h1;\r\n }\r\n else{\r\n h2.next = merge(h1, h2.next);\r\n return h2;\r\n }\r\n \r\n }", "T merge(T x);", "private static void merge(Comparable[] as, Comparable[] aux, int lo, int mid, int hi) {\n assert isSorted(as, lo, mid); // precondition that first sub array is ordered\n assert isSorted(as, mid + 1, hi); // precondition that second sub array is ordered\n\n for (int k = lo; k <= hi; k++) {\n aux[k] = as[k];\n }\n\n int i = lo;\n int j = mid + 1;\n for (int k = lo; k <= hi; k++) {\n // done with first sub array\n if (i > mid) as[k] = aux[j++];\n // done with second sub array\n else if (j > hi) as[k] = aux[i++];\n // second less than first\n else if (less(aux[j], aux[i])) as[k] = aux[j++];\n // first less than first\n else as[k] = aux[i++];\n }\n\n assert isSorted(as, lo, hi); // postcondition that whole as array is sorted\n }", "public ListNode mergeTwoListsIterative(ListNode l1, ListNode l2) {\n ListNode dummy=new ListNode();\n ListNode curr=dummy;\n while(l1!=null && l2!=null){\n if(l1.val<l2.val){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n else{\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n }\n while(l1!=null){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n while(l2!=null){\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n return dummy.next;\n }", "@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "static int[] merge(int[] A, int[] B){\n int m = A.length; int n = B.length;\n A = Arrays.copyOf(A, m+n);\n while(m > 0 && n > 0){\n if(A[m-1] > B[n-1]){\n A[m+n-1] = A[m-1];\n m--;\n }else{\n A[m+n-1] = B[n-1];\n n--;\n }\n }\n\n while(n > 0){\n A[m+n-1] = B[n-1];\n n--;\n }\n return A;\n }", "int merge(int list1, int list2) {\n\t\t\n\t\t// Get values of the lists\n\t\t\n\t\tComparable c1 = array[list1];\n\t\tComparable c2 = array[list2];\n\n\t\t// compare values\n\t\t\n\t\tint small = list1, big = list2;\n\t\tif (c1 != c2 && c1 != null && c1.compareTo(c2) > 0) {\n\n\t\t\tsmall = list2;\n\t\t\tbig = list1;\n\t\t}\n\n\t\t/*\n\t\t * If small list has no tail - set big list to be small list tail\n\t\t * If small list has tail - merge it with the big list and set result to be small list tail\n\t\t */\n\t\t\n\t\tif (next[small] == NIL)\n\t\t\tnext[small] = big;\n\t\telse\n\t\t\tnext[small] = merge(next[small], big);\n\t\t\n\t\t// return small list with new tail\n\t\t\n\t\treturn small;\n\t}", "@SuppressWarnings(\"unchecked\")\n private static Unit<? extends Quantity> getInstance(Element[] leftElems,\n Element[] rightElems) {\n\n // Merges left elements with right elements.\n Element[] result = new Element[leftElems.length + rightElems.length];\n int resultIndex = 0;\n for (int i = 0; i < leftElems.length; i++) {\n Unit unit = leftElems[i]._unit;\n int p1 = leftElems[i]._pow;\n int r1 = leftElems[i]._root;\n int p2 = 0;\n int r2 = 1;\n for (int j = 0; j < rightElems.length; j++) {\n if (unit.equals(rightElems[j]._unit)) {\n p2 = rightElems[j]._pow;\n r2 = rightElems[j]._root;\n break; // No duplicate.\n }\n }\n int pow = (p1 * r2) + (p2 * r1);\n int root = r1 * r2;\n if (pow != 0) {\n int gcd = gcd(Math.abs(pow), root);\n result[resultIndex++] = new Element(unit, pow / gcd, root / gcd);\n }\n }\n\n // Appends remaining right elements not merged.\n for (int i = 0; i < rightElems.length; i++) {\n Unit unit = rightElems[i]._unit;\n boolean hasBeenMerged = false;\n for (int j = 0; j < leftElems.length; j++) {\n if (unit.equals(leftElems[j]._unit)) {\n hasBeenMerged = true;\n break;\n }\n }\n if (!hasBeenMerged)\n result[resultIndex++] = rightElems[i];\n }\n\n // Returns or creates instance.\n if (resultIndex == 0)\n return ONE;\n else if ((resultIndex == 1) && (result[0]._pow == result[0]._root))\n return result[0]._unit;\n else {\n Element[] elems = new Element[resultIndex];\n for (int i = 0; i < resultIndex; i++) {\n elems[i] = result[i];\n }\n return new ProductUnit<Quantity>(elems);\n }\n }", "@Test\n public void isOverlap_interval1ContainWithinInterval2_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public static void test_merge() {\n assertThat(merge(new int[] {0, 1}, new int[] {2, 3})).isFalse();\n assertThat(merge(new int[] {2, 3}, new int[] {0, 1})).isFalse();\n\n // a0 b0 b1 a1\n // a0 b0 a1 b1\n assertThat(merge(new int[] {0, 1}, new int[] {0, 1})).isTrue();\n assertThat(merge(new int[] {0, 1}, new int[] {0, 2})).isTrue();\n assertThat(merge(new int[] {0, 1}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 2}, new int[] {1, 3})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 3})).isTrue();\n\n // b0 a0 a1 b1\n // b0 a0 b1 a1\n assertThat(merge(new int[] {0, 3}, new int[] {0, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 3})).isTrue();\n assertThat(merge(new int[] {1, 2}, new int[] {0, 3})).isTrue();\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n ListNode prehead = new ListNode(-1);\n\n ListNode prev = prehead;\n while (l1 != null && l2 != null) {\n if (l1.val <= l2.val) {\n prev.next = l1;\n l1 = l1.next;\n } else {\n prev.next = l2;\n l2 = l2.next;\n }\n prev = prev.next;\n }\n\n // exactly one of l1 and l2 can be non-null at this point, so connect\n // the non-null list to the end of the merged list.\n prev.next = l1 == null ? l2 : l1;\n\n return prehead.next;\n }", "public List<Interval> merge(List<Interval> intervals) {\n // sort the interval list by start\n Collections.sort(intervals, new Comparator<Interval>() {\n @Override\n public int compare(Interval o1, Interval o2) {\n return o1.start - o2.start;\n }\n });\n // use a linked list as data structure\n LinkedList<Interval> output = new LinkedList<>();\n for (Interval interval : intervals) {\n if (output.isEmpty()) {\n output.addLast(interval);\n } else {\n if (interval.start <= output.getLast().end) {\n // if present interval.start <= last interval.end,\n // update last interval.end by max interval.end between present and last\n output.getLast().end = Math.max(interval.end, output.getLast().end);\n } else {\n output.addLast(interval);\n }\n }\n }\n return output;\n }", "@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "static void merge(double a[],int start,int mid, int end) {\r\n \tint i,j,k;\r\n \tint size1 = mid - start +1;\r\n \tint size2 = end - mid;\r\n \tif (size2 > 0 && size1 > 0) {\r\n \t\tdouble leftA[] = new double[size1]; // temp arrays\r\n \tdouble rightA[] = new double[size2];\r\n \tfor(i=0;i < size1;i++) leftA[i] = a[start+i]; //Copy data into temp arrays \r\n \tfor(j=0;j<size2;j++) rightA[j] = a[mid+1+j];\r\n \ti=0; // Merge temp arrays back into a[]\r\n \tj=0;\r\n \tk=start;\r\n \twhile (i<size1 && j < size2) {\r\n \t\tif(leftA[i]<=rightA[j]) {\r\n \t\t\ta[k]=leftA[i];\r\n \t\t\ti++;\r\n \t\t}else {\r\n \t\t\ta[k]=rightA[j];\r\n \t\t\tj++;\r\n \t\t}\r\n \t\tk++;\r\n \t}\r\n \twhile(i<size1) { //if remaining in leftA[] copy in\r\n \t\ta[k]=leftA[i];\r\n \t\ti++;\r\n \t\tk++;\r\n \t}\r\n \twhile(j<size2) { //if remaining in rightA[] copy in\r\n \t\ta[k]=rightA[j];\r\n \t\tj++;\r\n \t\tk++;\r\n \t}\r\n \t}\t\r\n }", "public void addRange(int left, int right) {\n Interval cur = intervals.get(left);\n if (cur == null) {\n cur = new Interval(left, right);\n intervals.put(left, cur);\n } else {\n cur.end = Math.max(cur.end, right);\n }\n\n // now merge intervals\n\n // lower one\n Integer lower = intervals.lowerKey(cur.start);\n if (lower != null && intervals.get(lower).end >= cur.start) { //overlap\n int end = Math.max(cur.end, intervals.get(lower).end);\n cur = intervals.get(lower);\n cur.end = end;\n intervals.remove(left);\n }\n\n // higher ones\n Integer higher = intervals.higherKey(cur.start); //like next\n while (higher != null) {\n if (intervals.get(higher).start > cur.end) {\n break;\n }\n\n cur.end = Math.max(cur.end, intervals.get(higher).end);\n intervals.remove(higher);\n\n higher = intervals.higherKey(cur.start);\n }\n }", "public ListNode mergeInBetween(ListNode list1, int a, int b, ListNode list2) {\n final ListNode vituralHead = new ListNode(0);\n vituralHead.next = list1;\n\n ListNode cursor = vituralHead;\n int index = 0;\n\n ListNode aNode = null;\n ListNode bNode = null;\n while (cursor != null) {\n\n if (index == a) {\n aNode = cursor;\n }\n\n if (index == b + 1) {\n bNode = cursor;\n break;\n }\n\n index++;\n cursor = cursor.next;\n }\n\n ListNode tailOfList2 = list2;\n while (tailOfList2.next != null) {\n tailOfList2 = tailOfList2.next;\n }\n\n aNode.next = list2;\n tailOfList2.next = bNode.next;\n return vituralHead.next;\n }", "public int [] merge(int []a, int[]b, int last) {\n\n int end = a.length - 1;\n int i = last;\n int j = b.length - 1;\n\n while(i >= 0 && j >= 0) {\n int va = a[i];\n int vb = b[j];\n if (va > vb) {\n a[end--] = va;\n i--;\n } else if (vb > va) {\n a[end--] = vb;\n j--;\n } else {\n a[end--] = va;\n a[end--] = va;\n i--; j--;\n }\n }\n\n while(i >= 0) a[end--] = a[i--];\n while(j >= 0) a[end--] = b[j--];\n\n return a;\n }", "public static Comparable[] merge( Comparable[] leftPart, Comparable[] rightPart ) {\n\n int cursorLeft = 0, cursorRight = 0, counter = 0;\n\n Comparable[] merged = new Comparable[leftPart.length + rightPart.length];\n\n\n\n while ( cursorLeft < leftPart.length && cursorRight < rightPart.length ) {\n\n\n if ( leftPart[cursorLeft].compareTo(rightPart[cursorRight])<0) {\n\n merged[counter] = leftPart[cursorLeft];\n\n cursorLeft++;\n\n } else {\n\n merged[counter] = rightPart[cursorRight];\n\n cursorRight++;\n\n }\n\n\n\n counter++;\n\n }\n\n\n\n if ( cursorLeft < leftPart.length ) {\n\n System.arraycopy( leftPart, cursorLeft, merged, counter, merged.length - counter );\n\n }\n\n if ( cursorRight < rightPart.length ) {\n\n System.arraycopy( rightPart, cursorRight, merged, counter, merged.length - counter );\n\n }\n\n\n\n return merged;\n\n }", "public TreeNode mergeTrees(TreeNode t1, TreeNode t2){\r\n if( t1==null )\r\n return t2;\r\n if( t2==null )\r\n return t1;\r\n t1.value += t2.value;\r\n t1.left = mergeTrees(t1.left, t2.left);\r\n t2.right = mergeTrees(t1.right, t2.right);\r\n return t1;\r\n }", "@Override\n\tpublic void merge(MutableAggregationBuffer buffer1, Row buffer2) {\n\t\tif (buffer1.getString(0) == null) {\n\t\t\tbuffer1.update(0, buffer2.getString(0));\n\t\t} else\n\t\t\tbuffer1.update(0, buffer1.getString(0) + \",\" + buffer2.getString(0));\n\n\t\tbuffer1.update(1, buffer1.getLong(1) + buffer2.getLong(1));\n\t\tbuffer1.update(2, buffer1.getLong(2) + buffer2.getLong(2));\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate static <E extends Comparable<? super E>> void merge(\r\n\t\t\tComparable<E>[] data, int first, int second, int len,\r\n\t\t\tComparable<E>[] target) {\r\n\t\t// indices from first\r\n\t\tint i = 0;\r\n\t\t// indices from second\r\n\t\tint j = 0;\r\n\t\t// index in target to copy to\r\n\t\tint t = first;\r\n\r\n\t\t// main copy smaller element into target loop\r\n\t\t// stop if the right pointer runs off the array\r\n\t\twhile (i < len && j < len && second + j < data.length) {\r\n\t\t\tint cmp = data[first + i].compareTo((E) data[second + j]);\r\n\t\t\tif (cmp > 0) {\r\n\t\t\t\ttarget[t] = data[second + j];\r\n\t\t\t\tj++;\r\n\t\t\t} else {\r\n\t\t\t\ttarget[t] = data[first + i];\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tt++;\r\n\t\t}\r\n\r\n\t\t// finish copying from the array that hasn't finished, making sure you\r\n\t\t// don't run off the end of the array\r\n\t\tif (i < len) {\r\n\t\t\t// finish copying first array\r\n\t\t\tfor (int k = i; k < len && first + k < data.length; k++) {\r\n\t\t\t\ttarget[t] = data[first + k];\r\n\t\t\t\tt++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// finish copying second array\r\n\t\t\tfor (int k = j; k < len && second + k < data.length; k++) {\r\n\t\t\t\ttarget[t] = data[second + k];\r\n\t\t\t\tt++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static List<Integer> merge2(List<Integer> left, List<Integer> right) {\n ArrayList<Integer> result = new ArrayList<>();\n int leftIndex = 0;\n int rightIndex = 0;\n\n while (leftIndex < left.size() && rightIndex < right.size()) {\n if (left.get(leftIndex) < right.get(rightIndex)) {\n result.add(left.get(leftIndex));\n leftIndex++;\n } else {\n result.add(right.get(rightIndex));\n rightIndex++;\n }\n }\n List<Integer> leftRemaining = left.subList(leftIndex, left.size());\n List<Integer> rightRemaining = right.subList(rightIndex, right.size());\n\n result.addAll(leftRemaining);\n result.addAll(rightRemaining);\n\n return result;\n }", "private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }", "public static void merge(int[] a, int[] b, int lastA, int lastB) {\r\n\t\tint indexMerged = lastB + lastA - 1; /* Index of last location of merged array */\r\n\t\tint indexA = lastA - 1; /* Index of last element in array b */\r\n\t\tint indexB = lastB - 1; /* Index of last element in array a */\r\n\t\r\n\t\t/* Merge a and b, starting from the last element in each */\r\n\t\twhile (indexB >= 0) {\r\n\t\t\tif (indexA >= 0 && a[indexA] > b[indexB]) { /* end of a is bigger than end of b */\r\n\t\t\t\ta[indexMerged] = a[indexA]; // copy element\r\n\t\t\t\tindexA--; \r\n\t\t\t} else {\r\n\t\t\t\ta[indexMerged] = b[indexB]; // copy element\r\n\t\t\t\tindexB--;\r\n\t\t\t}\r\n\t\t\tindexMerged--; // move indices\t\t\t\r\n\t\t}\r\n\t}", "public int[][] merge(int[][] intervals) {\n Arrays.sort(intervals, new Comparator<int[]>() {\n @Override\n public int compare(int[] arr1, int[] arr2) {\n if (arr1[0] == arr2[0]) {\n return 0;\n }\n return arr1[0] < arr2[0] ? -1 : 1;\n }\n });\n List<int[]> ans = new ArrayList<>();\n // Take the first interval and compare its end with the starts of the next intervals. As long as they overlap,\n // we update the end to be the max end of the overlapping inervals. Once we find a non-overlapping interval,\n // we add the previous extended interval to the result and start over.\n int[] newInterval = intervals[0];\n ans.add(newInterval);\n for (int[] interval : intervals) {\n if (interval[0] <= newInterval[1]) {\n // Overlapping interval, update the end\n newInterval[1] = Math.max(newInterval[1], interval[1]);\n } else {\n // Non-overlapping interval, add it to the result and start over\n newInterval = interval;\n ans.add(newInterval);\n }\n }\n return ans.toArray(new int[ans.size()][]);\n }", "public void merge(SortedList<T> list2){\n while(!list2.isEmpty()){\n this.internalInsert(list2.removeFromFront());\n }\n\n this.sort();\n }", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\r\n if (l1==null) {\r\n\t\t\treturn l2;\r\n\t\t}\r\n if (l2==null) {\r\n\t\t\treturn l1;\r\n\t\t}\r\n ListNode result=new ListNode(0);\r\n ListNode head=result;\r\n while(l1!=null&&l2!=null){\r\n \tif (l1.val<=l2.val) {\r\n\t\t\t\thead.next=l1;\r\n\t\t\t\tl1=l1.next;\r\n\t\t\t}else {\r\n\t\t\t\thead.next=l2;\r\n\t\t\t\tl2=l2.next;\r\n\t\t\t}\r\n \thead=head.next;\r\n }\r\n if (l1!=null) {\r\n\t\t\thead.next=l1;\r\n\t\t}\r\n if (l2!=null) {\r\n\t\t\thead.next=l2;\r\n\t\t}\r\n \r\n return result.next;\r\n }", "public Interval plus(Interval other) {\n\t\tInterval result = new Interval(\"\", \"\");\n\n\t\tif (isNegativeInfinite() || other.isNegativeInfinite())\n\t\t\tresult.setLow(\"-Inf\");\n\t\telse {\n\t\t\tresult.setLow(String.valueOf(Long.parseLong(this.getLow()) + Long.parseLong(other.getLow())));\n\t\t}\n\n\t\tif (isPositiveInfinite() || other.isPositiveInfinite())\n\t\t\tresult.setHigh(\"+Inf\");\n\t\telse {\n\t\t\tresult.setHigh(String.valueOf(Long.parseLong(this.getHigh()) + Long.parseLong(other.getHigh())));\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n public Tuple nonDistinctNext() {\n //function takes tuples from o2, merges them with t1 from o1 and\n //evaluates them, if it finds a fitting Tuple, returns the result of merge;\n while (tuple1 != null) {\n Tuple tuple2 = o2.nonDistinctNext();\n\n while (tuple2 != null) {\n Tuple result = tupleTrans.transform(new Tuple(tuple1, tuple2));\n if (result != null) {\n return result;\n }\n tuple2 = o2.nonDistinctNext();\n }\n\n //if o2 runs out of Tupes, new t1 is taken from o1 and o2 is reset\n tuple1 = o1.nonDistinctNext();\n o2.reset();\n }\n //if o1 runs out of tuples (t1 == null), the operator is at the end\n return null;\n }", "public static ListNode merge(ListNode l1, ListNode l2) {\n if (l1 == null) return l2;\n if (l2 == null) return l1;\n if (l1.val < l2.val) {\n l1.next = merge(l1.next, l2);\n return l1;\n } else {\n l2.next = merge(l1, l2.next);\n return l2;\n }\n }", "public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public Node merge(Node h1, Node h2) {\n\t\tNode dummy = new Node();\r\n\t\tNode temp = dummy;\r\n\t\twhile(true) {\r\n\t\t\t// if it is equal to null basically it is a empty link\r\n\t\t\tif(h1 == null) {\r\n\t\t\t\ttemp.next = h2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(h2 == null) {\r\n\t\t\t\ttemp.next = h1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(h1.data <= h2.data) { // while if h1 is bigger than h2 than need to store h1 inside\r\n\t\t\t\ttemp.next = h1;\r\n\t\t\t\th1 = h1.next;\r\n\t\t\t}else {\r\n\t\t\t\ttemp.next = h2;\r\n\t\t\t\th2 = h2.next;\r\n\t\t\t}\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t\treturn dummy.next;\r\n\t}", "private void merge(int[] left, int[] right, int[] a) {\n\t\t// i - left\n\t\t// j - right\n\t\t// k - original\n\t\tint i = 0, j = 0, k = 0;\n\t\tint sL = left.length;\n\t\tint sR = right.length;\n\n\t\twhile (i < sL && j < sR) {\n\t\t\tif (left[i] < right[j]) {\n\t\t\t\ta[k] = left[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\ta[k] = right[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\twhile (i < sL) {\n\t\t\ta[k] = left[i];\n\t\t\tk++;\n\t\t\ti++;\n\t\t}\n\t\twhile (j < sR) {\n\t\t\ta[k] = right[j];\n\t\t\tk++;\n\t\t\tj++;\n\t\t}\n\t}", "void merge(int arr[], int l, int m , int r)\n {\n int n1 = m-l+1;\n int n2 = r-m;\n\n //create temp arrays\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n //copy the elements to the array\n for(int i=0; i < n1 ;i++)\n L[i] = arr[l+i];\n for(int j=0; j < n2 ;j++)\n R[j] = arr[m+1+j];\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarry array\n int k = l;\n\n while(i<n1 && j< n2)\n {\n if(L[i] <= R[j])\n {\n arr[k++] = L[i++];\n }\n else\n {\n arr[k++] = R[j++];\n }\n }\n\n while(i<n1)\n {\n arr[k++]=L[i++];\n }\n\n while(j<n2)\n {\n arr[k++]=R[j++];\n }\n\n }", "public static Interval addition(Interval in1, Interval in2){\r\n return new Interval(in1.getFirstExtreme()+in2.getFirstExtreme(),in1.getSecondExtreme()+in2.getSecondExtreme(),in1.getFEincluded()==in2.getFEincluded()?in1.getFEincluded():'(',in1.getSEincluded()==in2.getSEincluded()?in1.getSEincluded():')');\r\n }", "public static void test() {\n List<Interval> list = new ArrayList<>();\n list.add(new Interval(1, 4));\n list.add(new Interval(2, 3)); // completely covered by previous\n list.add(new Interval(3, 6)); // partially overlapping over 1st one\n list.add(new Interval(5, 9)); // partially overlapping with the merged one (1, 6) to become (1, 9)\n list.add(new Interval(11, 15));\n list.add(new Interval(14, 18)); // merge with previous one as (11, 18)\n \n MergeIntervals p = new MergeIntervals();\n // works\n //p.merge(list);\n \n p.mergeWithStack(list);\n \n for(Interval i : list) {\n System.out.print(\"(\" + i.start + \", \" + i.end + \") \");\n }\n \n System.out.println(\"end\");\n }", "public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }", "private void merge(Scanner file1, Scanner file2, BufferedWriter writer) throws IOException {\n double value1 = file1.nextDouble();\n double value2 = file2.nextDouble();\n\n while (value1 != Double.POSITIVE_INFINITY || value2 != Double.POSITIVE_INFINITY) {\n if (value1 <= value2) {\n writer.write(value1 + \" \");\n value1 = file1.hasNextDouble() ? file1.nextDouble() : Double.POSITIVE_INFINITY;\n } else {\n writer.write(value2 + \" \");\n value2 = file2.hasNextDouble() ? file2.nextDouble() : Double.POSITIVE_INFINITY;\n }\n }\n }", "@Override\n\tprotected void merge(Object in1, Object in2, Object out) {\n\t\t\n\t}", "public ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n\t\t//The base condition if one of the list is empty so then return the other list as it is.\n\t\tif (l1 == null) return l2;\n\t\tif (l2 == null) return l1;\n\t\t//Intializing the head of the ans\n\t\tListNode ans = l1;\n\t\tif (l2.val < l1.val) {\n\t\t\tans = l2;\n\t\t\tl2 = l2.next;\n\t\t} else l1 = l1.next;\n\t\t//Initializing ans in another variable so that it should'nt get lost.\n\t\tListNode ans2 = ans;\n\t\twhile (l1 != null && l2 != null) {\n\t\t\tif (l1.val <= l2.val) {\n\t\t\t\tans.next = l1;\n\t\t\t\tl1 = l1.next;\n\t\t\t\tans = ans.next;\n\t\t\t} else {\n\t\t\t\tans.next = l2;\n\t\t\t\tl2 = l2.next;\n\t\t\t\tans = ans.next;\n\t\t\t}\n\t\t}\n\t\t//if list are not same then one list will be left to traverse\n\t\tif (l1 == null && l2 != null) ans.next = l2;\n\t\tif (l2 == null && l1 != null) ans.next = l1;\n\t\treturn ans2;\n\t}", "public static ListNode mergeTwoList(ListNode list1, ListNode list2){\n if (list1 == null) return list2;\n if (list2 == null) return list1;\n\n ListNode head = null;\n ListNode p = list1;\n ListNode q = list2;\n\n if (p.val <= q.val) {\n head = p;\n p = p.next;\n }\n else {\n head = q;\n q = q.next;\n }\n ListNode point = head;\n\n while (p != null && q != null){\n if (p.val <= q.val){\n point.next = p;\n p = p.next;\n\n }else {\n point.next = q;\n q = q.next;\n\n }\n point = point.next;\n }\n\n if (p == null){\n point.next = q;\n }else {\n point.next = p;\n }\n\n return head;\n }", "private static void merge(int[] a, int[] b) {\n\t\tint aI = a.length-1;\r\n\t\tint bI = b.length-1;\r\n\t\tint posI=a.length-b.length-1;\r\n\t\t\r\n\t\r\n\t\twhile (aI>=0 ) {\r\n\t\t\tif(a[posI]> b[bI]) {//missing the test for posI>=0 see mergeInPlace(int a[],int b[])\r\n\t\t\t\ta[aI]=a[posI];\r\n\t\t\t\tposI--;\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\r\n\t\t\t\ta[aI]=b[bI];\r\n\t\t\t\tbI--;\r\n\r\n\t\t\t}\r\n\t\t\taI--;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int x:a) {\r\n\t\t\tSystem.out.println(x);\r\n\t\t}\r\n\t}", "public static UnitP Addition(UnitP first, UnitP second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Addition,\n OperationsOther.GetOperationString(first, second, Operations.Addition)\n );\n }", "private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }", "public List<Interval> sortCombine (List<Interval> intervals){\r\n\t\tCompareIntervals compareIntervals = new CompareIntervals();\r\n\t\tList<Interval> mergedIntervals = new ArrayList<>();\r\n\t\t/*goes through intervals in the list and switches the higher and the lower values if \r\n\t\tthe higher value is the first. this makes comparisons easier, at the same time, \r\n\t\tusers don`t have to remember to only enter lower value first*/\r\n\t\tfor (Interval interval : intervals) {\r\n\t\t\tintervals.set(intervals.indexOf(interval), sort(interval));\r\n\t\t}\r\n\t\t//now thie list is sorted from lowest to highest, this again will make comparison easier and reduce the number of if statements slightly\r\n\t\tCollections.sort(intervals, compareIntervals);\r\n\t\t// this will add the first interval of the intervals list to the merged intervals list, so the comparison does work in the next step\r\n\t\tmergedIntervals.add(intervals.get(0));\r\n\t\t\r\n\t\t/* now the program will loop through the intervals and call checkMerge to see if the\r\n\t\tinterval shall be added to the List or merged with a existing entry*/\r\n\t\tfor (int i = 1; i < intervals.size(); i++) {\r\n\t\t\tInterval interval1 = intervals.get(i);\r\n\t\t\tmergedIntervals = checkMerge(interval1, mergedIntervals);\t\r\n\t\t}\r\n\t\treturn mergedIntervals;\t//finally merged intervals list is returned to controller, to have it display on the screen\r\n\t\t}", "void merge(T other);", "@Nonnull\r\n\tpublic static <T> Observable<T> merge(\r\n\t\t\t@Nonnull Observable<? extends T> first,\r\n\t\t\t@Nonnull Observable<? extends T> second) {\r\n\t\tList<Observable<? extends T>> list = new ArrayList<Observable<? extends T>>();\r\n\t\tlist.add(first);\r\n\t\tlist.add(second);\r\n\t\treturn merge(list);\r\n\t}", "void merge(int arr[], int left, int mid, int right) {\n\t\tint n1 = mid - left + 1;\n\t\tint n2 = right - mid;\n\n\t\t/* Create temporary arrays */\n\t\tint leftArray[] = new int[n1];\n\t\tint rightArray[] = new int[n2];\n\n\t\t/* Copy data to temporary arrays */\n\t\tfor (int i = 0; i < n1; ++i)\n\t\t\tleftArray[i] = arr[left + i];\n\t\tfor (int j = 0; j < n2; ++j)\n\t\t\trightArray[j] = arr[mid + 1 + j];\n\n\t\t/* Merge the temporary arrays */\n\n\t\t// Initial indexes of first and second sub-arrays\n\t\tint i = 0, j = 0;\n\n\t\t// Initial index of merged sub-array array\n\t\tint k = left;\n\t\twhile (i < n1 && j < n2) {\n\t\t\tif (leftArray[i] >= rightArray[j]) {\n\t\t\t\tarr[k] = leftArray[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tarr[k] = rightArray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of L[] if any */\n\t\twhile (i < n1) {\n\t\t\tarr[k] = leftArray[i];\n\t\t\ti++;\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of R[] if any */\n\t\twhile (j < n2) {\n\t\t\tarr[k] = rightArray[j];\n\t\t\tj++;\n\t\t\tk++;\n\t\t}\n\t\t\n\t}", "ArrayList<Edge> merge(ArrayList<Edge> l1, ArrayList<Edge> l2) {\n ArrayList<Edge> l3 = new ArrayList<Edge>();\n IComparator<Edge> c = new CompareEdges();\n while (l1.size() > 0 && l2.size() > 0) {\n if (c.apply(l1.get(0), l2.get(0))) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n else {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n }\n while (l1.size() > 0) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n while (l2.size() > 0) {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n return l3;\n }", "public void merge2(int[] nums1, int m, int[] nums2, int n) {\n int p1 = m - 1;\n int p2 = n - 1;\n // set pointer for nums1\n int p = m + n - 1;\n\n // while there are still elements to compare\n while ((p1 >= 0) && (p2 >= 0))\n // compare two elements from nums1 and nums2\n // and add the largest one in nums1\n nums1[p--] = (nums1[p1] < nums2[p2]) ? nums2[p2--] : nums1[p1--];\n\n // add missing elements from nums2\n System.arraycopy(nums2, 0, nums1, 0, p2 + 1);\n\n }", "private static <K> void merge(K[] S1, K[] S2, K[] S, Comparator<K> comp, long timeGiven, long startTime) throws TimedOutException {\n if (System.currentTimeMillis() - startTime > timeGiven) {\n throw new TimedOutException(\"TimeOut\");\n }\n int i = 0, j = 0;\n while (i + j < S.length) {\n if (j == S2.length || (i < S1.length && comp.compare(S1[i], S2[j]) > 0)) {\n S[i + j] = S1[i++]; // copy ith element of S1 and increment i\n } else {\n S[i + j] = S2[j++]; // copy jth element of S2 and increment j\n }\n }\n }" ]
[ "0.66110665", "0.6110672", "0.5968184", "0.5920309", "0.5856278", "0.58239985", "0.5733589", "0.57267565", "0.5716699", "0.5708867", "0.5683478", "0.56525564", "0.562403", "0.55616987", "0.5556611", "0.5530347", "0.5439759", "0.5415412", "0.5396924", "0.53868055", "0.53823125", "0.537616", "0.537504", "0.5370651", "0.53646326", "0.535364", "0.5310048", "0.5296005", "0.5295174", "0.528968", "0.528682", "0.5285782", "0.52713555", "0.52707195", "0.52681535", "0.52623695", "0.5237588", "0.52347565", "0.5228081", "0.5215951", "0.5212057", "0.52104884", "0.52097094", "0.520854", "0.5208404", "0.5200128", "0.51993936", "0.51988596", "0.5191868", "0.51918584", "0.51892924", "0.51891315", "0.5178679", "0.5178431", "0.5176796", "0.51666605", "0.5163443", "0.51547134", "0.51503843", "0.51393074", "0.5137252", "0.5132901", "0.5129679", "0.5129506", "0.5124471", "0.5118238", "0.5115529", "0.5113603", "0.5113457", "0.5109335", "0.5108787", "0.51062787", "0.5101612", "0.5101218", "0.5093442", "0.509277", "0.5087232", "0.50854665", "0.50829625", "0.507922", "0.50759417", "0.5071183", "0.5070577", "0.50702614", "0.5069267", "0.5053808", "0.5046126", "0.504483", "0.5042533", "0.5040356", "0.50360984", "0.50338155", "0.50291836", "0.5028077", "0.5025546", "0.502369", "0.50225097", "0.5016556", "0.50161606", "0.5007692" ]
0.5468041
16
/ Compares only the starting value of the interval
public int compareTo(UnitObject<T> o) { if (interval.start < o.interval.start) return -1; else if (interval.start > o.interval.start) return 1; else return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInInterval(int baseIndex);", "boolean isBeginInclusive();", "boolean isNewInterval();", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "@Override\n\t\t\tpublic int compare(Interval o1, Interval o2) {\n\t\t\t\treturn o1.start-o2.start;\n\t\t\t}", "public boolean isBefore(ReadableInterval interval) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[18]++;\nint CodeCoverConditionCoverageHelper_C6;\r\n if ((((((CodeCoverConditionCoverageHelper_C6 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C6 |= (2)) == 0 || true) &&\n ((interval == null) && \n ((CodeCoverConditionCoverageHelper_C6 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[6].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C6, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[6].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C6, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[11]++;\r\n return isBeforeNow();\n\r\n } else {\n CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[12]++;}\r\n return isBefore(interval.getStartMillis());\r\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n Range range0 = Range.of((-32768L));\n Range range1 = Range.of((-32768L));\n boolean boolean0 = range0.endsBefore(range1);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals((-32768L), long0);\n assertSame(range0, range1);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.intersects(range1);\n assertFalse(boolean0);\n assertFalse(range1.isEmpty());\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }", "public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value)\n/* 70 */ return upperBound; \n/* 71 */ return value;\n/* */ }", "private boolean isIntervalSelected(Date startDate, Date endDate)\n/* */ {\n/* 133 */ if (isSelectionEmpty()) return false;\n/* 134 */ return (((Date)this.selectedDates.first()).equals(startDate)) && (((Date)this.selectedDates.last()).equals(endDate));\n/* */ }", "public boolean isInterval() {\n return this == Spacing.regularInterval || this == Spacing.contiguousInterval\n || this == Spacing.discontiguousInterval;\n }", "public boolean isEmptyInterval(){\n\t\tif (leftbound<0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n Range range0 = Range.ofLength(0L);\n boolean boolean0 = range0.startsBefore(range0);\n assertFalse(boolean0);\n assertTrue(range0.isEmpty());\n }", "@Override\r\n\t public boolean equals(Object obj) {\n\t Interval inteval = (Interval)obj;\r\n\t return this.getStart().equals(inteval.getStart()) && this.getEnd().equals(inteval.getEnd()) ;\r\n\t }", "default int compareTo(Interval o) {\n if (getStart() > o.getStart()) {\n return 1;\n } else if (getStart() < o.getStart()) {\n return -1;\n } else if (getEnd() > o.getEnd()) {\n return 1;\n } else if (getEnd() < o.getEnd()) {\n return -1;\n } else {\n return 0;\n }\n }", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }", "@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "boolean isEndInclusive();", "@Override\n public int compareTo(Interval otherInterval) {\n return start.compareTo(otherInterval.start);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "default A isBetween(Number firstInclusive, Number lastInclusive) {\n return satisfiesNumberCondition(new NumberCondition<>(firstInclusive, GREATER_THAN_OR_EQUAL)\n .and(new NumberCondition<>(lastInclusive, LESS_THAN_OR_EQUAL)));\n }", "public long checkInterval()\r\n/* 184: */ {\r\n/* 185:363 */ return this.checkInterval.get();\r\n/* 186: */ }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n Range range0 = Range.of((-9223372036854775808L));\n range0.equals(range0);\n Range.Comparators.values();\n range0.getBegin();\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }", "@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "public interface Interval extends Comparable<Interval> {\n\n /**\n * Returns the start coordinate of this interval.\n * \n * @return the start coordinate of this interval\n */\n int getStart();\n\n /**\n * Returns the end coordinate of this interval.\n * <p>\n * An interval is closed-open. It does not include the returned point.\n * \n * @return the end coordinate of this interval\n */\n int getEnd();\n\n default int length() {\n return getEnd() - getStart();\n }\n\n /**\n * Returns whether this interval is adjacent to another.\n * <p>\n * Two intervals are adjacent if either one ends where the other starts.\n * \n * @param interval - the interval to compare this one to\n * @return <code>true</code> if the intervals are adjacent; otherwise\n * <code>false</code>\n */\n default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }\n \n /**\n * Returns whether this interval overlaps another.\n * \n * This method assumes that intervals are contiguous, i.e., there are no\n * breaks or gaps in them.\n * \n * @param o - the interval to compare this one to\n * @return <code>true</code> if the intervals overlap; otherwise\n * <code>false</code>\n */\n default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }\n \n /**\n * Compares this interval with another.\n * <p>\n * Ordering of intervals is done first by start coordinate, then by end\n * coordinate.\n * \n * @param o - the interval to compare this one to\n * @return -1 if this interval is less than the other; 1 if greater\n * than; 0 if equal\n */\n default int compareTo(Interval o) {\n if (getStart() > o.getStart()) {\n return 1;\n } else if (getStart() < o.getStart()) {\n return -1;\n } else if (getEnd() > o.getEnd()) {\n return 1;\n } else if (getEnd() < o.getEnd()) {\n return -1;\n } else {\n return 0;\n }\n }\n}", "@Override\n public int compareTo(Interval o) {\n return 0;\n }", "protected boolean hasNext() {\n\t\treturn (counter + incrValue) < max && (counter + incrValue) > min;\n\t}", "public boolean overlaps(ReadableInterval interval) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[11]++;\r\n long thisStart = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[12]++;\r\n long thisEnd = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[13]++;\nint CodeCoverConditionCoverageHelper_C4;\r\n if ((((((CodeCoverConditionCoverageHelper_C4 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C4 |= (2)) == 0 || true) &&\n ((interval == null) && \n ((CodeCoverConditionCoverageHelper_C4 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[7]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[14]++;\r\n long now = DateTimeUtils.currentTimeMillis();\r\n return (thisStart < now && now < thisEnd);\n\r\n } else {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[8]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[15]++;\r\n long otherStart = interval.getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[16]++;\r\n long otherEnd = interval.getEndMillis();\r\n return (thisStart < otherEnd && otherStart < thisEnd);\r\n }\r\n }", "public boolean isEveryDayRange() {\n int totalLength = MAX - MIN + 1;\n return isFullRange(totalLength);\n }", "@Override\r\n\t public int compareTo(Interval o) {\n\r\n\t SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\r\n\t try{\r\n\t Date startDate = sdf.parse(start);\r\n\t Date endDate = sdf.parse(end);\r\n\t Date pstartDate = sdf.parse(o.start);\r\n\t Date pendDate = sdf.parse(o.end);\r\n\r\n\t return startDate.compareTo(pstartDate);\r\n\r\n\t }catch(Exception ex){\r\n\t ex.printStackTrace();\r\n\t }\r\n\t return 0;\r\n\t }", "@Override\n public int compareTo(SkipInterval interval) {\n if(this.startAddr >= interval.startAddr && this.endAddr <= interval.endAddr){\n return 0;\n }\n if(this.startAddr > interval.startAddr){\n return 1;\n } else if(this.startAddr < interval.startAddr){\n return -1;\n } else if(this.endAddr > interval.endAddr){\n return 1;\n } else if(this.endAddr < interval.endAddr){\n return -1;\n } else\n return 0;\n \n// \n// if(this.startAddr >= interval.startAddr && this.endAddr <= interval.endAddr){\n// return 0;\n// } else if(this.startAddr > interval.endAddr){\n// return 1;\n// } else{\n// return -1;\n// }\n }", "public int getInterval() { return _interval; }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Object object0 = new Object();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 127L, 127L);\n Range range1 = Range.of(127L);\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(127L, long0);\n \n long long1 = range1.getBegin(range_CoordinateSystem0);\n assertEquals(128L, long1);\n }", "public boolean getStartInclusive() {\n return startInclusive;\n }", "default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }", "private static boolean isBetween(double start, double middle, double end) {\n if(start > end) {\n return end <= middle && middle <= start;\n }\n else {\n return start <= middle && middle <= end;\n }\n }", "@Test\n public void test_lowerBound() {\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(0.0d, new double[] {1, 2, 3})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(0.5d, new double[] {1, 2, 3})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(0.9999d, new double[] {1, 2, 3})).isEqualTo(0);\n // good input\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(1.0d, new double[] {1, 2, 3})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(1.0001d, new double[] {1, 2, 3})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(1.9999d, new double[] {1, 2, 3})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(2.0d, new double[] {1, 2, 3})).isEqualTo(1);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(2.0001d, new double[] {1, 2, 3})).isEqualTo(1);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(2.9999d, new double[] {1, 2, 3})).isEqualTo(1);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(3.0d, new double[] {1, 2, 3})).isEqualTo(2);\n // bad input, but still produces good output\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(3.0001d, new double[] {1, 2, 3})).isEqualTo(2);\n // check zero\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(-1.0d, new double[] {-1, 0, 1})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(-0.9999d, new double[] {-1, 0, 1})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(-0.0001d, new double[] {-1, 0, 1})).isEqualTo(0);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(-0.0d, new double[] {-1, 0, 1})).isEqualTo(1);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(0.0d, new double[] {-1, 0, 1})).isEqualTo(1);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(1.0d, new double[] {-1, 0, 1})).isEqualTo(2);\n assertThat(AbstractBoundCurveInterpolator.lowerBoundIndex(1.5d, new double[] {-1, 0, 1})).isEqualTo(2);\n }", "private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}", "@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-81L));\n range0.equals(range1);\n long long0 = range0.getEnd();\n assertEquals((-81L), long0);\n }", "public boolean isAfter(ReadableInterval interval) {\r\n long endMillis;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[20]++;\nint CodeCoverConditionCoverageHelper_C8;\r\n if ((((((CodeCoverConditionCoverageHelper_C8 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C8 |= (2)) == 0 || true) &&\n ((interval == null) && \n ((CodeCoverConditionCoverageHelper_C8 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[8].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C8, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[8].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C8, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[15]++;\r\n endMillis = DateTimeUtils.currentTimeMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[21]++;\n\r\n } else {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[16]++;\r\n endMillis = interval.getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[22]++;\r\n }\r\n return (getStartMillis() >= endMillis);\r\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n Range range1 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n range0.equals(range1);\n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertTrue(range0.isEmpty());\n assertEquals(2147483647L, long0);\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n Range range0 = Range.of((-81L));\n long long0 = range0.getLength();\n assertEquals(1L, long0);\n \n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n Range.Comparators.values();\n long long1 = range0.getBegin();\n assertEquals((-81L), long1);\n \n Object object0 = new Object();\n boolean boolean1 = range1.equals(object0);\n assertTrue(boolean1 == boolean0);\n assertFalse(boolean1);\n }", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "public static boolean isSequence(double start, double mid, double end)\r\n/* 140: */ {\r\n/* 141:324 */ return (start < mid) && (mid < end);\r\n/* 142: */ }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32767L, 9223372036854775554L);\n Object object0 = new Object();\n Range range1 = Range.of(range_CoordinateSystem0, 9977L, 9223372036854775554L);\n range1.getEnd();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n range1.getEnd();\n Object object1 = new Object();\n long long0 = range1.getEnd();\n assertEquals(9223372036854775553L, long0);\n \n long long1 = range0.getBegin();\n assertEquals(32767L, long1);\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "@SuppressWarnings(\"unused\")\n public static boolean withinRange(float value, float startValue, float endValue) {\n return value == ScWidget.valueRangeLimit(value, startValue, endValue);\n }", "public AbstractBoolean less(Interval other){\n\t\ttry {\n\t\t\t// If this.max < this.min then True\n\t\t\tif ((!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min > other.max then False\n\t\t\tif ((!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "public int getFirstInInterval(int start) {\n if (start > last()) {\n return -1;\n }\n if (start <= first) {\n return first;\n }\n if (stride == 1) {\n return start;\n }\n int offset = start - first;\n int i = offset / stride;\n i = (offset % stride == 0) ? i : i + 1; // round up\n return first + i * stride;\n }", "@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "private boolean inProcessRange(ProcessorDistributionKey key, ActiveTimeSpans active)\n {\n if (checkTime(active, key.getTimeSpan(), key.getConstraintKey()))\n {\n return true;\n }\n\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return false;\n }\n\n final int loadAhead = myProcessorBuilder.getProcessorFactory().getLoadAhead(key.getGeometryType());\n\n final AnimationState state = animationPlan.findState(key.getTimeSpan(), currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n animationPlan.getTimeSpanForState(state);\n boolean inRange = false;\n try\n {\n final int distance = animationPlan.calculateDistance(currentAnimationState, state);\n inRange = distance <= loadAhead;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as this always\n // happens during a plan\n // change where the distributor has yet to receive the updated\n // plan and ends up in\n // a race condition with the animation manager adjusting to the\n // new plan.\n inRange = false;\n }\n return inRange;\n }", "public int getLowerBound ();", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n \n List<Range> list0 = range1.complement(range0);\n assertFalse(range1.isEmpty());\n assertTrue(list0.contains(range1));\n }", "public void isStartNeedleTest()\n {\n LinearSearch ls = new LinearSearch();\n int [] haystack1 = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};\n assertTrue(ls.isStartNeedle(5, haystack1, 5, 10));\n }", "public static void verifySequence(double lower, double initial, double upper)\r\n/* 152: */ {\r\n/* 153:354 */ verifyInterval(lower, initial);\r\n/* 154:355 */ verifyInterval(initial, upper);\r\n/* 155: */ }", "boolean isNilSearchRecurrenceStart();", "public double getStart();", "public Interval(){\r\n firstExtreme = 0.0d;\r\n secondExtreme = 0.0d;\r\n feIncluded = '(';\r\n seIncluded = ')';\r\n }", "public int getInterval() {\r\n return interval;\r\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-32768L), 2147484380L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, (-32768L), 2147484380L);\n range1.getEnd();\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(2147484379L, long0);\n \n Object object0 = new Object();\n range0.getEnd();\n long long1 = range0.getBegin();\n assertEquals((-32769L), long1);\n }", "public Interval getInterval() { return interval; }", "private boolean CompareValues(int oldValue, int value)\n {\n if (playerType == PlayerType.White)\n {\n if (turn == 1)\n return oldValue > value;\n else\n return oldValue < value;\n }\n else\n if (turn == 1)\n return oldValue < value;\n else\n return oldValue > value;\n }", "public double interval() {\n return interval;\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n Range range0 = Range.of(2448L);\n Range range1 = Range.of(2829L, 3687L);\n range1.equals(range0);\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }", "public void testRanges() throws Exception {\n int num = atLeast(1000);\n for (int i = 0; i < num; i++) {\n BytesRef lowerVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n BytesRef upperVal = new BytesRef(TestUtil.randomUnicodeString(random()));\n if (upperVal.compareTo(lowerVal) < 0) {\n assertSame(upperVal, lowerVal, random().nextBoolean(), random().nextBoolean());\n } else {\n assertSame(lowerVal, upperVal, random().nextBoolean(), random().nextBoolean());\n }\n }\n }", "private void eatRangeStart() {\n\n Token token = tokens.get(currentTokenPointer++);\n\n if (token.kind == TokenKind.STARTINCLUSIVE) {\n\n startInclusive = true;\n\n } else if (token.kind == TokenKind.STARTEXCLUSIVE) {\n\n startInclusive = false;\n\n } else {\n\n raiseParseProblem(\"expected a version start character '[' or '(' but found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n }", "@Test\n public void equals_DifferentTimeRangeStart_Test() {\n Assert.assertFalse(bq1.equals(bq3));\n }", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.ofLength(9223372036854775806L);\n range0.getBegin();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n boolean boolean0 = range0.equals(range_CoordinateSystem0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem1);\n assertEquals(\"[ 1 .. 9223372036854775806 ]/RB\", string0);\n \n Range range1 = Range.parseRange(\"[ 1 .. 9223372036854775806 ]/RB\");\n boolean boolean1 = range0.equals(range1);\n assertTrue(boolean1 == boolean0);\n assertFalse(range1.equals((Object)range0));\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals(0L, long0);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n Range range0 = Range.of(4162L);\n Range range1 = Range.of(999L);\n range1.equals(range0);\n assertFalse(range0.equals((Object)range1));\n \n long long0 = range1.getEnd();\n assertEquals(999L, long0);\n }", "private boolean matchesBin(Long[] arr, Long value, int index) {\n if (arr.length == 1) {\n return true;\n }\n if (index == arr.length - 1) {\n return value >= arr[index];\n } else if (index == 0) {\n return value < arr[index + 1];\n } else {\n boolean lowerCond = value >= arr[index];\n boolean upperCond = value.equals(TemporalElement.DEFAULT_TIME_TO) ? value <= arr[index + 1] :\n value < arr[index + 1];\n return lowerCond && upperCond;\n }\n }", "default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }", "public boolean isRange() {\r\n return range;\r\n }", "public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = range_Builder0.contractBegin(0L);\n Range.Builder range_Builder2 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range_Builder0.expandBegin(1734L);\n range0.equals(range_Builder1);\n assertTrue(range0.isEmpty());\n \n Range.Builder range_Builder3 = new Range.Builder();\n range_Builder0.copy();\n Range range1 = Range.ofLength(1233L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n long long0 = range1.getBegin(range_CoordinateSystem0);\n assertFalse(range1.isEmpty());\n assertEquals(0L, long0);\n \n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 2147483647L, 2147483647L);\n assertFalse(range2.isEmpty());\n }", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Range range0 = Range.ofLength(0L);\n String string0 = range0.toString();\n assertEquals(\"[ 0 .. -1 ]/0B\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.isSubRangeOf(range0);\n assertTrue(boolean0);\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n Range range0 = Range.ofLength(212L);\n range0.getEnd();\n Range range1 = Range.ofLength(126L);\n Range range2 = range0.intersection(range1);\n assertFalse(range2.isEmpty());\n \n Object object0 = new Object();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals(211L, long0);\n assertFalse(range0.equals((Object)range2));\n \n long long1 = range1.getBegin();\n assertSame(range1, range2);\n assertEquals(0L, long1);\n }", "@Override\n\tpublic int compareTo(Object o) {\n\t\tInterval i = (Interval) o;\n\t\tif (i.end < this.end)\n\t\t\treturn 1;\n\t\telse if (i.end > this.end)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn 0;\n\t}", "static boolean checkbetween(int n) {\n if(n>9 && n<101){\n return true;\n }\n else {\n return false;\n }\n \n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "@Test\n\tpublic void increasingSignal() {\n\t\tDataset xData = data(0.0, 1.0);\n\t\tDataset yData = data(0.0, 1.0);\n\n\t\tdouble target = 0.4;\n\t\tdouble tolerance = 0.01;\n\n\t\tdouble expectedX = target - tolerance;\n\t\tdouble expectedY = target - tolerance;\n\n\t\ttest(xData, yData, target, tolerance, expectedX, expectedY);\n\t}", "public static void intervalRange() {\n Observable.intervalRange(0L, 10L, 0L, 10L, TimeUnit.MILLISECONDS).\n subscribe(new MyObserver<>());\n }", "@Override\n\tpublic int compare(ExecutionNode o1, ExecutionNode o2) {\n\t\t// compare start times\n\t\tTimePoint s1 = o1.getInterval().getStartTime();\n\t\tTimePoint s2 = o2.getInterval().getStartTime();\n\t\t// compare lower bounds\n\t\treturn s1.getLowerBound() < s2.getLowerBound() ? -1 : s1.getLowerBound() > s2.getLowerBound() ? 1 : 0;\n\t}", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-23L), (-23L));\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandBegin((-23L));\n range_Builder0.shift((-23L));\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n linkedList0.add(range0);\n List<Range> list0 = range0.complementFrom(linkedList0);\n assertEquals(0, list0.size());\n \n Range range1 = Range.of(9223372036854775807L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem2.toString();\n range0.equals(\"Zero Based\");\n range_CoordinateSystem1.toString();\n boolean boolean1 = range1.endsBefore(range0);\n assertTrue(boolean1 == boolean0);\n assertFalse(boolean1);\n }", "boolean isSetFractionalMinimum();", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n Range range1 = Range.of(1146L);\n boolean boolean0 = range1.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n List<Range> list0 = range1.complementFrom(linkedList0);\n range0.complementFrom(list0);\n Range range2 = Range.ofLength(1146L);\n Range range3 = range2.intersection(range1);\n long long1 = range1.getEnd();\n assertEquals(1146L, long1);\n \n boolean boolean1 = range0.intersects(range2);\n boolean boolean2 = range1.equals(range2);\n assertFalse(boolean2 == boolean1);\n \n range0.getEnd();\n Range.of(2641L);\n List<Range> list1 = range0.complement(range2);\n assertEquals(1, list1.size());\n \n boolean boolean3 = range3.startsBefore(range1);\n assertTrue(boolean3 == boolean0);\n assertTrue(range3.isEmpty());\n assertFalse(boolean3);\n }", "public boolean isLevelTrailSegment(int start, int end)\n {\n int max = markers[start];\n int min = markers[start];\n for (int i = start; i <= end; i++) {\n if (markers[i] > max) {\n max = markers[i];\n }\n \n if (markers[i] < min) {\n min = markers[i];\n }\n }\n \n return (max-min <= 10);\n }", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "boolean isNilFractionalMinimum();", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public static boolean openIntervalIntersect(float start1, float end1, float start2, float end2) {\n\t\treturn (start1 < end2 && start2 < end1);\n\t}", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private double getStartX() {\n\t\treturn Math.min(x1, x2);\n\t}" ]
[ "0.65889186", "0.6438975", "0.63567305", "0.6263915", "0.6202353", "0.61288035", "0.6124306", "0.59835327", "0.59700626", "0.59517473", "0.59489477", "0.5894521", "0.58921915", "0.58896047", "0.58656293", "0.58613193", "0.5848361", "0.5845927", "0.58257", "0.580939", "0.58091354", "0.5806911", "0.5784285", "0.5783702", "0.57457453", "0.5739157", "0.57103616", "0.5707682", "0.56904817", "0.56865954", "0.5682901", "0.5680527", "0.56778115", "0.56643903", "0.5664105", "0.56581", "0.5655613", "0.56410134", "0.56368595", "0.56367874", "0.56338954", "0.56111157", "0.5609468", "0.5607667", "0.5604506", "0.55765545", "0.55756444", "0.55729926", "0.5567283", "0.5564478", "0.5556906", "0.555583", "0.55318034", "0.55135226", "0.55023414", "0.5496366", "0.54770315", "0.54759747", "0.54691446", "0.54565966", "0.54548985", "0.5451962", "0.5446645", "0.54330844", "0.54195446", "0.5390528", "0.5387245", "0.5384636", "0.538075", "0.53655756", "0.5362767", "0.53553176", "0.5353912", "0.5350456", "0.53470683", "0.5346749", "0.53431535", "0.53406364", "0.5337496", "0.53337556", "0.53293395", "0.5324427", "0.5323214", "0.5322405", "0.53193605", "0.5312632", "0.5311136", "0.53094906", "0.530656", "0.5306394", "0.5303732", "0.52936286", "0.52896255", "0.5288535", "0.52829057", "0.5280426", "0.5279856", "0.52766234", "0.5275285", "0.5274646", "0.5274331" ]
0.0
-1
Set the target endpoint for the connection.
public void setTarget(AbstractModelElement target, EditPart editPart) { if (target == null) { throw new IllegalArgumentException(); } this.target = target; this.targetEditPart = editPart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setEndpoint(String endpoint);", "public void setEndpoint(com.quikj.server.app.EndPointInterface endpoint) {\n\t\tthis.endpoint = endpoint;\n\t}", "public void setEndPoint(EndPoint endPoint) {\r\n\t\tthis.endPoint = endPoint;\r\n\t}", "public void setEndPoint(String _endPoint) {\n this._endPoint = _endPoint;\n }", "@Override\n\tpublic void setEndPoint(Point endPoint) {\n\t\tthis.endPoint=endPoint;\n\t}", "public Builder setEndpoint(String endpoint) {\n this.endpoint = Preconditions.checkNotNull(endpoint, \"Endpoint is null.\");\n return this;\n }", "void configureEndpoint(Endpoint endpoint);", "public void setEndpoint(org.hl7.fhir.Uri endpoint)\n {\n generatedSetterHelperImpl(endpoint, ENDPOINT$8, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "@Value(\"#{props.endpoint}\")\n\tpublic void setEndPoint(String val) {\t\t\n\t this.val = val;\n\t}", "void setEndpointParameter(Endpoint endpoint, String name, Object value) throws RuntimeCamelException;", "public RgwAdminBuilder endpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "protected void setTarget(Command target) {\n\t\tproxy.setTarget(target);\n\t}", "void setDefaultEndpointUri(String endpointUri);", "T setUrlTarget(String urlTarget);", "public String target(String target)\n {\n return target + \":\" + this.getPort();\n }", "public void setEndpoints(String... endpoints) {\n this.endpoints = endpoints;\n }", "public void setEndPoint(AKeyCallPoint endPoint) {\n\t\t\tthis.endPoint = endPoint;\n\t\t}", "public void setEndpointUrl(final String endpointUrl) {\n\t\tthis.endpointUrl = endpointUrl;\n\t}", "public Builder setServiceEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n serviceEndpoint_ = value;\n bitField0_ |= 0x00002000;\n onChanged();\n return this;\n }", "public void testConfigureTargetSet() throws Exception {\n\t\tMockMessageExchange exchange = new MockMessageExchange();\n\t\tEchoComponent echo = new EchoComponent();\n echo.setService(new QName(\"urn:test\", \"echo\"));\n echo.setEndpoint(\"endpoint\");\n \n JBIContainer container = new JBIContainer();\n container.init();\n \n container.activateComponent(echo, \"echo\");\n container.start();\n\n\t\texchangeTarget.setInterface(new QName(\"test-interface\"));\n\t\texchangeTarget.setService(new QName(\"urn:test\", \"echo\"));\n\t\texchangeTarget.setUri(\"urn:test:echo\");\n\t\texchangeTarget.setEndpoint(\"endpoint\");\n\t\t\n\t\t// configureTarget should set the interface, service, and endpoint on the\n\t\t// exchange.\n\t\texchangeTarget.configureTarget(exchange, echo.getContext());\n\t\t\n\t\tassertNotNull(\"Service name should be set on the exchange\", exchange.getService());\n\t\tassertNotNull(\"Interface name should be set on the exchange\", exchange.getInterfaceName());\n\t\tassertNotNull(\"Endpoint should be set on the exchange\", exchange.getEndpoint());\n\t\t\n\t\tcontainer.stop();\n\t\t\n\t}", "public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}", "public void setEndpointId(String endpointId);", "private void setEndpoint(Node node, DescriptorEndpointInfo ep) {\n NamedNodeMap map = node.getAttributes();\n\n String epname = map.getNamedItem(\"endpoint-name\").getNodeValue();\n String sername = map.getNamedItem(\"service-name\").getNodeValue();\n String intername = map.getNamedItem(\"interface-name\").getNodeValue();\n ep.setServiceName(new QName(getNamespace(sername), getLocalName(sername)));\n ep.setInterfaceName(new QName(getNamespace(intername), getLocalName(intername)));\n ep.setEndpointName(epname);\n }", "public Object getTarget() {\n return this.endpoints;\n }", "public String getEndPoint() {\n return _endPoint;\n }", "public void setEndpointInterface(String endpointInterface)\r\n {\r\n this.endpointInterface = endpointInterface;\r\n }", "public String endpoint() {\n return this.endpoint;\n }", "void setValue(Endpoint endpoint, double value) {\n endpoint.setValue(this, value);\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "public String getEndpoint() {\n return this.endpoint;\n }", "synchronized MutableSpan setEndpoint(Endpoint endpoint) {\n for (int i = 0; i < annotations.size(); i++) {\n V1Annotation a = annotations.get(i);\n if (a.endpoint().equals(Endpoints.UNKNOWN)) {\n annotations.set(i, V1Annotation.create(a.timestamp(), a.value(), endpoint));\n }\n }\n this.endpoint = endpoint;\n return this;\n }", "public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t\tsuper.setSourcePath(target.getSourcePath());\n\t\t}\n\t}", "public com.autodesk.ws.avro.Call.Builder setTargetObjectUri(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.target_object_uri = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public HttpEndpoint( String theEndpoint ) {\n\t\tthis( theEndpoint, true );\n\t}", "public Builder setEndpoint(com.google.cloud.networkmanagement.v1beta1.EndpointInfo value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n stepInfo_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n stepInfoCase_ = 8;\n return this;\n }", "void setTarget(Node target) {\n\t\tthis.target = target;\n\t}", "public void setTarget(CPointer<BlenderObject> target) throws IOException\n\t{\n\t\tlong __address = ((target == null) ? 0 : target.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}", "public void setPwsEndpoint(String pwsEndpoint) {\n mPwsClient.setPwsEndpoint(pwsEndpoint);\n }", "public void setTarget(Object method)\n {\n __m_Target = method;\n }", "@Override\n\tpublic void setTarget(Object arg0) {\n\t\tdefaultEdgle.setTarget(arg0);\n\t}", "public void setDestination(String host, int port) {\n this.host = host;\n this.port = port;\n }", "public void setEndpointPassword(final String endpointPassword) {\n\t\tthis.endpointPassword = endpointPassword;\n\t}", "public void setProtocolEndpoint(java.lang.Boolean protocolEndpoint) {\r\n this.protocolEndpoint = protocolEndpoint;\r\n }", "private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}", "public void setSetPropertyTarget(String setPropertyTarget) {\n \n this.setPropertyTarget = setPropertyTarget;\n }", "public void setDestination (InetSocketAddress o) {\n\t\torigin = o;\n\t}", "@Override\n public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateEndpoint(request);\n }", "public void setEndpoints(com.microsoft.schemas.xrm._2014.contracts.EndpointCollection endpoints)\r\n {\r\n generatedSetterHelperImpl(endpoints, ENDPOINTS$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\r\n }", "public void setTargetUri(final String targetUri) {\r\n\t\tthis.targetUri = targetUri;\r\n\t}", "public EndPoint getEndPoint() {\r\n\t\treturn endPoint;\r\n\t}", "protected void onEndpointConnected(Endpoint endpoint) {}", "public void setNilEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().find_element_user(ENDPOINTS$0, 0);\r\n if (target == null)\r\n {\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n }\r\n target.setNil();\r\n }\r\n }", "public void setPoint(Point operand, Point target) {\n\tfor (Shape s : this.shapes)\n\t s.setPoint(operand, target);\n }", "public Builder setEndpoint(\n com.google.cloud.networkmanagement.v1beta1.EndpointInfo.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n stepInfo_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n stepInfoCase_ = 8;\n return this;\n }", "public void setTarget(Target target) {\n\t\tthis.target = target;\n\t}", "void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "protected void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin) {\n ((ConnectionWidget) findWidget(edge)).setTargetAnchor(getPinAnchor(targetPin));\n }", "public Builder setEndpoint(\n io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint.Builder builderForValue) {\n if (endpointBuilder_ == null) {\n endpoint_ = builderForValue.build();\n onChanged();\n } else {\n endpointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public void addEndpoint(Endpoint endpoint)\r\n {\r\n getEndpoints().add(endpoint);\r\n }", "SearchServiceRestClientImpl setEndpoint(String endpoint) {\n this.endpoint = endpoint;\n return this;\n }", "public URL getEndPoint();", "public Builder server(URI endpoint) {\n if (endpoint != null) {\n this.servers = Collections.singletonList(endpoint);\n }\n return this;\n }", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "public com.quikj.server.app.EndPointInterface getEndpoint() {\n\t\treturn endpoint;\n\t}", "public Builder url(URI endpoint) {\n return server(endpoint);\n }", "void setTarget(java.lang.String target);", "public String getEndpoint() {\n\t\treturn null;\n\t}", "public void setHost(String host);", "public Builder clearEndpoint() {\n if (endpointBuilder_ == null) {\n endpoint_ = null;\n onChanged();\n } else {\n endpoint_ = null;\n endpointBuilder_ = null;\n }\n\n return this;\n }", "public Builder clearServiceEndpoint() {\n serviceEndpoint_ = getDefaultInstance().getServiceEndpoint();\n bitField0_ = (bitField0_ & ~0x00002000);\n onChanged();\n return this;\n }", "public void setPort(final String remoteHost) {\n host = remoteHost;\n }", "public Builder setServiceEndpointBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n serviceEndpoint_ = value;\n bitField0_ |= 0x00002000;\n onChanged();\n return this;\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"PublishAPIServiceSoap\".equals(portName)) {\r\n setPublishAPIServiceSoapEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "EndPoint createEndPoint();", "public final void mT__46() throws RecognitionException {\n try {\n int _type = T__46;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:46:7: ( 'endpoint' )\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:46:9: 'endpoint'\n {\n match(\"endpoint\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void connect (SocketAddress endpoint)\n throws IOException {\n if (state >= CONNECTED)\n throw new IOException (\"socket already connected\");\n if (state != BOUND)\n throw new IOException(\"socket has not been bound\");\n if (endpoint == null)\n throw new IllegalArgumentException();\n if (! (endpoint instanceof InetSocketAddress) )\n throw new IllegalStateException (\"\");\n InetSocketAddress remote = (InetSocketAddress) endpoint;\n remoteAddr = remote.getAddress();\n remotePort = remote.getPort();\n remoteHost = remote.getHostName();\n state = CONNECTED;\n }", "public HISWebServiceStub(java.lang.String targetEndpoint)\r\n throws org.apache.axis2.AxisFault {\r\n this(null, targetEndpoint);\r\n }", "public void setTarget(String target) {\n this.target = target;\n }", "public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }", "public void setPort(final String remoteHost) {\n host = remoteHost;\n }", "@Override\n protected void onConnecting() {\n mPreferredTarget = null;\n }", "public void setTransport(Transport transport) {\n this.transport = transport;\n }", "public RadiologyServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {\n this(null,targetEndpoint);\n }", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "public void bind(LocalSocketAddress endpoint) throws IOException\n {\n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n bindLocal(fd, endpoint.getName(), endpoint.getNamespace().getId());\n }", "public Builder setEndpoint(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsEndpoint value) {\n if (endpointBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpoint_ = value;\n onChanged();\n } else {\n endpointBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"RemoteFacadeCfc\".equals(portName)) {\r\n setRemoteFacadeCfcEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public ClientRegistryStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {\r\n this(null,targetEndpoint);\r\n }", "public SOAPServiceStub(java.lang.String targetEndpoint)\n throws org.apache.axis2.AxisFault {\n this(null, targetEndpoint);\n }", "public IWsPmsSdkServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {\n this(null,targetEndpoint);\n }", "@Required\n\tpublic void setTargetService(TargetService service) {\n\t\tthis.targetService = service;\n\t}", "protected void setLinkOnly(FileNode target){\n\t\t//link = target;\n\t\t//super.setSourcePath(link.getSourcePath());\n\t\tsuper.setVirtualSourceNode(target);\n\t\tif(target != null) super.setSourcePath(target.getSourcePath());\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"publicService\".equals(portName)) {\n setpublicServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public EndPointAdapter(final SequelDatabase database) {\n\t\tsuper(database, \"endpoint\");\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UploaderPort\".equals(portName)) {\n setUploaderPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CenterServerImplPort\".equals(portName)) {\n setCenterServerImplPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public String endpointUrl() {\n return this.endpointUrl;\n }", "public String endpointUri() {\n return this.endpointUri;\n }" ]
[ "0.7280226", "0.722293", "0.7090138", "0.66645014", "0.6590243", "0.6473412", "0.63274413", "0.6324529", "0.6135884", "0.6114464", "0.6093543", "0.5969339", "0.5908152", "0.58982515", "0.5890205", "0.5889201", "0.58537954", "0.568455", "0.56658816", "0.563452", "0.5578107", "0.5556452", "0.55337733", "0.5515009", "0.55099607", "0.54896563", "0.54847646", "0.54818195", "0.5479382", "0.5475131", "0.5444433", "0.5444433", "0.5436802", "0.5430127", "0.5412124", "0.5330352", "0.5326043", "0.5325499", "0.5324837", "0.5323585", "0.53109825", "0.53013605", "0.52975965", "0.5277858", "0.5276455", "0.52747005", "0.5262115", "0.5227639", "0.5226205", "0.52255213", "0.52097845", "0.5189428", "0.5188278", "0.5188088", "0.51810455", "0.51794285", "0.51770324", "0.5174235", "0.5172717", "0.51677006", "0.51663625", "0.51611495", "0.51554257", "0.5146693", "0.5143814", "0.51311994", "0.5129919", "0.5126405", "0.5118468", "0.51181906", "0.5110964", "0.5096284", "0.50941324", "0.509053", "0.50888103", "0.50776845", "0.5076855", "0.507132", "0.5063552", "0.50473255", "0.5044041", "0.50416994", "0.5035532", "0.5029872", "0.50231886", "0.5016981", "0.5012851", "0.50000536", "0.49961483", "0.49878848", "0.49741396", "0.49726585", "0.4967811", "0.49643847", "0.49643537", "0.49637341", "0.49589014", "0.49582642", "0.49570692", "0.49543202" ]
0.51763064
57
BufferedReader f = new BufferedReader(new FileReader("uva.in"));
public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); int n = Integer.parseInt(f.readLine()); StringTokenizer st = new StringTokenizer(f.readLine()); int[] d = new int[n]; ArrayList<Integer> order = new ArrayList<>(n); for(int i = 0; i < n; i++) { d[i] = Integer.parseInt(st.nextToken()); order.add(i); } Collections.sort(order, new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { return d[o2]-d[o1]; } }); for(int i = 0; i < n; i++) { order.set(i, 2*order.get(i)+1); } for(int i = 0; i < n-1; i++) { out.println(order.get(i) + " " + order.get(i+1)); } for(int i = 0; i < n; i++) { int dist = d[order.get(i)/2]; int next = order.get(i)+1; out.println(order.get(i+dist-1) + " " + next); if(i+dist >= order.size()) { order.add(next); } } f.close(); out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void citire(FileReader f);", "public void readFile();", "public void readFromFile() {\n\n\t}", "public static void reading(String fileName)\n {\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\tFile filename = new File(\"D://normal.txt\");\r\n\t\tFileInputStream fstream = new FileInputStream(filename);\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\t\r\n\t}", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public void readData(String infile) throws Exception {\r\n \t\tScanner in = new Scanner(new FileReader(infile));\r\n \t}", "FrenchLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public static void main(String[] args) {\n\r\n String contenido = \"\";\r\n\r\n try {\r\n FileReader in = new FileReader(\"./src/fichero_prueba.txt\");\r\n int c = in.read();\r\n\r\n while (c != -1) {\r\n contenido += (char) c;\r\n c = in.read();\r\n }\r\n in.close();\r\n } catch (IOException e){\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n System.out.println(contenido);\r\n\r\n\r\n //LEER MENSAJE POR BLOQUES\r\n\r\n String contenido2 = \"\";\r\n\r\n try {\r\n BufferedReader inb = new BufferedReader(new FileReader(\"./src/fichero_prueba.txt\"));\r\n\r\n String linea = inb.readLine();\r\n while (linea!=null){\r\n contenido2 += linea+\"\\n\";\r\n linea = inb.readLine();\r\n }\r\n inb.close();\r\n } catch (IOException e){\r\n e.printStackTrace();\r\n }\r\n System.out.println(contenido2);\r\n\r\n }", "public void readVotes(File inFile);", "public static void main(String[] args) {\n BufferedReader bf = null;\r\n System.out.println(\" ********************Token***************\");\r\n try {\r\n bf = new BufferedReader(new FileReader(\"src/convertidor/Entrada.txt\"));\r\n Analizador a = new Analizador(bf);\r\n Symbol token = null;\r\n do {\r\n token = a.next_token();\r\n token.value.toString();\r\n System.out.println(token.value.toString());\r\n\r\n } while (token != null);\r\n\r\n bf.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error en \" + e.getMessage());\r\n }\r\n\r\n }", "FrenchLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public AnalisadorLexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Analizador_Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public static void main(String[] args) throws IOException {\n\n FileInputStream in = new FileInputStream(\"d:\\\\cztst.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String s = reader.readLine();\n System.out.println(s);\n }", "private void loadFrAfinnLibrary() throws FileNotFoundException, IOException{\n \n BufferedReader reader = new BufferedReader(new FileReader(\"src/language_libraries/AFINN-fr-165.txt\"));\n String line;\n \n while ((line = reader.readLine()) != null) \n {\n String[] parts = line.split(\"\t\", 2); //split each line into 2 parts separated by whitespace\n \n if(parts.length == 2){\n \n String key = parts[0].replaceAll(\"[\\\\s+|\\\\p{P}\\\\p{S}]\" ,\"\"); // part 1 is the words. replace any symbols or punctuation marks \"\"\n int value = Integer.parseInt(parts[1]); // part 2 is the word score\n afinnFrenchLibrary.put(key,value);//store in hashmap\n }\n }\n reader.close();\n }", "public void openFile() throws IOException {\n\t\tclientOutput.println(\">>> Unesite putanju do fajla fajla koji zelite da otvorite: \");\n\t\tuserInput = clientInput.readLine();\n\n\t\tizabraniF = new File(userInput);\n\n\t\t// Provera tipa fajla (.txt ili binarni)\n\t\tif (izabraniF.getName().endsWith(\".txt\")) {\n\t\t\tBufferedReader br = null;\n\t\t\ttry {\n\t\t\t\tbr = new BufferedReader(new FileReader(userInput));\n\n\t\t\t\tboolean kraj = false;\n\n\t\t\t\twhile (!kraj) {\n\t\t\t\t\tpom = br.readLine();\n\t\t\t\t\tif (pom == null)\n\t\t\t\t\t\tkraj = true;\n\t\t\t\t\telse\n\t\t\t\t\t\tclientOutput.println(pom);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tpom = null;\n\t\t\ttry {\n\t\t\t\tFileInputStream fIs = new FileInputStream(izabraniF);\n\t\t\t\tbyte[] b = new byte[(int) izabraniF.length()];\n\t\t\t\tfIs.read(b);\n\t\t\t\tpom = new String(Base64.getEncoder().encode(b), \"UTF-8\");\n\t\t\t\tclientOutput.println(pom);\n\t\t\t\tfIs.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tclientOutput.println(\">>> Fajl nije pronadjen!\");\n\t\t\t}\n\t\t}\n\t}", "public AnalizadorLexicoArchivo(java.io.Reader in) {\n this.zzReader = in;\n }", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "InputStream mo1151a();", "public reglas(java.io.Reader in) {\n this.zzReader = in;\n }", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "public void readTestFileToViterbi(String inputFile){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(inputFile),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tString[] words=line.split(\" \");\n\t\t\t\tArrayList<String> wordList=new ArrayList<String>();\n\t\t\t\tassert(words.length>0&&words.length%2==0);\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<words.length;i+=2){\n\t\t\t\t\twordList.add(words[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<HashMap<String,ViterbiUnit>> viterbiMap=updateMuList(wordList);\n\t\t\t\tArrayList<ViterbiUnit> resultList=getMuList(viterbiMap);\n\t\t\t\tString outputLine=\"\";\n\t\t\t\tfor(int i=1;i<resultList.size()-1;i++){\n\t\t\t\t\tViterbiUnit unit=resultList.get(i);\n\t\t\t\t\toutputLine+=(words[2*(i-1)]+\" \"+unit.word+\" \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(outputLine.substring(0, outputLine.length()-1));\n\t\t\t\t\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args){\n\t\ttry{\n\t\t\tFileReader fr=new FileReader(\"C:\\\\Users\\\\bharathi\\\\Desktop\\\\Hello\\\\new.txt\");\n\t\t\tbr = new BufferedReader(fr);\n\t\t\tSystem.out.println(\"reading lins from the file.... \"+br.readLine());\n\t\t}catch(Exception e){}\n\t}", "@Test\n\tpublic void testInlinerWithFile() throws Exception {\n\t\tString input = new String(Files.readAllBytes(new File(\"../warre.txt\").toPath()));\n\t\tInliner inliner = new Inliner();\n\t\tList<Part> parts = new Tokenizer(inliner).split(input);\n\t\tList<HTreeNode> freq = new FrequencyAnalyzer().analyzeFrequency(parts);\n\t\tString result = inliner.encode(parts, freq, 'X');\n\n\t\tSystem.out.println(\"\\nInput size : \" + input.length());\n\t\tSystem.out.println(\"Output size : \" + result.length());\n\t\tSystem.out.println(\"Num tokens : \" + freq.stream().filter(a -> a.prevalence > 1).count());\n\n//\t\tSystem.out.println(input);\n\t\tSystem.out.println(result);\n//\t\tSystem.out.println(inliner.decode(result, 'X'));\n\t}", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void main(String[] args) {\n byte[] content = null;\n try {\n content = Files.readAllBytes(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\diemkhang\\\\test reader\\\\introduce.txt\").toPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(new String(content));\n }", "Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public static void main(String[] args) {\n try {\n readHouseTxt();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n\n\n }", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "public void readFile()\r\n\t{\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tx = new Scanner(new File(\"clean vipr measles results.txt\"));\r\n\t\t\t\r\n\t\t\twhile (x.hasNext())\r\n\t\t\t{\r\n\t\t\t\tString a = x.next();\r\n\t\t\t\tString b = x.next();\r\n\t\t\t\tString c = x.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.printf(\"%s %s %s \\n\\n\", a,b,c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tx.close();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"file not found\");\r\n\t\t}\r\n\t\r\n\t}", "public static void main(String[] args)throws IOException {\n\t\tFileReader fr= new FileReader(\"D:\\\\Test1.txt\");\r\n\t\tBufferedReader br= new BufferedReader(fr);\r\n\t\tString line=null;\r\n\t\twhile((line=br.readLine())!=null) {\r\n\t\t\tSystem.out.println(line);\r\n\t\t}\r\n//\t\tint ch=0;\r\n//\t\twhile( (ch=fr.read())!=-1) {\r\n//\t\t\tSystem.out.print((char)ch);\r\n//\t\t}\r\n\t\tfr.close();\r\n\t\t}", "public AnalizadorLexico2(java.io.Reader in) {\n this.zzReader = in;\n }", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public NFA(File f){readMachineDescription(f);}", "public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoPaginas [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoPaginas scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoPaginas(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "void load(File file);", "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args)throws IOException {\n\t\tFileReader file = new FileReader(\"D:\\\\stream\\\\hello.txt\");\n\t\tBufferedReader buffer = new BufferedReader(file);\n\t//\tint k =buffer.read();\n\t//\tSystem.out.println(k);\n\t//\tString s = buffer.readLine();\n\t//\tSystem.out.println(s);\n\t\tint k;\n\t\twhile((k=buffer.read())!=-1) {\n\t\t\t\n\t\t\tSystem.out.print((char)k);\n\t\t}\n\t\tbuffer.close();\n\t\tfile.close();\n\t\t\n\t}", "String input() {\n\n try {\n\n FileReader reader = new FileReader(\"the text.txt\");\n BufferedReader bufferedReader = new BufferedReader(reader);\n StringBuilder builder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n\n } catch (IOException e) {\n\n System.out.println(\"Input Failure\");\n return null;\n }\n }", "public static void readfile() {\r\n\t\t// read input file\r\n\t\ttry {\r\n\t\t File inputObj = new File(\"input.txt\");\r\n\t\t Scanner inputReader = new Scanner(inputObj);\r\n\t\t int i = 0;\r\n\t\t while (inputReader.hasNextLine()) {\r\n\t\t String str = inputReader.nextLine();\r\n\t\t str = str.trim();\r\n\t\t if(i == 0) {\r\n\t\t \tnumQ = Integer.parseInt(str);\r\n\t\t \torign_queries = new String[numQ];\r\n\t\t \t//queries = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(i == numQ + 1) {\r\n\t\t \tnumKB = Integer.parseInt(str);\r\n\t\t \torign_sentences = new String[numKB];\r\n\t\t \t//sentences = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(0 < i && i< numQ + 1) {\t\r\n\t\t \torign_queries[i-1] = str;\r\n\t\t \t//queries.add(toCNF(str));\r\n\t\t }\r\n\t\t else {\r\n\t\t \torign_sentences[i-2-numQ] = str;\r\n\t\t \t//sentences.add(toCNF(str));\r\n\t\t }\t\t \r\n\t\t i++;\r\n\t\t }\r\n\t\t inputReader.close();\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t System.out.println(\"An error occurred when opening the input file.\");\r\n\t\t }\r\n\t}", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexico2 [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexico2 scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexico2(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "@Test\n public void in() throws IOException {\n InputStream in = getResourceAstream(\"peizhi.xml\");\n\n //InputStream in = new FileInputStream(\"G:\\\\IDEA\\\\Java_test\\\\src\\\\main\\\\resources\\\\peizhi.xml\");\n //定义一个数组相当于缓存\n byte by[]=new byte[1024];\n int n=0;\n while((n=in.read(by))!=-1)\n {\n String s=new String(by,0,n);\n System.out.println(s);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"testeArquivo.txt\");\n\t\tfile.createNewFile();\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Arquivo criado\");\n\t\twriter.flush();\n\t\twriter.close();\n\t\tFileReader fr = new FileReader(file); \n\t char [] a = new char[50];\n\t fr.read(a); \n\t for(char c : a){\n\t \tSystem.out.println(c);\n\t }\n\t fr.close();\n\t}", "private static String loadFile(File file) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\treturn br.readLine();\n\t}", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public static void loadProgramData() {\n\r\n try {\r\n File f = new File(\"DetailsOfVaccination.txt.txt\"); //Accessing the file\r\n Scanner read = new Scanner(f);\r\n while (read.hasNextLine()) { //Print data in the file line by line\r\n String data = read.nextLine();\r\n System.out.println(data);\r\n }\r\n read.close();\r\n }\r\n catch (FileNotFoundException e) { //Runs if there was an error\r\n System.out.println(\"An error occurred while reading data from the file.\");\r\n e.printStackTrace();\r\n }\r\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tInputStreamReader isr=new InputStreamReader\r\n\t\t\t\t\t(new FileInputStream(\"FileToScr.txt\"));\r\n\t\t\tchar c[]=new char[512];\r\n\t\t\tint n=isr.read(c);\r\n\t\t\tSystem.out.println(new String(c,0,n));\r\n\t\t isr.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public void Tokenizer(String s) throws FileNotFoundException\r\n {\nInputStream modelIn = new FileInputStream(\"C:/OpenNLP_models/en-token.bin\"); \r\n\t \r\n // InputStream modelIn=getClass().getResourceAsStream(\"en-token.bin\");\r\n try {\r\n TokenizerModel model = new TokenizerModel(modelIn);\r\n TokenizerME tokenizer = new TokenizerME(model);\r\n String tokens[] = tokenizer.tokenize(s);\r\n \r\n for(int i=0; i<tokens.length;i++)\r\n {\r\n System.out.println(tokens[i]);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (modelIn != null) {\r\n try {\r\n modelIn.close();\r\n }\r\n catch (IOException e) {\r\n }\r\n } \r\n } \r\n }", "String read();", "String read();", "public static void main(String[] args) throws IOException {\n\t\tReader in = new InputStreamReader(System.in);\n\t\tint data = 0;\n\t\twhile((data=in.read()) != -1) {\n\t\t\tSystem.out.print((char)data);\n\t\t}\n\t\t//f가나다라마바사아자차가카\n\t}", "private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoArchivo [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoArchivo scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoArchivo(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "public static void main(String[] args) throws Exception {\n FileReader fr = new FileReader(\"data/text.txt\");\n\n int i;\n while ((i=fr.read()) != -1)\n System.out.print((char)i);\n\n }", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\tInputStream is = new FileInputStream(\"C:\\\\Users\\\\John\\\\eclipse-workspace\\\\Java_Seoul_Wiz\\\\bin\\\\InputStream\\\\jain.txt\");\r\n\t\t\twhile(true) {\r\n\t\t\t\tint i = is.read();\r\n\t\t\t\tSystem.out.println(\"Data: \" + i);\r\n\t\t\t\tif(i==-1) break;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tis.close();\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public AnalizadorLexicoPaginas(java.io.Reader in) {\n this.zzReader = in;\n }", "Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }", "private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}", "public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}", "private static GiaoVu readGiaoVu(String line) {\n\t String[] s = line.split(\",\");\n GiaoVu gv = new GiaoVu(s[1], s[2], s[3], s[4], s[5]);\n return gv;\n }", "public InputStream readFile( String fileName, FileType type );", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public void load (File file) throws Exception;", "protected String readUnicodeInputStream(InputStream in) throws IOException {\n\t\tUnicodeReader reader = new UnicodeReader(in, null);\n\t\tString data = FileCopyUtils.copyToString(reader);\n\t\treader.close();\n\t\treturn data;\n\t}", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "public static void decode(File fIn) throws IOException {\n\t\tdecode(fIn, fIn, true);\n\t}", "public interface FileReader {\n\n String read(String fileName);\n}", "public static void main(String[] args) {\n\t\tFileUTL fUtl = new FileUTL();\n\t\tString fileAddres = \"C:\\\\Users\\\\lenovo\\\\Desktop\\\\医嘱和对应路径信息\\\\\";\n\t\tString filename = fileAddres+\"12个病人的医嘱信息-utf8.csv\";\n\t\tString splitSign = \",\";\n\t\tString dateSign = \"/\";\n\t\tfUtl.readFile(filename, splitSign, dateSign);\n\t}", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "List readFile(String pathToFile);", "public void readFile(String name) {\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\t\n\t\ttry {\t\t \n\t\t\tScanner reader = new Scanner(file);\n\t\t\t\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\tString data = reader.nextLine();\n\t\t System.out.println(data);\n\t\t\t}\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t System.out.println(\"File not found!\");\n\t\t} \n\t}", "public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tFileReader fr = new FileReader(\"fichero.txt\");\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString s = br.readLine();\r\n\t\t\twhile( s != null){\r\n\t\t\t\tSystem.out.println(s);\r\n\t\t\t\ts = br.readLine();\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//String s = br.readLine();\r\n\t\t\t//System.out.println(s);\r\n\t\t\t\r\n\t\t}catch(FileNotFoundException e){\r\n\t\t\tSystem.err.println(\"el fichero no se ha podido encontrar: \" + e);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n File file = new File(\"Noten.txt\");\n FileInputStream fileInputStream = new FileInputStream(file);\n\n int byteRead;\n int count = 0;\n while ((byteRead = fileInputStream.read())!= -1) {\n char[] ch = Character.toChars(byteRead);\n System.out.println(ch[0]);\n count++;\n }\n System.out.println(count);\n fileInputStream.close();\n }", "public static List<Polyomino> openFile() {\n \tString basePath = new File(\"\").getAbsolutePath();\n Path path = Paths.get(basePath, \"polyominoesINF421.txt\");\n Charset charset = Charset.forName(\"UTF-8\");\n List<Polyomino> polyominos = new LinkedList<Polyomino>();\n\t\ttry {\n\t\t\tList<String> lines = Files.readAllLines(path, charset);\n\t\t\tfor (String line : lines) {\n\t\t\t\tpolyominos.add(new Polyomino(line));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n return polyominos;\n }", "private static String readInput() {\n String kbString = \"\";\n File kbFile = new File(\"kb.txt\");\n if(kbFile.canRead()){\n try {\n FileInputStream fileInputStream = new FileInputStream(kbFile);\n\n int c;\n while((c = fileInputStream.read()) != -1){\n kbString += (char) c;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return kbString;\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public In(File file) throws Exception {\n\t\tif (file==null)\n\t\t\tthrow new NoSuchElementException(\"file argument is null\");\n\t\ttry{\n\t\t\tFileInputStream fis=new FileInputStream(file);\n\t\t\tscanner=new Scanner(new BufferedInputStream(fis),CHARSET_NAME);\n\t\t\tscanner.useLocale(LOCALE);\n\t\t}catch (IOException ioe){\n\t\t\tthrow new IOException(\"could not open\"+file,ioe);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n try {\n FileInputStream inputStream = new FileInputStream(\"fichier1.txt\");\n\n int data = inputStream.read();\n\n while(data != -1) {\n System.out.print((char)data);\n\n data = inputStream.read();\n }\n\n inputStream.close();\n\n }catch(Exception e) {\n System.out.println(e.toString());\n }\n\n }", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "private static String loadFile(String path){\n try {\n\n BufferedReader reader = new BufferedReader(new FileReader(path));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append('\\n');\n }\n\n reader.close();\n return sb.toString();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }", "private static void input(String[] args) {\n try (BufferedReader scanner = new BufferedReader(\n new InputStreamReader(args.length > 0 ? new FileInputStream(args[0]) : System.in))) {\n\n String linija;\n\n // regularne definicije\n while ((linija = scanner.readLine()) != null && linija.startsWith(\"{\")) {\n String tmp[] = linija.split(\" \");\n\n tmp[0] = tmp[0].substring(1, tmp[0].length() - 1);\n String naziv = tmp[0];\n String izraz = expandRegularDefinition(tmp[1]);\n\n regularneDefinicije.put(naziv, izraz);\n\n // System.out.println(naziv + \", \" + izraz);\n }\n\n // stanja\n while (!linija.startsWith(\"%X\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, stanjaLA);\n\n // leksicke jedinke\n while (!linija.startsWith(\"%L\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, leksickeJedinke);\n\n // pravila leksickog analizatora\n\n while ((linija = scanner.readLine()) != null) {\n while (!linija.startsWith(\"<\")) {\n linija = scanner.readLine();\n }\n\n String tmp[] = linija.split(\">\", 2);\n\n String stateName = tmp[0].substring(1, tmp[0].length());\n String regDef = tmp[1];\n\n regDef = expandRegularDefinition(regDef);\n\n // System.out.println(stateName + \"<> \" + regDef);\n LexerRule lexerRule = new LexerRule(regDef, stateName, 1, \"<\" + stateName + \">\" + regDef);\n lexerRules.add(lexerRule);\n\n scanner.readLine(); // preskoci {\n\n linija = scanner.readLine().trim();\n while (linija != null && scanner.ready() && !linija.equals(\"}\")) {\n // radi nesto s naredbom\n lexerRule.addAction(linija);\n linija = scanner.readLine().trim();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "public void showFile() throws FileNotFoundException, IOException{\r\n ArrayList<String> arxiu = new ArrayList<>();\r\n \r\n BufferedReader br = new BufferedReader(new FileReader(fitxerUsuaris));\r\n \r\n String usuari;\r\n \r\n while((usuari = br.readLine()) != null){\r\n arxiu.add(usuari);\r\n }\r\n \r\n for (int i = 0; i < arxiu.size(); i++) {\r\n System.out.println(arxiu.get(i));\r\n }\r\n }", "private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }", "public static Scanner openInput(String fname){\n\t Scanner infile = null;\n\t try {\n\t infile = new Scanner(new File(fname));\n\t } catch(FileNotFoundException e) {\n\t System.out.printf(\"Cannot open file '%s' for input\\n\", fname);\n\t System.exit(0);\n\t }\n\t return infile;\n\t }", "private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }", "private boolean cekUlangSebagian(String kata) throws FileNotFoundException, IOException{\n boolean res = false;\n BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(\"ulang_sebagian.txt\")));\n String input;\n while((input=br.readLine())!=null && input.length()!=0){\n if(kata.equalsIgnoreCase(input)){\n res = true;\n }\n }\n return res;\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "@Override\n\tpublic void load() {\n\t\tFileHandle file = Gdx.files.internal(DogRunner.PARENT_DIR + \"charset.txt\");\n\t\tcharset = file.readString();\n\t}" ]
[ "0.6456592", "0.60469246", "0.5952863", "0.5848711", "0.5842592", "0.57053715", "0.5700967", "0.56979334", "0.56897235", "0.5683288", "0.5678162", "0.56638265", "0.56499773", "0.56280565", "0.5625181", "0.5607407", "0.55812883", "0.5528477", "0.5524296", "0.55229294", "0.5522009", "0.5511573", "0.55112046", "0.5492752", "0.5460586", "0.54459745", "0.5442988", "0.54304385", "0.5428959", "0.5415681", "0.54147714", "0.54123557", "0.5404551", "0.53989977", "0.5392652", "0.5392048", "0.53908736", "0.53822464", "0.5376065", "0.53710127", "0.5369967", "0.53693193", "0.53612626", "0.5344008", "0.53423977", "0.53360623", "0.5319067", "0.5317656", "0.53175414", "0.53160137", "0.5288615", "0.5285934", "0.5284177", "0.52841586", "0.52825785", "0.5279256", "0.527614", "0.52688205", "0.52688205", "0.52658635", "0.5259321", "0.5258042", "0.5257352", "0.5255328", "0.52532524", "0.5252056", "0.5251666", "0.52451044", "0.52346474", "0.5226808", "0.5224826", "0.5223635", "0.5222542", "0.5222367", "0.5221448", "0.52173877", "0.52137196", "0.5213232", "0.5212182", "0.5211755", "0.5205666", "0.5204483", "0.52019316", "0.51980305", "0.51969796", "0.5196087", "0.51958245", "0.51935244", "0.5192636", "0.5186644", "0.5182987", "0.51821285", "0.5179122", "0.51783794", "0.5171324", "0.51686674", "0.5161414", "0.5161046", "0.51607686", "0.51607686", "0.5160629" ]
0.0
-1
Para activar el sensor, el argumento debe ser un int cualquiera
public static void main(String[] args) { Sensor s = new Sensor(8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSensorOn() {\n\n }", "public void accionProximidad(SensorEvent sensorEvent){\n String valProximidad = String.valueOf(sensorEvent.values[0]);\n Float valor = Float.parseFloat(valProximidad);\n tviewProx.setText(Float.toString(valor));\n\n //VALOR ES LO QUE ME DA EL SENSOR ES EL DE PROXIMIDAD\n if(valor == 1){\n sm.unregisterListener(this);\n if(PuertaLecAppEscRas.getLed().getEstado().equals(\"on\")){\n Toast toast = Toast.makeText(getApplicationContext(), \"TRATANDO DE APAGAR LA LUZ\", Toast.LENGTH_LONG);\n toast.show();\n baseDatosSoaRef.child(\"PuertaEscAppLecRas\").child(\"Led\").child(\"estado\").setValue(\"off\");\n PuertaEscAppLecRas.setLed(\"off\");\n }else {\n Toast toast = Toast.makeText(getApplicationContext(), \"TRATANDO DE ENCENDER LA LUZ\", Toast.LENGTH_LONG);\n toast.show();\n baseDatosSoaRef.child(\"PuertaEscAppLecRas\").child(\"Led\").child(\"estado\").setValue(\"on\");\n PuertaEscAppLecRas.setLed(\"on\");\n }\n TareaLed tareaLed = new TareaLed();\n tareaLed.execute();\n }\n }", "private void updateLightSensorValues()\n {\n sendMessage((byte)Constants.LIGHTSENSVAL,(byte)Constants.REQ);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.POTVAL, (byte)Constants.REQ);\n if(progPotToggleButton.isChecked())\n {\n int x =0;\n try {\n x = Integer.parseInt(progValueEditText.getText().toString());\n if(x>=0 && x<256)\n sendMessage((byte)Constants.PROGVAL,(byte)x);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.USEPOT,(byte)Constants.NO);\n } catch (NumberFormatException e) {\n messageView.append(\"int för helvete\");\n }\n }else\n sendMessage((byte)Constants.USEPOT,(byte)Constants.YES);\n\n }", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "private void activeSensor(Sensor sensor) {\n selectedSensor = sensor;\n// selectedSensor.debug(true);\n// if (start) {\n// view = (DrawingView) findViewById(R.id.surface);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n// }\n }", "public void sensorSystem() {\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == SENS_ACCELEROMETER && event.values.length > 0) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n latestAccel = (float)Math.sqrt(Math.pow(x,2.)+Math.pow(y,2)+Math.pow(z,2));\n //Log.d(\"pow\", String.valueOf(latestAccel));\n\n }\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy >0) {\n\n Log.d(\"Sensor\", event.sensor.getType() + \",\" + event.accuracy + \",\" + event.timestamp + \",\" + Arrays.toString(event.values));\n\n int newValue = Math.round(event.values[0]);\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n \n if(newValue!=0 && lastTimeSentUnix < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnix = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", latestAccel);\n intent.putExtra(\"TIME\", event.timestamp);\n intent.putExtra(\"ACCEL\", latestAccel);\n\n\n Log.d(\"change\", \"send intent\");\n\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), latestAccel, event.timestamp, event.values);\n }\n }\n\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (settingTonic) {\n\t\t\tif (setTonicLed.isHigh())\n\t\t\t\tsetTonicLed.low();\n\t\t\telse\n\t\t\t\tsetTonicLed.high();\n\t\t}\n\t\tif (settingHarmonicInterval) {\n\t\t\tif (setHarmIntLed.isHigh())\n\t\t\t\tsetHarmIntLed.low();\n\t\t\telse\n\t\t\t\tsetTonicLed.high();\n\t\t}\n\t\tif (settingScaleType) {\n\t\t\tif (setScaleLed.isHigh())\n\t\t\t\tsetScaleLed.low();\n\t\t\telse\n\t\t\t\tsetScaleLed.high();\n\t\t}\n\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "@JavascriptInterface\n public void VIA() {\n sensorManager.registerListener(c, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(c, giroscopio, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(c, gravità, SensorManager.SENSOR_DELAY_NORMAL);\n misC=0; // sovrascrivo le vecchie.\n }", "public void trigger() {\n\t\t\n//\t\t #ifdef DEBUG\n\t\t // The sensor should not have been scheduled if it has a NULL\n\t\t // callback function. Be safe and test here.\n\t\t if (func == null) {\n\t\t SoDebugError.post(\"SoSensor::trigger\",\n\t\t \"Cannot trigger a sensor with NULL callback\");\n\t\t return;\n\t\t }\n//\t\t #endif /* DEBUG */\n\t\t \n\t\t // Call the sensor function\n\t\t func.run(funcData, this);\n\t\t \n\t\t }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if(sensorEvent.sensor.getType()== Sensor.TYPE_ACCELEROMETER){\n if(rBtnPuerta.isChecked()){\n accionShake(sensorEvent);\n }\n }else{\n if(sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY){\n if(rBtnLed.isChecked()){\n accionProximidad(sensorEvent);\n }\n }else{\n if(sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT){\n if(rBtnLuminosidad.isChecked()){\n accionLuminosidad(sensorEvent);\n }\n }\n }\n }\n }", "RegisterSensor() {\n }", "@Override\n public void OnAccuracyChanged(Ssensor arg0, int arg1) {\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if( event.values[0] < sensor.getMaximumRange() )\n {\n //// SI LA PANTALLA NO FUE TAPADA ANTERIORMENTE -> GUARDO EL MOMENTO DE INICIO DEL JUEGO\n if( !pantallaEstabaTapada )\n {\n tiempoDeInicio= SystemClock.uptimeMillis();\n pantallaEstabaTapada=true;\n getWindow().getDecorView().setBackgroundColor(Color.RED);\n }\n }\n else\n {\n //// SI LA PANTALLA ESTABA TAPADA Y AHORA NO LO ESTA --> CALCULO LOS SEGUNDOS TRANSCURRIDOS Y DESTRUYO EL LISTENER DEL SENSOR\n if( pantallaEstabaTapada )\n {\n segundosTranscurridos= pasarMilisegundoASegundo(SystemClock.uptimeMillis() - tiempoDeInicio);\n pantallaEstabaTapada=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n\n ServicePOST comunicacionApiRest = new ServicePOST(getApplicationContext());\n comunicacionApiRest.registrarEvento(String.valueOf(event.values[0]), \"SENSOR DE PROXIMIDAD\");\n\n sensorManag.unregisterListener(sensorListener);\n\n }\n }\n guardarInfoEnSharedPreference(event.values[0]);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent terserah = new Intent(MainActivity.this,Acelerometer.class);\n\t\t\t\tstartActivity(terserah);\n\t\t\t}", "public void requestSensor(String sensorType){\n switch(sensorType){\n case \"SENSOR_ACC\":\n accelerometer = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n phoneSensorsMan.registerListener(sel,accelerometer, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GYRO\":\n gyro = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n phoneSensorsMan.registerListener(sel,gyro, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_MAGNET\":\n magnet = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n phoneSensorsMan.registerListener(sel,magnet, SensorManager.SENSOR_DELAY_GAME);\n break;\n case \"SENSOR_GPS\":\n phoneLocationMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,100,1,locListener);\n break;\n case \"SENSOR_ORIENTATION\":\n orientation = phoneSensorsMan.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n phoneSensorsMan.registerListener(sel,orientation, SensorManager.SENSOR_DELAY_GAME);\n\n\n }\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER && s.equals(\"Accelerometre\")) {\n float Ax = sensorEvent.values[0];\n float Ay = sensorEvent.values[1];\n float Az = sensorEvent.values[2];\n\n acce = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Ax = \" + Ax + \" \" + \"\\n Ay = \" + Ay + \" \" + \"\\n Az = \" + Az + \"\\n\";\n\n // Do something with this sensor value .\n sensorTxt.setText(acce);\n Log.d(TAG, \" TimeAcc = \" + sensorEvent.timestamp + \" Ax = \" + Ax + \" \" + \" Ay = \" + Ay + \" \" + \" Az = \" + Az);\n }\n\n //LUMIERE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT && s.equals(\"Lumiere\")) {\n // La valeur de la lumière\n float lv = sensorEvent.values[0];\n\n light = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Light value = \" + lv + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(light);\n }\n\n //PROXIMITE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY && s.equals(\"Proximite\")) {\n // La valeur de proximité\n float p = sensorEvent.values[0];\n\n proxi = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Proximite value = \" + p + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(proxi);\n }\n\n //GYROSCOPE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE && s.equals(\"Gyroscope\")) {\n // Les valeurs du gyroscope\n float xGyroscope = sensorEvent.values[0];\n float yGyroscope = sensorEvent.values[1];\n float zGyroscope = sensorEvent.values[2];\n\n gyro = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Valeur du gyroscope \\n Valeur en x = \" + xGyroscope + \" \" + \"\\n Valeur en y = \" + yGyroscope + \" \" + \"\\n Valeur en z = \" + zGyroscope + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(gyro);\n }\n\n }", "public void iniciarJuego ( View view )\n {\n if( gameOn)\n {\n sensorManag.unregisterListener(sensorListener);\n Toast.makeText(this, \"Ok reiniciemos el juego.\", Toast.LENGTH_SHORT).show();\n }\n //// SE BUSCA EL SENSOR DE PROXIMIDAD\n\n sensorManag=(SensorManager)getSystemService(SENSOR_SERVICE);\n sensor= sensorManag.getDefaultSensor(Sensor.TYPE_PROXIMITY);\n /// SIN NO HAY SENSOR DE PROXIMIDAD SE LO INFORMA CON UN MENSAJE Y SE SALE\n if(sensor == null)\n {\n Toast.makeText(this, \"No se pudo encontrar un sensor de proximidad, el cual es necesario para jugar.\", Toast.LENGTH_SHORT);\n return;\n }\n //// SE INFORMA QUE ES LO QUE SE DEBE HACER CUANDO HAY CAMBIOS EN EL SENSOR DE PROXIMIDAD\n sensorListener= new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent event) {\n //// SI EL SENSOR PUDO DETECTAR UN OBJETO APROXIMANDOSE\n if( event.values[0] < sensor.getMaximumRange() )\n {\n //// SI LA PANTALLA NO FUE TAPADA ANTERIORMENTE -> GUARDO EL MOMENTO DE INICIO DEL JUEGO\n if( !pantallaEstabaTapada )\n {\n tiempoDeInicio= SystemClock.uptimeMillis();\n pantallaEstabaTapada=true;\n getWindow().getDecorView().setBackgroundColor(Color.RED);\n }\n }\n else\n {\n //// SI LA PANTALLA ESTABA TAPADA Y AHORA NO LO ESTA --> CALCULO LOS SEGUNDOS TRANSCURRIDOS Y DESTRUYO EL LISTENER DEL SENSOR\n if( pantallaEstabaTapada )\n {\n segundosTranscurridos= pasarMilisegundoASegundo(SystemClock.uptimeMillis() - tiempoDeInicio);\n pantallaEstabaTapada=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n\n ServicePOST comunicacionApiRest = new ServicePOST(getApplicationContext());\n comunicacionApiRest.registrarEvento(String.valueOf(event.values[0]), \"SENSOR DE PROXIMIDAD\");\n\n sensorManag.unregisterListener(sensorListener);\n\n }\n }\n guardarInfoEnSharedPreference(event.values[0]);\n }\n /// NO ES NECESARIO TOCARLO PERO LA IMPLEMENTACION ME PIDE QUE POR LO MENOS LO DECLARE\n @Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }\n };\n /// REGISTRO EL LISTENER PARA QUE EMPIESE A ESCUCHAR\n sensorManag.registerListener(sensorListener, sensor, MILISEGUNDOS_EN_SEGUNDO/6);\n //// FLAG PARA SABER QUE SE ESTA PREPARADO PARA JUGAR ///////\n gameOn=true;\n }", "Sensor getSensor();", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "public void setSensorOff() {\n\n }", "public void setSensor(byte sensor) {\r\n\t\tthis.sensor = sensor;\t\t\r\n\t}", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "public void message1Pressed() {\n // display\n TextLCD.print(MESSAGE1);\n // current sensor state?\n boolean sensorState = fSensorState[0];\n // activate/passivate sensor\n if(sensorState)\n Sensor.S1.passivate();\n else\n Sensor.S1.activate();\n // change sensor state\n fSensorState[0] = !sensorState;\n }", "public void onClick(View v) {\n\t\t\t\tsensorEnable = !sensorEnable;\n\t\t\t\tif( CarDataService.obdSensor == null ){\n\t\t\t\t\tCarDataService.obdSensor = new OBDSensor(baseAct);\n\t\t\t\t}\n\t\t\t\tif (sensorEnable) {\n//\t\t\t\t\tif( mBtStat == 3 ){\n\t\t\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"sensor enable\");\n\t\t\t\t\tsensorSwt.setImageResource(R.drawable.icon_radio_enable);\n//\t\t\t\t\tCarDataService.obdSensor.initData();\n\t\t\t\t\tCarDataService.obdSensor.registSensor();\t\t\t\t\t\n\t\t\t\t\tBase.OBDApp.sensorState = true;//start write sensor data\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tToast.makeText(baseAct, \"OBD未连接,请先连接OBD\", 1).show();\n//\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"sensor disable\");\n\t\t\t\t\tsensorSwt.setImageResource(R.drawable.icon_radio_disable);\t\t\t\t\t\n\t\t\t\t\tCarDataService.obdSensor.unRegistSensor();\n\t\t\t\t\tBase.OBDApp.sensorState = false;//stop write sensor data and tell service upload data if wifi enable\n\t\t\t\t}\t\t\t\t\n\t\t\t}", "private void handleSensorActivated() {\n if (securityRepository.getArmingStatus() == ArmingStatus.DISARMED) {\n return; //no problem if the system is disarmed\n }\n switch (securityRepository.getAlarmStatus()) {\n case NO_ALARM -> setAlarmStatus(AlarmStatus.PENDING_ALARM);\n case PENDING_ALARM -> setAlarmStatus(AlarmStatus.ALARM);\n }\n }", "DeviceSensor createDeviceSensor();", "@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\r\n\t\tax = - event.values[0] / 7;\r\n\t\tay = event.values[1] / 7;\r\n\t}", "public void init(){\n int myValue = this.getArguments().getInt(\"sensor\");\r\n\r\n //Creates a sensor from the sensorID\r\n sensorM = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\r\n sensor = sensorM.getDefaultSensor(myValue);\r\n\r\n //Creates new sensor listener\r\n sensorListener = new SensorListener(getActivity(), myView, sensor);\r\n\r\n //Stores all sensor information in variables\r\n String name = sensor.getName();\r\n String vendor = sensor.getVendor();\r\n int version = sensor.getVersion();\r\n int minDelay = sensor.getMinDelay();\r\n int maxDelay = sensor.getMaxDelay();\r\n float range = sensor.getMaximumRange();\r\n float power = sensor.getPower();\r\n boolean isWakeUpSensor = sensor.isWakeUpSensor();\r\n float resolution = sensor.getResolution();\r\n\r\n //set text in all text views\r\n tvSensorName.setText(name);\r\n tvSensorVendor.setText(\"Vendor: \" + vendor);\r\n tvSensorVersion.setText(\"Version: \" + version);\r\n tvSensorMinDelay.setText(\"Minimum delay: \" + minDelay);\r\n tvSensorMaxDelay.setText(\"Maximum delay: \" + maxDelay);\r\n tvSensorRange.setText(\"Maximum range: \" + range);\r\n tvSensorPower.setText(\"Power consumption: \" + power);\r\n tvSensorWakeUp.setText(\"Is wake up sensor: \" + isWakeUpSensor);\r\n tvSensorResolution.setText(\"Resolution: \" + resolution);\r\n }", "ExternalSensor createExternalSensor();", "@Override\n public void runOpMode() throws InterruptedException{\n\n LeftWheel = hardwareMap.dcMotor.get(\"LeftWheel\");\n RightWheel = hardwareMap.dcMotor.get(\"RightWheel\");\n LLAMA = hardwareMap.dcMotor.get(\"LLAMA\");\n RightWheel.setDirection(DcMotor.Direction.REVERSE);\n beaconFlagSensor = hardwareMap.i2cDevice.get(\"color sensor\");\n LeftWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RightWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n buttonPusher = hardwareMap.servo.get(\"Button Pusher\");\n buttonPusher.setDirection(Servo.Direction.REVERSE);\n\n LeftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n RightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n LLAMA.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n beaconFlagReader= new I2cDeviceSynchImpl(beaconFlagSensor, I2cAddr.create8bit(0x3c), false);\n beaconFlagReader.engage();\n\n double PUSHER_MIN = 0;\n double PUSHER_MAX = 1;\n buttonPusher.scaleRange(PUSHER_MIN,PUSHER_MAX);\n\n if(beaconFlagLEDState){\n beaconFlagReader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n beaconFlagReader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n\n\n waitForStart();\n //Go forward to position to shoot\n long iniForward = 0;\n //Shoot LLAMA\n long shootLLAMA=0 ;\n //Turn towards Wall\n long turnToWall= 0;\n //Approach Wall\n long wallApproach= 0;\n //Correct to prepare for button\n long correctForButton= 0;\n long correctForButton2=0 ;\n //Use sensors to press button\n /** This is sensor*/\n //Go forward\n long toSecondButton= 0;\n //Use Sensors to press button\n /** This is sensor*/\n //turn to center\n\n //charge\n long chargeTime= 0;\n\n //Go forward to position to shoot\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(iniForward);\n\n STOP();\n\n //Shoot LLAMA\n LLAMA.setPower(1);\n\n sleep(shootLLAMA);\nSTOP();\n //Turn towards Wall\n LeftWheel.setPower(-1);\n RightWheel.setPower(1);\n\n sleep(turnToWall);\n\n STOP();\n //Approach Wall\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(wallApproach);\n\n STOP();\n //Correct to prepare for button\n\n LeftWheel.setPower(1);\n RightWheel.setPower(-1);\n\n sleep(correctForButton);\n\n STOP();\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(correctForButton2);\n\n STOP();\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //Go forward\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(toSecondButton);\n\n STOP();\n //Use Sensors to press button\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //turn to center\n\n\n //charge\n }", "protected void execute() {\n if (oi.getButton(1,3).get()){\n speedModifier = 0.6;\n }\n else if(oi.getButton(2,3).get()){\n speedModifier = 1;\n }\n else if(oi.getButton(1,2).get()&&oi.getButton(2, 2).get()){\n speedModifier = 0.75;\n }\n chassis.tankDrive((oi.getJoystick(1).getAxis(Joystick.AxisType.kY)*speedModifier), (oi.getJoystick(2).getAxis(Joystick.AxisType.kY)*speedModifier));\n //While no triggers are pressed the robot moves at .75 the joystick input\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tint sensorType = event.sensor.getType(); \n //values[0]:X轴,values[1]:Y轴,values[2]:Z轴 \n float[] values = event.values; \n if (sensorType == Sensor.TYPE_ACCELEROMETER) \n { \n if ((Math.abs(values[0]) > 17 || Math.abs(values[1]) > 17 || Math \n .abs(values[2]) > 17)) \n { \n Log.d(\"sensor x \", \"============ values[0] = \" + values[0]); \n Log.d(\"sensor y \", \"============ values[1] = \" + values[1]); \n Log.d(\"sensor z \", \"============ values[2] = \" + values[2]); \n Intent intent = new Intent(this, MapActivity.class);\n startActivity(intent);\n //摇动手机后,再伴随震动提示~~ \n vibrator.vibrate(500); \n } \n \n } \n\t}", "public interface AccelerometerListener extends SensorEventListener {\n\n void onSensorChanged(SensorEvent var1);\n\n void onAccuracyChanged(Sensor var1, int var2);\n\n void start(Context context, int samplingRate, String queryNumber,String ioPair);\n\n void stop();\n\n}", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if(arg1){\n Log.d(TAG,\"set sensor of controller.\");\n mSensorControl.setMode(SensorControl.SENSOR_MODE_CONTROLLER);\n }\n else{\n Log.d(TAG,\"set sensor of headset.\");\n mSensorControl.setMode(SensorControl.SENSOR_MODE_HEADSET);\n }\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n // TODO Auto-generated method stub\n int sensorType = event.sensor.getType();\n\n //values[0]:X轴,values[1]:Y轴,values[2]:Z轴\n float[] values = event.values;\n\n if(sensorType == Sensor.TYPE_ACCELEROMETER){\n\n /*监听任一轴的加速度大于14的时候,\n *\n */\n if((Math.abs(values[0])>14||Math.abs(values[1])>14||Math.abs(values[2])>14)){\n num++;\n //摇动手机后,设置button上显示的字为空\n text.setText(\"摇了\"+num+\"下\");\n\n //摇动手机后,再伴随震动提示~~\n vibrator.vibrate(500);\n }\n }\n }", "public AccelerometerButtonsActivity()\r\n\t{\r\n\t\tLog.d(TAG,\"AccelerometerActivity()\");\r\n\t\tbbHWSensorInitialized=false;\r\n\t\tsetCOMStatus (null,false);\r\n\t\t\t\t\r\n\t\tglobal = new Globals();\r\n\t\tMsgQueue = new android.os.Handler (this);\r\n\t\t\r\n\t\tlast_sent_ms=0;\r\n\t\tuitoken=0;\r\n\t\t_bbStartSend=false;\r\n\t\tsm=null;\r\n\t\tacc_val= new accVal();\r\n\t\tlast_sent_ms=0;\r\n\t\tnAccVal=0;\r\n\t\tformatter = new DecimalFormat(\"#000.00\");\r\n\t\t\r\n\t\tformatter3 = new DecimalFormat(\"#00\");\r\n\t\tts_connection=0;\r\n\t\tlast_nAccVal=0;\r\n\t}", "public void rightButtonPressed() {\n\t\t\n\t\t// Only register a click if the sensor is enabled\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif (on) {\n\t\t\t\tif(!inCountdown1Mode) {\n\t\t\t\t\tIntent myIntent = new Intent(getApplicationContext(), GraphActivity.class);\n\t\t\t\t\tmyIntent.putExtra(\"SensorName\", \"Oxidizing Gas\");\n\t\t\t\t\tmyIntent.putExtra(\"quickInt\", qsSensor);\n\t\t\t\t\tstartActivity(myIntent);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void execute() {\n SmartDashboard.putNumber(\"Encoder Value: \", encoderMotor.getSelectedSensorPosition());\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy > 0) {\n int newValue = Math.round(event.values[0]);\n\n if(newValue!=0 && lastTimeSentUnixHR < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnixHR = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", event.accuracy);\n intent.putExtra(\"TIME\", event.timestamp);\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n\n }\n }\n // also send motion/humidity/step data to know when NOT to interpret hr data\n\n if (event.sensor.getType() == SENS_STEP_COUNTER && event.values[0]-currentStepCount!=0) {\n\n if(lastTimeSentUnixSC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixSC = System.currentTimeMillis() / 1000L;\n currentStepCount = event.values[0];\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n\n }\n\n if (event.sensor.getType() == SENS_ACCELEROMETER) {\n\n if(lastTimeSentUnixACC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixACC = System.currentTimeMillis() / 1000L;\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n }\n\n }", "public void activar(){\n\n }", "protected void execute() { \t\n \tif (isLowered != Robot.oi.getOperator().getRawButton(2)) {\n \t\tisLowered = Robot.oi.getOperator().getRawButton(2);\n \t\tif (isLowered)\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kForward);\n \t\telse\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kReverse);\n \t}\n \t\n \tif (Robot.oi.getOperator().getRawButton(11))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0.75);\n \telse if (Robot.oi.getOperator().getRawButton(12))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0);\n \telse if (Robot.oi.getOperator().getRawButton(10))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(-0.75);\n }", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public void stateChanged(SensorPort arg0, int arg1, int arg2) {\n\t\t\n\t}", "public int Register(){\n\t\tnumSensors = 0;\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tif(mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME)) numSensors++; \n\t\treturn numSensors;\t\n\t}", "void powerOn();", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.setClass(MotionSensor.this, MainActivity.class);\n\t\t\t\tMotionSensor.this.startActivity(intent);\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tnewUpdate1(DeviceNum1);\r\n\r\n\t\t\t}", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "ActuatorAction handle(float delta, SensorInfo carStatus);", "public void changeSensorActivationStatus(Sensor sensor, Boolean active) {\n // The logic hasn't to be checked when alarm is active\n // Modify the logic to meet the request for test 6\n if (securityRepository.getAlarmStatus() != AlarmStatus.ALARM) {\n if (active) {\n handleSensorActivated();\n } else if (sensor.getActive()) {\n handleSensorDeactivated();\n }\n }\n sensor.setActive(active);\n securityRepository.updateSensor(sensor);\n }", "public void turnOn(int x, int y);", "public void autonomousPeriodic() {\r\n try{\r\n if(joy.getRawButton(2)){\r\n frontLeft.set(1);\r\n }else if(joy.getRawButton(3)){\r\n frontRight.set(1);\r\n }else if(joy.getRawButton(4)){\r\n backRight.set(1);\r\n }else if(joy.getRawButton(5)){\r\n backLeft.set(1);\r\n }\r\n }catch(Exception e){\r\n \r\n }\r\n \r\n }", "default void interactWith(PressureSwitch pressureSwitch) {\n\t}", "public void mouseClickPositionSensor(int x, int y)\n\t{\n\t\t\n\t\tsensorActive = true;\n\t\tsensorX_Coordinate = x;\n\t\tsensorY_Coordinate = y;\n\n\t\tupdateCanvas();\n\t}", "public void switchOn();", "public void onboard_control_sensors_enabled_SET(@MAV_SYS_STATUS_SENSOR int src)\n { set_bits(- 1 + src, 26, data, 178); }", "public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }", "public void teleopPeriodic() {\n \t//driveTrain.setInputSpeed(xbox.getAxisLeftY(), xbox.getAxisRightY());\n \t\n \tdriveTrain.print();\n \t\n \t// funcao PID\n \tif (xbox.getButtonX()) {\n\t\t\tbotaoapertado = true;\n\t\t} else if (xbox.getButtonY()) {\n\t\t\tbotaoapertado = false;\n\t\t\tdriveTrain.start();\n\t\t\tdriveTrain.setSetPoint(0, 0);\n\t\t}\n \tif (botaoapertado) {\n \t\tdriveTrain.setSetPoint(100, 100);\n\t\t}\n \t\n }", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "public int getSensorId();", "protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public interface OnSensorValueChangeListener {\n public void onSensorValueChanged(int newVal);\n}", "protected abstract void onReceiveBatteryFrame(int[] value);", "public void grabarInt(int x) throws IOException\r\n {\r\n maestro.writeInt(x); \r\n }", "private static native void triggerVibration(long pointer,\n long controllerHandle,\n short leftSpeed,\n short rightSpeed);", "@Override\n public void magnetometer(int x, int y, int z, int timestamp) {\n }", "public abstract void runSensors() throws Exception;", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n \n }", "@Override\n public void onSensorChanged (SensorEvent event) {\n\n Sensor mySensor = event.sensor;\n\n if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n// output.setText(\"x=\" + x + \"y=\" + y + \"z=\" + z);\n // Log.i(\"acc\",(\"x=\" + x + \"y=\" + y + \"z=\" + z));\n// try {\n// String value=String.valueOf(x)+\",\"+String.valueOf(y)+\",\"+ String.valueOf(z);\n// // outvalue.write(value.getBytes());\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Log.i(\"acc\", Float.toString(x) + Float.toString(y)+Float.toString(z));\n\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n sensorManager.registerListener(SensorService.this, accelerometerSensor, SensorManager.SENSOR_DELAY_NORMAL);\n return super.onStartCommand(intent, flags, startId);\n }", "public void onSensorChanged(SensorEvent event) {\n try {\n Thread.sleep(16);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //called when accelerometer senses directional change\n sensorX = event.values[0];\n sensorY = event.values[1];\n }", "@Override\n public void batteryStatus(int value) {\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n }", "@Override\n protected void execute() {\n Robot.jack.setJackMotor(Robot.oi.gamePad.getLeftJoystickY()/3);\n Robot.jack.setJackDriveMotor(Robot.oi.gamePad.getRightJoystickY()/3);\n \n SmartDashboard.putString(\"Currently Running Diagnostic\", \"Jack\");\n }", "public static void main(String[] args) throws Exception{\n\t\t\r\n\t\tint turnChk = 0;\r\n\t\tTouchSensor touch = new TouchSensor(SensorPort.S1);\r\n\t\tLightSensor light = new LightSensor(SensorPort.S3);\r\n\t\tUltrasonicSensor UltraSonic = new UltrasonicSensor(SensorPort.S4);\r\n\t\t\r\n\t\tMotor.A.setSpeed(300);\r\n\t\tMotor.B.setSpeed(300);\r\n\t\t\r\n\t\twaitForLoudSound();\r\n\t\tMotor.A.forward();\r\n\t\tMotor.B.forward();\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tUltraSonic = new UltrasonicSensor(SensorPort.S4);\r\n\t\t\t\r\n\t\t\tLCD.drawString(\"START\", 0, 0);\r\n\t\t\t//LCD.drawString(\"turnChk\", 0, 1);\r\n\t\t\t//LCD.drawInt(turnChk, 9, 1);\r\n\t\t\tif(UltraSonic.getDistance() < 35\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t){\r\n\t\t\t\tif(turnChk < 4){\r\n\t\t\t\t\tMotor.B.stop();\r\n\t\t\t\t\tMotor.A.rotate(320);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tturnChk++;\r\n\t\t\t}else{\r\n\t\t\t\tMotor.A.forward();\r\n\t\t\t\tMotor.B.forward();\r\n\t\t\t}\r\n\t\t}\r\n\t\tMotor.A.stop();\r\n\t\tMotor.B.stop();\r\n\t\tLCD.drawString(\"FIRST POINT\", 0, 0);\r\n\t\tThread.sleep(3000);\r\n\t\tMotor.B.rotate(360);\r\n\t\t\r\n\t\twhile(!touch.isPressed()){\r\n\t\t\tMotor.A.forward();\r\n\t\t\tMotor.B.forward();\r\n\t\t}\r\n\t\tMotor.A.stop();\r\n\t\tMotor.B.stop();\r\n\t\tLCD.drawString(\"NOT FOUND \", 0, 0);\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\twhile(light.getNormalizedLightValue()>400){\r\n\t\t\tMotor.A.backward();\r\n\t\t\tMotor.B.backward();\r\n\t\t}\r\n\t\tMotor.B.stop();\r\n\t\tMotor.A.rotate(380);\r\n\t\tLCD.drawString(\"GO ON \", 0, 0);\r\n\t\tThread.sleep(3000);\r\n\t\tturnChk = 0;\r\n\t\twhile(true){\r\n\t\t\tUltraSonic = new UltrasonicSensor(SensorPort.S4);\r\n\t\t\tLCD.drawString(\"GO ON \", 0, 0);\r\n\t\t\t\r\n\t\t\tif(UltraSonic.getDistance()<30){\r\n\t\t\t\tif(turnChk == 0){\r\n\t\t\t\t\tMotor.A.stop();\r\n\t\t\t\t\tMotor.B.rotate(360);\r\n\t\t\t\t\tturnChk = 1;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tMotor.A.stop();\r\n\t\t\t\t\tMotor.B.stop();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tMotor.A.forward();\r\n\t\t\t\tMotor.B.forward();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tLCD.drawString(\"FOUND \", 0, 0);\r\n\t\tThread.sleep(5000);\r\n\t\tSystem.exit(0);\r\n\t}", "@Override\n public void run() { //3o thread xeirizetai ta optikoakoustika mhnymata se periptwsh epikeimenhs sugroushs\n MainActivity.mHandler.post(new Runnable(){\n public void run(){\n if (light < Float.parseFloat(LightT) || prox == 0){\n mypool.play(AlertId, 1, 1, 1, 0, 1);\n if (prox == 0)\n Toast.makeText(SensorService.this, \"DANGER!!! proximity sensor value is: \" + String.valueOf(prox), Toast.LENGTH_SHORT).show();\n if (light < Float.parseFloat(LightT))\n Toast.makeText(SensorService.this, \"DANGER!!! light sensor value is: \" + String.valueOf(light), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainInterface.this, ChronometerDemoActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}", "@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }", "@Override\r\n public final void onSensorChanged(SensorEvent event) {\n double a0 = (double) event.values[0];\r\n double a1 = (double) event.values[1];\r\n double a2 = (double) event.values[2];\r\n\r\n double a = sqrt(a0*a0+a1*a1+a2*a2);\r\n\r\n // Do something with this sensor value.\r\n\r\n TextView textView = (TextView) findViewById(R.id.text_box2);\r\n textView.setText(Double.toString(a));\r\n\r\n if(count<size_accels) {\r\n accelerations[count] = a;\r\n times[count] = event.timestamp;\r\n }\r\n count = count + 1;\r\n }", "@Override\n public void onClick(View v) {\n boolean checked = ((Switch)v).isChecked();\n if(checked){\n // when the switch is checked send the state 1 and value of progress to the server\n light_value=\"1\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }else {\n // when the switch is unchecked send the state 0 and value of progress to the server\n light_value=\"0\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }\n }", "public void onSensorChanged(SensorEvent event) {\n\t\tif(event.sensor.getType() == Sensor.TYPE_PROXIMITY){\n\t\tproxview.setText(\"\\n\\n\"+\"PROXIMITY\"+\"\\n\"+String.valueOf(event.values[0]));\n\t\t\n\t\t\n\t\t}\n\t\tif(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){\n\t\t\t\n\t\taccview.setText(\"ACCELEROMETER\"+\"\\n\"+\"X: \"+event.values[0]+\"\\nY: \"+event.values[1]+\"\\nZ: \"+event.values[2]);\n\t\t\n\t\tdouble p = event.values[0];\n\t\tif(p<0.0)\n\t\t{mp.pause();}\n\t\telse{\n\t\t\tif(mp.isPlaying())\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{mp.start();}\n\t\t}\n\t\t\n\t}\n\t\tif(event.sensor.getType() == Sensor.TYPE_LIGHT){\n\t\t\t\n\t\t\tliview.setText(\"LIGHT\"+\"\\n\"+String.valueOf(event.values[0]));\n\t\t\t\n\t\t}\n}", "public void receivedDataFromRobot(int[] data) {}", "public FUScaleSensors(Activity a, SensorEventListener parent){\n\t\t// Local Copy\n\t\tactivity = a;\n\t\tm_parent = parent;\n\t\t\n\t\t// Create Sensors\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tmSensorManager = (SensorManager)activity.getSystemService(android.content.Context.SENSOR_SERVICE);\t\n\t}", "public int cameraOn() {\r\n System.out.println(\"hw- ligarCamera\");\r\n return serialPort.enviaDados(\"!111O*\");//camera ON \r\n }", "@Override\n public void skinTemperature(int value, int timestamp) {\n }", "public void mo5965b(int i) {\n SharedPreferences.Editor edit = getSharedPreferences(\"setNightModeChangeVolumeValue\", 0).edit();\n edit.putInt(\"vol\", i);\n edit.apply();\n }", "@Override\r\n public void onClick(View v)\r\n {\n \r\n DJIDrone.getDjiMainController().setGohomeAltitude(50, new DJIExecuteBooleanResultCallback() {\r\n \r\n @Override\r\n public void onResult(boolean result)\r\n {\r\n // TODO Auto-generated method stub\r\n if (result) {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Successfully\"));\r\n } else {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Fail\"));\r\n }\r\n }\r\n });\r\n }", "public void set(float signal);", "private void initSensor() {\n if ((status == PedoListener.RUNNING) || (status == PedoListener.STARTING)\n && status != PedoListener.PAUSED) {\n return;\n }\n\n Database db = Database.getInstance(getActivity());\n\n todayOffset = db.getSteps(Util.getToday());\n\n SharedPreferences prefs = getActivity().getSharedPreferences(\"pedometer\", Context.MODE_PRIVATE);\n\n goal = prefs.getInt(PedoListener.GOAL_PREF_INT, PedoListener.DEFAULT_GOAL);\n since_boot = db.getCurrentSteps();\n int pauseDifference = since_boot - prefs.getInt(\"pauseCount\", since_boot);\n\n Log.i(TAG, \"PedoListener initSensor todayOffset=\"+todayOffset+\" since_boot=\"+since_boot+\" pauseDifference=\"+pauseDifference);\n\n // register a sensor listener to live update the UI if a step is taken\n sensorManager = (SensorManager) getActivity().getSystemService(Context.SENSOR_SERVICE);\n sensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);\n if (sensor == null) {\n new AlertDialog.Builder(getActivity()).setTitle(\"R.string.no_sensor\")\n .setMessage(\"R.string.no_sensor_explain\")\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(final DialogInterface dialogInterface) {\n getActivity().finish();\n }\n }).setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(final DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n }).create().show();\n } else {\n sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI, 0);\n }\n\n since_boot -= pauseDifference; \n\n total_start = db.getTotalWithoutToday();\n total_days = db.getDays();\n\n Log.i(TAG, \"PedoListener initSensor since_boot=\"+since_boot+ \" total_start=\"+total_start+\" total_days=\"+total_days);\n\t\n \tstatus = PedoListener.STARTING;\n\t\n\t db.setConfig(\"status_service\", \"start\");\n \n db.close();\n\n updateUI();\n }", "protected abstract void getPotentiometerValue(int value, int channelNo);", "@Override\n public void onProcessedValueChanged(DSensorEvent dSensorEvent) {\n if (Float.isNaN(dSensorEvent.values[0])) {\n textToSpeech.speak(\"Compass is not working ,\" +\n \"please calibrate ypur phone.\"\n ,TextToSpeech.QUEUE_FLUSH,null);\n\n } else {\n compass = Distance.round(Math.toDegrees(dSensorEvent.values[0]),1);\n if (compass < 0) {\n compass = Distance.round((compass + 360) % 360,1);\n }\n }\n //Toast.makeText(RoutesActivity.this, String.valueOf(dSensorEvent.values[0]), Toast.LENGTH_SHORT).show();\n }", "public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (Joy.getRawButtonPressed(1)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\tairCompressor.start();\n\t\t\t\tSystem.out.println(\"Compressor ON\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\tairCompressor.stop();\n\t\t\t\tSystem.out.println(\"Compressor OFF\");\n\t\t\t}\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tSystem.out.println(\"Solenoid Forward\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tSystem.out.println(\"Solenoid Reversed\");\n\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6381367", "0.6095178", "0.59962404", "0.5986006", "0.5902217", "0.5872821", "0.58349943", "0.5831673", "0.57894665", "0.575039", "0.57484233", "0.57440686", "0.574088", "0.5720453", "0.57151896", "0.5703477", "0.5677051", "0.5669415", "0.56456774", "0.55957234", "0.5595694", "0.5533298", "0.55317634", "0.55215067", "0.551257", "0.5510713", "0.5506222", "0.5501766", "0.5500832", "0.54944235", "0.54924524", "0.548778", "0.545121", "0.5415586", "0.54140824", "0.5404365", "0.5388709", "0.53853184", "0.538435", "0.5381418", "0.53807783", "0.53787404", "0.5378215", "0.5370184", "0.53619516", "0.53617555", "0.5354769", "0.5336881", "0.53359187", "0.5332708", "0.5326924", "0.53239346", "0.5322797", "0.53192234", "0.5315069", "0.53105533", "0.5302159", "0.52985454", "0.5296425", "0.52879995", "0.52871627", "0.52833986", "0.52829665", "0.5277151", "0.52620834", "0.5257228", "0.5256499", "0.5243128", "0.52413094", "0.523447", "0.52326816", "0.5232509", "0.52320594", "0.52308863", "0.5226202", "0.52254856", "0.5225148", "0.5225148", "0.5224923", "0.5224557", "0.5223369", "0.5220337", "0.52175665", "0.5216616", "0.5205736", "0.5183052", "0.517895", "0.5177732", "0.5174909", "0.5164104", "0.5161749", "0.51583695", "0.51567286", "0.5155112", "0.5151539", "0.5150805", "0.51482594", "0.51478213", "0.5143784", "0.51437545", "0.5139718" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { syso }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by user on 2017/10/6.
@SqlMapper public interface PortalAreaAdminirationMapper { List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition); Integer getCount(PortalAreaAdminirationListCondition condition); Integer save(PortalAreaAdminirationListCondition condition); Integer delete(PortalAreaAdminirationListCondition condition); Integer update(PortalAreaAdminirationListCondition condition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void getExras() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo12930a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo21877s() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo6081a() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public void mo9848a() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public int getOrder() {\n return 0;\n }", "private void getStatus() {\n\t\t\n\t}", "public void mo1531a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void m23075a() {\n }", "@Override\n public int getOrder() {\n return 4;\n }", "public final void mo91715d() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void mo12628c() {\n }", "public void mo21878t() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n public void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override public int describeContents() { return 0; }", "public static void listing5_14() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void method_4270() {}", "@Override\r\n\tpublic void init() {}", "Consumable() {\n\t}" ]
[ "0.61038446", "0.58966583", "0.5856801", "0.58364606", "0.57179147", "0.5715606", "0.5712023", "0.5712023", "0.56824446", "0.5677871", "0.5633738", "0.5595255", "0.5572124", "0.55598366", "0.5532318", "0.5531677", "0.551713", "0.5507629", "0.55031586", "0.54993576", "0.5498793", "0.5485117", "0.5485117", "0.5485117", "0.5485117", "0.5485117", "0.5485117", "0.5485117", "0.547414", "0.54717195", "0.54489744", "0.54452586", "0.54361105", "0.54285467", "0.5420452", "0.541887", "0.54118794", "0.5397221", "0.5391332", "0.5387122", "0.5386163", "0.53828895", "0.53780955", "0.53652793", "0.5362988", "0.536134", "0.5360794", "0.53593725", "0.5359008", "0.5359008", "0.5359008", "0.5359008", "0.5359008", "0.5359008", "0.53566206", "0.5356492", "0.5356492", "0.5349803", "0.5344304", "0.5336101", "0.5332545", "0.53152543", "0.5301144", "0.5301144", "0.5301144", "0.5301144", "0.5301144", "0.52964115", "0.52932614", "0.5292804", "0.52875334", "0.5281501", "0.5279121", "0.5274525", "0.5272961", "0.5267735", "0.5266969", "0.5263236", "0.52614856", "0.5250284", "0.524844", "0.5247776", "0.5245386", "0.5245386", "0.52433634", "0.5242199", "0.5239008", "0.5236531", "0.5236531", "0.522752", "0.522752", "0.522752", "0.5226943", "0.5224789", "0.52242565", "0.5222613", "0.5222613", "0.5222613", "0.522226", "0.5221547", "0.5211951" ]
0.0
-1
TODO Autogenerated method stub
@Override public int add(OrderDetailBean detail) { return dao.add(detail); }
{ "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 int update(OrderDetailBean detail) { return 0; }
{ "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 int delete(String orderId) { return 0; }
{ "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 List<OrderDetailBean> query(OrderDetailBean detail) { return dao.query(detail); }
{ "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
restart array cell state
private void restartArray() { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { Start.shemaArray[i][j].baseModel.state = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }", "public void restart() {\n\t\td1 = 6;\n\t\td2 = 6;\n\t\tthis.rolled = false;\n\t}", "public void restart() {\n\t\telements[currentElement - 1].turnOff();\n\t\tstart();\n\t}", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "private void restart(){\n model.init();\n view.refreshPieces();\n start();\n }", "public void restartPuzzle(){\t\t\n\t\tfor(int i = 0 ; i < puzzle.length; i++){\n\t\t\tfor(int j = 0; j < puzzle[i].length ; j++){\n\t\t\t\tif(!preset[i][j]){\n\t\t\t\t\tpuzzle[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void reset() {\n this.setIndex(0);\n }", "public abstract void reset(int index);", "public void reset() {\n index = 0;\n }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }", "private void resetTurn(){\r\n lastRow = 0;\r\n lastCol = 0;\r\n selected = false;\r\n nextMove = new int[8][8];\r\n moveList = new Stack<>();\r\n repaint();\r\n System.out.println(toString());\r\n }", "public void ResetState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n pictures[i][j] = temp_pictures[i][j];\n pictures2[i][j] = pictures[i][j];\n\n\n }\n }\n }", "public void reset() {\n this.index = this.startIndex;\n }", "void reinit() {\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n plots[i][j].setObjectives(i, j);\r\n }\r\n }\r\n fireTableDataChanged();\r\n }", "public void punishment(){\n\t\tthis.cell = 0;\n\t}", "public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}", "public void restart() {\n\n\t\t//Reset the list of Mho locations\n\t\tmhoLocations.clear();\n\n\t\t//Generate a unique map of game elements again\n\t\tgenerateMap();\n\n\t\t//reset gameOver and win variables\n\t\tgameOver = false;\n\t\twin = false;\n\n\t\t//repaint the board\n\t\tboard.repaint();\n\t}", "@SuppressWarnings({\"unused\", \"RedundantSuppression\"})\n public void resetArray() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n mBaseCacheAdapter.resetArray();\n mBaseRecyclerViewAdapter.notifyDataSetChanged();\n }\n\n @NonNull\n @Override\n public String toString() {\n return \"BaseCacheAdapterWrapper.resetArray()\";\n }\n });\n }", "public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}", "public void resetState();", "public void restart()\n\t{\n\t\tinit();\n\t}", "void restart() {\n\t\t\tthis.t = 0;\n\t\t\tthis.w = 0;\n\t\t\tthis.balls.clear();\n\t\t\tthis.visited.clear();\n\t\t\tthis.bitRep = 0;\n\t\t\tthis.numConsecutiveRepeats = 0;\n\n\n\t\t\tRandom random = new Random();\n\t\t\t\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (random.nextBoolean()) {\n\t\t\t\t\tthis.addBall(bag.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.visited.add(this.bitRep);\n\t\t}", "public void restart() {\n eaten = 0;\n }", "public void reset(){\n\t\tthis.currentIndex = 0;\n\t}", "@Override\n public void restart() {\n }", "public final synchronized void restart() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t}", "public void restart() {\r\n\t\tthis.cancel = false;\r\n\t}", "public void Reset() \r\n {\r\n _index = -1;\r\n }", "public void resetGrid() {\n grid = new byte[grid.length];\n }", "private void updateStateOnce() {\n for(int i = 0; i < maskArray.length; i++) {\n for (int j = 0; j < maskArray[i].length; j++) {\n\n if (maskArray[i][j] == 1){\n stateArray[i][j] = stateGenerator.generateElementState();\n }\n\n }\n }\n }", "public void restart();", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "private void clear() {\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = 0;\n\n generations = 0;\n }", "private void reinitRowValues() {\n for (int i=0; i<rowValues.length; i++) {\n rowValues[i] = null;\n }\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public void reset() {\n hasWinner = false;\n firstTurn = true;\n for (int row = 0; row < mRowsCount; row++) {\n for (int col = 0; col < mColsCount; col++) {\n mCells[row][col] = new Cell();\n }\n }\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "@Override\n\tpublic void restart() {\n\t\t\n\t}", "public static void restartbossair(){\n\t\t\t\tbossair.periodair=periodairinit;\n\t\t\t\tbossair.lastcreatedair=0; \n\t\t\t\tbossair.xmoving=xmovinginit; \n\t}", "void indexReset();", "public int[] reset() \n {\n return reset;\n }", "public void reset() {\n\t\trabbitcount[1]=8;\n\t\trabbitcount[2]=8;\n\t\tpieces.clear();\n\t\tselectedsquares.clear();\n\t\trepaint();\n\t}", "private void rehash() {\n\t HashEntry[] oldArray = array;\n\n\t // Create a new double-sized, empty table\n\t allocateArray(2 * oldArray.length);\n\t occupied = 0;\n\t theSize = 0;\n\n\t // Copy table over\n\t for (HashEntry entry : oldArray) {\n\t if (entry != null && entry.isActive)\n\t add(entry.element);\n\t }\n\t }", "public int[] reset() {\r\n return reset;\r\n }", "public void renumberCells() {\r\n int num = 1;\r\n for (Cell cell : cells) {\r\n cell.updateCellNum(num);\r\n num++;\r\n }\r\n }", "public void reset() {\n firstUpdate = true;\n }", "public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}", "protected void restart()\r\n \t{\r\n \t\tspielen();\r\n \t}", "public void restart()\n {\n \tfoundWords.clear();\n \tfoundWordsArea.setText( \"\" );\n \tfoundWordsAmount = 0;\n \t\n \tscore = 0;\n \tscoreLabel.setText( \"Score: 0\" );\n \t\n \tmessagesLabel.setText( \"Enter word: \" );\n \t\n \tremoveWord();\n \t\n \tString message = String.format( \"Do you want a new board?\" );\n \tint n = JOptionPane.showConfirmDialog(\n \t\t frame,\n \t\t message,\n \t\t \"New board?\",\n \t\t JOptionPane.YES_NO_OPTION );\n \tif( n == JOptionPane.YES_OPTION )\n \t{\n \t\tg = new Grid( BOARD_SIZE );\n \t\t\n \t\tfor( int i = 0; i < BOARD_SIZE; i++ )\n \t\t{\n \t\t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n \t\t\t{\n \t\t\t\tgridButtons[i][j].setText( Character.toString( g.charAt( i, j ) ) );\n \t\t\t}\n \t\t}\n \t}\n \t\n \tt.reset();\n }", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "private void reinit() {\n \tthis.showRowCount = false;\n this.tableCount = 0;\n this.nullString = \"\";\n\t}", "public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}", "public void resetBoard(){\n totalmoves = 0;\n this.board = new Cell[3][3];\n //fill the board with \"-\"\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board[i][j]=new Cell(new Coordinates(i,j), \"-\");\n }\n }\n }", "public final void Reset()\n\t{\n\t\t_curindex = -1;\n\t}", "private void reset() {\n }", "private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "public void resetGrid() {\n // reset all cells to dead\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n game.grid[i][j] = false;\n }\n } \n // repaint so that the cells show up regardless of if the program has started or not\n repaint();\n }", "public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}", "public int[] reset() {\n return store;\n }", "private int[] reset() {\n return data;\n }", "protected void recycleArray(Bitmap[][] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tint length2 = array[i].length;\n\t\t\t\tfor(int j = 0; j < length2; j++)\n\t\t\t\t{\n\t\t\t\t\tif(array[i][j] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray[i][j].recycle();\n\t\t\t\t\t\tarray[i][j] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void reset()\n {\n reset(values);\n }", "@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public void undo() {\n\t\tstate = null;\n\t\tfor (Row r : containingRows)\n\t\t\tr.undo(this);\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "public void resetToInitialBelief() {\n\t\t\t//TODO when do we call this?\n\t\t\tthis.data = new ArrayList<Double>();\n\t\t\tfor(int i = 0; i < _initialBelief.data.size(); i++) {\n\t\t\t\tthis.data.add(_initialBelief.data.get(i));\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++)\r\n\t\t\t\tgame[i][j].Clear();\r\n\t\t}\r\n\t\tcomputerTurn();\r\n\t\tcomputerTurn();\r\n\t\tfreeCells = rows_size*columns_size - 2;\r\n\t\ttakenCells = 2;\r\n\t}", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "public abstract Op resetStates();", "public void resetIteration(){\n\t\titeration = 0;\n\t}", "public void restart() {\n\t\tthis.restartEvent.emit();\n\t}", "public void reset () {}", "private void resetBoard() {\r\n\t\tboard.removeAll();\r\n\t\tboard.revalidate();\r\n\t\tboard.repaint();\r\n\t\tboard.setBackground(Color.WHITE);\r\n\r\n\t\t// Reset filled\r\n\t\tfilled = new boolean[length][length];\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tfor (int y = 0; y < length; y++) {\r\n\t\t\t\tfilled[x][y] = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tupdateBoard();\r\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "public void resetBoardOnRestartClick()//when restart game\n {\n JOptionPane.showMessageDialog(view.getParent(),\"PLAYER \"+playerSymbol+\" HAS REQUESTED GAME RESET\");\n currentPlayer=1;\n playerSymbol=\"O\";\n JButton[][] board=view.getGameBoard();\n for(int i=0;i<dim;i++)\n {\n for(int j=0;j<dim;j++)\n {\n board[i][j].setText(\"\");\n }\n }\n }", "@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}", "private void reinit() {\n init();\n }", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "public void restartDataset() {\n data = new Instances(initialData);\r\n loadInstancesData(data);\r\n RequestContext.getCurrentInstance().update(\"IdFormDialogsSelection:IdPanelSelection\");\r\n }", "public void resetBoard() {\n piece = 1;\n b = new Board(9);\n board = b.getBoard();\n\n board2d = new int[3][3];\n makeBoard2d();\n\n }", "public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }", "@Override\n T restart();", "protected void reset(){\n inited = false;\n }", "public void resetState() {\n \ts = State.STRAIGHT;\n }", "protected void recycleArray(Bitmap[] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tarray[i].recycle();\n\t\t\t\tarray[i] = null;\n\t\t\t}\n\t\t}\n\t}", "protected void resetState()\n {\n // Nothing to do by default.\n }", "public void undoAll() {\n firePropertyChange(\"array\", null, EMPTY_STRING);\n myDrawingArray.clear();\n myUndoStack.clear();\n myCurrentShape = new Drawing(new Line2D.Double(), Color.WHITE, 0);\n repaint();\n }", "public void restart() {\r\n\t\tstart();\r\n\t}", "@Override\n\tpublic void reset() {\n\t\tfor (int i = 0; i < _board.length; i++)\n for (int j = 0; j < _board[i].length; j++)\n \t_board[i][j] = null;\n\n\t\t_columnFull = new HashSet<Integer>();\n\t\t_lastPosition = new HashMap<Integer,Integer>();\n\t}", "public void resetBoard() {\n for (int y = 0; y < length; y++) {\n for (int x = 0; x < width; x++) {\n grid[x][y].setBackground(null);\n grid[x][y].setEnabled(true);\n }\n }\n }" ]
[ "0.6963658", "0.6649018", "0.65408945", "0.65241766", "0.63348556", "0.6310886", "0.6222221", "0.6222047", "0.6188661", "0.6183465", "0.6174655", "0.61593264", "0.61472136", "0.6145644", "0.6125121", "0.61144215", "0.6099148", "0.6063148", "0.60530776", "0.604009", "0.6039871", "0.6038505", "0.6027353", "0.6020795", "0.60171986", "0.60124165", "0.5993909", "0.5958428", "0.59462875", "0.5933656", "0.59309024", "0.59296834", "0.5924063", "0.59188294", "0.59075934", "0.59050494", "0.5886322", "0.5881361", "0.58678895", "0.5867533", "0.58586484", "0.58581376", "0.5856857", "0.5843658", "0.58362514", "0.5830975", "0.58274734", "0.5821001", "0.58138704", "0.58085334", "0.57923406", "0.57883626", "0.57711506", "0.57682955", "0.57668525", "0.57657796", "0.5764843", "0.57449216", "0.5741512", "0.57349867", "0.57338154", "0.5731408", "0.5729157", "0.5728277", "0.57220113", "0.57146144", "0.5711367", "0.570628", "0.5695892", "0.56928664", "0.5691952", "0.56912726", "0.56893015", "0.5680129", "0.5679524", "0.5666427", "0.56661004", "0.5665817", "0.5664126", "0.5657825", "0.5651283", "0.5651283", "0.5651283", "0.5651283", "0.5647662", "0.5643769", "0.5641203", "0.56256187", "0.5623072", "0.5622304", "0.5621685", "0.5619791", "0.5616938", "0.5607642", "0.5606286", "0.56056213", "0.56045043", "0.5600306", "0.5600225", "0.5597292" ]
0.78848124
0
/ chek if we found "baba qga hause"
private boolean checkWinner(int secondI, int secondJ) { if (Start.shemaArray[secondI][secondJ].baseModel.baba == 1) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean Ncontains(String word, char a) \n {\n \t// return true of false if the String match char a\n for(int x = 0; x < word.length(); x++)\n {\n if(word.charAt(x) == a)\n return false;\n }\n return true;\n }", "public static void main(String[] args)\n {\n Pattern pattern = Pattern.compile(\"aba\");\n Matcher m = pattern.matcher(\"abababa\");\n //boolean find()//return true if found the pattern and go to the next sub sequence\n while(m.find()){\n System.out.print(m.start());//0 and 4 but not 2!\n System.out.print(m.end());//3 and 7 (return the position of the last char matched + 1)\n System.out.print(m.group());// = s.substring(m.start(), m.end());\n System.out.print(\"\\n\");\n }\n //what's append?\n //first occurence starts at 0, ends at 2 and aba\n //search for the second occurence from 3\n //second occurence starts at 4, ends at 6 and aba\n //search for the thrid occurence from 7\n \n System.out.print(\"========\\n\");\n \n //0-length matches\n Pattern pattern2 = Pattern.compile(\"a?\");\n Matcher m2 = pattern2.matcher(\"aba\");\n while(m2.find()){\n System.out.print(m2.start());//the char a is or not is at position 0,1,2 and 3\n System.out.print(m2.end());//1,1,3,3 ==> ?? @see page 500\n System.out.print(\"\\n\");\n }\n \n /** Expressions **/\n // \\d digit\n // \\s whitespace\n // \\w letters, digits or _\n // [abc] searching for a, b or c\n // [a-f] searching for a letter to f lettre included\n // [A-F] searching for A letter to F lettre included\n // [a-fA-F] search for a letter to f or A letter to F lettre included\n // 0 [x-X] search for 0 followed by x or X\n /** quantifiers **/\n //? Zero or one\n //* Zero or more\n //+ One or more\n// 0[x-X]+ => 0 followed by one x or one X\n// (0[x-X])+ => 0 followed by x or X one time\n \n //. = any char (whitespace is a char)\n //Escaping special char !!! . = any char, \\. = compilator error, \\\\. = .\n }", "public boolean search(String word) {\n // 1. 遍历 每个 字母 去掉 从list 里去出来结果 比较list 每个结果\n for (int i = 0; i < word.length(); i++) {\n String key = word.substring(0, i) + word.substring(i+1);\n List<int[]> indexAndCharList = dictonary.getOrDefault(key, new ArrayList<>());\n for (int[] indexAndChar : indexAndCharList) {\n if (indexAndChar[0] == i && indexAndChar[1] != (word.charAt(i) - 'a')) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean search(String word) {\n\t\tchar[] cArray = word.toCharArray();\n\t\tfor (int i = 0; i < cArray.length; i++) {\n\t\t\tfor (char c = 'a'; c <= 'z'; c++) {\n\t\t\t\tif (c == cArray[i])\n\t\t\t\t\tcontinue;\n\t\t\t\tchar temp = cArray[i];\n\t\t\t\tcArray[i] = c;\n\t\t\t\tif (checkTrieTree(new String(cArray)))\n\t\t\t\t\treturn true;\n\t\t\t\tcArray[i] = temp;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isSubSequence(String s, String word){\n int startPointer = 0;\n for(int i=0; i<word.length(); i++){\n int location = s.indexOf(word.charAt(i), startPointer);\n if(location < 0)\n return false;\n startPointer = location+1;\n }\n return true;\n }", "public boolean isAccepted2(String word) {\r\n\t return word.endsWith(\"baa\");\r\n \r\n }", "@Test \r\n public void shouldFindOneWordAtTheEnd() {\r\n \r\n String inputWord = \"bxxxxxxxe\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"be\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n \r\n assertEquals(\"be\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public boolean search(String word) {\n char [] words=word.toCharArray();\n CharTree t=root;\n for (char c : words) {\n t=t.next[c-97];\n if(t==null)return false;\n }\n if (!t.isend)return false;\n return true;\n }", "public boolean search(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n return false;\n }\n cur = cur.map[ind];\n }\n return cur.end;\n }", "public static boolean abrevChecker(String abrv, String word) {\r\n \r\n //our 3rd word make by decrypting the given word\r\n String newWord = \"\";\r\n\r\n //splitting our two inputs into arrayLists and redefining them\r\n char[] firstWord = abrv.toCharArray();\r\n char[] secondWord = word.toCharArray();\r\n\r\n /*a for loop to check if each letter in word is inside the abbrevbation\r\n and creating a new word made of the commmon letters*/\r\n for (char letter : secondWord) {\r\n if (abrv.indexOf(letter) != -1) {\r\n newWord += letter;\r\n }\r\n }\r\n \r\n //check if the abrevation contains any forgein letters that word doesnt have\r\n for (char letter : firstWord) {\r\n if (word.indexOf(letter) == -1) {\r\n return false;\r\n\r\n /*if the abbrevation contains only letters found in word checks if\r\n the abbrevation is inside the new word*/\r\n } else if (word.indexOf(letter) != -1) {\r\n if (newWord.contains(abrv)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n }\r\n\t\treturn false;\r\n }", "private boolean checkInCashe(String s) {\n return true;\n }", "public boolean whereTheFuckIsBob(String str){\n\n\t\tString chekkkkkBob = new String(str);\n\n\t\tfor(int i = 0; i < chekkkkkBob.length(); i++){\n\n\t\t\tchar forBob = chekkkkkBob.charAt(i);\n\n\t\t\tif(forBob == 'b'){\n\t\t\t\tif(chekkkkkBob.charAt(i+2) == 'b'){\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean search(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null) return false;\n point = point.getChild(ch - 'a');\n }\n return point.getIsWord();\n }", "public boolean search(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n return false;\n }\n ptr = ptr.child[c - 'a'];\n }\n return ptr.is_end;\n }", "public static String alexBrokenContest(String s){\n\t\tString[] names={\"Danil\", \"Olya\", \"Slava\", \"Ann\",\"Nikita\"};\n\t\tint count=0;\n\t\tfor (int i=0;i<5 ;i++)\n\t\t{\n\t\t\t\n\t\t\tint index = s.indexOf(name[i]);\n\t\t\twhile (index!=-1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\tindex=s.indexOf(name[i],index+1);\n\t\t\t}\n\t\t}\n\t\tif(count==1)\n\t\t{\n\t\t\n\t\tSystem.out.println(\"YES\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "public boolean search(String word) {\n if (word == null || word.length() == 0)\n return false;\n char [] letters = word.toCharArray();\n TrieNode node = root;\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null)\n return false;\n node = node.son[pos];\n }\n\n return node.isEnd;\n }", "public static void main(String[] a){\n System.out.println(\"abc\".contains(\"a\"));//Verdadero\n\tSystem.out.println(\"abc\".contains(\"B\")); //Falso\n }", "static String abbreviation(String a, String b) {\r\n \r\n HashSet<Character> aSet = new HashSet<>();\r\n\r\n for(int i = 0 ; i< a.length() ; i++){\r\n aSet.add(a.charAt(i));\r\n }\r\n \r\n for(int i = 0 ; i < b.length() ; i++){\r\n \r\n if(aSet.contains(b.charAt(i)) ){\r\n aSet.remove(b.charAt(i));\r\n }\r\n else if(aSet.contains(Character.toLowerCase(b.charAt(i)))){\r\n aSet.remove(Character.toLowerCase(b.charAt(i)));\r\n }\r\n else{\r\n return \"NO\";\r\n }\r\n \r\n\r\n }\r\n\r\n Iterator<Character> it = aSet.iterator();\r\n while(it.hasNext()){\r\n\r\n if(!isLowerCase(it.next())){\r\n return \"NO\";\r\n }\r\n }\r\n return \"YES\";\r\n \r\n /*\r\n String regex = \"\";\r\n for(int i = 0 ; i < b.length() ; i++){\r\n regex += \"[a-z]*\" + \"[\" + b.charAt(i) + \"|\" + Character.toLowerCase(b.charAt(i)) + \"]\";\r\n }\r\n regex += \"[a-z]*\";\r\n Pattern ptrn = Pattern.compile(regex);\r\n Matcher matcher = ptrn.matcher(a);\r\n\r\n return matcher.matches() ? \"YES\" : \"NO\";\r\n*/\r\n \r\n /*\r\n int aPtr = 0;\r\n\r\n //b e F g H\r\n // E F H\r\n for(int i = 0 ; i < b.length() ; i++){\r\n\r\n if(aPtr + 1 >= a.length())\r\n return \"NO\";\r\n //if(aPtr + 1 == a.length() && i + 1 == b.length())\r\n // return \"YES\";\r\n\r\n System.out.println(b.charAt(i) + \" \" + a.charAt(aPtr));\r\n if(b.charAt(i) == a.charAt(aPtr)){\r\n aPtr++;\r\n }else if(b.charAt(i) == Character.toUpperCase(a.charAt(aPtr)) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n\r\n } else if(b.charAt(i) != a.charAt(aPtr) && !isLowerCase(a.charAt(aPtr))){\r\n return \"NO\";\r\n }else if(b.charAt(i) != a.charAt(aPtr) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n i--;\r\n }\r\n\r\n\r\n\r\n }\r\n for(int i = aPtr ; i < a.length() ; i++){\r\n if(!isLowerCase(a.charAt(i)))\r\n return \"NO\";\r\n }\r\n\r\n return \"YES\";\r\n */\r\n\r\n }", "static String isSandivic(String str) {\n\t\t\n\t\tint first=str.indexOf(\"bread\");\n\t\tint second=str.lastIndexOf(\"bread\");\n\t\tif(first==second) return \"nothing\";\n\t\telse \n\t\treturn str.substring(first+5,second);\n\t\t\n\t}", "private boolean containedIn(String a, String b){\n if(a.length() > b.length())return false;\n int aInd = 0;\n int bInd = 0;\n\n while(bInd < b.length()){\n if(aInd >= a.length())return true;\n char bChar = b.charAt(bInd);\n char aChar = a.charAt(aInd);\n if(bChar == aChar){\n aInd++;\n }\n bInd++;\n }\n return false;\n }", "public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String pattern = \"e\";\n// String s = \"eukera\";\n\n boolean flag = wordPattern(pattern, s);\n\n System.out.println(flag);\n }", "public static void main(String[] args) {\nString word = \"aabbaaaccbbaacc\";\n String result = \"\";\n\n for (int i = 0; i <=word.length()-1 ; i++) {\n\n if(!result.contains(\"\"+word.charAt(i))){ //if the character is not contained in the result yet\n result+=word.charAt(i); //then add the character to the result\n }\n\n }\n System.out.println(result);\n\n\n\n }", "public boolean search(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n return false;\n current = current.childrens[index];\n }\n return current.eow;\n }", "public static boolean containsThe(String str) {\n int x = str.indexOf(\"The\");\n int y = str.indexOf(\"the\");\n if (x != -1 || y != -1){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean search(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n return false;\n }\n cur = cur.tries[c];\n i++;\n }\n return cur.hasWord;\n }", "public boolean search(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n return false;\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n return currentNode.isFinished;\n }", "public boolean search(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n // does not match\n return false;\n }\n else {\n cur = cur.children.get(ch);\n }\n }\n return cur.isEnd;\n }", "boolean harry(String str) {\n return str.matches(\".+\\\\bHarry\\\\b\");\n }", "private boolean myContains(String str2, String search2) {\n if (search2.length() == 0) {\n return true;\n }\n int k = 0;\n int f = 0;\n String str = str2.toLowerCase();\n String search = search2.toLowerCase();\n for (int i = 0; i < str.length(); i++) {\n if (str.charAt(i) == search.charAt(k)) {\n k += 1;\n f += 1;\n if (f == search.length()) {\n return true;\n }\n } else {\n k = 0;\n f = 0;\n }\n }\n return false;\n }", "public boolean search(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\treturn false;\n\t \tp = p.children[c-'a'];\n\t }\n\t return p.mark;\n\t }", "@Test\n public void shouldFindSubstringAtTheEndOfTheStringAfterOneCharacterPartialMatch() {\n // Given\n String string = \"AABc\";\n CharSequence charSequence = new StringBuilder(\"ABc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertTrue(containsCharSequence);\n }", "public boolean startHi(String str) {\n if (str.length() < 2) return false;\n \n String front;\n if (str.length() == 2) {\n front = str;\n } else {\n front = str.substring(0, 2);\n }\n \n return (front.equals(\"hi\"));\n \n}", "public static void main(String[] args) {\n\n\t\tString a=\"Hadi gidelim bu diyardan\";\n\t\tSystem.out.println(a.startsWith(\"H\"));//true\n\t\tSystem.out.println(a.startsWith(\"\"));//true==> hic biseyi de kabul etti\n\t\tSystem.out.println(a.startsWith(\"Hadi\"));//true\n\t\n\t\tSystem.out.println(a.startsWith(\"g\", 5));//true==> index 5 \"g\" ile mi basliyor demektir\n\t\tSystem.out.println(a.startsWith(\"i\", 7));//false==> index7 de \"i\" mi var diye bakar\n\t\tSystem.out.println(a.startsWith(\"\", 6));//true==>index6 da normalde \"i\" var ancak hicbirsey arandiginda hicbirseylere bakar\n\t\n\t\t\n\t\t//12.indexOf()==>of=in,in anlami var.indexin gibi\n\t\t//indexOf da hem String hem de char kullanilir\n\t\tSystem.out.println(a.indexOf(\"i\"));//3==>soldan saga giderken ilk gorunumun indexini verir\n\t\tSystem.out.println(a.indexOf('d'));//2\n\t\t//deli yi bulur ve ilk harfinin indexini verir.birden cok karakter varsa ilkinin indexini verir\n\t\tSystem.out.println(a.indexOf(\"deli\"));//7\n\t\t//olmayan bir character icin indexOf kullanirsaniz java -1 return eder\n\t\tSystem.out.println(a.indexOf(\"x\"));//-1\n\t\tSystem.out.println(a.indexOf(\"diyer\"));//-1 coklu characterde hepsi ayni olmasa yine d yi gormeyip -1 doner\n\t\t\n\t\tSystem.out.println(a.indexOf(\"d\", 4));//7==> 4.indexten sonraki d nin indexini buluyor\n\t\tSystem.out.println(a.indexOf(\"a\", 9));//19==> 9. indexten sonraki a nin indexini verir\n\t\tSystem.out.println(a.indexOf('e', 8));//8\n\t\t\n\t\t//13. lastIndexOf()==>son gorunumun indexini verir\n\t\t\n\t\tString b=\"Java Ah java!\";\n\t\tSystem.out.println(b.lastIndexOf(\"v\"));//10 ==>son v nin indexi demektir\n\t\tSystem.out.println(b.lastIndexOf(\"av\"));//9 ==> son av i bulup a nin indexini basar\n\t\t\n\t\t//14. subString()==> bir Stringin belli bir bolumunu kesip almaya yarar(ONEMLI COK KULLANILIR)\n\t\t\n\t\tString c=\"Karakartal\";\n\t\t//asdece kartal kelimesini ekrana yazdirmak icin soyle yapilir. begin= baslangic\n\t\tSystem.out.println(c.substring(4));//kartal==> kesmeye baslanilan yerden sonrasini ekrana basar\n\t\t//ekrana arakartal yazalim\n\t\tSystem.out.println(c.substring(1));//arakartal\n\t\t//ekrana kar yazdiralim\n\t\t//subString methodun da iki sayi kullanirsaniz ilk sayi dahil ikinci sayi haric olur asagida ki gibi\n\t\tSystem.out.println(c.substring(4, 7));//kar\n\t\t//subString le ilk harfi almak icin subString(0,1) yazariz bunu cok kullaniriz\n\t\tSystem.out.println(c.substring(0, 1));//K\n\t\t// baslangic ve bitis index lerini ayni yaparsak hicbirsey aliriz.\n\t\tSystem.out.println(c.substring(2, 2));//\"\" hicbirsey goruruz\n\t\t//subString te baslangic indexi bitis indexinden buyk olamaz.\n\t\t//buyuk yazarsak Run Time Error aliriz\n\t\t//System.out.println(c.substring(5, 3));\n\t\t\n\t\t\n\t\t//trim() methodu==>trim==tras anlamina gelir.bir Stringin bas ve son tarafindaki spaceleri siler\n\t\t//dikkat edin aradakileri degil bas ve sondakileri siler\n\t\tString d=\" Java iyidir \";\n\t\tSystem.out.println(d.length());//16\n\t\t\n\t\tSystem.out.println(d.trim().length());//11\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main (String[] args)\n {\n String test = \"software\";\n \n CharSequence seq = \"soft\";\n boolean bool = test.contains(seq);\n System.out.println(\"Found soft?: \" + bool);\n \n // it returns true substring if found.\n boolean seqFound = test.contains(\"war\");\n System.out.println(\"Found war? \" + seqFound);\n \n // it returns true substring if found otherwise\n // return false.\n boolean sqFound = test.contains(\"wr\");\n System.out.println(\"Found wr?: \" + sqFound);\n }", "public boolean search(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n return false;\n\n node = node.children[c - 'a'];\n }\n\n return node.word.equals(word);\n }", "public static void main(String[] args) {\n\n\t\tString s=\"xxxxxabcxxxx\";\n\t\tint m=s.length()/2;\n\t\t\n\t\tif(s.substring(m-1, m+2).equals(\"abc\")) {\n\t\t\t\n\t\tSystem.out.println(\"middle\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"no inmid\");\n\t\t\n\n}\n}", "public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}", "public boolean search(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] != null) {\n root = root.next[c - 'a'];\n } else {\n return false;\n }\n }\n if (root.word == null) {\n return false;\n }\n\n return true;\n }", "public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }", "public boolean search(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return tn.flag;\n }", "public boolean gHappy(String str) {\n for(int x=0; x<str.length(); x++)\n {\n if(str.charAt(x)=='g')\n {\n if(str.length()<2)\n return false;\n else if(x==0 && str.charAt(x+1) != 'g')\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && x+1==str.length())\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && str.charAt(x+1) != 'g')\n return false;\n }\n }\n\n return true;\n}", "public boolean search(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n return false;\n }\n curr = curr.children[idx];\n }\n return curr.isWord;\n }", "public boolean search(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn temp != null && temp.isLeafNode;\n\t}", "public boolean search(String word) {\n char[] chars = word.toCharArray();\n Node node = root;\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) return false;\n node = next;\n }\n return word.equals(node.val);\n }", "public boolean search(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n return false;\n }\n p = p.children[childIndex];\n }\n return p.isWord;\n }", "public static void main(String[] args) {\n\t\tString s = \"aab\";//\"aab\";//\"aaaaaa\";//\"mississpp\";//\"aaabbbccc\";\r\n\t\tString p = \"c*a*b\";//\"c*a*b\";//\"a*\";//\"mis*is*p*.\";//\"a*bb.cc*\"\r\n\r\n\t\tSystem.out.println(\"Match ? \" + isMatchLC(s, p));\r\n\r\n\t}", "public static void main(String[] args){\n String str = \"aasdfasdfasdfasdfas\";\n String pattern = \"aasdf.*asdf.*asdf.*asdf.*s\";\n// String str = \"mississippi\";\n// String pattern = \"mis*is*ip*.\";\n// String pattern = \"mis*is*p*.\";\n// String pattern = \"mis*is*ip*.\";\n// String str = \"aaaaaaaaaaaaac\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*c\";\n long time = System.currentTimeMillis();\n// String str = \"aaaaaaaaaaaaab\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*b\";\n System.out.println(find(str,pattern));\n System.out.println(\"time: \" + (System.currentTimeMillis() - time));\n }", "private boolean checkWord(String str)\n\t{\n\t\tfor (int i = 0; i < words.length(); i++)\n\t\t{\n\t\t\tif (equals(words.get(i), str))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "public boolean search(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node = curr.hmap.get(c);\n if(node==null){\n return false;\n }\n else{\n curr=node;\n }\n }\n \n return curr.endOfWord;\n }", "public boolean search(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)) {\n return false;\n }\n node = node.get(curr);\n }\n return node.isEnd();\n\n }", "private boolean match(String word, int i, TrieNode root) {\n if (i == word.length()) {\n return root.isWord;\n }\n\n char c = word.charAt(i);\n if (c != '.') {\n return root.children[c - 'a'] != null && match(word, i + 1, root.children[c - 'a']);\n } else {\n for (int j = 0; j < 26; j++) {\n if (root.children[j] != null) {\n if (match(word, i + 1, root.children[j])) {\n return true;\n }\n } \n }\n }\n return false;\n }", "static boolean findDuplicate (String word)\n {\n Stack<Character> st = new Stack<>();\n for (int i = 0; i < word.length(); i++) {\n\n char currentChar = word.charAt(i);\n\n if (currentChar == ')') {\n\n if (st.peek() == '(') {\n return true;\n }\n else {\n while (st.peek() != '(') {\n st.pop();\n }\n st.pop();\n }\n }\n else {\n st.push(currentChar);\n }\n }\n return false;\n }", "public boolean search(String word) {\n // Write your code here\n Queue<TrieNode> nexts=new LinkedList<>();\n nexts.add(root);\n int index=0;\n while(!nexts.isEmpty()){\n int size=nexts.size();\n char c=word.charAt(index);\n boolean flag=false;\n for(int i=0;i<size;++i){\n TrieNode cur=nexts.poll();\n if(c=='.'){\n for(TrieNode tempNode:cur.children.values()){\n nexts.add(tempNode);\n flag|=tempNode.hasWord;\n }\n } else if(cur.children.containsKey(c)){\n TrieNode nextNode=cur.children.get(c);\n flag|=nextNode.hasWord;\n nexts.add(nextNode);\n }\n }\n index++;\n if(index>=word.length()) return flag;\n }\n return false;\n }", "public boolean search(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null) return false;\n current = current.children[c];\n }\n return current.isWord;\n }", "private static boolean binarySearch(String exWord) {\n\t\tint bot = 0;\n\t\tint top = DaleChallWords.getDaleChall().length;\t\n\t\tint mid;\n\t\twhile(bot <= top) {\n\t\t\tmid = (top + bot)/2;\n\t\t\tif(Concurrency.levenshtein(DaleChallWords.getDaleChall()[mid], exWord) > 2) {\n\t\t\t\tif(exWord.compareToIgnoreCase(DaleChallWords.getDaleChall()[mid]) < 0) {\n\t\t\t\t\t\ttop = mid -1;\n\t\t\t\t}\n\t\t\t\telse if(exWord.compareToIgnoreCase(DaleChallWords.getDaleChall()[mid]) > 0) { \n\t\t\t\t\tbot = mid +1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean search(String word) {\n return backtrace(root, word.toCharArray(), 0);\n }", "public boolean search (String s)\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tTreeNode pos = Pos;\n\t\tboolean found = true;\n\t\touter: while (Pos.node().getaction(\"C\").indexOf(s) < 0 || Pos == pos)\n\t\t{\n\t\t\tif ( !Pos.haschildren())\n\t\t\t{\n\t\t\t\twhile ( !hasvariation())\n\t\t\t\t{\n\t\t\t\t\tif (Pos.parent() == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = false;\n\t\t\t\t\t\tbreak outer;\n\t\t\t\t\t}\n\t\t\t\t\telse goback();\n\t\t\t\t}\n\t\t\t\ttovarright();\n\t\t\t}\n\t\t\telse goforward();\n\t\t}\n\t\tshowinformation();\n\t\tcopy();\n\t\treturn found;\n\t}", "public boolean search(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n return false;\n }\n curr = subNode;\n }\n return curr.isWord;\n }", "private static boolean isAnagram2(String str, String anagram) {\n\n\t\tchar[] chararray = str.toCharArray();\n\n\t\tStringBuilder sb = new StringBuilder(anagram);\n\n\t\tfor (char ch : chararray) {\n\t\t\t\n\t\t\tint index = sb.indexOf(\"\" + ch);\n\n\t\t\tif (index != -1) {\n\n\t\t\t\tsb.deleteCharAt(index);\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn sb.length() == 0 ? true : false;\n\t}", "public static void main(String[] args){\n\n String NO=\"张xin\";\n String Name=\"张xin(123)\";\n Boolean B=Name.contains(NO);\n System.out.println(B);\n\n\n\n }", "static boolean m22727a(String str) {\n if (TextUtils.isEmpty(str)) {\n return false;\n }\n for (String contains : f20300a.f20309c) {\n if (str.contains(contains)) {\n return true;\n }\n }\n return false;\n }", "public boolean search(String s, String p) {\n int i,j,start=0;\n for(i=0,j=0;i<s.length()&&j<p.length();i++) {\n if(p.charAt(j)=='*') {\n start = ++j;\n i--;\n } else if(match(p.charAt(j),s.charAt(i))) {\n j++;\n } else {\n i-=j-start;\n j=start;\n }\n }\n while(j<p.length() && p.charAt(j)=='*') {\n j++;\n }\n return j>=p.length();\n }", "private static void searchWords(boolean[][] check, int row, int col, char[][] boogle, TrieNode root, String str){\n \t\n \tif(root.isLeaf==true) {\n \t\tSystem.out.println(str);\n \t}\n\n \tif(isSafe(check, row, col)){\n \t\tcheck[row][col] = true;\n\n \t\tfor(int i=0; i<SIZE; i++){\n \t\t\tif(root.child[i] != null){\n \t\t\t\tchar c = (char)(i + 'A');\n \t\t\t\tif(isSafe(check, row-1, col) && boogle[row-1][col]==c) searchWords(check, row-1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col+1) && boogle[row-1][col+1]==c) searchWords(check, row-1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col+1) && boogle[row][col+1]==c) searchWords(check, row, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col+1) && boogle[row+1][col+1]==c) searchWords(check, row+1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col) && boogle[row+1][col]==c) searchWords(check, row+1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col-1) && boogle[row+1][col-1]==c) searchWords(check, row+1, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col-1) && boogle[row][col-1]==c) searchWords(check, row, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col-1) && boogle[row-1][col-1]==c) searchWords(check, row-1, col-1, boogle, root.child[i], str+c);\n \t\t\t}\n \t\t}\n \t\tcheck[row][col] = false;\n \t}\n }", "private static boolean special_optimization(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_value(\"\"+a.charAt(x)));\n }\n if(sum <= library.return_uppervalue() && sum >= library.return_lowervalue())\n return false;\n return true;\n }", "public boolean search(String word) {\n Node temp = root;\n while(word.length()!=0){\n char c = word.charAt(0);\n word = word.substring(1);\n int index = (int)c -97;\n if(temp.children[index]==null){\n return false;\n }\n temp = temp.children[index];\n }\n if(temp==null) return false;\n \n return temp.isEnd;\n }", "private boolean detectRepeat(String substring) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tchar actual=substring.charAt(i);\n\t\t\t\n\t\t\tint j=i+1;\n\t\t\t//Los anteriores ya se han comprobado\n\t\t\tfor (; j < substring.length() && actual!=substring.charAt(j) ; j++);\n\t\t\t\n\t\t\tif (j<substring.length()) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private void find(char[] m, String message, Trie cur, Trie root, int index, List<String> results) {\n // Base case 1. No match with any dictionary word. if cur == null -> no match ; return\n if (cur == null) {\n return;\n }\n // Base case 2. if out of bounds, check previously collected word and return\n if (index == message.length()) {\n // result only in case matches word\n if (cur.word != null) {\n results.add(new String(m));\n }\n return;\n }\n char c = message.charAt(index);\n if (c == SPACE) {\n // matches word or character 'e'\n // check if matches word from dictionary\n if (cur.word != null) {\n m[index] = SPACE;\n // if space - start collecting new word from beginning of Trie\n find(m, message, root, root, index + 1, results);\n }\n // otherwise ' ' -> 'e'\n c = 'e';\n }\n // considered non-space character (backtracking)\n m[index] = c;\n // get next element from try\n Trie next = cur.get(c);\n find(m, message, next, root, index + 1, results);\n }", "public int repeatedStringMatch(String a, String b) {\n \n int count = 0;\n StringBuilder sb = new StringBuilder();\n \n while(sb.length() < b.length()){\n sb.append(a); //O(roundUp(M/N) * N) < O(M*N)\n count++;\n }\n \n if(sb.indexOf(b) != -1) return count; //check at max O(M*N) characters\n \n //handles rotated array case\n if(sb.append(a).indexOf(b) != -1) return count + 1; //append takes O(N), indexOf takes in the worst case (missing match) ~O(M*N)\n \n return -1;\n }", "public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }", "@Test\n public void wordPatternTest() {\n String pattern = \"aaa\", str = \"aa aa aa aa\";\n boolean ans = instance.wordPattern(pattern, str);\n System.out.println(ans);\n }", "public static void main(String[] args) {\n String s = \"acdcb\", p = \"a*?b\";//true\n System.out.println(isMatch(s, p));\n }", "public int stringMatch(String a, String b) {\n int result = 0;\n int end = (a.length()<=b.length()? a.length():b.length());\n for (int i = 0; i <end-1 ; i++){\n if (a.substring(i, i + 2).equals(b.substring(i, i + 2))) {\n result++;\n }\n }\n return result;\n }", "public boolean containsAnagram(String s, String t) {\n\t\tint[] tmap = new int[26];\n\t\tfor (char c : t.toCharArray())\n\t\t\ttmap[c - 'A']++;\n\t\tint p1 = 0, p2 = 0;\n\t\tint minimumLen = Integer.MAX_VALUE;\n\t\tint expandedLength = t.length();\n\t\twhile (p1 < s.length() && p1 < s.length()) {\n\t\t\tif (tmap[s.charAt(p2++) - 'A']-- > 0) expandedLength--;\n\t\t\twhile (expandedLength == 0) {\n\t\t\t\tif (p2 - p1 < minimumLen) {\n\t\t\t\t\tminimumLen = p2 - p1;\n\t\t\t\t\tif (minimumLen == t.length()) return true;\n\t\t\t\t}\n\t\t\t\tif (p1 >= s.length()) break;\n\t\t\t\t// Exists in t.\n\t\t\t\tif (tmap[s.charAt(p1++) - 'A']++ == 0) expandedLength++;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void shouldNotFindSubstringWithMismatchedFirstCharacterAtTheEndOfThString() {\n // Given\n String string = \"123ABc\";\n CharSequence charSequence = new StringBuilder(\"cBc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertFalse(containsCharSequence);\n }", "public static void qThere (String s) { \n boolean foundQ = false; \n \n for (int i=0; i<s.length(); ++i) { //iterate through every char\n if (s.charAt(i) == 'q')\n foundQ = true;\n if (s.charAt (i) == 'Q')\n foundQ = true;\n }\n \n if (foundQ){\n System.out.println (\"It contains the letter q... how interesting!\");\n } else {\n System.out.println (\"It doesn't contain the letter q... how boring.\");\n //then we check to see if there are any uppercase q's\n }\n }", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a word\");\n\t\tString a=scan.nextLine();\n\n\t\tint sayac=0;\n\t\tint sayac1=0;\n\t\tint sayac2=0;\n\t\tint sayac3=0;\n\t\tint sayac4=0;\n\t\tint sayac5=0;\n\t\tint sayac6=0;\n\t\tint sayac7=0;\n\t\tint sayac8=0;\n\t\tint sayac9=0;\n\t\n\t\n\tint b=a.toLowerCase().length();\n\t\nchar[] alphabet= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','u','p','r','s','t','u','z','w','x','v'};\n\t\n\t\n\t\t\n\tfor(int i=0; i<=b-1; i++) {\n\t\tfor(int j=0; j<alphabet.length; j++) {\n\t\tif(a.charAt(i)==alphabet[j] ) {\n\t\t\tSystem.out.println(\"a harfi \"+(i+1)+\". siradadir\");\n\t\t\tsayac++;\n\t\t\tSystem.out.println(sayac+\"tane a.charAt(i) harfi vardir\");\n\t\t}\n\t\t\n\t\t\n\t\n\t\t}}\n\n\n\t}", "public boolean search(String word) {\n TrieNode last = walkTo(word);\n if (last == null) {\n return false;\n }\n return last.children.containsKey('\\0');\n }", "@Test\npublic void testKMPSearch() throws Exception { \n//TODO: Test goes here...\n String origin = \"aaaaaab\";//目标字符串\n String pattern = \"aababaaa\"; //匹配字符串\n int i = KMP.KMPSearch(origin,pattern);\n System.out.println(i);\n}", "public boolean contains (String word) {\n //boolean res = true ;\n\n if(word.length()>0){\n\n String lettre = Character.toString(word.charAt(0));\n if(this.fils.containsKey(lettre)){\n String ssChaine = word.substring(1);\n return this.fils.get(lettre).contains(ssChaine);\n\n }\n else{\n return false;\n }\n }\n else{\n return /*res &&*/ this.fin;\n }\n }", "public boolean search(String word) {\n TrieNode node = root;\n\n // for each char in the word, search in the TrieNode\n for (char c: word.toCharArray()) {\n // if we can not find the child, then return false\n if (node.children[c - 'a'] == null) {\n return false;\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n }\n // if we iterate to the last, check isWord\n return node.isWord;\n }", "protected boolean isSubstring(String substring, String word) {\r\n//\t\tboolean isSub = true;\r\n\t\treturn word.contains(substring);\r\n//\t\treturn isSub;\r\n\t}", "String getWordIn(String schar, String echar);", "public boolean startsWith(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn true;\n\t}", "public static void searchZodiacLetter() {\n\t\t//String message = \"This is the Zodiac speaking. I am rather unhappy because you people will not wear some nice buttons. So I now have a little list, starting with the woeman + her baby that I gave a rather intersting ride for a couple howers one evening a few months back that ended in my burning her car where I found them.\";\n\t\tString message = \"San Francisco Chronicle S.F. Mon. Oct 5, 1970 Dear Editor, You'll hate me, but I've got to tell you. The pace isn't any slower! In fact it's just one big thirteenth 13 'Some of them fought it was horrible' P.S. THERE ARE REPORTS city police pig cops are closeing in on me. Fk I'm crackproof, What is the price tag now? Zodiac\";\n\t\t\n\t\t// try to anagram into portions of the Unabomber manifesto\n\t\tStringBuffer corpus = FileUtil.loadSBFrom(\n\t\t\t\t\"/Users/doranchak/projects/zodiac/github/zodiac-killer-ciphers/docs/corpus/unabomber-manifesto.txt\");\n\t\t\n\t\tString[] tokens = FileUtil.tokenizeAndConvert(corpus.toString());\n\t\tsearch(tokens, message, 50, true);\n\t}", "public String findFirstWord(String a, String b) {\n\t\tchar[] aArray = a.toCharArray();\n\t\tchar[] bArray = b.toCharArray();\n\n\t\t//loop through letters of each\n\t\tfor (int i = 0; i < aArray.length; i++) {\n\n\t\t\t// if letter in a comes before b, then return a\n\t\t\tif (aArray[i] < bArray[i]) {\n\t\t\t\treturn a;\n\t\t\t}\n\n\t\t\t// check if letter in b comes before a\n\t\t\tif (aArray[i] > bArray[i]) {\n\t\t\t\treturn b;\n\t\t\t}\n\n\t\t\t// otherwise they are equal and you can move to the next letter\n\t\t}\n\n\t\t// you need this line in case the above loop doesn't return anything.\n\t\t// this is for the compiler.\n\t\treturn a;\n\t}", "private boolean m81839a(String str) {\n return C6969H.m41409d(\"G738BDC12AA\").equals(str) || C6969H.m41409d(\"G738BDC12AA39A528F61E\").equals(str);\n }", "private boolean m76078a(String str) {\n return str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\")) || str.contains(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\")) || str.contains(Uri.encode(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")));\n }", "boolean isSubStr(String s, String t) {\n\t\tint k = 0;\n\t\tfor (int i = 0; i < s.length(); ++i) {\n\t\t\tboolean found = false;\n\t\t\tfor (; k < t.length(); ++k) if (found = (t.charAt(k) == s.charAt(i))) break;\n\t\t\tif (!found) return false;\n\t\t\t++k;\n\t\t}\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"\\\\bis\\\\b\"); // эффект тот же\n\n Matcher m = p.matcher(\"this island is beautiful\");\n while (m.find()){\n System.out.println(m.start() + \" \" + m.group());\n }\n }", "public boolean search(String word)\n {\n return true;\n }", "public final boolean zzba(String str) {\n AppMethodBeat.i(68617);\n boolean zzd = zzd(str, zzew.zzaic);\n AppMethodBeat.o(68617);\n return zzd;\n }", "protected int findBytes(ByteChunk bc, byte[] b) {\n\n byte first = b[0];\n byte[] buff = bc.getBuffer();\n int start = bc.getStart();\n int end = bc.getEnd();\n\n // Look for first char \n int srcEnd = b.length;\n\n for (int i = start; i <= (end - srcEnd); i++) {\n if (Ascii.toLower(buff[i]) != first) continue;\n // found first char, now look for a match\n int myPos = i+1;\n for (int srcPos = 1; srcPos < srcEnd; ) {\n if (Ascii.toLower(buff[myPos++]) != b[srcPos++])\n break;\n if (srcPos == srcEnd) return i - start; // found it\n }\n }\n return -1;\n }", "public boolean isActivationString(String word);", "private void checkEasterEgg (String word) {\r\n if (word.startsWith (\"IMAC\") || word.equals (\"APPLE\") || word.equals (\"KATZ\") || word.startsWith (\"IPOD\") || word.startsWith (\"IPHONE\")\r\n || word.startsWith (\"MAC\") && !word.startsWith (\"MACR\") && !word.startsWith (\"MACE\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered cannot be recognized\\nSince we are nice, we will add it for you anyways.\",\r\n \"Woah There!\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }", "public String getGoodWordStartingWith(String s) {\n Random random = new Random();\n String x = s;\n TrieNode temp = searchNode(s);\n if (temp == null){\n return \"noWord\";\n }\n // get a random word\n ArrayList<String> charsNoWord = new ArrayList<>();\n ArrayList<String> charsWord = new ArrayList<>();\n String c;\n\n while (true){\n charsNoWord.clear();\n charsWord.clear();\n for (String ch: temp.children.keySet()){\n if (temp.children.get(ch).isWord){\n charsWord.add(ch);\n } else {\n charsNoWord.add(ch);\n }\n }\n System.out.println(\"------>\"+charsNoWord+\" \"+charsWord);\n if (charsNoWord.size() == 0){\n if(charsWord.size() == 0){\n return \"sameAsPrefix\";\n }\n s += charsWord.get( random.nextInt(charsWord.size()) );\n break;\n } else {\n c = charsNoWord.get( random.nextInt(charsNoWord.size()) );\n s += c;\n temp = temp.children.get(c);\n }\n }\n if(x.equals(s)){\n return \"sameAsPrefix\";\n }else{\n return s;\n }\n }", "public boolean search(String s) {\n\t\tTreeNode node = root;\n\n\t\tboolean completed = false;\n\n\t\tfor (int i = 0; i<s.length(); i++){\n\n\t\t\tif (i == s.length()-1){\n\t\t\t\tcompleted = true;\n\t\t\t}\n\n\n\t\t\tnode = search(String.valueOf(s.charAt(i)), node, completed);\n\n\t\t\tif (foundFalse == true){\n\t\t\t\tfoundFalse = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\t\n\t \n\t}", "protected boolean isSubString(BSTVertexOfBabyNames T,String subString)\r\n\t{\r\n\t\tString babyName=T.key;\r\n\t\tint stringLength=subString.length();\r\n\t\tboolean identical=false;\r\n\t\t\r\n\t\tfor(int i=0;i<babyName.length();i++)\r\n\t\t{\r\n\t\t\tif(i+stringLength>babyName.length())\r\n\t\t\t\treturn false;\r\n\t\t\tfor(int start=0;start<stringLength;start++)\r\n\t\t\t{\r\n\t\t\t\tif(babyName.charAt(i+start)==subString.charAt(start))\r\n\t\t\t\t\tidentical=true;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tidentical=false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(identical)\treturn true;\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Anisha sinhA\");\n\t\t\n\t\tSystem.out.println(\"index of h--\"+sb.indexOf(\"h\"));\n\t\t//System.out.println(\"last index of a--\"+sb.lastIndexOf(\"a\"));\n\t\t//System.out.println(\"5th position of a --\"+sb.charAt(5));\n\t\t\n\t\tSystem.out.println(\"5th position of a -->\"+sb.indexOf(\"a\", 5));\n\t\t\n\t\t\n\t\t\n\n\t}", "private String searchString(String inWord)\n {\n String line = null;\n StringBuffer rtn = new StringBuffer();\n int len = inWord.length();\n boolean found = false;\n\n if(len == 1)\n {\n if(Character.isDigit(inWord.charAt(0)))\n {\n rtn.append(inWord).append(\"I\");\n found = true;\n } // fi\n\n else if(Character.isLetter(inWord.charAt(0)))\n {\n rtn.append(inWord.toLowerCase()).append(\"S\");\n found = true;\n } // else fi\n } // fi\n\n if(!found)\n {\n int\tnum_A = 0; // Upper case\n int\tnum_L = 0; // Lower case\n int\tnum_N = 0; // Numbers\n int\tnum_P = 0; // Punctuation (numeric)\n int\tnum_Q = 0; // Quotes\n int\tnum_O = 0; // Other\n char last_ch = ' ';\n\n for(int i = 0; i < len; i++)\n {\n if((i == 0) && (inWord.charAt(i) == '-'))\n num_L++;\n\n else if(Character.isLowerCase(inWord.charAt(i)))\n num_L++;\n\n else if(Character.isUpperCase(inWord.charAt(i)))\n num_A++;\n\n else if(Character.isDigit(inWord.charAt(i)))\n num_N++;\n\n else if((inWord.charAt(i) == '=')||(inWord.charAt(i) == ':') ||\n (inWord.charAt(i) == '+')||(inWord.charAt(i) == '.') ||\n (inWord.charAt(i) == ','))\n num_P++;\n\n else if((inWord.charAt(i) == '\\'') ||\n (inWord.charAt(i) == '`') || (inWord.charAt(i) == '\"'))\n num_Q++;\n\n else\n num_O++;\n\n last_ch = inWord.charAt(i);\n } // for\n\n int pos = 0;\n if((len - ntail) > 0)\n pos = len - ntail;\n\n rtn.append(inWord.substring(pos).toLowerCase());\n\n if((num_L + num_Q) == len)\n rtn.append(\"\");\n\n else if((num_A + num_Q) == len)\n rtn.append(\"A\");\n\n else if((num_N + num_P + num_Q) == len)\n rtn.append(\"N\");\n\n else if((num_L + num_A + num_Q) == len)\n rtn.append(\"B\");\n\n else if((num_A + num_N + num_P + num_Q) == len)\n rtn.append(\"C\");\n\n else if((num_L + num_N + num_P + num_Q) == len)\n rtn.append(\"E\");\n\n else if((num_A + num_L + num_N + num_P + num_Q) == len)\n rtn.append(\"D\");\n\n else if((num_O == 0) && (last_ch == '+'))\n rtn.append(\"F\");\n\n else\n rtn.append(\"O\");\n } // else\n\n rtn.append(\"_\");\n\n return(rtn.toString());\n }", "public static void main(String[] args) {\n\t\tString str = \"ABba\";\n\t\tSystem.out.println(findMatchingPair(str));\n\t\t\n\t\tString str1 = \"ABbCca\";\n\t\tSystem.out.println(findMatchingPair(str1));\n\t\t\n\t}" ]
[ "0.6858984", "0.6592051", "0.6554811", "0.65523386", "0.6534867", "0.65332615", "0.6480764", "0.6465806", "0.64178926", "0.6399402", "0.63630474", "0.63439834", "0.6325846", "0.6325225", "0.6293427", "0.629038", "0.6281175", "0.6262256", "0.62442076", "0.6241426", "0.6222004", "0.6221792", "0.62145126", "0.6212649", "0.61785483", "0.617022", "0.6105536", "0.6094478", "0.60940105", "0.60918546", "0.6087004", "0.6085085", "0.6072703", "0.6063067", "0.6051942", "0.6050321", "0.60419875", "0.6036659", "0.60331374", "0.6029636", "0.60266006", "0.6022979", "0.60065466", "0.59979594", "0.5990069", "0.5988658", "0.5957811", "0.5948779", "0.5948492", "0.5939329", "0.59349644", "0.593116", "0.5928283", "0.59237444", "0.59148836", "0.59123635", "0.59119624", "0.59011936", "0.58898586", "0.5886142", "0.5880729", "0.5876792", "0.5875149", "0.5873665", "0.5868141", "0.58671176", "0.586444", "0.5862288", "0.5862019", "0.5859816", "0.5854963", "0.5854348", "0.58537287", "0.58486575", "0.5845131", "0.5842614", "0.5810621", "0.58100784", "0.5809999", "0.5806774", "0.58012617", "0.5795533", "0.5795403", "0.57924205", "0.5789524", "0.5783544", "0.5782958", "0.57809085", "0.57795703", "0.57751054", "0.57705164", "0.5766159", "0.57648337", "0.57455534", "0.57446384", "0.5743241", "0.57235163", "0.57203925", "0.5720216", "0.57159257", "0.5714398" ]
0.0
-1
/ check if the current position hasn't possible move
private boolean checkBoxSituation(int secondI, int secondJ) { int max = 0; if (secondI + 1 < 8) { if (checkBlueBox(secondI + 1, secondJ)) { max++; } } if (secondI - 1 > -1) { if (checkBlueBox(secondI - 1, secondJ)) { max++; } } if (secondJ + 1 < 8) { if (checkBlueBox(secondI, secondJ + 1)) { max++; } } if (secondJ - 1 > -1) { if (checkBlueBox(secondI, secondJ - 1)) { max++; } } if (max >= 3) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}", "public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }", "private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}", "private boolean isMove() {\n return this.getMoves().size() != 0;\n }", "public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }", "boolean canMove();", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isMoving() {\n\t\treturn moveProgress > 0;\n\t}", "public boolean allowMove(Point p, int pos);", "public boolean canMove()\n {\n return canMove;\n }", "public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}", "public boolean canMove() {\r\n return (state == State.VULNERABLE || state == State.INVULNERABLE);\r\n\r\n }", "@Override\n\tpublic boolean isLegalMove(Square newPosition) {\n\t\treturn false;\n\t}", "public boolean canMoveTo(Position position){\n return !isOccupied(position);\n }", "@Override\n public boolean isMoving() {\n return _movementTask != null && !_movementTask.isDone();\n }", "public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean canMove() {\n\t\tArrayList<Location> loc = getValid(getLocation());\n\t\tif (loc.isEmpty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tpath.add(getLocation());\n\t\t\tif (loc.size() >= 2) {\n\t\t\t\tcrossLocation.push(path);\n\t\t\t\tpath = new ArrayList<Location>();\n\t\t\t\tnext = betterDir(loc);\n\t\t\t}\n\t\t\tnext = loc.get(0);\n\t\t}\n\t\treturn true;\n\t}", "public abstract boolean canMove();", "public boolean attemptMove(Position2D pos)\n {\n return setPosition(pos);\n }", "public boolean onFirstMove() {\n\t\treturn (PawnMoveInformation.NOT_MOVED_YET == this.info);\n\t}", "public boolean isLegalMove() {\n return iterator().hasNext();\n }", "public boolean canMoveTo(Position position){\n if(position.x > mapSize.x || position.x < 0 || position.y > mapSize.y || position.y < 0){\n return false;\n }\n return !isOccupied(position);\n }", "boolean canMoveTo(Vector2d position);", "public boolean canMove() {\n ArrayList<Location> valid = canMoveInit();\n if (valid == null || valid.isEmpty()) {\n return false;\n }\n ArrayList<Location> lastCross = crossLocation.peek();\n for (Location loc : valid) {\n Actor actor = (Actor) getGrid().get(loc);\n if (actor instanceof Rock && actor.getColor().equals(Color.RED)) {\n next = loc;\n isEnd = true;\n return false;\n }\n if (!lastCross.contains(loc)) {\n lastCross.add(loc);\n next = loc;\n ArrayList<Location> nextCross = new ArrayList<>();\n nextCross.add(next);\n nextCross.add(last);\n crossLocation.push(nextCross);\n return probabilityAdd();\n }\n }\n next = lastCross.get(1);\n crossLocation.pop();\n return probabilitySub();\n }", "public boolean isSolvable() {\n return finalMove != null;\n }", "private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }", "boolean isMoving();", "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}", "public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }", "boolean isValidMove(int move)\n\t{\n\t\treturn move >= 0 && move <= state.size() - 1 && state.get(move) == 0;\n\t}", "boolean isMoveFinished(int tick);", "public boolean isNotPosibleMove(final int type) {\n switch (type) {\n case KeyEvent.VK_LEFT:\n isNotPossible = pacman.existWall(pacman.getX() - SIZE_ELEMENT, pacman.getY());\n break;\n case KeyEvent.VK_RIGHT:\n isNotPossible = pacman.existWall(pacman.getX() + SIZE_ELEMENT, pacman.getY());\n break;\n case KeyEvent.VK_UP:\n isNotPossible = pacman.existWall(pacman.getX(), pacman.getY() - SIZE_ELEMENT);\n break;\n case KeyEvent.VK_DOWN:\n isNotPossible = pacman.existWall(pacman.getX(), pacman.getY() + SIZE_ELEMENT);\n break;\n default:\n break;\n }\n return isNotPossible;\n }", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "boolean legalMove(Move mov) {\n if (mov == null || !validSquare(mov.toIndex())\n || !validSquare(mov.fromIndex())) {\n throw new IllegalArgumentException(\"Illegal move\");\n }\n PieceColor from = get(mov.fromIndex());\n PieceColor to = get(mov.toIndex());\n if (!mov.isJump() && jumpPossible()) {\n return false;\n }\n if (from != _whoseMove) {\n return false;\n } else if (mov.isJump()) {\n return checkJump(mov, false);\n } else if (from == BLACK && row(mov.fromIndex()) == '1') {\n return false;\n } else if (from == WHITE && row(mov.fromIndex()) == '5') {\n return false;\n } else if (mov.isLeftMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Right\");\n } else if (mov.isRightMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Left\");\n } else if (from == BLACK) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.fromIndex() - mov.toIndex() == SIDE\n || mov.fromIndex() - mov.toIndex() == SIDE - 1\n || mov.fromIndex() - mov.toIndex() == SIDE + 1;\n } else {\n return mov.fromIndex() - mov.toIndex() == SIDE && to == EMPTY;\n }\n } else if (from == WHITE) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.toIndex() - mov.fromIndex() == SIDE\n || mov.toIndex() - mov.fromIndex() == SIDE + 1\n || mov.toIndex() - mov.fromIndex() == SIDE - 1;\n } else {\n return mov.toIndex() - mov.fromIndex() == SIDE && to == EMPTY;\n }\n }\n return false;\n }", "private boolean isValidMove(int position) {\n\t\tif( !(position >= 0) || !(position <= 8) ) return false;\n\n\t\treturn gameBoard[position] == 0;\n\t}", "public boolean isInCorrectPosition() {\n return originalPos == currentPos;\n }", "private boolean validMove(int dir) {\n return !(dir == UPKEY && direction == DOWNKEY || dir == DOWNKEY && direction == UPKEY || dir == LEFTKEY && direction == RIGHTKEY || dir == RIGHTKEY && direction == LEFTKEY);\n }", "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 }", "@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }", "public boolean hasMoved(){\n\t\treturn getGame().getCurrentPlayer().hasMoved();\n\t}", "@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }", "boolean checkLegalMove(int posx, int posy) {\n\t\tBoolean bool;\n\t\tint change;\n\t\tchange = curPlayer > 1 ? (change = 1) : (change = -1);\n\t\tif (kingJumping(posx, posy, change)){\n\t\t\tbool = true;\n\t\t} else if (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\tSystem.out.println(\"Normal move\");\n\t\t\tbool = true;\n\t\t} else if (jump(posx, posy, prevPiece) && (prevPosX == posx + (change * 2) && (prevPosY == posy - 2 || prevPosY == posy + 2))) {\n\t\t\tbool = true;\n\t\t} else if (((JLabel)prevComp).getIcon().equals(Playboard.rKing) || ((JLabel)prevComp).getIcon().equals(Playboard.bKing) || ((JLabel)prevComp).getIcon().equals(Playboard.blackSKing) || ((JLabel)prevComp).getIcon().equals(Playboard.redSKing)){\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\t\tbool = true;\n\t\t\t} else\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 4 && (prevPosX == posx + 1 || prevPosX == posx -1) && (prevPosY == posy - 1 || prevPosY == posy +1)) { // King moves\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else {\n\t\t\tbool = false;\n\t\t}\n\t\treturn bool;\n\t}", "boolean prepareToMove();", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "@Override\n public boolean canMove(double x, double y) {\n return !getOwner().isDead();\n }", "@Override\n\tpublic Boolean hasMoved() {\n\t\treturn moved;\n\t}", "public boolean canMove() {\n\n if (workers.size() == 0) return true;\n\n return workerCanMove(0) || workerCanMove(1);\n }", "protected boolean shouldMoveTo(World worldIn, BlockPos pos)\n {\n Block block = worldIn.getBlockState(pos).getBlock();\n\n if (block == Blocks.FARMLAND)\n {\n pos = pos.up();\n IBlockState iblockstate = worldIn.getBlockState(pos);\n block = iblockstate.getBlock();\n\n if (block instanceof BlockCrops && this.wantsToReapStuff && (this.currentTask == 0 || this.currentTask < 0))\n {\n this.currentTask = 0;\n return true;\n }\n\n }\n\n return false;\n }", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}", "private boolean canMove(String direction) {\n\t\tif (currentPiece.getLocation() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tLoc nextPoint = nextPoint(loc, direction);\n\t\t\tif (nextPoint == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// if there's someone else's piece blocking you\n\t\t\tif ((new Loc(nextPoint.row, nextPoint.col).isOnBoard())\n\t\t\t\t\t&& boardTiles[nextPoint.row][nextPoint.col] != backgroundColor && !isMyPiece(nextPoint)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isSolvable()\n {\n return moves() >= 0;\n }", "boolean doMove();", "public boolean isSolvable() {\n return moves != -1;\n }", "public void InvalidMove();", "private boolean isSpaceFree(Move move) {\n int moveX = move.getMoveX(); \n int moveY = move.getMoveY(); \n if (boardState[moveX][moveY] == 'X' || boardState[moveX][moveY] == 'O') {\n return false; \n }\n return true; \n }", "public boolean isMoving() {\n return this.movementComposer.isMoving();\n }", "public boolean canMove(int dir) {\n return true;\n }", "public void paradiseMove(){\n if (!getCurrentMainCellCoordinates().equals(new DiscreteCoordinates(11, 9))) {\n move(30);\n }\n }", "public boolean isMoveLegal(int x, int y) {\n\t\tif (rowSize <= x || colSize <= y || x < 0 || y < 0) {\r\n\t\t\t// System.out.print(\"Position (\" + (x + 1) + \", \" + (y + 1) + \") is\r\n\t\t\t// out of range!\\n\");\r\n\t\t\treturn false;\r\n\t\t} else if (!(matrix[x][y] == 0)) {\r\n\t\t\t// System.out.print(\"Position (\" + (x + 1) + \", \" + (y + 1) + \") has\r\n\t\t\t// been occupied!\\n\");\r\n\t\t\treturn false;\r\n\t\t} else\r\n\t\t\treturn true;\r\n\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "@objid (\"7f09cb7d-1dec-11e2-8cad-001ec947c8cc\")\n public boolean allowsMove() {\n return true;\n }", "public boolean validMove(int x, int y){\n if(!super.validMove(x, y)){\n return false;\n }\n if(((Math.abs(x - this.x()) == 2) && (Math.abs(y - this.y()) == 1))\n || ((Math.abs(x - this.x()) == 1) && (Math.abs(y - this.y()) == 2))){\n return true;\n }else{\n return false;\n }\n }", "public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}", "public boolean hasMoved() {\n return moved;\n }", "public boolean isValidMove(Coordinates coordinates) {\n if (grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'X' &&\n grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'O') {\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic boolean hasMoved() {\n\t\treturn false;\n\t}", "@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}", "boolean canMove(Tile t);", "@Override\n public boolean isValidMove(Move move) {\n if (board[move.oldRow][move.oldColumn].isValidMove(move, board))\n return true;\n //player will not be in check\n //move will get player out of check if they are in check\n return false;\n }", "public boolean requestMove() {\r\n if (game != null) {\r\n player.getMove();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean isValidMove(Move move) {\n if (this.gameStarted && isSpaceFree(move) && isPlayerTurn(move)) {\n return true; \n }\n return false; \n }", "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 }", "protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }", "public boolean hasMoved(){\r\n\t\treturn this.moved;\r\n\t}", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "public boolean justMoved() {\n\n\t\tdouble[] scores = compareFrames(length-1, length-2);\n\n\t\tSystem.out.println(scores[0]);\n\n\t\treturn scores[0] > MOVEMENT_THRESHOLD; // || scores[1] > ROTATION_THRESHOLD;\n\t}", "public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "protected boolean canMove(int pos) {\n\t\tString[] directions = getDirectionsFor(pos).split(\",\");\n\t\tfor(String strlabel : directions){\n\t\t\tint label = Integer.parseInt(strlabel);\n\t\t\tif(label == blank)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean canMove() {\n return storage.isRampClosed();\n }", "public boolean attemptMove(int x, int y)\n {\n return setPosition(x, y);\n }", "public boolean canMoveTo (Coordinate c)\n\t{\n\t\tif (c.x < 0 || c.x >= GRID_SIZE){\n\t\t\treturn false;\n\t\t}\n\t\tif (c.y < 0 || c.y >= GRID_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tif (grid[c.x][c.y] == GridChar.AVAILABLE || grid[c.x][c.y] == GridChar.END){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean shouldMoveTo(World worldIn, BlockPos pos) {\n Block block = worldIn.getBlockState(pos).getBlock();\n\n if (block == Blocks.FARMLAND) {\n pos = pos.up();\n IBlockState iblockstate = worldIn.getBlockState(pos);\n block = iblockstate.getBlock();\n\n if (block instanceof BlockCropPinto && ((BlockCropPinto) block).isMaxAge(iblockstate) && this.wantsToReapStuff && (this.currentTask == 0 || this.currentTask < 0)) {\n this.currentTask = 0;\n return true;\n }\n\n if (iblockstate.getMaterial() == Material.AIR && this.hasFarmItem && (this.currentTask == 1 || this.currentTask < 0)) {\n this.currentTask = 1;\n return true;\n }\n }\n return false;\n }", "private boolean isLastMoveEnPassentCapture()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tif (appliedMoves.size() - 2 < 0) return false;\r\n\t\tMove beforeLastMove = appliedMoves.get(appliedMoves.size() - 2);\r\n\t\tif (beforeLastMove == null) return false;\r\n\t\t\r\n\t\tif (!(lastMove.capture instanceof Pawn)) return false;\r\n\t\tif (Math.abs(lastMove.from.coordinate.x - lastMove.to.coordinate.x) != 1) return false;\r\n\t\tif (Math.abs(lastMove.from.coordinate.y - lastMove.to.coordinate.y) != 1) return false;\r\n\r\n\t\t//Move before must have been a double move\r\n\t\tif (Math.abs(beforeLastMove.from.coordinate.y - beforeLastMove.to.coordinate.y) != 2) return false;\r\n\t\t//Pawn must have been removed\r\n\t\tif (fields[beforeLastMove.to.coordinate.x][beforeLastMove.to.coordinate.y].piece != null) return false;\r\n\t\t//Before last move's target must be on same y coordinate as from coordinate of last move\r\n\t\tif (beforeLastMove.to.coordinate.y != lastMove.from.coordinate.y) return false;\r\n\t\t//Before last move's target must be only one x coordinate away from coordinate of last move\r\n\t\tif (Math.abs(beforeLastMove.to.coordinate.x - lastMove.from.coordinate.x) != 1) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }", "@Override\n public boolean canMovePieceAtPoint(Point point) {\n return (getPiece(point) != null);\n }", "public boolean continueExecuting()\n\t{\n\t\treturn this.entity.posX != this.xPosition && this.yPosition != this.entity.posY && this.entity.posZ != this.zPosition;\n\t}", "public boolean canMove(Location loc){\n if(loc.getX() >= theWorld.getX() || loc.getX() < 0){\n System.out.println(\"cant move1\");\n return false;\n }else if(loc.getY() >= theWorld.getY() || loc.getY() < 0){\n System.out.println(\"cant move2\");\n return false;\n }else{\n System.out.println(\"can move\");\n return true;\n }\n }", "public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}", "private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }", "public boolean tryMove(Move m) {\n \tif(m.getSource().getColor() != turn) return false;\n \treturn m.getSource().move(m);\n }", "boolean makeMove();", "public boolean isMoving() {\n return moving;\n }", "@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\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\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isValidMove(CardStack stack)\n {\n return false;\n }" ]
[ "0.78442734", "0.76335067", "0.7576505", "0.7518208", "0.747652", "0.7472779", "0.74722755", "0.74367577", "0.7423927", "0.7423237", "0.7401134", "0.74006844", "0.7363534", "0.73451877", "0.7304077", "0.7303542", "0.72964144", "0.7293731", "0.72698027", "0.7241707", "0.7237893", "0.72353923", "0.72204226", "0.72034454", "0.71515936", "0.71454704", "0.71213466", "0.71130633", "0.70803744", "0.7074858", "0.7050987", "0.7045757", "0.7024082", "0.7011137", "0.6998368", "0.6981905", "0.6971211", "0.69499576", "0.69393617", "0.6918068", "0.6907313", "0.68925923", "0.68924046", "0.6890973", "0.68822676", "0.6866515", "0.6856077", "0.68549746", "0.685445", "0.6846555", "0.6846234", "0.68393135", "0.6831022", "0.68243265", "0.68126756", "0.6809955", "0.6801567", "0.67935985", "0.67875713", "0.6786225", "0.6775021", "0.67710274", "0.6761588", "0.6754324", "0.6750556", "0.6739555", "0.6736469", "0.67256784", "0.6723783", "0.67234266", "0.670815", "0.67056507", "0.6698894", "0.66896826", "0.6685906", "0.6685244", "0.66832155", "0.6677846", "0.66704774", "0.6667419", "0.6666593", "0.6666593", "0.6666593", "0.6666593", "0.6664923", "0.6663015", "0.6658704", "0.66484016", "0.66478443", "0.66451234", "0.663405", "0.6629565", "0.661917", "0.6615188", "0.66119426", "0.661061", "0.6608684", "0.6598179", "0.6590016", "0.6589224", "0.6588691" ]
0.0
-1
check is unknow territory is blue space
private boolean checkBlueBox(int i , int j) { if ( Start.shemaArray[i][j].bomb == 1) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFullyExplored();", "private boolean isBlack(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK || aux == Cells.BLACK_QUEEN);\r\n }", "public boolean isBlue()\n {\n // TODO: replace this line with your code\n }", "boolean isFalseColor();", "public boolean isRed()\n {\n // TODO: replace this line with your code\n }", "public boolean isDark() {\n return (col + row) % 2 == 0;\n }", "private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "private boolean isRed(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.RED || aux == Cells.RED_QUEEN);\r\n }", "private boolean isBlack(Color color){\r\n return color == Color.black;\r\n }", "boolean getNoColor();", "public boolean isGreen()\n {\n // TODO: replace this line with your code\n }", "private boolean isBlack(Position<Entry<K, V>> p) {\n return tree.getAux(p) == BLACK;\n }", "boolean checkBorders();", "private void checkColors(){\r\n\t\tpaintCorner(RED);\r\n\t\tif(leftIsClear()){\r\n\t\t\tturnLeft();\r\n\t\t\tmove();\r\n\t\t\tif(cornerColorIs(null)){\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tturnLeft();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}else{\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tturnLeft();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(rightIsClear()){\r\n\t\t\tturnRight();\r\n\t\t\tmove();\r\n\t\t\tif(cornerColorIs(null)){\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tturnRight();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t}else{\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tturnRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(frontIsClear()){\r\n\t\t\tmove();\r\n\t\t\tif(cornerColorIs(null)) {\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tpaintCorner(GREEN);\r\n\t\t\t\tturnAround();\r\n\t\t\t}else{\r\n\t\t\t\tmoveBack();\r\n\t\t\t\tturnAround();\r\n\t\t\t}\r\n\t\t}\r\n\t\tmakeMove();\r\n\t}", "private void checks(){\n if (check(true)){\n changeBottomPane(\"White is in check! :(\");\n }\n else if (check(false)){\n changeBottomPane(\"Black is in check!!!!!!!!!!!\");\n }\n else{\n changeBottomPane(\"\");\n }\n }", "boolean isRedTeam() {\n return ( START_AS_RED ? (!color_flipped_) : color_flipped_ );\n }", "private boolean is_valid(int x, int y, int proposed_color) {\n\t\tfor (int x1 = 1; x1 <= x; x1++) {\n\t\t\tif (color[x1 - 1][y - 1] == proposed_color)\n\t\t\t\treturn false;\n\t\t}\n\t\tfor (int y1 = 1; y1 <= y; y1++) {\n\t\t\tif (color[x - 1][y1 - 1] == proposed_color)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void isRedTest() {\n assertTrue(red_piece.isRed());\n assertTrue(!white_piece.isRed());\n }", "private boolean isBlack(Node node) {\n Circle temp = (Circle) node;\n return temp.getFill() == Paint.valueOf(\"black\");\n }", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "private boolean canAddBlueTile() {\n\t\tint soldierCount=0,queenCount=0;\n\n\n\t\tArrayList<Piece> playerPieces = Board.getInstance().getColorPieces(Game.getInstance().getCurrentPlayerColor());\n\t\tfor(Piece p:playerPieces)\n\t\t{\n\t\t\tif(p instanceof Soldier)\n\t\t\t{\n\t\t\t\tsoldierCount++;\n\t\t\t}\n\t\t\tif(p instanceof Queen)\n\t\t\t{\n\t\t\t\tqueenCount++;\n\t\t\t}\n\t\t}\n\t\treturn (soldierCount == 2 && queenCount == 1);\n\t}", "public boolean isBlack () { return (this == PlayColour.BLACK);}", "public boolean isBlack() {\r\n\t\treturn !isRed();\r\n\t}", "protected boolean isBlack() {\n return this.black;\n }", "private boolean obligatoryEats(Color pColor){\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if(isBlack(pColor) && !isEmpty(pos) && isBlack(pos) && canEats(pos))\r\n return true;\r\n if(isRed(pColor) && !isEmpty(pos) && isRed(pos) && canEats(pos))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Test\n public void testVictoryBlue(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "private int checkGreenColorProduct() {\r\n if (product == null) {\r\n return -1;\r\n } else {\r\n if (!product.isSafeFood()) {\r\n return Color.RED;\r\n }\r\n if (userHalal && !product.isHalal() || userKashir && !product.isKashir() ||\r\n userVegetarian && !product.isVegetarian() || userVegan && !product.isVegan()) {\r\n return Color.RED;\r\n }\r\n if (userSoy && product.isSoy() || userFish && product.isFish() ||\r\n userEggs && product.isEggs() || userGluten && product.isGluten() ||\r\n userLactose && product.isLactose() || userNuts && product.isNuts()) {\r\n return Color.RED;\r\n }\r\n return Color.GREEN;\r\n }\r\n }", "public boolean inVerticalBlank();", "public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }", "public boolean checkColoring(int[] ccolor){\n // \tfor(int i = 0; i < ccolor.length; i++){\n //\t System.out.println(Arrays.toString(ccolor));\n \t//}\n for(int i = 0; i < ccolor.length; i++){\n for(int w = 0; w < ccolor.length; w++){\n \t//System.out.println(i + \",\" + w);\n if(hasEdge(i,w) && (ccolor[i] == ccolor[w])){\n \t//System.out.println(i + \",false\" + w);\n return false;\n }\n }\n }\n return true;\n }", "private static <K> boolean colorOf(Node<K> p) {\n return (p == null ? BLACK : p.color);\n }", "private boolean isRed(Color color){\r\n return color == Color.red;\r\n }", "boolean hasFillBehavior();", "boolean isSolid();", "@Test\n public void testVicrotyFullGrid(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n boolean vicrotyTest = modelTest.getVictory();\n // On a rempli la grille de cellule bleu, on test également la victoire du bleu\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(vicrotyTest,true);\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "public boolean isSetColor() {\n return this.color != null;\n }", "private Boolean isRed(Node h){\n\t\tif(h.color == null)\n\t\t\treturn false;\n\t\treturn h.color==RED;\n\t}", "@Override\n public boolean isGoodForInterior()\n {\n return false;\n }", "boolean similarColorTo(Card c);", "protected String comprobarColor(Colores color){\r\n if(getColor() == Colores.AZUL | getColor() == Colores.BLANCO | getColor() == Colores.GRIS | getColor() == Colores.NEGRO\r\n | getColor() == Colores.ROJO){\r\n return \"Color correcto\";\r\n }\r\n else{\r\n return \"Color erroneo\";\r\n }\r\n }", "public void topLeftVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(19,12);\n\t\td.set(1,23);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(23);\n\t\tassertTrue(1==test_arr.get(0).getX() && 1==test_arr.get(0).getY());\n\n\t}", "public boolean isDraw(){\n String config = gameBoardToString();\n\n // Checks to see if there any more empty squares in the gameBoard. Returns -1 if 'g' not found in String config,\n // meaning there are no more empty squares in the gameBoard\n int val = config.indexOf('g');\n\n // Return true if no more empty squares. Otherwise, false.\n if (val == -1){\n return true;\n }\n else {\n return false;\n }\n }", "public boolean checkDrawCondition(int x,int y)\n {\n boolean draw=true;\n JButton [][]board=view.getGameBoard();\n for(int i=0;i<dim && draw;i++)\n {\n for(int j=0;j<dim && draw;j++)\n {\n if(board[i][j].getText().toString().equals(\"\"))\n {\n draw=false;\n }\n }\n }\n halt=true;\n return draw;\n\n }", "public boolean isSetColor() {\r\n return this.color != null;\r\n }", "private void colorDetermine(PGraphics pg) {\n\t\tif(this.getDepth() < 70){\n\t\t\tpg.fill(255,255,0);\n\t\t}else if(this.getDepth() >= 70 && this.getDepth() < 300){\n\t\t\tpg.fill(0, 0, 255);\n\t\t}else if(this.getDepth() >= 300){\n\t\t\tpg.fill(255, 0, 0);\n\t\t}\n\t}", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "boolean isHighlighted();", "@Test\n public void testVictoryRed(){\n for (Cell c: modelTest.grid) {\n if (c.getX() == 6)\n c.setColor(Color.RED);\n }\n\n modelTest.researchVictory(1,0);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.RED);\n }", "public boolean checkDiscard() {\n /*\n r7 = this;\n int r0 = r7.screenType\n r1 = 1\n if (r0 != r1) goto L_0x00de\n org.telegram.ui.ActionBar.Theme$ThemeAccent r0 = r7.accent\n int r2 = r0.accentColor\n int r3 = r7.backupAccentColor\n if (r2 != r3) goto L_0x0092\n int r2 = r0.accentColor2\n int r3 = r7.backupAccentColor2\n if (r2 != r3) goto L_0x0092\n int r2 = r0.myMessagesAccentColor\n int r3 = r7.backupMyMessagesAccentColor\n if (r2 != r3) goto L_0x0092\n int r2 = r0.myMessagesGradientAccentColor1\n int r3 = r7.backupMyMessagesGradientAccentColor1\n if (r2 != r3) goto L_0x0092\n int r2 = r0.myMessagesGradientAccentColor2\n int r3 = r7.backupMyMessagesGradientAccentColor2\n if (r2 != r3) goto L_0x0092\n int r2 = r0.myMessagesGradientAccentColor3\n int r3 = r7.backupMyMessagesGradientAccentColor3\n if (r2 != r3) goto L_0x0092\n boolean r2 = r0.myMessagesAnimated\n boolean r3 = r7.backupMyMessagesAnimated\n if (r2 != r3) goto L_0x0092\n long r2 = r0.backgroundOverrideColor\n long r4 = r7.backupBackgroundOverrideColor\n int r6 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))\n if (r6 != 0) goto L_0x0092\n long r2 = r0.backgroundGradientOverrideColor1\n long r4 = r7.backupBackgroundGradientOverrideColor1\n int r6 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))\n if (r6 != 0) goto L_0x0092\n long r2 = r0.backgroundGradientOverrideColor2\n long r4 = r7.backupBackgroundGradientOverrideColor2\n int r6 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))\n if (r6 != 0) goto L_0x0092\n long r2 = r0.backgroundGradientOverrideColor3\n long r4 = r7.backupBackgroundGradientOverrideColor3\n int r6 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))\n if (r6 != 0) goto L_0x0092\n float r0 = r0.patternIntensity\n float r2 = r7.backupIntensity\n float r0 = r0 - r2\n float r0 = java.lang.Math.abs(r0)\n r2 = 981668463(0x3a83126f, float:0.001)\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 > 0) goto L_0x0092\n org.telegram.ui.ActionBar.Theme$ThemeAccent r0 = r7.accent\n int r2 = r0.backgroundRotation\n int r3 = r7.backupBackgroundRotation\n if (r2 != r3) goto L_0x0092\n java.lang.String r0 = r0.patternSlug\n org.telegram.tgnet.TLRPC$TL_wallPaper r2 = r7.selectedPattern\n if (r2 == 0) goto L_0x0072\n java.lang.String r2 = r2.slug\n goto L_0x0074\n L_0x0072:\n java.lang.String r2 = \"\"\n L_0x0074:\n boolean r0 = r0.equals(r2)\n if (r0 == 0) goto L_0x0092\n org.telegram.tgnet.TLRPC$TL_wallPaper r0 = r7.selectedPattern\n if (r0 == 0) goto L_0x0086\n org.telegram.ui.ActionBar.Theme$ThemeAccent r2 = r7.accent\n boolean r2 = r2.patternMotion\n boolean r3 = r7.isMotion\n if (r2 != r3) goto L_0x0092\n L_0x0086:\n if (r0 == 0) goto L_0x00de\n org.telegram.ui.ActionBar.Theme$ThemeAccent r0 = r7.accent\n float r0 = r0.patternIntensity\n float r2 = r7.currentIntensity\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 == 0) goto L_0x00de\n L_0x0092:\n org.telegram.ui.ActionBar.AlertDialog$Builder r0 = new org.telegram.ui.ActionBar.AlertDialog$Builder\n android.app.Activity r1 = r7.getParentActivity()\n r0.<init>((android.content.Context) r1)\n r1 = 2131627480(0x7f0e0dd8, float:1.8882226E38)\n java.lang.String r2 = \"SaveChangesAlertTitle\"\n java.lang.String r1 = org.telegram.messenger.LocaleController.getString(r2, r1)\n r0.setTitle(r1)\n r1 = 2131627479(0x7f0e0dd7, float:1.8882224E38)\n java.lang.String r2 = \"SaveChangesAlertText\"\n java.lang.String r1 = org.telegram.messenger.LocaleController.getString(r2, r1)\n r0.setMessage(r1)\n r1 = 2131627478(0x7f0e0dd6, float:1.8882222E38)\n java.lang.String r2 = \"Save\"\n java.lang.String r1 = org.telegram.messenger.LocaleController.getString(r2, r1)\n org.telegram.ui.ThemePreviewActivity$$ExternalSyntheticLambda1 r2 = new org.telegram.ui.ThemePreviewActivity$$ExternalSyntheticLambda1\n r2.<init>(r7)\n r0.setPositiveButton(r1, r2)\n r1 = 2131626789(0x7f0e0b25, float:1.8880824E38)\n java.lang.String r2 = \"PassportDiscard\"\n java.lang.String r1 = org.telegram.messenger.LocaleController.getString(r2, r1)\n org.telegram.ui.ThemePreviewActivity$$ExternalSyntheticLambda2 r2 = new org.telegram.ui.ThemePreviewActivity$$ExternalSyntheticLambda2\n r2.<init>(r7)\n r0.setNegativeButton(r1, r2)\n org.telegram.ui.ActionBar.AlertDialog r0 = r0.create()\n r7.showDialog(r0)\n r0 = 0\n return r0\n L_0x00de:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.ThemePreviewActivity.checkDiscard():boolean\");\n }", "public boolean isRed(Color c, int GB){\n\t\treturn ( (c.getRed() > ts.getBall_r()) && (c.getBlue() <= ts.getBall_b()) && (c.getGreen() <= ts.getBall_g()) && GB < 60 );\n\t}", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tGraphics2D ga = (Graphics2D) g; \n\t\t\tif (currentColor == color) {\n\t\t\t\tShape check = factory.getShape(ShapeFactory.CHECK);\n\t\t\t\tcheck.setPosition(new Point2D.Double(point.getX() + getPreferredSize().width/2 - 7, point.getY()+ 25));\n\t\t\t\tga.setColor(currentColor);\n\t\t\t\tcheck.draw(ga);\n\t\t\t}\n\t\t}", "private boolean checkColor(boolean walkingHere) {\n\t\tint x = getMouse().getPosition().x,\n\t\t\ty = getMouse().getPosition().y + 1,\n\t\t\ti = 0;\n\t\t\n\t\tdo {\n\t\t\tsleep(10);\n\t\t\tc = getColorPicker().colorAt(x, y);\n\t\t\tif (c.getRed() == 255 && c.getGreen() == 0 && c.getBlue() == 0) {\n\t\t\t\tdebug(\"Interact color check: \"+(walkingHere ? \"failure\" : \"success\")+\" (red)!\");\n\t\t\t\treturn walkingHere ? false : true;\n\t\t\t}\n\t\t\tif (c.getRed() == 255 && c.getGreen() == 255 && c.getBlue() == 0) {\n\t\t\t\twarning(\"Interact color check: \"+(!walkingHere ? \"failure\" : \"success\")+\" (yellow)!\");\n\t\t\t\treturn walkingHere ? true : false;\n\t\t\t}\n\t\t} while (i++ < 50);\n\t\t\n\t\t// Default to true, as no color we want was found!\n\t\twarning(\"Interact color check: defaulted\");\n\t\treturn true;\n\t}", "@Test\n public void isGameOverNoRed()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n\n for (int y = 8 - 3; y < 8; y++)\n {\n for (int x = 0; x < 8; x++)\n {\n if ((x % 2) != (y % 2))\n {\n final CheckersPosition position = CheckersPosition.findByCoordinates(x, y);\n environment.removeToken(position);\n }\n }\n }\n\n assertThat(environment.getTokenCountFor(CheckersTeam.RED), is(0));\n assertThat(environment.getTokenCountFor(CheckersTeam.WHITE), is(12));\n\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertTrue(adjudicator.isGameOver(environment));\n }", "public boolean checkColorValue(String valueCombo) {\r\n\t\tString Storedvalue = valueCombo.substring(0,1);\r\n\t\tint storeValueInt = Integer.parseInt(Storedvalue);\r\n\t\tint[] colorValues = getScreenColor(lifeGlobe.getPosition().get(9 - storeValueInt).get(1), \r\n\t\t\t\tlifeGlobe.getPosition().get(9 - storeValueInt).get(0));\r\n\t\tdouble dist = calcDist(colorValues);\r\n\r\n\t\t\r\n\t\t// I might wanna rework this because it dont work 100% of the times\r\n\t\tif(dist < 40){\r\n\t\t\tfc.playSound();\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\treturn false;\r\n\t\r\n\t\t/*\r\n\t\tif(colorValues[0] != 186.0 && colorValues[0] != 91.0){\r\n\t\t\tif(colorValues[1] != 149.0 && colorValues[1] != 70.0){\r\n\t\t\t\tif(colorValues[1] != 107.0 && colorValues[1] != 45.0){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t*/\r\n\t}", "public boolean isOther() {\n\t\treturn color == null;\n\t}", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }", "boolean hasRect2Value();", "public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }", "public boolean isBlue(Color c){\n\t\treturn ( (c.getRed() <= ts.getBlue_r()) && (c.getBlue() > ts.getBlue_b()) && (c.getGreen() <= ts.getBlue_g()));\n\t}", "boolean hasGrid();", "public boolean win(){\n\t\tint num=0;//number of the boxes are in the areas\n\t\tfor(int i=0;i<boxes.size();i++){\n\t\t\tbox a =boxes.get(i);\n\t\t\tfor(int j=0;j<areas.size();j++){\n\t\t\t\tarea b = areas.get(j);\n\t\t\t\tif(a.getX()==b.getX()&&a.getY()==b.getY()){//check whether all the boxes have been in the certain areas\n\t\t\t\t\t//System.out.println(j);\n\t\t\t\t\t//System.out.println(\"area: \"+j);\n\t\t\t\t\tb.emptyImage();//clear the original image of boxes\n\t\t\t\t a.setImage();//change to the colorful one\n\t\t\t\t\tnum++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//\t b.setImage(); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(num==areas.size()){//whether their number are same \n\t\t\tnum=0;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean getCorrectFuncion(){\n\t\tif(this.getBackground().equals(Color.RED))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "boolean getFill();", "public abstract void colorChecker(Color c);", "private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isBlue() {\r\n return this.blue;\r\n }", "boolean hasIndispensableYn();", "boolean hasIndispensableYn();", "public boolean isSetPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PENCLR$12) != 0;\n }\n }", "public abstract boolean isInterior();", "private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }", "public boolean blackCheck() {\n\t\treturn false;\n\t}", "public boolean isSolved() {\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 1) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 2) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2, 3) != RubiksColor.BLUE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3, 3) != RubiksColor.BLUE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 1) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 2) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2, 3) != RubiksColor.YELLOW) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3, 3) != RubiksColor.YELLOW) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 1) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 2) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2, 3) != RubiksColor.GREEN) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3, 3) != RubiksColor.GREEN) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 1) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 2) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2, 3) != RubiksColor.WHITE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3, 3) != RubiksColor.WHITE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 1) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 2) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2, 3) != RubiksColor.ORANGE) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3, 3) != RubiksColor.ORANGE) return false;\n\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 1) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 2) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2, 3) != RubiksColor.RED) return false;\n if (getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3, 3) != RubiksColor.RED) return false;\n\n return true;\n }", "public boolean isRed() {\r\n\t\treturn getColor() == RED;\r\n\t}", "public boolean IsDisappearing(){\r\n for (int i = 2; i < 10; i++) {\r\n ArrayList<Block> blocks = blockList.GetBlockList(i);//get all blocks\r\n int[] indexI = new int[blocks.size()], indexJ = new int[blocks.size()];\r\n //put i and j of All blocks with same color on i&j arrays\r\n for (int j = 0; j < indexI.length; j++) {\r\n indexI[j] = blocks.get(j).getI();\r\n indexJ[j] = blocks.get(j).getJ();\r\n }\r\n //check if 2 block beside each other if yes return true\r\n if (CheckBoom(indexI, indexJ))\r\n return true;\r\n else if (blocks.size() == 3) {//else check if there is another block have same color if yes swap on i,j array\r\n int temp = indexI[2];\r\n indexI[2] = indexI[1];\r\n indexI[1] = temp;\r\n temp = indexJ[2];\r\n indexJ[2] = indexJ[1];\r\n indexJ[1] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n else {//else check from another side\r\n temp = indexI[0];\r\n indexI[0] = indexI[2];\r\n indexI[2] = temp;\r\n temp = indexJ[0];\r\n indexJ[0] = indexJ[2];\r\n indexJ[2] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n }\r\n }\r\n }\r\n //if not return true so its false\r\n return false;\r\n }", "private boolean checkDraw()\n {\n \tboolean IsDraw = true;\n \tfor(int i =0;i<movesPlayed.length;i++)\n \t{\n \t\t//\"O\" or \"X\"\n \t\tif (!\"X\".equals(movesPlayed[i]) || !\"O\".equals(movesPlayed[i]))\n \t\t//if(movesPlayed[i] != 'X' || movesPlayed[i] != 'O')\n \t\t{\n \t\t\t//System.out.println(movesPlayed[i]);\n \t\t\t//System.out.println(\"False condition \");\n \t\t\tIsDraw = false;\n \t\t\treturn IsDraw;\n \t\t}\n \t}\n \t//System.out.println(\"true condition \");\n \t\n \treturn IsDraw;\n }", "public boolean isPaletteApplicable() {\n \t\treturn true;\n \t}", "private void checkCircle(int col) {\n int lastRowIndex = col + ((ROW - 1) * COL);\n ObservableList<Node> childrens = grid.getChildren();\n Node firstRow = childrens.get(col);\n Node lastRow = childrens.get(lastRowIndex);\n\n if (isBlack(lastRow)) {\n switchColor(lastRow);\n } else if (!isBlack(firstRow)) {\n\n } else {\n for (int i = lastRowIndex - COL; i >= 0; i -= COL) {\n Node temp = childrens.get(i);\n if (isBlack(childrens.get(i))) {\n switchColor(temp);\n break;\n }\n }\n }\n checkPotentialCircle(col);\n }", "@Test\n\tpublic void topRightVertWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(20,22);\n\t\td.set(8,33);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(33);\n\t\tassertTrue(10==test_arr.get(0).getX() && 1==test_arr.get(0).getY());\n\n\t}", "private boolean twoRedInTheRow() {\n if (current.isRed() && current.getParent().isRed()) {\n System.out.println(\"twoRedInTheRowRight\\nCurrent and parent are red\");\n return true;\n }\n return false;\n }", "protected boolean mustDrawInterior()\n {\n return this.getActiveAttributes().isDrawInterior();\n }", "private boolean canAddRedTile() {\n\n\t\tif(isAllPiecesEaten(Game.getInstance().getCurrentPlayerColor())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isSurroundedByDeepSpace() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDeepSpace = true;\n while (i < surrounding.size() && (isAllDeepSpace)) {\n if (!isDeepSpace(surrounding.get(i))) {\n isAllDeepSpace = false;\n } else {\n i++;\n }\n }\n return isAllDeepSpace;\n }", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "private boolean colisionPalas() {\r\n\t\treturn game.racketIzq.getBounds().intersects(getBounds())\r\n\t\t\t\t|| game.racketDer.getBounds().intersects(getBounds());\r\n\t}", "private void colorDetermine(PGraphics pg) {\r\n\t\tfloat depth = getDepth();\r\n\t\t\r\n\t\tif (depth < THRESHOLD_INTERMEDIATE) {\r\n\t\t\tpg.fill(255, 255, 0);\r\n\t\t}\r\n\t\telse if (depth < THRESHOLD_DEEP) {\r\n\t\t\tpg.fill(0, 0, 255);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpg.fill(255, 0, 0);\r\n\t\t}\r\n\t}", "boolean outOfSight();", "private boolean checkOrTurn(int row,int column, ItemState itemStateCurrentPlayer, int x, int y) {\n\t\t if(column==Settings.nbrRowsColumns||column<0){\n\t\t\t return false; //Get the hell out\n\t\t }\n\t\t if(row==Settings.nbrRowsColumns||row<0){ \n\t\t\t return false; //Get the hell out\n\t\t }\n\t\t if (gameStateInt[row][column]==Helpers.getOpponentPlayerCorrespondingInt(itemStateCurrentPlayer)){ //Still another color\n\t\t\t if(checkOrTurn(row+y,column+x, itemStateCurrentPlayer, x, y)){ //continue check next\n\t\t\t\t\t changed.add(new Action(row,column));\n\t\t\t\t return true;\n\t\t\t }else{\n\t\t\t\t return false;\n\t\t\t }\n\t\t }else if (gameStateInt[row][column]==Helpers.getPlayerCorrespondingInt(itemStateCurrentPlayer)){\n\t\t\t return true; //found same color\n\t\t }else{\n\t\t\t return false; //found grass\n\t\t }\n\t }", "int getBlue(int x, int y);", "protected void attemptGridPaintSelection() {\n/* 314 */ Color c = JColorChooser.showDialog(this, localizationResources.getString(\"Grid_Color\"), Color.blue);\n/* */ \n/* 316 */ if (c != null) {\n/* 317 */ this.gridPaintSample.setPaint(c);\n/* */ }\n/* */ }", "private void redSouthThrough(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenSouthThrough[index] = false;\n }", "private void winCondition(){\n if(cleared==(int)grid.clearedToWin){\n winGame();\n }\n }", "public boolean getColor(TreeNode node){\n //null node is BLACK because we cannot have a dangling (incomplete) 2-node (RED)\n if (node == null) return BLACK;\n return node.color;\n }", "protected boolean isShapeFilled(Plot plot, int series, int item, double x, double y) {\n return false;\n }", "boolean isAllowed(int rgb, float[] hsl);", "public void getAllianceColor() {\n DriverStation.Alliance color;\n color = DriverStation.getInstance().getAlliance();\n if (color == DriverStation.Alliance.valueOf(\"Blue\")) {\n blue();\n } else if (color == DriverStation.Alliance.valueOf(\"Red\")) {\n red();\n } else {\n scannerGray();\n }\n }", "public boolean isBlueReady() {\n if (FieldAndRobots.getInstance().isAllianceReady(FieldAndRobots.BLUE)) {\n blueSideReady.setBackground(READY);\n return true;\n } else {\n blueSideReady.setBackground(NOT_READY);\n return false;\n }\n }", "private boolean isRed(Node x) {\n if (x == null)\n return false;\n return x.color == RED;\n }" ]
[ "0.64540946", "0.6361941", "0.63102674", "0.624872", "0.6218272", "0.61493516", "0.61294943", "0.611387", "0.6086392", "0.6034445", "0.60324115", "0.5979573", "0.59730357", "0.5957277", "0.59485704", "0.5916175", "0.58770186", "0.58631444", "0.5861266", "0.5842565", "0.5823041", "0.5817743", "0.58112997", "0.58054507", "0.57980835", "0.5779829", "0.577848", "0.57320875", "0.5726735", "0.5701598", "0.5691336", "0.56552345", "0.5654636", "0.56378067", "0.56174684", "0.56101775", "0.5609711", "0.5608498", "0.5592275", "0.55907154", "0.5586934", "0.5581417", "0.55801743", "0.5573036", "0.556965", "0.5569133", "0.55631036", "0.5560666", "0.55459976", "0.5543876", "0.5532196", "0.5531413", "0.5507841", "0.54884166", "0.5483079", "0.5481774", "0.54790545", "0.54729944", "0.5470042", "0.5464732", "0.54619694", "0.54560995", "0.5450826", "0.54496837", "0.5443462", "0.54391265", "0.5432225", "0.5427267", "0.5419722", "0.5419722", "0.54152393", "0.54137784", "0.5391506", "0.5391301", "0.5387463", "0.5386667", "0.537846", "0.537806", "0.53759956", "0.53757817", "0.5374482", "0.5372859", "0.536969", "0.5365923", "0.53571814", "0.53452444", "0.53434587", "0.53338915", "0.5329603", "0.5329302", "0.5326473", "0.53239024", "0.53181475", "0.5302448", "0.53005123", "0.5300229", "0.5298879", "0.52960366", "0.529549", "0.529519" ]
0.57649964
27
TODO event.registerServerCommand(new CommandLevel()); event.registerServerCommand(new CommandGame());
public static void load(FMLServerStartingEvent event) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "private void registerCommands() {\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.HOME.toString())) {\r\n\t\t\t(new HomeCommand(this)).register();\r\n\t\t\t(new SetHomeCommand(this)).register();\r\n\t\t\t(new DelHomeCommand(this)).register();\r\n\t\t\t(new ListHomesCommand(this)).register();\r\n\t\t\t(new NearbyHomesCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.BACK.toString())) {\r\n\t\t\t(new Back(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.TPASK.toString())) {\r\n\t\t\t(new TeleportToggle(this)).register();\r\n\t\t\t(new TpAsk(this)).register();\r\n\t\t\t(new TpAskHere(this)).register();\r\n\t\t\t(new TeleportAccept(this)).register();\r\n\t\t\t(new TeleportDeny(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.TELEPORT.toString())) {\r\n\t\t\t(new Teleport(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.SPEED_SETTING.toString())) {\r\n\t\t\t(new SpeedCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.FLY.toString())) {\r\n\t\t\t(new FlyCommand(this)).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.GAMEMODE.toString())) {\r\n\t\t\tGameModeCommand gmc = new GameModeCommand(this);\r\n\t\t\tPlayerLoader loader = new PlayerLoader(true, false, false, false);\r\n\t\t\tGameModeLoader gml = new GameModeLoader(true);\r\n\t\t\tgmc.setLoader(gml);\r\n\t\t\tgml.setLoader(loader);\r\n\t\t\tgmc.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.PLAYER_CMD.toString())) {\r\n\t\t\t// create command and player loader\r\n\t\t\tPlayerCommand pc = new PlayerCommand();\r\n\t\t\tPlayerLoader playerLoader = new PlayerLoader(true, false, false, false);\r\n\t\t\t\r\n\t\t\t// create components\r\n\t\t\tFeedComponent fc = new FeedComponent();\r\n\t\t\tfc.setLoader(playerLoader);\r\n\t\t\tStarveComponent sc = new StarveComponent();\r\n\t\t\tsc.setLoader(playerLoader);\r\n\t\t\tHealComponent hc = new HealComponent();\r\n\t\t\thc.setLoader(playerLoader);\r\n\t\t\tKillComponent kc = new KillComponent();\r\n\t\t\tkc.setLoader(playerLoader);\r\n\t\t\tBurnComponent bc = new BurnComponent();\r\n\t\t\tbc.setLoader(playerLoader);\r\n\t\t\tExtinguishComponent ec = new ExtinguishComponent();\r\n\t\t\tec.setLoader(playerLoader);\r\n\t\t\tLightningComponent lc = new LightningComponent();\r\n\t\t\tlc.setLoader(playerLoader);\r\n\t\t\tLightningEffectComponent lec = new LightningEffectComponent();\r\n\t\t\tlec.setLoader(playerLoader);\r\n\t\t\t\r\n\t\t\tPlayerLoader gcLoader = new PlayerLoader(false, false, false, false);\r\n\t\t\tBinaryLoader ooc = new BinaryLoader(true, BinaryLoader.BINARY.ENABLE_DISABLE);\r\n\t\t\tooc.setLoader(gcLoader);\r\n\t\t\t\r\n\t\t\tInvincibleComponent gc = new InvincibleComponent();\r\n\t\t\tgc.setLoader(ooc);\r\n\t\t\t\r\n\t\t\t// add components\r\n\t\t\tpc.addComponent(\"feed\", fc);\r\n\t\t\tpc.addComponent(\"starve\", sc);\r\n\t\t\tpc.addComponent(\"heal\", hc);\r\n\t\t\tpc.addComponent(\"invincible\", gc);\r\n\t\t\tpc.addComponent(\"kill\", kc);\r\n\t\t\tpc.addComponent(\"burn\", bc);\r\n\t\t\tpc.addComponent(\"extinguish\", ec);\r\n\t\t\tpc.addComponent(\"lightning\", lc);\r\n\t\t\tpc.addComponent(\"lightningeffect\", lec);\r\n\t\t\t\r\n\t\t\t// register command\r\n\t\t\tpc.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.HAT.toString())) {\r\n\t\t\t// /hat command\r\n\t\t\t(new HatCommand()).register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.WORKBENCH_ENDERCHEST.toString())) {\r\n\t\t\t// /enderchest and /workbench commands\r\n\t\t\tWorkbenchCommand wb = new WorkbenchCommand();\r\n\t\t\twb.setPermission(\"karanteenials.inventory.workbench\");\r\n\t\t\twb.register();\r\n\t\t\t\r\n\t\t\tEnderChestCommand ec = new EnderChestCommand();\r\n\t\t\tec.setPermission(\"karanteenials.inventory.enderchest\");\r\n\t\t\tec.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.CLEAR_INVENTORY.toString())) {\r\n\t\t\tClearInventoryCommand cic = new ClearInventoryCommand();\r\n\t\t\tPlayerLoader pl = new PlayerLoader(true, false, false, false);\r\n\t\t\tMaterialLoader ml = new MaterialLoader(true, false, false);\r\n\t\t\tpl.setLoader(ml);\r\n\t\t\tcic.setLoader(pl);\r\n\t\t\tpl.setPermission(\"karanteenials.inventory.clear-multiple\");\r\n\t\t\tcic.setPermission(\"karanteenials.inventory.clear\");\r\n\t\t\tcic.register();\r\n\t\t}\r\n\t\t\r\n\t\t// /nick command\r\n\t\t/*if(getSettings().getBoolean(KEY_PREFIX+KEYS.NICK.toString())) {\r\n\t\t\tNickCommand nc = new NickCommand();\r\n\t\t\tnc.register();\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t// /enchant command\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.ENCHANT_COMMAND.toString())) {\r\n\t\t\tEnchantCommand ec = new EnchantCommand();\r\n\t\t\t\r\n\t\t\tGiveEnchantmentComponent gec = new GiveEnchantmentComponent();\r\n\t\t\tgec.setPermission(\"karanteenials.enchant.set\");\r\n\t\t\t\r\n\t\t\tRemoveEnchantmentComponent rec = new RemoveEnchantmentComponent();\r\n\t\t\trec.setPermission(\"karanteenials.enchant.remove\");\r\n\t\t\t\r\n\t\t\tec.addComponent(\"give\", gec);\r\n\t\t\tec.addComponent(\"remove\", rec);\r\n\t\t\t\r\n\t\t\tEnchantmentLoader giveEnchLoader = new EnchantmentLoader();\r\n\t\t\tgec.setLoader(giveEnchLoader);\r\n\t\t\t\r\n\t\t\tEnchantmentLoader removeEnchLoader = new EnchantmentLoader();\r\n\t\t\trec.setLoader(removeEnchLoader);\r\n\t\t\t\r\n\t\t\tLevelLoader ll = new LevelLoader();\r\n\t\t\tgiveEnchLoader.setLoader(ll);\r\n\t\t\t\r\n\t\t\tec.register();\r\n\t\t}\r\n\t\t\r\n\t\t// /rtp command\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.RANDOM_TELEPORT.toString())) {\r\n\t\t\tRandomTeleport rtp = new RandomTeleport();\r\n\t\t\tPlayerLoader pl = new PlayerLoader(true, false, true, false);\r\n\t\t\trtp.setLoader(pl);\r\n\t\t\trtp.register();\r\n\t\t}\r\n\t\t\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.NEAR_COMMAND.toString())) {\r\n\t\t\tNearCommand nc = new NearCommand();\r\n\t\t\tnc.setPermission(\"karanteenials.near\");\r\n\t\t\tnc.register();\r\n\t\t}\r\n\t}", "private void registerCommands() {\n }", "private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }", "private void sendGameCommand(){\n\n }", "public abstract void onCommand(MessageEvent context) throws Exception;", "@Override\n public void registerClientCommands(CommandHandler handler) {\n new InGameCommands(handler);\n }", "CommandHandler() {\n registerArgument(new ChallengeCmd());\n registerArgument(new CreateCmd());\n }", "private void getGameCommands(){\n\n }", "protected abstract void registerCommands(CommandHandler handler);", "void sendCommand(CommandEvent event);", "private void customCommands(MessageEvent message) {\r\n String command = message.getMessage();\r\n \r\n if (!reservedCommands.contains(command)) {\r\n String[]info;\r\n info = manager.getCommandFromDatabase(command, message.getChannel().getName());\r\n\r\n //checks if the command is in custom mod commands\r\n if (info[1].matches(\"-m\")) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"You're not allowed to use this command.\");\r\n }\r\n }\r\n //checks if the command is in the custom commands available to everyone\r\n else if (info[1].matches(\"-e\")) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"No such command exists\");\r\n }\r\n }\r\n }", "public void handleCommand(String command, String args[], Player player){\n\t}", "public void registerCommands() {\n commands = new LinkedHashMap<String,Command>();\n \n /*\n * admin commands\n */\n //file util cmds\n register(ReloadCommand.class);\n register(SaveCommand.class);\n \n //shrine cmds\n register(KarmaGetCommand.class);\n register(KarmaSetCommand.class); \n }", "private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }", "CommandTypes(String command) {\n this.command = command;\n }", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "public void handleCommand(String command);", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}", "@Override\n public void addCommand(CommandConfig command) {\n }", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "public interface ServerCommand {\n\t\n\t/**\n\t * Command wird ausgef&uuml;hrt.\n\t * \n\t * @param m Member, welcher den Command ausgef&uuml;hrt hat.\n\t * @param c TextChannel, in dem der Command ausgef&uuml;hrt wurde.\n\t * @param msg Message, in der der Command steht.\n\t */\n public abstract void performCommand(Member m, TextChannel c, Message msg);\n}", "public void addCommand(Object cmd) {\n Message msg = this.handler.obtainMessage(0);\n msg.obj = cmd;\n this.handler.sendMessage(msg);\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "@NotNull\n CommandResult onCommand(@NotNull Player player, @NotNull String[] params);", "public void registerCommands() {\n\t CommandSpec cmdCreate = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdCreate.getInstance())\n\t .permission(\"blockyarena.create\")\n\t .build();\n\n\t CommandSpec cmdRemove = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdRemove.getInstance())\n\t .permission(\"blockyarena.remove\")\n\t .build();\n\n\t CommandSpec cmdJoin = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"mode\")))\n\t )\n\t .executor(CmdJoin.getInstance())\n\t .build();\n\n\t CommandSpec cmdQuit = CommandSpec.builder()\n\t .executor(CmdQuit.getInstance())\n\t .build();\n\n\t CommandSpec cmdEdit = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t GenericArguments.optional(onlyOne(GenericArguments.string(Text.of(\"param\"))))\n\t )\n\t .executor(CmdEdit.getInstance())\n\t .permission(\"blockyarena.edit\")\n\t .build();\n\n\t CommandSpec cmdKit = CommandSpec.builder()\n\t .arguments(onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdKit.getInstance())\n\t .build();\n\n\t CommandSpec arenaCommandSpec = CommandSpec.builder()\n\t .child(cmdEdit, \"edit\")\n\t .child(cmdCreate, \"create\")\n\t .child(cmdRemove, \"remove\")\n\t .child(cmdJoin, \"join\")\n\t .child(cmdQuit, \"quit\")\n\t .child(cmdKit, \"kit\")\n\t .build();\n\n\t Sponge.getCommandManager()\n\t .register(BlockyArena.getInstance(), arenaCommandSpec, \"blockyarena\", \"arena\", \"ba\");\n\t }", "@Override\r\n public void execute(Command command) {\n\r\n }", "public interface Command {\n\n\n}", "boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);", "public CommandHandler() {\r\n\t\tcommands.put(\"userinfo\", new UserInfoCommand());\r\n\t\tcommands.put(\"verify\", new VerifyCommand());\r\n\t\tcommands.put(\"ping\", new PingCommand());\r\n\t\tcommands.put(\"rapsheet\", new RapsheetCommand());\r\n\t\tcommands.put(\"bet\", new BetCommand());\r\n\t\tcommands.put(\"buttons\", new ButtonCommand());\r\n\r\n\t\t// for each command in commands\r\n\t\t// call getAlternativeName and assign to that key\r\n\t\tcommands.keySet().stream().forEach(key -> {\r\n\t\t\tList<String> alts = commands.get(key).getAlternativeNames();\r\n\t\t\tif (alts != null)\r\n\t\t\t\talts.forEach(a -> commandAlternative.put(a, key));\r\n\t\t});\r\n\t}", "public void addCommand(Command m);", "public void sendCommand(Command cmd);", "public interface GameCommand\r\n{\r\n void execute(Game game);\r\n}", "public void configureSocketEvents() {\n socket.on(\"startGame\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n\n try {\n String start = (String) data.getString(\"room\");\n if (start.equals(roomHost)) {\n startGame = true;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).on(\"playerNames\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONArray data = (JSONArray) args[0];\n try {\n\n for (int i = 0; i < data.length(); i++) {\n playerNames[i] = (String) data.getString(i);\n }\n for (int i = data.length(); i < maxPlayers; i++) {\n playerNames[i] = \"Empty\";\n }\n updateNames();\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to update names\");\n }\n }\n }).on(\"maxPlayers\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n maxPlayers = (int) data.getInt(\"maxPlayers\");\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n }).on(\"lobbyUpdate\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n String room = (String) data.getString(\"id\");\n if (room.equals(roomHost)) {\n updateLobby();\n }\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n }).on(\"roomCanceled\", new Emitter.Listener() {\n @Override\n public void call(Object... args) {\n JSONObject data = (JSONObject) args[0];\n try {\n String room = (String) data.getString(\"roomid\");\n if (room.equals(roomHost)) {\n mainmenu = true;\n }\n } catch (JSONException e) {\n Gdx.app.log(\"multiplayer\", \"unable to get max players\");\n }\n }\n });\n }", "public void addCommand(CommandIF command) {\r\n\t\tmelody.add(command);\r\n\t}", "private void registerCommands() {\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtick\")\n\t\t\t\t\t\t.then(argument(\"Number of Ticks Between Sends\", integer())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.timeBetween = getInteger(c, \"Number of Ticks Between Sends\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message will be sent every \" + getInteger(c, \"Number of Ticks Between Sends\") + \" ticks.\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurphrase [Recurring Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurphrase\")\n\t\t\t\t\t\t.then(argument(\"Recurring Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentPhrase = getString(c, \"Recurring Phrase\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + getString(c, \"Recurring Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurtoggle\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtoggle\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.persistentChat = !config.persistentChat;\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message has been turned \" + (config.persistentChat ? \"on\" : \"off\") + \".\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//arrecur [Enabled?]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecur\")\n\t\t\t\t\t\t.then(argument(\"Enabled?\", bool())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentChat = getBool(c, \"Enabled?\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + (config.persistentChat ? \"on\" : \"off\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//aradditem [Item Name] [Trigger Term]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddterm\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string())\n\t\t\t\t\t\t\t\t.then(argument(\"Trigger Term\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.terms.add(getString(c, \"Trigger Term\") + \"|\" + getString(c, \"Item Name\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tHelper.setupChatMessages();\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added term \\\"\" + getString(c, \"Trigger Term\") + \"\\\" to item \\\"\" + getString(c, \"Item Name\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t})))\n\t\t));\n\t\t//araddin [In Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddin\")\n\t\t\t\t\t\t.then(argument(\"In Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.ins.add(getString(c, \"In Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added in-phrase \\\"\" + getString(c, \"In Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//araddout [Out Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddout\")\n\t\t\t\t\t\t.then(argument(\"Out Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.outs.add(getString(c, \"Out Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added out-phrase \\\"\" + getString(c, \"Out Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arreload\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arreload\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tarreload();\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"AutoReply config reloaded.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//araddshopitem [Item Name] [Quantity] [Price]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddshopitem\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string()).then(argument(\"Quantity\", string()).then(argument(\"Price\", string())\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.shopItems.add(getString(c, \"Item Name\") + \"|\" + getString(c, \"Quantity\") + \"|$\" + getString(c, \"Price\"));\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added \" + getString(c, \"Item Name\") + \" to shop stock.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t}))))\n\t\t));\n\t}", "public void processCommand(String command, MessageReceivedEvent event){\n command = command.toLowerCase();\n String[] parsing = command.split(\" \");\n switch(parsing[1]){\n case \"new\":\n validateNewCraftEntry(parsing, event);\n break;\n case \"list\":\n generateCraftingList(event);\n break;\n case \"help\":\n showHelp(event);\n break;\n case \"listall\":\n listall(event);\n break;\n case \"cancel\":\n cancelCraft(event);\n break;\n }\n }", "Commands createCommands();", "public void setCommand(String command) {\n this.command = command;\n }", "public AGameCommand(Command command) {\n this.game = Game.getInstance();\n this.command = command;\n }", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "public static void handleCommand(Player player) {\n // Check if the player has the permission\n if(!player.hasPermission(\"advent.use\")) {\n player.sendMessage(StaticMessages.NO_COMMAND_PERMISSIONS);\n return;\n }\n\n // Return help menu\n player.sendMessage(StaticMessages.HELP_TITLE);\n player.sendMessage(StaticMessages.HELP_HELP_CMD);\n player.sendMessage(StaticMessages.HELP_INFO_CMD);\n\n if(player.hasPermission(\"advent.admin\")) {\n player.sendMessage(StaticMessages.HELP_ADMIN_CMD);\n player.sendMessage(StaticMessages.HELP_SET_CMD);\n player.sendMessage(StaticMessages.HELP_LOAD_CMD);\n }\n }", "@Override\n public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {\n if (event.getAuthor().isBot()) { // ignore other bots and ourselves too\n return;\n }\n\n String[] args = event.getMessage().getContentRaw().split(\"\\\\s+\");\n\n if (args[0].startsWith(CommandHandler.prefix)) { // Check if prefix is correct\n Molly.logger.info(\"User \" + event.getAuthor().getName() + \" tried to invoke \" + args[0].substring(1).toLowerCase());\n switch (args[0].substring(1).toLowerCase()) {\n case \"info\":\n new Info(args, event).run();\n break;\n case \"summon\":\n new Summon(args, event).run();\n break;\n case \"ping\":\n new Pong(args, event).run();\n break;\n case \"sad\":\n new Sad(args, event).run();\n break;\n case \"annoy\":\n new Annoy(args, event).run();\n break;\n case \"say\":\n new Say(args, event).run();\n break;\n default:\n event.getChannel().sendMessage(\"I don't know this command. Type ** \" + CommandHandler.prefix + \"info** for a list of all commands.\").queue();\n }\n }\n }", "void commandStarted(Command c);", "public interface GuestCommand extends Command {\n}", "public AddCommand(Event event) {\n this.event = event;\n }", "private static void parse(String[] command, Player player) {\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}", "public static void logCommand(GuildMessageReceivedEvent event) {\n }", "public void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Listener\n public void onServerStart(GameStartedServerEvent event) {\n logger.debug(\"*************************\");\n logger.debug(\"HI! MY PLUGIN IS WORKING!\");\n logger.debug(\"*************************\");\n }", "public interface RouterDemoCommand {\n // Ui command begin\n String goDemoHomeActivity = \"goDemoHomeActivity\";\n // Ui command end\n\n // Data command begin\n // Data command end\n\n // Op command begin\n // Op command end\n}", "public EventType getCommand(){\n return this.command;\n }", "private void initHandlers(){\n\t\thandlers.put((byte) 0x02, new Cmd02());\n\t\t//handlers.put((byte) 0x03, new Cmd03());\n\t\thandlers.put((byte) 0x04, new Cmd04());\n\t\thandlers.put((byte) 0x05, new Cmd05());\n\t\thandlers.put((byte) 0x06, new Cmd06());\n\t\thandlers.put((byte) 0x07, new Cmd07());\n\t\thandlers.put((byte) 0x08, new Cmd08());\n\t\thandlers.put((byte) 0x80, new Cmd80());\n\t\thandlers.put((byte) 0x81, new Cmd81());\n\t\thandlers.put((byte) 0x82, new Cmd82());\n\t\thandlers.put((byte) 0x83, new Cmd83());\n\t\thandlers.put((byte) 0x84, new Cmd84());\n\t\thandlers.put((byte) 0x85, new Cmd85());\n\t\thandlers.put((byte) 0x86, new Cmd86());\n\t}", "public abstract void executeCommand(@Nonnull SlashCommandEvent event, @Nullable Member sender, @Nonnull SlashCommandContext ctx) throws SQLException;", "public void triggerEvent(Event event, BaseEntity command);", "public void registerCommand(BaseCommand baseCommand) throws Exception {\n baseCommand.setShard(shard);\n Command botCommand = baseCommand.botCommand;\n for (BaseCommand cmd : baseCommands) {\n if (StringUtils.stripAccents(cmd.getCommandIdentifier()).equalsIgnoreCase(StringUtils.stripAccents\n (botCommand.getCommandIdentifier())))\n {\n System.out.println(\"Multiple baseCommands cannot be registered under the same name. Ignoring new \" +\n \"instance\" +\n \".\\n\" +\n \"Name: \" + baseCommand.toString());\n return;\n }\n }\n botCommand.setupSubcommands();\n baseCommands.add(baseCommand);\n commandUsages.put(baseCommand.commandIdentifier, (long) 0);\n System.out.println(\"Successfully registered \" + baseCommand.toString());\n }", "network.message.PlayerResponses.Command getCommand();", "private void execute(String command) {\n if (command.equals(\"lf\")) {\n listFrames();\n } else if (command.equals(\"le\")) {\n listEvents();\n } else if (command.equals(\"af\")) {\n addFrame();\n } else if (command.equals(\"ae\")) {\n addEvent();\n } else if (command.equals(\"rf\")) {\n removeFrame();\n } else if (command.equals(\"re\")) {\n removeEvent();\n } else if (command.equals(\"ve\")) {\n viewEvents();\n } else if (command.equals(\"li\")) {\n lorentzInvariant();\n } else if (command.equals(\"s\")) {\n saveWorld();\n } else if (command.equals(\"l\")) {\n loadWorld();\n } else {\n System.out.println(\"Command not recognized.\");\n }\n }", "public interface CommandExecutor {\n /**\n * This method parse a commands from string and call it\n *\n * @param sender ource of the commands\n * @param connectionCommand commands\n * @return true if a valid commands, otherwise false\n */\n default boolean onCommand(CommandSender sender, ConnectionCommand connectionCommand) {\n String[] split = connectionCommand.getCommand().split(\" \");\n\n return onCommand(sender, split[0], Arrays.copyOfRange(split, 1, split.length), connectionCommand.getArgs());\n }\n\n /**\n * Executes the given commands, returning its success\n *\n * @param sender ource of the commands\n * @param command Command which was executed\n * @param args Passed commands arguments\n * @param objects Objects\n * @return true if a valid commands, otherwise false\n */\n boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);\n\n}", "@Override\r\n\tpublic void onMessageCreate(MessageCreateEvent event) {\n\t\tif (event.getMessageContent().startsWith(\"!\") && event.getChannel().getId() == 310560101352210432L) {\r\n\t\t\t// remove prefix from string and anything after\r\n\t\t\tString command = event.getMessageContent().substring(1).split(\" \")[0].toLowerCase();\r\n\t\t\t// check if original command name\r\n\t\t\tif (commands.containsKey(command))\r\n\t\t\t\tcommands.get(command).process(event);\r\n\t\t\t// check if alternative name for command\r\n\t\t\telse if (commandAlternative.containsKey(command))\r\n\t\t\t\tcommands.get(commandAlternative.get(command)).process(event);\r\n\r\n\t\t\tlogger.info(event.getMessageAuthor().getDiscriminatedName() + \" invoked: \" + command);\r\n\t\t}\r\n\r\n\t}", "@EventHandler\n public void onInventoryClick(InventoryClickEvent event) {\n //if clicked outside of area, return\n if(event.getCurrentItem() == null){\n return;\n }\n\n //test if this is one of our menus\n Menu menu = null;\n Boolean ourMenu = false;\n for (Menu m : plugin.menuList) {\n if (m.getMenuName().equalsIgnoreCase(event.getClickedInventory().getName())){\n menu = m;\n ourMenu = true;\n break;\n }\n }\n\n if (!ourMenu) {\n //not our menu\n return;\n }\n\n //it is our GUI\n //stop moving item straight away\n event.setCancelled(true);\n\n Player player = (Player) event.getWhoClicked();\n\n //get item through slot that was clicked\n int clickedSlot = event.getSlot();\n Item item = menu.getItems().stream().filter((i) -> i.getSlot() == clickedSlot).findFirst().orElse(null);\n\n\n //if item clicked is null, just do nothing\n if (item == null) {\n return;\n }\n //get stored arrays\n CommandMemory savedCmds = plugin.cmdMemoryList.stream()\n .filter((cm) -> cm.uuid.equalsIgnoreCase(player.getUniqueId().toString()))\n .findFirst()\n .orElse(null);\n\n //check that we actually have the command saved\n if (savedCmds == null) {\n //command has not been saved\n plugin.console.log(\"Unable to find saved ARgs\");\n return;\n }\n\n String CommandToRun;//this string will hold every command\n\n\n //execute console commands\n for (String consoleCMD : item.getCommands()) {\n CommandToRun = consoleCMD.replace(\"{player}\", player.getName());//puts this player in the command\n //add in args\n for (Argument a : savedCmds.args) {\n CommandToRun = CommandToRun.replace(\"$arg\" + a.getArgNum(), a.getName());\n }\n\n //run command\n if (CommandToRun.contains(\"[console]\")) {\n //run as console\n plugin.getServer()\n .dispatchCommand(\n plugin.getServer().getConsoleSender(),\n CommandToRun.replace(\"[console]\", \"\").trim());\n } else if (CommandToRun.contains(\"[player]\")) {\n //run as player\n player.performCommand(CommandToRun.replace(\"[player]\", \"\").trim());\n } else if (CommandToRun.contains(\"[message]\")) {\n //message caller\n player.sendMessage(menu.getPrefix()\n + ChatColor.RESET\n + CommandToRun.replace(\"[message]\", \"\").trim());\n } else if (CommandToRun.contains(\"[close]\")) {\n //close menu\n player.closeInventory();//close invent for player\n plugin.cmdMemoryList.remove(savedCmds);\n } else if (CommandToRun.contains(\"[refresh]\")) {\n //refresh item that was clicked\n menu.refreshMenu(event);\n } else {\n //don't know how to handle.... let console know\n plugin.console.log(\"Unknown command: \" + CommandToRun);\n //let player know\n player.sendMessage(menu.getPrefix() + ChatColor.RED + \"There was a problem with running your command. Please report this.\");\n }\n }\n }", "protected String getCommand() {\n\treturn \"GAME\";\n }", "public void setCommand(String command)\n {\n this.command = command;\n }", "@Override\n public void addPostCommand(String postCommand) {\n }", "public void setCommand(String command){\r\n commandUpdate=command;\r\n }", "public abstract void execute(CommandSender sender, String[] args);", "public void onCmd(String cmd) \n {\n \tString split[] = cmd.split(\" \");\n \tif (split.length <= 1)\n \t{\n \t\tacm(\"No command was typed. Use \\\"help\\\" for a list of commands\");\n \t\treturn;\n \t}\n \telse\n \t{\n \t\tfor (ICommand command : commands)\n \t\t{\n \t\t\tif (command.getCommand().equalsIgnoreCase(split[1]))\n \t\t\t{\n \t\t\t\tcommand.onCmd(split);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\tacm(\"\\\"\" + split[1] + \"\\\" Unknown command. Use \\\"help\\\" for a list of commands\");\n \t}\n }", "public interface Command {\n\t public String execute(String[] request);\n}", "private void handleCommands() {\n for (Command c : commands) {\n try {\n if (!game.isPaused()) {\n switch (c) {\n case INTERACT:\n game.interact();\n break;\n case PRIMARY_ATTACK:\n game.shoot(mouse.getX(), mouse.getY());\n break;\n case SECONDARY_ATTACK:\n game.specialAbility(mouse.getX(), mouse.getY());\n break;\n case PAUSE:\n game.pauseGame();\n break;\n }\n }\n } catch (Exception ignored) { }\n }\n }", "public void registerCommand(Command c) {\n\t\tcommands.add(c);\n\t}", "@Override\n public void initDefaultCommand() {\n\n }", "protected void setCommand(String command)\n {\n Command = command;\n }", "private void putCommands() {\r\n ShellCommand charset = new CharsetCommand();\r\n commands.put(charset.getCommandName(), charset);\r\n ShellCommand symbol = new SymbolCommand();\r\n commands.put(symbol.getCommandName(), symbol);\r\n ShellCommand exit = new ExitCommand();\r\n commands.put(exit.getCommandName(), exit);\r\n ShellCommand cat = new CatCommand();\r\n commands.put(cat.getCommandName(), cat);\r\n ShellCommand copy = new CopyCommand();\r\n commands.put(copy.getCommandName(), copy);\r\n ShellCommand ls = new LsCommand();\r\n commands.put(ls.getCommandName(), ls);\r\n ShellCommand mkdir = new MkdirCommand();\r\n commands.put(mkdir.getCommandName(), mkdir);\r\n ShellCommand hexdump = new HexdumpCommand();\r\n commands.put(hexdump.getCommandName(), hexdump);\r\n ShellCommand tree = new TreeCommand();\r\n commands.put(tree.getCommandName(), tree);\r\n ShellCommand help = new HelpCommand();\r\n commands.put(help.getCommandName(), help);\r\n ShellCommand pwd = new PwdCommand();\r\n commands.put(pwd.getCommandName(), pwd);\r\n ShellCommand cd = new CdCommand();\r\n commands.put(cd.getCommandName(), cd);\r\n ShellCommand pushd = new PushdCommand();\r\n commands.put(pushd.getCommandName(), pushd);\r\n ShellCommand popd = new PopdCommand();\r\n commands.put(popd.getCommandName(), popd);\r\n ShellCommand listd = new ListdCommand();\r\n commands.put(listd.getCommandName(), listd);\r\n ShellCommand dropd = new DropdCommand();\r\n commands.put(dropd.getCommandName(), dropd);\r\n ShellCommand rmtree = new RmtreeCommand();\r\n commands.put(rmtree.getCommandName(), rmtree);\r\n ShellCommand cptree = new CptreeCommand();\r\n commands.put(cptree.getCommandName(), cptree);\r\n ShellCommand massrename = new MassrenameCommand();\r\n commands.put(massrename.getCommandName(), massrename);\r\n }", "public static void main(String[] args) {\n//\n// remote.setCommand(garageDoorOpenCommand);\n// remote.buttonWasPressed();\n\n RemoteControl remoteControl = new RemoteControl();\n\n Light livingRoomLight = new Light(\"Living Room\");\n Light kitchenLight = new Light(\"Kitchen\");\n CeilingFan ceilingFan = new CeilingFan(\"Living Room\");\n GarageDoor garageDoor = new GarageDoor(\"\");\n Stereo stereo = new Stereo(\"Living Room\");\n\n LightOnCommands livingRoomLightsOn = new LightOnCommands(livingRoomLight);\n LightOffCommand livingRoomLightsOff = new LightOffCommand(livingRoomLight);\n LightOnCommands kitchenLightsOn = new LightOnCommands(kitchenLight);\n LightOffCommand kitchenLightsOff = new LightOffCommand(kitchenLight);\n\n CeilingFanOnCommand ceilingFanOnCommand = new CeilingFanOnCommand(ceilingFan);\n CeilingFanOffCommand ceilingFanOffCommand = new CeilingFanOffCommand(ceilingFan);\n\n GarageDoorOpenCommand garageDoorOpenCommand = new GarageDoorOpenCommand(garageDoor);\n GarageDoorCloseCommand garageDoorCloseCommand = new GarageDoorCloseCommand(garageDoor);\n\n StereoOnWithCdCommand stereoOnWithCdCommand = new StereoOnWithCdCommand(stereo);\n StereoOffCommand stereoOffCommand = new StereoOffCommand(stereo);\n\n\n remoteControl.setCommand(0, livingRoomLightsOn, livingRoomLightsOff);\n remoteControl.setCommand(1, kitchenLightsOn, kitchenLightsOff);\n remoteControl.setCommand(2, ceilingFanOnCommand, ceilingFanOffCommand);\n remoteControl.setCommand(3, stereoOnWithCdCommand, stereoOffCommand);\n\n System.out.println(remoteControl);\n\n remoteControl.onButtonWasPushed(0);\n remoteControl.offButtonWasPushed(0);\n remoteControl.onButtonWasPushed(1);\n remoteControl.offButtonWasPushed(1);\n remoteControl.onButtonWasPushed(2);\n remoteControl.offButtonWasPushed(2);\n remoteControl.onButtonWasPushed(3);\n remoteControl.offButtonWasPushed(3);\n }", "public interface Command {\n void execute();\n\n void printCommandInfo();\n}", "public static void runCommand(GuildMessageReceivedEvent event, String[] args) {\n\t\tEmbedBuilder info = new EmbedBuilder();\r\n\t\t\r\n\t\t//if (args.length == 0) return;\r\n\t\t\r\n\t\t//if (args[0].equalsIgnoreCase(Bot_Main.PREFIX + command)) {\r\n\t\t\t//check if user can use the command\r\n\t\t\tif (!Functions.passPermCheck(event, \"report\")) {\r\n\t\t\t\tevent.getChannel().sendMessage(\"You do not have permission to use this command.\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (ChallongeDataManager.API_KEY.equals(\"\") || ChallongeDataManager.API_KEY == null) {\r\n\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\tinfo.addField(\"Problem\",\"You need to input your challonge api key through \"+Bot_Main.PREFIX+\"apikey\",false);\r\n\t\t\t\tinfo.addField(\"What the heck is an api key?\",\"https://challonge.com/settings/developer\",false);\r\n\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\tinfo.clear();\r\n\t\t\t} else if (ChallongeDataManager.TOURNEY_URL.equals(\"\") || ChallongeDataManager.TOURNEY_URL == null) {\r\n\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\tinfo.addField(\"Problem\",\"You need to create a tournament with a new URL or use \"+Bot_Main.PREFIX+\"seturl or specify the current url via \"+Bot_Main.PREFIX+\"seturl [tournament_url]\",false);\r\n\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\tinfo.clear();\r\n\t\t\t} else if (ChallongeDataManager.USERNAME.equals(\"\") || ChallongeDataManager.USERNAME == null) {\r\n\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\tinfo.addField(\"Problem\",\"You need to set the username with \"+Bot_Main.PREFIX+\"username\",false);\r\n\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\tinfo.clear();\r\n\t\t\t} else if (!ChallongeDataManager.getTournamentDataString(\"state\").equals(\"underway\")) { \r\n\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\tinfo.addField(\"Problem\",\"This tournament is not in a state where you can submit scores.\",false);\r\n\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\tinfo.clear();\r\n\t\t\t} else if (args.length > 5 || args.length < 5) {\r\n\t\t\t\t//ERROR usage !create [tournament name] [tournament URL]\r\n\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\tinfo.addField(\"Problem\",\"Invalid usage.\",false);\r\n\t\t\t\tinfo.addField(\"Correct Usage\",Bot_Main.PREFIX+command+\" 'your name' 'your_score' 'opponent name' 'opponent_score'\",false);\r\n\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\tinfo.clear();\r\n\t\t\t} else {\r\n\t\t\t\tif (Configs.only_users_in_match_report && !event.getAuthor().getName().equals(args[1])) {\r\n\t\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\t\tinfo.addField(\"Problem\",\"Invalid usage. You didn't put your name.\",false);\r\n\t\t\t\t\tinfo.addField(\"Correct Usage\",Bot_Main.PREFIX+command+\" 'your name' 'your_score' 'opponent name' 'opponent_score'\",false);\r\n\t\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\tinfo.clear();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//TODO make sure submitted scores are decent integers\r\n\t\t\t\t\tint score1 = 0, score2 = 0;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tscore1 = Integer.parseInt(args[2]);\r\n\t\t\t\t\t\tscore2 = Integer.parseInt(args[4]);\r\n\t\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\t\t\tinfo.addField(\"Problem\",\"A score you inputted was not an integer!\",false);\r\n\t\t\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\t\tinfo.clear();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO get their player data and throw an error if either doesn't exist\r\n\t\t\t\t\tChallongePlayerManager.refreshChallongePlayers();\r\n\t\t\t\t\tString name1 = args[1], name2 = args[3];\r\n\t\t\t\t\tint id1 = ChallongePlayerManager.getChallongePlayerIDByName(name1);\r\n\t\t\t\t\tif (id1 == -1) { \r\n\t\t\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\t\t\tinfo.addField(\"Problem\",\"The first name you entered is not currently in the tournament or it was spelled wrong. Make sure its the name used in the bracket!\",false);\r\n\t\t\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\t\tinfo.clear();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint id2 = ChallongePlayerManager.getChallongePlayerIDByName(name2);\r\n\t\t\t\t\tif (id2 == -1) { \r\n\t\t\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\t\t\tinfo.addField(\"Problem\",\"The second name you entered is not currently in the tournament or it was spelled wrong. Make sure its the name used in the bracket!\",false);\r\n\t\t\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\t\tinfo.clear();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO verify match exists\r\n\t\t\t\t\tChallongeDataManager.refreshMatches();\r\n\t\t\t\t\tint matchID = ChallongeDataManager.getOpenMatchIDByParticipantIDs(id1, id2);\r\n\t\t\t\t\tif (matchID == -1) {\r\n\t\t\t\t\t\tinfo.setTitle(\"ERROR\");\r\n\t\t\t\t\t\tinfo.addField(\"Problem\",\"The match you tried to update either doesn't exist or currently can't be updated.\",false);\r\n\t\t\t\t\t\tinfo.setColor(0xff0000);\r\n\t\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\t\tinfo.clear();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO flip id and score if needed\r\n\t\t\t\t\tif (ChallongeDataManager.getMatchDataIntByID(matchID,\"player1_id\") != id1) {\r\n\t\t\t\t\t\tint temp = id1;\r\n\t\t\t\t\t\tid1 = id2;\r\n\t\t\t\t\t\tid2 = temp;\r\n\t\t\t\t\t\ttemp = score1;\r\n\t\t\t\t\t\tscore1 = score2;\r\n\t\t\t\t\t\tscore2 = temp;\r\n\t\t\t\t\t\tString temp2 = name1;\r\n\t\t\t\t\t\tname1 = name2;\r\n\t\t\t\t\t\tname2 = temp2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO do the double verify check\r\n\t\t\t\t\tif (Configs.both_players_verify) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO upload results\r\n\t\t\t\t\tChallongeDataManager.updateMatchScore(matchID, score1, score2, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\tinfo.setTitle(\"SET COMPLETE\");\r\n\t\t\t\t\tinfo.setDescription(name1+\" and \"+name2+\" have completed a set!\");\r\n\t\t\t\t\t//info.addField(\"Winner\",\"didn't set up yet\",false);\r\n\t\t\t\t\tinfo.addField(\"Score\",score1+\"-\"+score2,false);\r\n\t\t\t\t\tinfo.setColor(0x00ff00);\r\n\t\t\t\t\tevent.getChannel().sendMessage(info.build()).queue();\r\n\t\t\t\t\tinfo.clear();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t//}\r\n\t\t\r\n\t}", "public static void processCommand(String command) {\n\n\t\tString commandType = command.substring(0, command.indexOf(\" \"));\n\n\t\tswitch (commandType) {\n\t\t\n\t\tcase COMMAND_ADD:\n\t\t\tFileStorage.addEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_DELETE:\n\t\t\tFileStorage.deleteEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_EDIT:\n\t\t\tFileStorage.editEvent(command);\n\t\t\tbreak;\n\t\t\n\t\tcase COMMAND_RECUR:\n\t\t\tFileStorage.recurEvent(command);\n\t\t\tbreak;\n\t\t\t\n\t\tcase COMMAND_NAVIGATE:\n\t\t\tFileStorage.navigateDay(command);\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(MESSAGE_INVALID);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "interface CommandBase {}", "void legalCommand();", "public abstract void onBakestatsCommand(Player player);", "public abstract void setCommand(String cmd);", "public interface Command {\n\t/**\n\t * Executes the logic for this command\n\t * @return an Object to be cast to the desired return object\n\t * @throws ServerException \n\t */\n\tpublic void execute() throws ServerException;\n}", "public abstract String getCommand();", "public void fireOnItemAddedToInventoryCommands();", "@Override\n public void initDefaultCommand() \n {\n }", "private void cmdHandler(JSONArray parameter, String cmd) {\n switch (cmd) {\n case \"login\":\n signIn(parameter);\n break;\n case \"time\":\n Date d = new GregorianCalendar().getTime();\n clientResponse(d.toString());\n break;\n case \"ls\":\n listFiles(parameter);\n break;\n case \"who\":\n clientResponse(MailboxServer.getUsersAsString());\n break;\n case \"msg\":\n sendMessage(parameter);\n break;\n case \"exit\":\n signOut();\n break;\n }\n }", "public interface CommandHandler {\n\n\t/**\n\t * Receive and handle the given Command.\n\t * @param c The Command to be handled.\n\t */\n\tpublic void handleCommand(String command);\n}", "public interface MenuCommands \n{\n public void execute( int idx, Creature c ); \n}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {\n\t\tif (sender instanceof ConsoleCommandSender){\n\t\t\t\n\t\t\tsender.sendMessage(\"§r ARRETE DE FAIRE LE CON\");\n\t\t\t\n\t\t}\n\t\t//si c'est un joueur on gère la commandes\n\t\telse if(sender instanceof Player){\n\t\t\t\n\t\t\tPlayer player = (Player) sender;\n\t\t\t\n\t\t\t//on verifie que la commende est la bonne\n\t\t\tif(cmd.getName().equalsIgnoreCase(\"castejoin\")){\n\t\t\t\t\n\t\t\t\t//on verifie que l'on a bien des arguments\n\t\t\t\tif(args.length != 0){\n\t\t\t\t\t\n\t\t\t\t\t//on recupère la caste en argument\n\t\t\t\t\tString caste = args[0];\n\t\t\t\t\t\n\t\t\t\t\t//le message que le joueur recevra s'il ne peut pas rejoindre la caste au cas ou il y aurais plusieur raison\n\t\t\t\t\tString message = \"\"; \n\t\t\t\t\t\n\t\t\t\t\t//si le joueur peut rejoindre une caste\n\t\t\t\t\tif( (message = playerCanJoinCaste(player,caste)).equals(\"ok\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\tint indexCaste = -1;\n\t\t\t\t\t\t//si la caste existe elle nous renvoie l'id de la position dans la liste des Caste sinon -1\n\t\t\t\t\t\tif( (indexCaste = isCasteExiste(caste)) != -1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on recupère la class caste qui correspond pour la mettre dans la hashmap\n\t\t\t\t\t\t\tCaste casteClass = Caste.castes.get(indexCaste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on l'ajoute a la liste des joueur et des caste qui leur corespond\n\t\t\t\t\t\t\tMain.playerCaste.put(player, casteClass);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on ecrit le changement dans le fichier player .yml\n\t\t\t\t\t\t\tPlayerManager.createEntryYml(player);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//message de confirmation\n\t\t\t\t\t\t\tplayer.sendMessage(\"vous avez rejoins la caste : \"+caste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//la caste demander n'existe pas\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tplayer.sendMessage(\"la caste : \"+caste+\" n'existe pas\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//le joueur ne peut pas pretendre a aller dans cette caste\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tplayer.sendMessage(message);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tplayer.sendMessage(\"/casteJoin <nom_de_la_caste>\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tsender.sendMessage(\"impossible Oo\");\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "@Override\n \tpublic boolean onPlayerRunCommand(Player player, String[] args) {\n \t\tif(args.length == 10 &&\n \t\t\t\tDungeonManager.dungeonExists(args[0]) && //dungeon\n \t\t\t\tDeityDungeons.isInt(args[1]) &&\t//mob id\n \t\t\t\tDungeonManager.getDungeonByName(args[0]).hasMob(Integer.parseInt(args[1])) && //mob\n \t\t\t\tDeityDungeons.isInt(args[6]) && //health\n \t\t\t\tEntityType.valueOf(args[7]) != null && //type\n \t\t\t\t(args[8].equalsIgnoreCase(\"t\") || args[8].equalsIgnoreCase(\"f\") || args[8].equalsIgnoreCase(\"true\") || args[8].equalsIgnoreCase(\"false\")) && //target\n \t\t\t\tDeityDungeons.isInt(args[9])){ //weapon id \n \n \t\t\tDungeon dungeon = DungeonManager.getDungeonByName(args[0]);\n \t\t\tMob mob = dungeon.getMobByID(Integer.parseInt(args[1]));\n \n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[2].toUpperCase().charAt(0)), ArmorPiece.HELMET);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[3].toUpperCase().charAt(0)), ArmorPiece.CHESTPLATE);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[4].toUpperCase().charAt(0)), ArmorPiece.LEGGINGS);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[5].toUpperCase().charAt(0)), ArmorPiece.BOOTS);\n \n \t\t\tDungeonManager.setMobHealth(mob, Integer.parseInt(args[6]));\n \n \t\t\tDungeonManager.setMobType(mob, EntityType.fromName(args[7]));\n \n \t\t\tString f = args[8];\n \n \t\t\tif(f.equalsIgnoreCase(\"true\") || f.equalsIgnoreCase(\"t\")) {\n \t\t\t\tDungeonManager.setMobTarget(mob, true);\n \t\t\t}else if(f.equalsIgnoreCase(\"false\") || f.equalsIgnoreCase(\"f\")){\n \t\t\t\tDungeonManager.setMobTarget(mob, false);\n \t\t\t}else{\n \t\t\t\tDeityAPI.getAPI().getChatAPI().sendPlayerError(player, \"DeityDungeons\", \"Usage: /dungeon editmob <dungeon> <mobid> <helm> <chest> <legs> <boots> <health> <type> <target> <weapon id>\");\n \t\t\t}\n \t\t\t\n \t\t\tDungeonManager.setMobWeapon(mob, Integer.parseInt(args[9]));\n \t\t\t\n \t\t\tDeityAPI.getAPI().getChatAPI().sendPlayerMessage(player, \"DeityDungeons\", \"<green>The mob attributes have been set for mob with id <red>\" + args[1]);\n \t\t\treturn true;\n \n \t\t\t//Already having a dungeon selected\n \t\t}else if(args.length == 9 &&\n \t\t\t\tDungeonManager.playerHasDungeon(player) &&\n \t\t\t\tDeityDungeons.isInt(args[0]) &&\t//mob id\n \t\t\t\tDungeonManager.getPlayersDungeon(player).hasMob(Integer.parseInt(args[0])) && //mob\n \t\t\t\tDeityDungeons.isInt(args[5]) && //health\n \t\t\t\tEntityType.valueOf(args[6]) != null && //type\n \t\t\t\t(args[7].equalsIgnoreCase(\"t\") || args[7].equalsIgnoreCase(\"f\") || args[7].equalsIgnoreCase(\"true\") || args[7].equalsIgnoreCase(\"false\")) && //target\n \t\t\t\tDeityDungeons.isInt(args[8])) {\n \t\t\t\n \t\t\tDungeon dungeon = DungeonManager.getPlayersDungeon(player);\n \t\t\tMob mob = dungeon.getMobByID(Integer.parseInt(args[0]));\n \n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[1].toUpperCase().charAt(0)), ArmorPiece.HELMET);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[2].toUpperCase().charAt(0)), ArmorPiece.CHESTPLATE);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[3].toUpperCase().charAt(0)), ArmorPiece.LEGGINGS);\n \t\t\tDungeonManager.setMobArmor(mob, ArmorMaterial.getByChar(args[4].toUpperCase().charAt(0)), ArmorPiece.BOOTS);\n \n \t\t\tDungeonManager.setMobHealth(mob, Integer.parseInt(args[5]));\n \n \t\t\tDungeonManager.setMobType(mob, EntityType.valueOf(args[6]));\n \n \t\t\tString f = args[7];\n \n \t\t\tif(f.equalsIgnoreCase(\"true\") || f.equalsIgnoreCase(\"t\")) {\n \t\t\t\tDungeonManager.setMobTarget(mob, true);\n \t\t\t}else if(f.equalsIgnoreCase(\"false\") || f.equalsIgnoreCase(\"f\")){\n \t\t\t\tDungeonManager.setMobTarget(mob, false);\n \t\t\t}else{\n \t\t\t\tDeityAPI.getAPI().getChatAPI().sendPlayerError(player, \"DeityDungeons\", \"Usage: /dungeon editmob <dungeon> <mobid> <helm> <chest> <legs> <boots> <health> <type> <target> <weapon id>\");\n \t\t\t}\n \t\t\t\n \t\t\tDungeonManager.setMobWeapon(mob, Integer.parseInt(args[8]));\n \t\t\t\n \t\t\tDeityAPI.getAPI().getChatAPI().sendPlayerMessage(player, \"DeityDungeons\", \"<green>The mob attributes have been set for mob with id <red>\" + args[1]);\n \t\t\treturn true;\n \n \t\t}\n \t\t\n \t\tDeityAPI.getAPI().getChatAPI().sendPlayerError(player, \"DeityDungeons\", \"Usage: /dungeon editmob <dungeon> <mobid> <helm> <chest> <legs> <boots> <health> <type> <target> <weapon id>\");\n \t\treturn true;\n \t}", "public void onCommand(Session session) {\n /**\n * VRFY is not safe.\n */\n String responseString = \"502 VRFY command is disabled\";\n session.writeResponse(responseString);\n }", "@Override\r\n public void initDefaultCommand() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\r\n setDefaultCommand(new joystick_lift_upAndDown());\r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND\r\n\r\n // Set the default command for a subsystem here.\r\n // setDefaultCommand(new MySpecialCommand());\r\n }", "private void registerCommands(final PlayerToggleRegistry playerToggleRegistry,\n final LanguageConfiguration languageConfiguration,\n final PlayerPermissionChecker permissionChecker) {\n\n Objects.requireNonNull(getCommand(\"serena\")).setExecutor(new SerenaToggleCommand(playerToggleRegistry\n , languageConfiguration\n , permissionChecker));\n Objects.requireNonNull(getCommand(\"serena-reload\")).setExecutor(new SerenaReloadCommand(permissionChecker\n , languageConfiguration\n , this));\n }", "public interface Command {\n \n /**\n * Méthode utilisée pour réaliser l'action voulue.\n */\n public void execute();\n \n /**\n * Méthode utilisée pour annuler la dernière action.\n */\n public void undo();\n}", "protected void initializeCommands() {\n\t\t\r\n\t\tcommands.add(injector.getInstance(Keys.inputQuestionCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.backCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.helpCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.quitCommand));\r\n\t}", "@Override\n public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) {\n\n // If the sender is a PLAYER\n if (sender instanceof Player) {\n final Player p = (Player) sender;\n\n // If there are arguments and not the main command alone\n if (args.length > 0) {\n boolean cont = false;\n CmdProperties cmdClass = null;\n\n // Assign all commands to their name in the hashmap\n for (final Map.Entry<String, CmdProperties> entry : commandClasses.entrySet()) {\n if (!cont) {\n if (entry.getKey().equalsIgnoreCase(args[0])) {\n cont = true;\n cmdClass = entry.getValue();\n }\n }\n }\n\n // check for permission i think? idk whats entirely going on here, review later\n if (cont) {\n final int argsNeeded = cmdClass.getLength();\n if (args.length - 1 >= argsNeeded) {\n if (p.hasPermission(cmdClass.getPermission())) {\n if (args[argsNeeded] == null) {\n args[argsNeeded] = \"Nothing\";\n }\n final StringBuilder sb = new StringBuilder();\n for (int i = argsNeeded; i < args.length; i++) {\n sb.append(args[i]).append(\" \");\n }\n\n final String allArgs = sb.toString().trim();\n if (cmdClass.isAlias())\n cmdClass.getAlias().perform(p, allArgs, args);\n else\n cmdClass.perform(p, allArgs, args);\n return true;\n } else {\n // D: no permission!\n MsgUtils.error (sender, \"(no permission)\");\n return true;\n }\n } else {\n // Not the right amount of arguments for the command. Maybe put something like cmdClass.getUsage() here to show the player how to use the command\n MsgUtils.error (sender, cmdClass.getUsage());\n return true;\n }\n } else {\n // The argument doesn't exist.\n MsgUtils.error (sender, \"/ca \" + MsgUtils.Colors.VARIABLE + args[0] + MsgUtils.Colors.ERROR + \" is not a command\");\n return true;\n }\n } else {\n // Not enough arguments (show help here)\n MsgUtils.raw(p, \"&e-=-=-=- &7Availible &bClanArena &7Commands: &e-=-=-=-\");\n for (final Map.Entry<String, CmdProperties> entry : commandClasses.entrySet()) {\n if (p.hasPermission(entry.getValue().getPermission())) {\n MsgUtils.sendMessage(p, \"/ca \" + MsgUtils.Colors.VARIABLE + entry.getKey() + MsgUtils.Colors.INFO + \": \" + entry.getValue().getHelpMessage());\n }\n }\n return true;\n }\n } else {\n // Sender isn't a player\n MsgUtils.error (sender, \"Sorry! No console commands are available yet :(\");\n return true;\n }\n }", "@Override\n public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n if (sender instanceof Player) {\n Player p = (Player) sender;\n return executeGamemodeCommand(p, aliasMap.get(label.toLowerCase()), args);\n } else if (sender instanceof ConsoleCommandSender){\n ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();\n return executeGamemodeCommand(console, aliasMap.get(label.toLowerCase()), args);\n }\n return false;\n }" ]
[ "0.71644", "0.707374", "0.7066208", "0.70216125", "0.69727427", "0.6860261", "0.68475574", "0.67849755", "0.6782189", "0.66349304", "0.6616138", "0.6612454", "0.65645117", "0.6535822", "0.65085334", "0.6477293", "0.64551914", "0.6447688", "0.6432851", "0.6432286", "0.64194584", "0.6418632", "0.6397165", "0.6397165", "0.63948065", "0.6354555", "0.6243419", "0.62238795", "0.6217728", "0.61914223", "0.6165386", "0.61610585", "0.61530685", "0.6130225", "0.6125102", "0.61053187", "0.6069184", "0.6044606", "0.601206", "0.6005555", "0.60015166", "0.5998532", "0.59853673", "0.59834546", "0.5971251", "0.5943387", "0.5941453", "0.5940952", "0.59095407", "0.5892822", "0.58911055", "0.5887958", "0.58780676", "0.58770925", "0.58672214", "0.58641165", "0.5841981", "0.5835922", "0.5830042", "0.5817493", "0.5812619", "0.5805346", "0.5803683", "0.58011496", "0.5799449", "0.57898504", "0.57848173", "0.57758284", "0.5774184", "0.57712644", "0.57630336", "0.57587427", "0.57555133", "0.5753337", "0.57524556", "0.5745901", "0.57446826", "0.5740016", "0.57341474", "0.57316464", "0.5722231", "0.5720417", "0.5720033", "0.5719503", "0.5719288", "0.57187265", "0.5718279", "0.571807", "0.5709971", "0.56926924", "0.5680737", "0.5678556", "0.5676562", "0.56756204", "0.56708026", "0.5667646", "0.5666441", "0.5666265", "0.566213", "0.5660421", "0.5655552" ]
0.0
-1
Created by chengmo on 2018/3/2.
@Transactional @Repository public interface TagParameterDAO extends JpaRepository<TagParameter, Long>, JpaSpecificationExecutor<TagParameter> { @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph", nativeQuery = true) List<TagParameter> getTagParameters(@Param("graph") String graph); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.id in(:ids)", nativeQuery = true) List<TagParameter> getTagParameters(@Param("graph") String graph, @Param("ids") Set<Long> ids); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.type in(:types)", nativeQuery = true) List<TagParameter> getTagParametersByTypes(@Param("graph") String graph, @Param("types") Set<String> types); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.reference=:reference", nativeQuery = true) TagParameter getTagParameterByReference(@Param("graph") String graph, @Param("reference") String reference); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\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}", "private void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\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\tpublic void nghe() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo38117a() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void mo4359a() {\n }", "@Override\n public void initialize() { \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "private void strin() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tprotected void initialize() {\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 }", "private void m50366E() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void postInit() {\n\t\t\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}" ]
[ "0.6223942", "0.60617", "0.59577894", "0.5915094", "0.5877985", "0.5877985", "0.5849779", "0.5845078", "0.5833687", "0.58184737", "0.5817749", "0.5756408", "0.57512814", "0.5728568", "0.5728459", "0.5726123", "0.57170904", "0.57057595", "0.56900454", "0.5686225", "0.56810397", "0.56690145", "0.56688327", "0.56667584", "0.5662911", "0.5660148", "0.5660148", "0.5660148", "0.5660148", "0.5660148", "0.5657014", "0.56429255", "0.56429255", "0.56277037", "0.56277037", "0.5624625", "0.5614261", "0.5614261", "0.5614261", "0.5614261", "0.5614261", "0.5614261", "0.5606245", "0.56047964", "0.5586857", "0.5584682", "0.5581092", "0.5581092", "0.5581092", "0.5580338", "0.5580338", "0.5580338", "0.55607116", "0.5540893", "0.55400425", "0.5539504", "0.5539504", "0.5539504", "0.55380946", "0.5534562", "0.5529531", "0.55231744", "0.55208004", "0.55119145", "0.55073404", "0.55073404", "0.54977965", "0.54902923", "0.5483207", "0.5475472", "0.5470631", "0.5465774", "0.5461967", "0.545991", "0.54589653", "0.5454925", "0.54353654", "0.54296637", "0.5421319", "0.5416772", "0.5416772", "0.54113823", "0.54072404", "0.54015934", "0.5401463", "0.53973347", "0.53973347", "0.53973347", "0.53973347", "0.53973347", "0.53973347", "0.53973347", "0.53932667", "0.5387495", "0.53814393", "0.5380236", "0.5374658", "0.5371819", "0.5368827", "0.53663826", "0.5363684" ]
0.0
-1
Send message if require to Admins and Mods Logs mining activity if required
private void processLogging(HashMap<Player, Integer> miners, String oreType, String oreAbbrev) { Integer updatedOre; Integer existingOre=miners.get(player); String message; if (existingOre == null) { updatedOre=1; } else { updatedOre=existingOre+1; } miners.put(player, updatedOre); // send a message to admins and mods if a player has mined a multiple of ore blocks if (updatedOre%multiple==0) { message = player.getName() + " has broken a total of " + updatedOre + " diamond ore blocks"; sendMessageToAdmins(player, message); } if (XRayHacker.LOGGING_ENABLED) { if ((updatedOre == threshhold && !playerOnWatchList)) { XRayHacker.updateLoggingInitiatedFlag(true); message = "Logging of diamond mining started for " + player.getName() + "."; sendMessageToAdmins(player, message); } if (updatedOre >= threshhold || playerOnWatchList) { logMiningActivity(player, block, oreAbbrev, updatedOre); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onMotdSent() {\r\n\t\tif (!loggedIn) {\r\n\t\t\tif (adminWindow != null) {\r\n\t\t\t\tadminWindow.setVisible(true);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t\tloggedIn = true;\r\n\t\t}\r\n\t\t\r\n\t}", "public void notifyAdmins(){\n \tfor(PlayerHandler player : players){\n \t\tif(player.isAdmin()){\n \t\t\tplayer.notify(1);\n \t\t}\n \t}\n }", "void sendAdminCommandLocked(String action, int reqPolicy, int userHandle, Bundle adminExtras) {\n final DevicePolicyData policy = getUserData(userHandle);\n final int count = policy.mAdminList.size();\n for (int i = 0; i < count; i++) {\n final ActiveAdmin admin = policy.mAdminList.get(i);\n if (admin.info.usesPolicy(reqPolicy)) {\n sendAdminCommandLocked(admin, action, adminExtras, null);\n }\n }\n }", "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }", "public static void sendAdminChatMessage(ServerPlayer player, Component textComponent) {\n if (ServerUtil.checkIfAdminSilenced(player)) return; // Don't send if admin silenced\n String text = textComponent.getString();\n\n text = \"[\" + player.getName() + \": \" + text + \"]\";\n TextComponent newtext = getText(ChatFormatting.GRAY + \"\" + ChatFormatting.ITALIC + text);\n List<ServerPlayer> players = ServerPlayerUtil.getOnlinePlayers();\n LogHelper.info(text);\n\n for (ServerPlayer serverPlayer : players) {\n if (ServerPlayerUtil.isOperator(serverPlayer) && !serverPlayer.getName().equals(player.getName())) {\n sendMessage(serverPlayer, newtext, false);\n }\n }\n\n }", "void admin() {\n\t\tSystem.out.println(\"i am from admin\");\n\t}", "private void sendAdminCommandToSelfAndProfilesLocked(String action, int reqPolicy,\n int userHandle, Bundle adminExtras) {\n int[] profileIds = mUserManager.getProfileIdsWithDisabled(userHandle);\n for (int profileId : profileIds) {\n sendAdminCommandLocked(action, reqPolicy, profileId, adminExtras);\n }\n }", "public boolean logAccess() {\n Map<String, String> response;\n try {\n response = logMessageService.sendRequestMessage(\"\");\n } catch (Exception exception) {\n LOGGER.warn(\"Log message could not be sent. [exception=({})]\", exception.getMessage());\n return allowAccess();\n }\n if (response != null) {\n return allowAccess();\n } else {\n LOGGER.warn(\"No response received.\");\n return allowAccess();\n }\n }", "public void alertManagers(String msg, Object... args) {\n broadcast(ChatType.PERSONAL_TELL, monitorRole, \"!!!!!!!!! IMPORTANT ALERT !!!!!!!!!\");\n tellManagers(msg, args);\n }", "public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }", "@Override\n\t\t\tpublic void onMessage(Connect connect, MessageEvent event){\n\t\t\t\tif(!event.getChannel().equalsIgnoreCase(\"AdminChat\")){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Get the message */\n\t\t\t\tString message = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tmessage = event.getMessageAsString();\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t/* Something went wrong, don't broadcast */\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Broadcast it! */\n\t\t\t\tfor(Player player : plugin.getServer().getOnlinePlayers()){\n\t\t\t\t\tif(player.hasPermission(\"adminchat.use\")) player.sendMessage(message);\n\t\t\t\t}\n\t\t\t}", "private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }", "public boolean sendToAdmins(Throwable t, HttpServletRequest request){\r\n\t\ttry {\r\n\t\t\tif(isIgnoreException(t)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tMailService.Message msg = createMessage(t, request);\r\n\r\n\t\t\tMailService mailService = MailServiceFactory.getMailService();\r\n\t\t\tmailService.sendToAdmins(msg);\r\n\r\n\t\t\tlogger.log(Level.INFO, \"mail send: \" + msg.getSender() + \" -> \" + msg.getTo());\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(Level.WARNING, \"mail cannot send\", e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void tellManagers(String msg, Object... args) {\n broadcast(ChatType.PERSONAL_ADMIN_TELL, monitorRole, msg, args);\n command.tell(CHANNEL_EVENTS_GROUP, msg, args);\n }", "public void handleEvent(Message event) {\n\r\n if(m_ensureLock && event.getMessageType() == Message.ARENA_MESSAGE && event.getMessage().equals(\"Arena UNLOCKED\")) {\r\n m_botAction.toggleLocked();\r\n return;\r\n }\r\n\r\n if(event.getMessageType() != Message.PRIVATE_MESSAGE) {\r\n return;\r\n }\r\n\r\n int id = event.getPlayerID();\r\n String name = m_botAction.getPlayerName(id);\r\n String msg = event.getMessage().trim().toLowerCase();\r\n\r\n if(name == null || msg == null || msg.length() == 0) {\r\n return;\r\n }\r\n\r\n String lcname = name.toLowerCase();\r\n\r\n boolean isSmod = m_operatorList.isSmod(lcname);\r\n boolean hasAccess = isSmod || m_access.contains(lcname);\r\n\r\n /* public pm commands */\r\n //!help\r\n if(msg.equals(\"!help\")) {\r\n m_botAction.privateMessageSpam(id, help_player);\r\n\r\n if(hasAccess) {\r\n m_botAction.privateMessageSpam(id, help_staff);\r\n }\r\n\r\n if(isSmod) {\r\n m_botAction.privateMessageSpam(id, help_smod);\r\n m_botAction.sendPrivateMessage(id, \"Database: \" + (m_botAction.SQLisOperational() ? \"online\" : \"offline\"));\r\n }\r\n\r\n //!status\r\n } else if(msg.equals(\"!status\")) {\r\n cmdStatus(id);\r\n\r\n //!spec\r\n } else if(msg.equals(\"!spec\")) {\r\n if(m_state.isStarting() || m_state.isStartingFinal()) {\r\n m_botAction.specWithoutLock(id);\r\n }\r\n\r\n //!about\r\n } else if(msg.equals(\"!about\")) {\r\n m_botAction.sendPrivateMessage(id, \"KimBot! (2007-12-15) by flibb <ER>\", 7);\r\n\r\n //!lagout/!return\r\n } else if(msg.equals(\"!lagout\") || msg.equals(\"!return\")) {\r\n KimPlayer kp = m_allPlayers.get(lcname);\r\n\r\n if(kp == null) {\r\n return;\r\n }\r\n\r\n if(!kp.m_isOut) {\r\n synchronized(m_state) {\r\n if((m_state.isMidGame() || m_state.isMidGameFinal()) && m_lagoutMan.remove(lcname)) {\r\n putPlayerInGame(id, kp, false);\r\n } else if((m_state.isStarting() || m_state.isStartingFinal()) && m_startingLagouts.remove(lcname)) {\r\n m_startingReturns.add(kp);\r\n m_botAction.sendPrivateMessage(id, \"You will be put in at the start of the game.\");\r\n }\r\n }\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Cannot return to game.\");\r\n }\r\n\r\n //poll vote\r\n } else if(Tools.isAllDigits(msg)) {\r\n if(m_poll != null) {\r\n m_poll.handlePollCount(id, name, msg);\r\n }\r\n\r\n /* staff commands */\r\n } else if(hasAccess) {\r\n //!start\r\n if(msg.equals(\"!start\")) {\r\n m_deathsToSpec = 10;\r\n m_maxTeamSize = 1;\r\n cmdStart(id);\r\n } else if(msg.startsWith(\"!start \")) {\r\n String[] params = msg.substring(7).split(\" \");\r\n m_deathsToSpec = 10;\r\n m_maxTeamSize = 1;\r\n\r\n for(String p : params) {\r\n try {\r\n if(Tools.isAllDigits(p)) {\r\n m_deathsToSpec = Integer.parseInt(p);\r\n } else if(p.startsWith(\"teams=\")) {\r\n m_maxTeamSize = Integer.parseInt(p.substring(6));\r\n }\r\n } catch(NumberFormatException e) {\r\n m_botAction.sendPrivateMessage(id, \"Can't understand: \" + p);\r\n return;\r\n }\r\n }\r\n\r\n m_deathsToSpec = Math.max(1, Math.min(99, m_deathsToSpec));\r\n m_maxTeamSize = Math.max(1, Math.min(99, m_maxTeamSize));\r\n cmdStart(id);\r\n //!stop\r\n } else if(msg.equals(\"!stop\")) {\r\n cmdStop(id);\r\n //!die\r\n } else if(msg.equals(\"!die\")) {\r\n if(m_state.isStopped()) {\r\n m_lvz.clear();\r\n\r\n try {\r\n Thread.sleep(3000);\r\n } catch(InterruptedException e) {}\r\n\r\n m_botAction.die(\"!die by \" + name);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"A game is in progress. Use !stop first.\");\r\n }\r\n\r\n //!startinfo\r\n } else if(msg.equals(\"!startinfo\")) {\r\n if(m_state.isStopped() || m_startedBy == null) {\r\n m_botAction.sendPrivateMessage(id, \"No one started a game.\");\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Game started by \" + m_startedBy);\r\n }\r\n\r\n //!reset\r\n } else if(msg.equals(\"!reset\")) {\r\n if(m_state.isStopped()) {\r\n resetArena();\r\n m_botAction.sendPrivateMessage(id, \"Resetted.\");\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"A game is in progress. Use !stop first.\");\r\n }\r\n\r\n //!remove\r\n } else if(msg.startsWith(\"!remove \")) {\r\n synchronized(m_state) {\r\n if(m_state.isStopped()) {\r\n m_botAction.sendPrivateMessage(id, \"The game is not running.\");\r\n } else {\r\n cmdRemove(id, msg.substring(8));\r\n }\r\n }\r\n\r\n //!test\r\n } else if(msg.startsWith(\"!test\")) {\r\n m_botAction.sendArenaMessage(Tools.addSlashes(\"test'test\\\"test\\\\test\"));\r\n\r\n } else if(isSmod) {\r\n //!addstaff\r\n if(msg.startsWith(\"!addstaff \")) {\r\n String addname = msg.substring(10);\r\n\r\n if(addname.length() <= 1 || addname.indexOf(':') >= 0) {\r\n m_botAction.sendPrivateMessage(id, \"Invalid name. Access list not changed.\");\r\n } else if(addname.length() > MAX_NAMELENGTH) {\r\n m_botAction.sendPrivateMessage(id, \"Name too long. Max. 18 characters.\");\r\n } else if(m_access.add(msg.substring(10))) {\r\n updateAccessList(id);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"That name already has access.\");\r\n }\r\n\r\n //!delstaff\r\n } else if(msg.startsWith(\"!delstaff \")) {\r\n if(m_access.remove(msg.substring(10))) {\r\n updateAccessList(id);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Name not found.\");\r\n }\r\n\r\n //!accesslist\r\n } else if(msg.equals(\"!accesslist\")) {\r\n for(String s : m_access) {\r\n m_botAction.sendPrivateMessage(id, s);\r\n }\r\n\r\n m_botAction.sendPrivateMessage(id, \"End of list.\");\r\n //!purge\r\n } else if(msg.equals(\"!purge\")) {\r\n cmdPurge(id, 90);\r\n } else if(msg.startsWith(\"!purge \")) {\r\n try {\r\n cmdPurge(id, Integer.parseInt(msg.substring(7)));\r\n } catch(NumberFormatException e) {\r\n m_botAction.sendPrivateMessage(id, \"Nothing done. Check your typing.\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}", "private void commandCheck() {\n\t\t//add user command\n\t\tif(cmd.getText().toLowerCase().equals(\"adduser\")) {\n\t\t\t/*\n\t\t\t * permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\t * There will be more user level commands added in version 2, like changing rename to allow a\n\t\t\t * user to rename themselves, but not any other user. Admins can still rename all users.\n\t\t\t */\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\taddUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//delete user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"deluser\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdelUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t};\n\t\t}\n\t\t//rename user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"rename\")) {\n\t\t\t//permissions check: if user is an admin, allow the user o chose a user to rename.\n\t\t\t//If not, allow the user to rename themselves only.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\trename(ALL);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trename(SELF);\n\t\t\t}\n\t\t}\n\t\t//promote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"promote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tpromote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//demote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"demote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdemote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//the rest of the commands are user level, no permission checking\n\t\telse if(cmd.getText().toLowerCase().equals(\"ccprocess\")) {\n\t\t\tccprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"cprocess\")) {\n\t\t\tcprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opentill\")) {\n\t\t\topenTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"closetill\")) {\n\t\t\tcloseTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opendrawer\")) {\n\t\t\topenDrawer();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"sale\")) {\n\t\t\tsale();\n\t\t}\n\t\t//if the command that was entered does not match any command, return an error.\n\t\telse {\n\t\t\terror(CMD_NOT_FOUND);\n\t\t}\n\t}", "private void sendAdminCommandForLockscreenPoliciesLocked(\n String action, int reqPolicy, int userHandle) {\n final Bundle extras = new Bundle();\n extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(userHandle));\n if (isSeparateProfileChallengeEnabled(userHandle)) {\n sendAdminCommandLocked(action, reqPolicy, userHandle, extras);\n } else {\n sendAdminCommandToSelfAndProfilesLocked(action, reqPolicy, userHandle, extras);\n }\n }", "public void action() {\n for (int i = 0; i < myAgent.friends.size(); ++i) {\n SendRequestToFriend(myAgent.friends.get(i));\n }\n\n // Crée un filtre pour lire d'abord les messages des amis et des leaders des amis\n MessageTemplate temp = MessageTemplate.MatchReceiver(myfriends);\n MessageTemplate temp2 = MessageTemplate.MatchReceiver(friendsLeader);\n MessageTemplate tempFinal = MessageTemplate.or(temp, temp2);\n\n // Réception des messages\n ACLMessage messageFriendly = myAgent.receive(tempFinal);\n // si on n'est pas dans un groupe\n if (messageFriendly != null && !inGroup) {\n \t// s'il reçoit une proposition d'un amis/ leader d'un ami, il accepte, peu importe le poste et s econsidère dans le groupe\n if (messageFriendly.getPerformative() == ACLMessage.PROPOSE) {\n AcceptProposal(messageFriendly, Group.Role.valueOf(messageFriendly.getContent()));\n inGroup = true;\n }\n // s'il reçoit un CONFIRM, il enregistre le leader\n else if (messageFriendly.getPerformative() == ACLMessage.CONFIRM) {\n myLeader = messageFriendly.getSender();\n }\n // s'il reçoit un INFORM, il enregistre l'AID du leader de son ami afin de recevoir ses messages et lui demande son poste préféré\n else if (messageFriendly.getPerformative() == ACLMessage.INFORM) {\n AddFriendsLeaderToList(messageFriendly);\n AnswerByAskingPreferedJob(messageFriendly);\n }\n // sinon, il renvoie une erreur\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFriendly );\n }\n }\n // si on est dans un groupe\n else if (messageFriendly != null && inGroup) { \n \t// s'il reçoit une requete et qu'il est déjà dans un groupe, il renvoir l'AID de son leader à son ami\n if (messageFriendly.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFriendly);\n }\n // s'il reçoit un DISCONFIRM, il se remet en quete de job\n else if (messageFriendly.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFriendly);\n }\n else {\n \t// sinon, il refuse tout offre\n RefuseOffer(messageFriendly);\n }\n }\n else {\n \t// on check ensuite les messages des inconnus, une fois ceux des amis triés\n ACLMessage messageFromInconnu = myAgent.receive();\n \n // si on n'est pas dans un groupe\n if (messageFromInconnu != null && !inGroup) {\n \n boolean offerPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent().equals((\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\"));\n boolean offerNotPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent() != (\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\" );\n \n //on accepte l offre s'il s'agit de notre role préféré\n if (offerPreferedJob){\n AcceptProposal(messageFromInconnu, myAgent.preferedRole);\n }\n // on refuse s'il ne s'agit pas de notre offre favorite en redemandant notre job préféré\n else if (offerNotPreferedJob){\n RefuseOffer(messageFromInconnu);\n }\n // si on reçoit une confimation, on se considère dans un groupe et on enregistre notre leader\n else if (messageFromInconnu.getPerformative() == ACLMessage.CONFIRM){\n inGroup = true;\n myLeader = messageFromInconnu.getSender();\n }\n // sinon, il s'agit d'une erreure\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFromInconnu );\n }\n }\n // si on est dans un groupe\n else if (messageFromInconnu != null && inGroup) {\n \t// si on reçoit une requete, on renvoie à notre leader\n if (messageFromInconnu.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFromInconnu);\n }\n // si on reçoit un DISCONFIRM, on repart en quete de job\n else if (messageFromInconnu.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFromInconnu);\n }\n // sinon on refuse\n else {\n RefuseOffer(messageFromInconnu);\n }\n }\n // si le message est vide, on bloque le flux\n else {\n block();\n }\n }\n }", "static void logInPanelHelpAcknowledged() {\n RecordUserAction.record(\"ContextualSearch.logInPanelHelpAcknowledged\");\n }", "public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "protected void notifyUser()\n {\n }", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic void doChat(LoginDetails loginDetails) {\n\tSystem.out.println(\"Boomer chat\");\t\n\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}", "void onPrivMsg(TwitchUser sender, TwitchMessage message);", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "private void sendUpdateMessage() {\n Hyperium.INSTANCE.getHandlers().getGeneralChatHandler().sendMessage(\n \"A new version of Particle Addon is out! Get it at https://api.chachy.co.uk/download/ParticleAddon/\" + ChachyMod.INSTANCE.getVersion(() -> \"ParticleAddon\"));\n }", "public static void sendCoordinatorMsg() {\n int numberOfRequestsNotSent = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if ( key != ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n\n try {\n MessageTransfer.sendServer(\n ServerMessage.getCoordinator( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent leader ID to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n numberOfRequestsNotSent += 1;\n System.out.println(\"WARN : Server s\"+destServer.getServerID()+\n \" has failed, it will not receive the leader\");\n }\n }\n }\n if( numberOfRequestsNotSent == ServerState.getInstance().getServers().size()-1 ) {\n // add self clients and chat rooms to leader state\n List<String> selfClients = ServerState.getInstance().getClientIdList();\n List<List<String>> selfRooms = ServerState.getInstance().getChatRoomList();\n\n for( String clientID : selfClients ) {\n LeaderState.getInstance().addClientLeaderUpdate( clientID );\n }\n\n for( List<String> chatRoom : selfRooms ) {\n LeaderState.getInstance().addApprovedRoom( chatRoom.get( 0 ),\n chatRoom.get( 1 ), Integer.parseInt(chatRoom.get( 2 )) );\n }\n\n leaderUpdateComplete = true;\n }\n }", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "public void sendToOutpatients(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n\t\tPlayer player = (Player) sender;\n\t\tif (label.equalsIgnoreCase(\"help\")) {\n\t\t\tif (args.length == 0 || (args.length == 1 && args[0].equalsIgnoreCase(\"1\"))) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Help 1 of 4 - Cubeville Commands:\");\n\t\t\t\t// player.sendMessage(ChatColor.RED + \"< > represents required parameters. [ ] represents optional ones.\");\n\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) \\\"/modreq <message>\\\" to request staff assistance.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) \\\"/spawn\\\" to teleport to spawn.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) \\\"/hub\\\" to teleport to the teleport hub\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) \\\"/spleef tp\\\" to teleport to the spleef arena\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) \\\"/sethome\\\" to set your home.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/home\\\" to teleport to your home.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) \\\"/money\\\" to see your cube balance.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/money pay <username> <amount>\\\" to pay someone in cubes.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"7) \\\"/modlist\\\" to see currently online staff.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \" + ChatColor.GREEN + \"MODs \" + ChatColor.GOLD + \"can handle general questions and chat issues\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \" + ChatColor.LIGHT_PURPLE + \"SMODs \" + ChatColor.GOLD + \"can handle griefings\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \" + ChatColor.AQUA + \"ADMINs \" + ChatColor.GOLD + \"can handle most issues\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \" + ChatColor.DARK_RED + \"SADMINs \" + ChatColor.GOLD+ \"are the server managers\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"8) \\\"/mumble register\\\" to complete Mumble registration.\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 1 && args[0].equalsIgnoreCase(\"2\")) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Help 2 of 4 - Chat Commands:\");\n\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) \\\"/y <message>\\\" will send your message to all players.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) Typing without \\\"/\\\" will send your message to players within 50 blocks of you.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) \\\"/ch list\\\" shows you channels available to you.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/ch j <channel name>\\\" to join a channel.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/ch l <channel name>\\\" to leave a channel.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) \\\"/msg <username> <message>\\\" to send a private message to a user.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) \\\"/group invite <username>\\\" to invite a user to your group.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/group join <username>\\\" to join a user's group.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/p <message>\\\" to send a message to your group.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/group leave\\\" to leave your group.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"7) Be sure to follow all rules when chatting.\");\n\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 1 && (args[0].equalsIgnoreCase(\"we\") || args[0].equalsIgnoreCase(\"worldguard\") || args[0].equalsIgnoreCase(\"3\"))) {\n\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Help 3 of 4 - WorldGuard Commands:\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) \\\"/rg i\\\" to show the data for the region you are in.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) \\\"/rg flag <region name> <flag type> [flag parameters]\\\" to add a flag to a region.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" ex: \\\"/rg flag tutorial greeting Hello World!\\\" sets flag greeting: \\\"Hello World!\\\" to region \\\"tutorial\\\"\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) \\\"/rg addmember <region name> <username>\\\" to add a member to your region.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" ex: \\\"/rg addmember tutorial RandomRob13\\\" will add RandomRob13 as a member to your region.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) \\\"//size\\\" will show you the size of your selected region after using \\\"//wand\\\"\");\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 2 && ((args[0].equalsIgnoreCase(\"we\") || args[0].equalsIgnoreCase(\"worldguard\") || args[0].equalsIgnoreCase(\"3\")) && (args[1].equalsIgnoreCase(\"2\") || args[1].equalsIgnoreCase(\"tut\") || args[1].equalsIgnoreCase(\"tutorial\")))) {\n\t\t\t\tString playerName = player.getName().toString();\n\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Automatic Worldguard Region:\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) \\\"/claimhere\\\" to automatically claim a 30x30x256 region.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" Be sure to stay AT LEAST 40 blocks away from all builds and 100 blocks away from CV Towns & Villages!\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" The region will be named home_\" + playerName + \".\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/rg addmember home_\" + playerName + \" <username>\\\" to add a member to your region.\");\n\n\t\t\t\tplayer.sendMessage(\"\");\n\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Custom Worldguard Region:\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) Be sure to stay AT LEAST 40 blocks away from all builds and 100 blocks away from CV Towns & Villages!\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) \\\"//wand\\\" to give yourself a worldguard wand.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) Right click one corner of your build, and left click the opposite corner.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) \\\"//expand vert\\\" to expand your region vertically\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) \\\"/rg claim <region name>\\\" to claim your region.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) \\\"/rg addmember <reigon name> <username>\\\" to add a user to your region.\");\n\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 1 && (args[0].equalsIgnoreCase(\"lwc\") || args[0].equalsIgnoreCase(\"4\"))) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Help 4 of 4 - LWC Commands:\");\n\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) \\\"/cprivate\\\" to lock a chest, door, furnace, etc.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) \\\"/cmodify <username>\\\" to allow a user to use your locked item.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/cmodify -<username>\\\" to disallow a user to use your locked item.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/cmodify @<username>\\\" to add someone to your lock as an admin\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) \\\"/cpersist\\\" to allow locking/modifying multiple items without typing command.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) \\\"/cremove\\\" to remove a lock from a chest, door, furnace, etc.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) \\\"/cpublic\\\" to allow anyone to access your chest but not break it.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) \\\"/cdonation\\\" to allow anyone to add to your chest but not take from or break it.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"7) \\\"/cpassword <password>\\\" to allow anyone with a password to access your locked item.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/cunlock <password>\\\" to unlock a locked item with a passcode for you.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"8) \\\"/lwc flag <flag> <on/off>\\\" to apply a flag to a locked item.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" ex: \\\"/lwc flag autoclose on\\\" will apply a flag that autocloses a door after being opened.\");\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Those are not valid parameters!\");\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (label.equalsIgnoreCase(\"faq\")) {\n\t\t\tif (args.length == 0 || (args.length == 1 && args[0].equalsIgnoreCase(\"1\"))) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"FAQ Page 1 of 2:\");\n\t\t\t\t\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) Players are chosen to be staff through honesty, politeness, and being mature.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" We will not select players to be staff if they ask.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) Earn cubes by voting for the server or selling items.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" Vote for cubes at www.cubeville.org/vote/.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) Build AT LEAST 40 blocks away from all builds and 100 blocks away from CV Towns & Villages!\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" Only build closer with permission from other players/\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) Staff will not spawn items for you.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) Staff will not teleport you by request.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) Staff will not sell spawned items.\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 1 && args[0].equalsIgnoreCase(\"2\")) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"FAQ Page 2 of 2:\");\n\t\t\t\t\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Instaday, Instanight, Instastorm, and Instasun all cost cubes!\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) Use \\\"/instaday\\\" and \\\"/instanight\\\" to change between day and night.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) Use \\\"/instasun\\\" and \\\"/instastorm\\\" to change between sun and storm.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) PvP is disabled everywhere except the PvP Arenas.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) You can join channels with \\\"/ch j <channel name>\\\".\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/ch j market\\\" to join market chat.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/mch <message>\\\" to type in market chat.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/ch j pvp\\\" to join pvp chat.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \" \\\"/pvp <message>\\\" to type in pvp chat.\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Those are not valid parameters!\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (label.equalsIgnoreCase(\"rules\")) {\n\t\t\tif (args.length == 0 || (args.length == 1 && args[0].equalsIgnoreCase(\"1\"))) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Rules Page 1 of 2:\");\n\t\t\t\tplayer.sendMessage(ChatColor.DARK_RED + \"THESE RULES ARE NOT NEGOTIABLE\");\n\t\t\t\tplayer.sendMessage(ChatColor.DARK_RED + \"THE FULL RULES ARE ON CUBEVILLE.ORG\");\n\t\t\t\t\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"1) Do as the staff say. We know best. We can help you if you cooperate.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"2) Do not grief a build for\" + ChatColor.BOLD + \"ANY\" + ChatColor.RESET + \"\" + ChatColor.GOLD + \"reason.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"3) No stealing. Give back items you accidentally pick up.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"4) No hacking. No hacking clients. No hacking codes.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"5) No XRaying of any form, including resource packs, mods, glitches, etc.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"6) No swearing, this includes acronyms.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"7) No vulgar/offensive behavior. Chat, skins, signs, builds.\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t} else if (args.length == 1 && args [0].equalsIgnoreCase(\"2\")) {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Rules Page 2 of 2:\");\n\t\t\t\t\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"8) No exploiting glitches.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"9) No unconsented PvP. This means any damage to players.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"10) No advertising other servers.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"11) Report any violations you see to staff.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"12) Do not post offensive/vulgar links in chat.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"13) Do not trick players into /kill'ing themselves.\");\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + \"14) Do not create excessive lag on the server.\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"Those are not valid parameters!\");\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (label.equalsIgnoreCase(\"finish\")) {\n\t\t\tplayer.teleport(new Location(Bukkit.getWorld(\"world\"), -984, 70, -836));\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected void doAdminLogin() {\n\t\tif (et_pin.getText().toString().trim().equals(\"\")) {\r\n//\t\t\td.dialogShow(v, AdminLoginActivity.this, \"Sorry\",\r\n//\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\td.showSingleButtonDialog( AdminLoginActivity.this,\r\n\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\r\n\t\t\tGlobalVariable.adminMasterPin = et_pin.getText().toString().trim();\r\n\t\t\tIntent i = new Intent(AdminLoginActivity.this,\r\n\t\t\t\t\tAdminConfirmLoginActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\toverridePendingTransition(R.anim.open_translate,\r\n\t\t\t\t\tR.anim.close_translate);\r\n\r\n\t\t}\r\n\t}", "public static void ulogujSeKaoAdmin() {\r\n\t\tprikazIProveraSifre(-2, 'a');\r\n\t}", "@Override\n public void action() {\n ACLMessage acl = receive();\n if (acl != null) {\n if (acl.getPerformative() == ACLMessage.REQUEST) {\n try {\n ContentElement elemento = myAgent.getContentManager().extractContent(acl);\n if (elemento instanceof PublicarServicio) {\n PublicarServicio publicar = (PublicarServicio) elemento;\n Servicio servicio = publicar.getServicio();\n jadeContainer.iniciarChat(servicio.getTipo(), servicio.getDescripcion());\n //myAgent.addBehaviour(new IniciarChatBehaviour(myAgent, servicio.getTipo(), servicio.getDescripcion()));\n } else if (elemento instanceof EnviarMensaje) {\n EnviarMensaje enviar = (EnviarMensaje) elemento;\n Mensaje mensaje = enviar.getMensaje();\n jadeContainer.enviarMensajeChatJXTA(mensaje.getRemitente(), mensaje.getMensaje());\n }\n } catch (CodecException ex) {\n System.out.println(\"CodecException: \" + ex.getMessage());\n } catch (UngroundedException ex) {\n System.out.println(\"UngroundedException: \" + ex.getMessage());\n } catch (OntologyException ex) {\n System.out.println(\"OntologyException: \" + ex.getMessage());\n }\n }\n } else {\n block();\n }\n }", "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "public boolean sendAdminMandrill(CoreUser coreUser, String templateName,String router) throws Exception;", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "public void tellEventChannelsAndManagers(String msg, Object... args) {\n if (loggingIn)\n return;\n if (args.length > 0) {\n msg = MessageFormat.format(msg, args);\n }\n command.tell(CHANNEL_USCL, msg);\n command.tell(CHANNEL_EVENTS_GROUP, msg);\n broadcast(ChatType.PERSONAL_ADMIN_TELL, monitorRole, msg, args);\n }", "public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}", "boolean sendAdminCommandLocked(ActiveAdmin admin, String action, Bundle adminExtras,\n BroadcastReceiver result, boolean inForeground) {\n Intent intent = new Intent(action);\n intent.setComponent(admin.info.getComponent());\n if (UserManager.isDeviceInDemoMode(mContext)) {\n intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);\n }\n if (action.equals(DeviceAdminReceiver.ACTION_PASSWORD_EXPIRING)) {\n intent.putExtra(\"expiration\", admin.passwordExpirationDate);\n }\n if (inForeground) {\n intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);\n }\n if (adminExtras != null) {\n intent.putExtras(adminExtras);\n }\n if (mInjector.getPackageManager().queryBroadcastReceiversAsUser(\n intent,\n PackageManager.MATCH_DEBUG_TRIAGED_MISSING,\n admin.getUserHandle()).isEmpty()) {\n return false;\n }\n\n final BroadcastOptions options = BroadcastOptions.makeBasic();\n options.setBackgroundActivityStartsAllowed(true);\n\n if (result != null) {\n mContext.sendOrderedBroadcastAsUser(intent, admin.getUserHandle(),\n null, AppOpsManager.OP_NONE, options.toBundle(),\n result, mHandler, Activity.RESULT_OK, null, null);\n } else {\n mContext.sendBroadcastAsUser(intent, admin.getUserHandle(), null, options.toBundle());\n }\n\n return true;\n }", "public void askedToAdminConfirm(Update update, String text) {\n String url = \"https://api.telegram.org/bot%s/sendMessage?chat_id=%s&text=%s\";\n// url = String.format(url, properties.getProperties().getProperty(\"botToken\"), String.valueOf(properties.getProperties().getProperty(\"adminId\")), text);\n// url = String.format(url, properties.getProperties().getProperty(\"botToken\"), String.valueOf(\"01010101\"), text);\n url = String.format(url, \"967287812:AAEAjnZ6gIVczLECLc9J99KAz9oYWORaE9Q\", String.valueOf(\"01010101\"), text);\n try {\n restTemplate.exchange(url, HttpMethod.POST, new HttpEntity<>(\"\"), String.class);\n } catch (HttpClientErrorException | ResourceAccessException e) {\n e.printStackTrace();\n } finally {\n System.out.println(Thread.currentThread() + \" RUNNING\");\n }\n }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "private void sendMessage() {\n\n // Get the right Prefix\n String prefix = null;\n\n if ( !messageGroup.getPrefix().equalsIgnoreCase(\"\") ) {\n prefix = messageGroup.getPrefix();\n } else {\n prefix = Announcer.getInstance().getConfig().getString(\"Settings.Prefix\");\n }\n\n Announcer.getInstance().getCaller().sendAnnouncment( messageGroup, prefix, counter);\n\n counter();\n\n }", "public boolean canBecomeAdmin(User user, Chatroom chatroom) {\n\t\treturn adminInvitationSent(user, chatroom);\n\t}", "private ACLMessage respondToLogMessage(ACLMessage request, Action a) {\n\t\t\n\t\tLogMessage logMessage = (LogMessage) a.getAction();\t\t\n\t\tString message = logMessage.getMessage();\n\t\tgetLogger().log(Level.INFO, message);\n\t\t\n\t\treturn null;\n\t}", "public static void aviUsers() {\n\t\tsendNotification();\r\n\t}", "protected boolean processAnnouncement(String username, String message){return false;}", "@Override\n public void onGuildMemberJoin(@NotNull GuildMemberJoinEvent event) {\n super.onGuildMemberJoin(event);\n event.getMember().getUser().openPrivateChannel().queue((channel) -> {\n channel.sendMessage(Settings.WELCOME_MESSAGE).queue();\n });\n }", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "@Override\n public void userRequestedAction()\n {\n inComm = true;\n view.disableAction();\n\n // switch to loading ui\n view.setActionText(\"Loading...\");\n view.setStatusText(loadingMessages[rand.nextInt(loadingMessages.length)]);\n view.setStatusColor(COLOR_WAITING);\n view.loadingAnimation();\n\n // switch the status of the system\n if (isArmed) disarmSystem();\n else armSystem();\n isArmed = !isArmed;\n\n // notify PubNub\n }", "public void handleEvent(PlayerEntered event) {\r\n if( isEnabled )\r\n m_botAction.sendPrivateMessage(event.getPlayerName(), \"Autopilot is engaged. PM !info to me to see how *YOU* can control me. (Type :\" + m_botAction.getBotName() + \":!info)\" );\r\n }", "public static void sendRequirementMessages(Player player) {\n\t\tfor (int i = 1; i < 310; i++)\n\t\t\tinter(player, i, \"\");\n\t\tplayer.getInterfaceManager().sendInterface(275);\n\t\tinter(player, 1, \"<col=FF0000><shad=000000>Distinction cape requirements</col>\");\n\n\t\tinter(player, 10, \"<col=046DB3><shad=000000><u>Max cape requirements</u></col>\");\n\t\tinter(player, 11, (isWorthyMaxCape(player) ? \"<str>\" : \"\")+\"Every stat level 99\");\n\t\tinter(player, 12, (isWorthyMaxCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 14, \"<col=046DB3><shad=000000><u>Completionist cape requirements</u></col>\");\n\t\tinter(player, 15, ((isMaxed(player) && player.getSkills().getLevelForXp(Skills.DUNGEONEERING) == 120) ? \"<str>\" : \"\")+\"Every stat level 99 & 120 Dungeoneering\");\n\t\tinter(player, 16, (player.isKilledQueenBlackDragon() ? \"<str>\" : \"\")+\"Killed the Queen Black Dragon\");\n\t\tinter(player, 17, (player.isCompletedFightCaves() ? \"<str>\" : \"\")+\"Completed the Fight Caves minigame\");\n\t\tinter(player, 18, (player.isCompletedFightKiln() ? \"<str>\" : \"\")+\"Completed the Fight Kiln minigame\");\n\t\tinter(player, 19, (player.isKilledCulinaromancer() ? \"<str>\" : \"\")+\"Completed the Recipe for Disaster minigame\");\n\t\tinter(player, 20, (player.getQuestManager().completedQuest(Quests.NOMADS_REQUIEM) ? \"<str>\" : \"\")+\"Completed the Nomad's mini-quest\");\n\t\tinter(player, 21, (isWorthyCompCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 23, \"<col=046DB3><shad=000000><u>Completionist cape (t) requirements</u></col>\");\n\t\tinter(player, 24, ((isWorthyCompCape(player)) ? \"<str>\" : \"\")+\"Have completed all of the above\");\n\t\tinter(player, 25, ((player.getOresMined() >= 5000) ? \"<str>\" : \"\")+\"Mine a total of 5'000 ores (\"+Utils.getFormattedNumber(player.getOresMined())+\")\");\n\t\tinter(player, 26, ((player.getBarsSmelt() >= 5000) ? \"<str>\" : \"\")+\"Smith a total of 5'000 bars (\"+Utils.getFormattedNumber(player.getBarsSmelt())+\")\");\n\t\tinter(player, 27, ((player.getLogsChopped() >= 5000) ? \"<str>\" : \"\")+\"Chop a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsChopped())+\")\");\n\t\tinter(player, 28, ((player.getLogsBurned() >= 5000) ? \"<str>\" : \"\")+\"Burn a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsBurned())+\")\");\n\t\tinter(player, 29, ((player.getLapsRan() >= 1000) ? \"<str>\" : \"\")+\"Complete a total of 1'000 agility laps (\"+Utils.getFormattedNumber(player.getLapsRan())+\")\");\n\t\tinter(player, 30, ((player.getBonesOffered() >= 5000) ? \"<str>\" : \"\")+\"Offer a total of 5'000 bones (\"+Utils.getFormattedNumber(player.getBonesOffered())+\")\");\n\t\tinter(player, 31, ((player.getPotionsMade() >= 5000) ? \"<str>\" : \"\")+\"Make a total of 5'000 potions (\"+Utils.getFormattedNumber(player.getPotionsMade())+\")\");\n\t\tinter(player, 32, ((player.getTimesStolen() >= 5000) ? \"<str>\" : \"\")+\"Steal a total of 5'000 times (\"+Utils.getFormattedNumber(player.getTimesStolen())+\")\");\n\t\tinter(player, 33, ((player.getItemsMade() >= 5000) ? \"<str>\" : \"\")+\"Craft a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsMade())+\")\");\n\t\tinter(player, 34, ((player.getItemsFletched() >= 5000) ? \"<str>\" : \"\")+\"Fletch a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsFletched())+\")\");\n\t\tinter(player, 35, ((player.getCreaturesCaught() >= 3000) ? \"<str>\" : \"\")+\"Catch a total of 3'000 creatures (\"+Utils.getFormattedNumber(player.getCreaturesCaught())+\")\");\n\t\tinter(player, 36, ((player.getFishCaught() >= 5000) ? \"<str>\" : \"\")+\"Catch a total of 5'000 fish (\"+Utils.getFormattedNumber(player.getFishCaught())+\")\");\n\t\tinter(player, 37, ((player.getFoodCooked() >= 5000) ? \"<str>\" : \"\")+\"Cook a total of 5'000 food (\"+Utils.getFormattedNumber(player.getFoodCooked())+\")\");\n\t\tinter(player, 38, ((player.getProduceGathered() >= 3000) ? \"<str>\" : \"\")+\"Farm a total of 3'000 produce (\"+Utils.getFormattedNumber(player.getProduceGathered())+\")\");\n\t\tinter(player, 39, ((player.getPouchesMade() >= 2500) ? \"<str>\" : \"\")+\"Infuse a total of 2'500 pouches (\"+Utils.getFormattedNumber(player.getPouchesMade())+\")\");\n\t\tinter(player, 40, ((player.getMemoriesCollected() >= 5000) ? \"<str>\" : \"\")+\"Harvest a total of 5'000 memories (\"+Utils.getFormattedNumber(player.getMemoriesCollected())+\")\");\n\t\tinter(player, 41, ((player.getRunesMade() >= 5000) ? \"<str>\" : \"\")+\"Runecraft a total of 5'000 runes (\"+Utils.getFormattedNumber(player.getRunesMade())+\")\");\n\t\tinter(player, 42, ((isWorthyCompCapeT(player)) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\t}", "@Override\n public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n int LEXP = uc.getLangConfig().getInt(\"LevelingEXP\");\n if (args.length == 0) {\n if(sender.hasPermission(\"lp.lps\")) {\n for (String x : uc.getLangConfig().getStringList(\"lp\")) {\n API api = new API();\n sender.sendMessage(api.format(x));\n }\n }else{\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"LPSErrorPermission\")));\n }\n }\n\n if(args.length >= 1) {\n if(args[0].equalsIgnoreCase(\"test\")){\n double math = 0;\n for(int i = 0; i<Integer.parseInt(args[1]); i++){\n math = 50 * Math.pow(1.5,i );\n BigDecimal bigDecimal = BigDecimal.valueOf(math);\n bigDecimal.setScale(0, RoundingMode.HALF_UP);\n sender.sendMessage(NumberFormat.getNumberInstance(Locale.US).format(Math.round(Float.parseFloat(uc.formatter.format(bigDecimal.doubleValue())))));\n }\n }\n if (args.length == 1) {\n if (args[0].equalsIgnoreCase(\"reload\")) {\n if (sender.hasPermission(\"lp.admin.reload\")) {\n lp.reloadConfig();\n uc.RunFiles();\n API api = new API();\n\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpreload\")));\n } else {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"LPSErrorPermission\")));\n }\n\n }\n }\n\n if (sender.hasPermission(\"lp.admin.give\")) {\n\n if (args[0].equalsIgnoreCase(\"expgive\")) {\n if (args.length == 1) {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpsEXPGIVEPlayer\")));\n return true;\n }\n\n if (args.length == 2) {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpsEXPGIVEAmount\")));\n return true;\n }\n if (args.length == 3) {\n Player target = Bukkit.getPlayer(args[1]);\n\n\n if (target != null) {\n\n //lp.CustomXP(target, Integer.parseInt(args[2]), 0);\n uc.GainEXP(target, Integer.valueOf(args[2]));\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpAdminEXPGive\").replace(\"{lp_Target}\", target.getName()).replace(\"{lp_Earn_Exp}\", args[2])));\n target.sendMessage(api.format(uc.getLangConfig().getString(\"lpEXPGive\").replace(\"{lp_Earn_Exp}\", args[2]).replace(\"{lp_player}\", uc.getLangConfig().getString(\"lpServerName\"))));\n\n }\n }\n }\n\n }\n if (sender.hasPermission(\"lp.admin.remove\")) {\n if (args[0].equalsIgnoreCase(\"expremove\")) {\n\n if (args.length == 1) {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpsEXPREMOVEPlayer\")));\n return true;\n }\n if (args.length == 2) {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpsEXPREMOVEAmount\")));\n return true;\n }\n if (args.length == 3) {\n Player target = Bukkit.getPlayer(args[1]);\n File userdata = new File(lp.userFolder, target.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n\n if (target != null) {\n double expp = uc.getCurrentEXP(target);\n double t = Double.valueOf(args[2]);\n double tep = expp - t;\n UsersConfig.set(\"EXP.Amount\", tep);\n try {\n UsersConfig.save(userdata);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(lp.getConfig().getBoolean(\"BossBar\")){\n uc.updateBossbar(uc.getBossbar(target), target);\n }\n if (sender instanceof Player) {\n API api = new API();\n target.sendMessage(api.format(uc.getLangConfig().getString(\"lpEXPRemove\").replace(\"{lp_Earn_Exp}\", args[2]).replace(\"{LP_USER}\", sender.getName())));\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpAdminEXPRemove\").replace(\"{lp_Target}\", target.getName()).replace(\"{lp_Earn_Exp}\", args[2])));\n }else{\n API api = new API();\n target.sendMessage(api.format(uc.getLangConfig().getString(\"lpEXPRemove\").replace(\"{lp_Earn_Exp}\", args[2]).replace(\"{lp_player}\", uc.getLangConfig().getString(\"lpServerName\"))));\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpAdminEXPRemove\").replace(\"{lp_Target}\", target.getName()).replace(\"{lp_Earn_Exp}\", args[2])));\n }\n\n }\n }\n }\n\n if (sender.hasPermission(\"lp.player\")) {\n if (args[0].equalsIgnoreCase(\"top\")) {\n posTop = 0;\n\n\n for (String x : uc.getLangConfig().getStringList(\"lpsTopListTop\")) {\n API api = new API((Player) sender, x);\n sender.sendMessage(api.formatTags());\n // Here you can send to player or do whatever you wan't.\n\n }\n ConfigurationSection cf = uc.getTopListConfig().getConfigurationSection(\"\");\n cf.getValues(false)\n .entrySet()\n .stream()\n .sorted((a1, a2) -> {\n int points1 = ((MemorySection) a1.getValue()).getInt(\"Level\");\n int points2 = ((MemorySection) a2.getValue()).getInt(\"Level\");\n return points2 - points1;\n })\n .limit(10) // Limit the number of 'results'\n .forEach(f -> {\n posTop += 1;\n\n int points = ((MemorySection) f.getValue()).getInt(\"Level\");\n String playername = ((MemorySection) f.getValue()).getString(\"Name\");\n\n for (String x : uc.getLangConfig().getStringList(\"lpsTopListMid\")) {\n sender.sendMessage(API.format(x).replace(\"{LP_Ranked}\", Integer.toString(posTop)).replace(\"{lp_player}\", playername).replace(\"{lp_level}\", Integer.toString(points)));\n // Here you can send to player or do whatever you wan't.\n\n }\n });\n for (String x : uc.getLangConfig().getStringList(\"lpsTopListBottom\")) {\n API api = new API((Player) sender, x);\n sender.sendMessage(api.formatTags());\n // Here you can send to player or do whatever you wan't.\n\n }\n if (args[0].equalsIgnoreCase(\"creator\")) {\n sender.sendMessage(ChatColor.DARK_AQUA + \"LevelPoints Created by: \" + ChatColor.AQUA + \"Zoon20X\");\n }\n }\n } else {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"LPSErrorPermission\")));\n }\n }\n\n if (sender.hasPermission(\"lp.player\")) {\n\n if (sender instanceof Player) {\n if (args.length >= 1) {\n Player player = (Player) sender;\n File userdata = new File(lp.userFolder, player.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n\n\n if (args.length == 1) {\n if (args[0].equalsIgnoreCase(\"prestige\")) {\n if (UsersConfig.getInt(\"Level\") == uc.getMaxLevel()) {\n if (UsersConfig.getInt(\"EXP.Amount\") >= uc.getMaxLevelEXP(player)) {\n\n int pres = UsersConfig.getInt(\"Prestige\");\n sender.sendMessage(ChatColor.DARK_AQUA + \"You Prestiged\");\n UsersConfig.set(\"Level\", 1);\n UsersConfig.set(\"Prestige\", pres + 1);\n UsersConfig.set(\"EXP.Amount\", 0);\n\n try {\n UsersConfig.save(userdata);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API(player, uc.getLangConfig().getString(\"lpsPrestigeLevelUP\"));\n player.sendMessage(api.formatTags());\n return true;\n } else {\n double need = uc.getRequiredEXP(player) - uc.getCurrentEXP(player);\n\n API api = new API();\n player.sendMessage(api.format(uc.getLangConfig().getString(\"lpsPrestigeMoreEXP\").replace(\"{lp_Required_EXP}\", String.valueOf(need))));\n }\n } else {\n player.sendMessage(API.format(uc.getLangConfig().getString(\"lpsPrestigeLevelNot\").replace(\"{lp_Max_Level}\", String.valueOf(uc.getMaxLevel()))));\n }\n }\n if (args[0].equalsIgnoreCase(\"info\")) {\n\n for (String x : uc.getLangConfig().getStringList(\"lpsInfo\")) {\n API api = new API(player, x);\n sender.sendMessage(api.formatTags());\n }\n;\n return true;\n }\n if (args[0].equalsIgnoreCase(\"toggle\")) {\n if (UsersConfig.getBoolean(\"ActionBar\")) {\n UsersConfig.set(\"ActionBar\", false);\n } else {\n UsersConfig.set(\"ActionBar\", true);\n }\n try {\n UsersConfig.save(userdata);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API();\n player.sendMessage(api.format(uc.getLangConfig().getString(\"lpsActionBarToggle\").replace(\"{LP_Toggle_Value}\", String.valueOf(UsersConfig.getBoolean(\"ActionBar\")))));\n\n }\n }\n if(args[0].equalsIgnoreCase(\"setRequirement\")){\n if(player.hasPermission(\"lp.admin\")){\n ItemStack item = player.getInventory().getItemInMainHand();\n if(item !=null){\n ItemMeta im = item.getItemMeta();\n ArrayList<String> lore = new ArrayList<>();\n if(im.hasLore()){\n for(String x : im.getLore()) {\n if(!x.contains(API.format(uc.getLangConfig().getString(\"lpRequirement\").replace(\"{Required_Level}\", \"\")))) {\n lore.add(x);\n }\n }\n lore.add(API.format(uc.getLangConfig().getString(\"lpRequirement\").replace(\"{Required_Level}\", args[1])));\n }else{\n lore.add(API.format(uc.getLangConfig().getString(\"lpRequirement\").replace(\"{Required_Level}\", args[1])));\n }\n im.setLore(lore);\n item.setItemMeta(im);\n\n }\n }\n }\n if(args[0].equalsIgnoreCase(\"removeRequirement\")){\n if(player.hasPermission(\"lp.admin\")){\n ItemStack item = player.getInventory().getItemInMainHand();\n if(item !=null){\n ItemMeta im = item.getItemMeta();\n ArrayList<String> lore = new ArrayList<>();\n if(im.hasLore()){\n for(String x : im.getLore()) {\n if(!x.contains(API.format(uc.getLangConfig().getString(\"lpRequirement\").replace(\"{Required_Level}\", \"\")))) {\n lore.add(x);\n }\n }\n }\n im.setLore(lore);\n item.setItemMeta(im);\n\n }\n }\n }\n if (args[0].equalsIgnoreCase(\"setPrestige\")) {\n if (player.hasPermission(\"lp.admin\")) {\n if (args.length == 1) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Player\");\n return true;\n }\n if (args.length == 2) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Level to set\");\n return true;\n }\n Player target = Bukkit.getPlayer(args[1]);\n File targetData = new File(lp.userFolder, target.getUniqueId() + \".yml\");\n FileConfiguration TargetConfig = YamlConfiguration.loadConfiguration(targetData);\n if (target != null) {\n int prestige = Integer.parseInt(args[2]);\n TargetConfig.set(\"Prestige\", prestige);\n\n\n try {\n TargetConfig.save(targetData);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API();\n target.sendMessage(api.format(uc.getLangConfig().getString(\"lpSetPrestige\").replace(\"{lp_Earn_Prestige}\", args[2]).replace(\"{lp_player}\", sender.getName())));\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpAdminSetPrestige\").replace(\"{lp_Target}\", target.getName()).replace(\"{lp_Earn_Prestige}\", args[2])));\n }\n } else {\n player.sendMessage(ChatColor.RED + \"You Have Insufficient Permission\");\n }\n }\n if (args[0].equalsIgnoreCase(\"setlevel\")) {\n if (player.hasPermission(\"lp.admin\")) {\n if (args.length == 1) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Player\");\n return true;\n }\n if (args.length == 2) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Level to set\");\n return true;\n }\n Player target = Bukkit.getPlayer(args[1]);\n File targetData = new File(lp.userFolder, target.getUniqueId() + \".yml\");\n FileConfiguration TargetConfig = YamlConfiguration.loadConfiguration(targetData);\n if (target != null) {\n int level = Integer.parseInt(args[2]);\n TargetConfig.set(\"Level\", level);\n uc.TopListConfig.set(target.getUniqueId() + \".Name\", target.getName());\n uc.TopListConfig.set(target.getUniqueId() + \".Level\", level);\n\n try {\n TargetConfig.save(targetData);\n uc.TopListConfig.save(uc.TopListFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API();\n target.sendMessage(api.format(uc.getLangConfig().getString(\"lpSetLevel\").replace(\"{lp_Earn_Level}\", args[2]).replace(\"{lp_player}\", sender.getName())));\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"lpAdminSetLevel\").replace(\"{lp_Target}\", target.getName()).replace(\"{lp_Earn_Level}\", args[2])));\n if(lp.getConfig().getBoolean(\"BossBar\")){\n uc.updateBossbar(uc.getBossbar(target), target);\n }\n }\n } else {\n player.sendMessage(ChatColor.RED + \"You Have Insufficient Permission\");\n }\n\n }\n if (args[0].equalsIgnoreCase(\"addlevel\")) {\n if (player.hasPermission(\"lp.admin\")) {\n if (args.length == 1) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Player\");\n return true;\n }\n if (args.length == 2) {\n sender.sendMessage(ChatColor.RED + \"You Must Pick a Level to add\");\n return true;\n }\n\n Player target = Bukkit.getPlayer(args[1]);\n File targetData = new File(lp.userFolder, target.getUniqueId() + \".yml\");\n FileConfiguration TargetConfig = YamlConfiguration.loadConfiguration(targetData);\n int CurrentLevel = uc.getCurrentLevel(target);\n TargetConfig.set(\"Level\", CurrentLevel + Integer.parseInt(args[2]));\n uc.TopListConfig.set(target.getUniqueId() + \".Name\", target.getName());\n uc.TopListConfig.set(target.getUniqueId() + \".Level\", CurrentLevel + Integer.parseInt(args[2]));\n try {\n uc.TopListConfig.save(uc.TopListFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n TargetConfig.save(targetData);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if(lp.getConfig().getBoolean(\"BossBar\")){\n uc.updateBossbar(uc.getBossbar(target), target);\n }\n }\n }\n }\n\n\n if (args.length == 2) {\n if (args[0].equalsIgnoreCase(\"info\")) {\n StringBuilder str = new StringBuilder(args[1]);\n\n for (int i = 2; i < args.length; i++) {\n str.append(' ').append(args[i]);\n }\n if (Bukkit.getPlayer(str.toString()) != null) {\n Player TargetPlayer = Bukkit.getPlayer(str.toString());\n\n File userdata = new File(lp.userFolder, TargetPlayer.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n\n int levels = uc.getCurrentLevel(TargetPlayer);\n int pres = UsersConfig.getInt(\"Prestige\");\n double LevelUpEXP = uc.getRequiredEXP(TargetPlayer);\n double expss = uc.getCurrentEXP(TargetPlayer);\n\n\n double percentage = expss * 100;\n\n\n String EXP = expss + \"/\" + LevelUpEXP;\n String Percentage = Math.round(percentage / LevelUpEXP) + \"%\";\n\n\n for (String x : uc.getLangConfig().getStringList(\"lpsInfo\")) {\n API api = new API(TargetPlayer, x);\n sender.sendMessage(api.format(api.formatTags()));\n }\n return true;\n } else {\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"LPSNotOnline\")));\n }\n }\n }\n\n if(args.length == 5){\n if(sender.hasPermission(\"lp.*\")){\n if(args[0].equalsIgnoreCase(\"booster\")){\n if(args[1].equalsIgnoreCase(\"give\")){\n Player Target = Bukkit.getPlayer(args[2]);\n if(Target != null) {\n int Multipler = 0;\n int amount = 0;\n try {\n Multipler = Integer.parseInt(args[3]);\n amount = Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n API api = new API();\n sender.sendMessage(api.format(\"&4Error&8>> &cString is not a Number\"));\n }\n File userdata = new File(lp.userFolder, Target.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n\n if(UsersConfig.getInt(\"Boosters.\" + Multipler) == 0) {\n UsersConfig.set(\"Boosters.\" + Multipler, amount);\n }else{\n int current = uc.getCurrentBoosters(Target, Multipler);\n UsersConfig.set(\"Boosters.\" + Multipler, amount + current);\n }\n try {\n UsersConfig.save(userdata);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"BoosterAdminGive\")\n .replace(\"{BoosterMultiplier}\", String.valueOf(Multipler))\n .replace(\"{lp_player}\", Target.getName()))\n .replace(\"{Booster_Amount}\", String.valueOf(amount)));\n Target.sendMessage(api.format(uc.getLangConfig().getString(\"BoosterGive\"))\n .replace(\"{BoosterMultiplier}\", String.valueOf(Multipler))\n .replace(\"{Booster_Amount}\", String.valueOf(amount)));\n }\n }\n }\n }\n }\n if(sender.hasPermission(\"lp.player\")) {\n if (args.length >= 1) {\n if (args[0].equalsIgnoreCase(\"booster\")) {\n Player player = (Player) sender;\n File userdata = new File(lp.userFolder, player.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n if (args[1].equalsIgnoreCase(\"list\")) {\n\n ConfigurationSection BoostersList = UsersConfig.getConfigurationSection(\"Boosters\");\n if (BoostersList == null) {\n API api = new API();\n player.sendMessage(api.format(\"&cYou currently have 0 boosters\"));\n } else {\n for (String x : BoostersList.getKeys(false)) {\n int amount = UsersConfig.getInt(\"Boosters.\" + x);\n API api = new API();\n player.sendMessage(api.format(uc.getLangConfig().getString(\"lpsBoosterList\").replace(\"{Booster_Multiplier}\", x).replace(\"{Booster_Amount}\", String.valueOf(amount))));\n }\n }\n }\n if (args[1].equalsIgnoreCase(\"use\")) {\n try {\n uc.boosteruseclick(player, Integer.parseInt(args[2]));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }else{\n\n }\n }\n }else if (sender instanceof ConsoleCommandSender){\n if(args.length == 5){\n if(sender.hasPermission(\"lp.*\")){\n if(args[0].equalsIgnoreCase(\"booster\")){\n if(args[1].equalsIgnoreCase(\"give\")){\n Player Target = Bukkit.getPlayer(args[2]);\n if(Target != null) {\n int Multipler = 0;\n int amount = 0;\n try {\n Multipler = Integer.parseInt(args[3]);\n amount = Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n API api = new API();\n sender.sendMessage(api.format(\"&4Error&8>> &cString is not a Number\"));\n }\n File userdata = new File(lp.userFolder, Target.getUniqueId() + \".yml\");\n FileConfiguration UsersConfig = YamlConfiguration.loadConfiguration(userdata);\n\n if(UsersConfig.getInt(\"Boosters.\" + Multipler) == 0) {\n UsersConfig.set(\"Boosters.\" + Multipler, amount);\n }else{\n int current = uc.getCurrentBoosters(Target, Multipler);\n UsersConfig.set(\"Boosters.\" + Multipler, amount + current);\n }\n try {\n UsersConfig.save(userdata);\n } catch (IOException e) {\n e.printStackTrace();\n }\n API api = new API();\n sender.sendMessage(api.format(uc.getLangConfig().getString(\"BoosterAdminGive\")\n .replace(\"{BoosterMultiplier}\", String.valueOf(Multipler))\n .replace(\"{lp_player}\", Target.getName())\n .replace(\"{Booster_Amount}\", String.valueOf(amount))));\n Target.sendMessage(api.format(uc.getLangConfig().getString(\"BoosterGive\"))\n .replace(\"{BoosterMultiplier}\", String.valueOf(Multipler))\n .replace(\"{Booster_Amount}\", String.valueOf(amount)));\n }\n }\n }\n }\n }\n }\n }else{\n API api = new API((Player) sender, uc.getLangConfig().getString(\"LPSErrorPermission\"));\n sender.sendMessage(api.formatTags());\n }\n return true;\n }", "@Override\n\tpublic boolean isAdmin() {\n\t\treturn isOnline() && bukkitPlayer.hasPermission(Permission.ADMIN_NODE);\n\t}", "public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }", "private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}", "public void qtellProgrammers(String msg, Object... args) {\n broadcast(ChatType.PERSONAL_QTELL, programmerRole, msg, args);\n }", "public void handleEvent(Message event)\r\n {\r\n m_tsm.handleEvent(event);\r\n\r\n String msg = event.getMessage().toLowerCase();\r\n\r\n String name = m_botAction.getPlayerName(event.getPlayerID());\r\n\r\n if(event.getMessageType() == Message.PRIVATE_MESSAGE && m_opList.isER(name))\r\n {\r\n if(msg.equals(\"!safeson\"))\r\n {\r\n c_Activate(name, true);\r\n }\r\n else if(msg.equals(\"!safesoff\"))\r\n {\r\n c_Activate(name, false);\r\n m_entryTimes.clear();\r\n } else if(msg.startsWith(\"!default\")) {\r\n cmd_default(name, msg);\r\n }\r\n }\r\n }", "protected void processNewMessage(String user, CfAction action){\n\t\tif (shouldTakeActionOnMessage(action)){\n\t\t\tsendToAllAgents(user, action);\t\n\t\t}\n\t}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {\n\n\t\tboolean playerCanDo = false;\n\t\tboolean isConsole = false;\n\t\tPlayer senderPlayer = null, targetPlayer = null;\n\t\tGroup senderGroup = null;\n\t\tUser senderUser = null;\n\t\tboolean isOpOverride = config.isOpOverride();\n\t\tboolean isAllowCommandBlocks = config.isAllowCommandBlocks();\n\t\t\n\t\t// PREVENT GM COMMANDS BEING USED ON COMMANDBLOCKS\n\t\tif (sender instanceof BlockCommandSender && !isAllowCommandBlocks) {\n\t\t\tBlock block = ((BlockCommandSender)sender).getBlock();\n\t\t\tGroupManager.logger.warning(ChatColor.RED + \"GM Commands can not be called from CommandBlocks\");\n\t\t\tGroupManager.logger.warning(ChatColor.RED + \"Location: \" + ChatColor.GREEN + block.getWorld().getName() + \", \" + block.getX() + \", \" + block.getY() + \", \" + block.getZ());\n\t\t \treturn true;\n\t\t}\n\n\t\t// DETERMINING PLAYER INFORMATION\n\t\tif (sender instanceof Player) {\n\t\t\tsenderPlayer = (Player) sender;\n\n\t\t\tif (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase(\"manload\")) {\n\t\t\t\tsender.sendMessage(ChatColor.RED + \"All commands are locked due to an error. \" + ChatColor.BOLD + \"\" + ChatColor.UNDERLINE + \"Check plugins/groupmanager/error.log or console\" + ChatColor.RESET + \"\" + ChatColor.RED + \" and then try a '/manload'.\");\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tsenderUser = worldsHolder.getWorldData(senderPlayer).getUser(senderPlayer.getUniqueId().toString());\n\t\t\tsenderGroup = senderUser.getGroup();\n\t\t\tisOpOverride = (isOpOverride && (senderPlayer.isOp() || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, \"groupmanager.op\")));\n\n\t\t\tif (isOpOverride || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, \"groupmanager.\" + cmd.getName())) {\n\t\t\t\tplayerCanDo = true;\n\t\t\t}\n\t\t} else {\n\n\t\t\tif (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase(\"manload\")) {\n\t\t\t\tsender.sendMessage(ChatColor.RED + \"All commands are locked due to an error. \" + ChatColor.BOLD + \"\" + ChatColor.UNDERLINE + \"Check plugins/groupmanager/error.log or console\" + ChatColor.RESET + \"\" + ChatColor.RED + \" and then try a '/manload'.\");\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tisConsole = true;\n\t\t}\n\n\t\t// PERMISSIONS FOR COMMAND BEING LOADED\n\t\tdataHolder = null;\n\t\tpermissionHandler = null;\n\n\t\tif (senderPlayer != null) {\n\t\t\tdataHolder = worldsHolder.getWorldData(senderPlayer);\n\t\t}\n\n\t\tString selectedWorld = selectedWorlds.get(sender.getName());\n\t\tif (selectedWorld != null) {\n\t\t\tdataHolder = worldsHolder.getWorldData(selectedWorld);\n\t\t}\n\n\t\tif (dataHolder != null) {\n\t\t\tpermissionHandler = dataHolder.getPermissionsHandler();\n\t\t}\n\n\t\t// VARIABLES USED IN COMMANDS\n\n\t\tint count;\n\t\tPermissionCheckResult permissionResult = null;\n\t\tArrayList<User> removeList = null;\n\t\tString auxString = null;\n\t\tList<String> match = null;\n\t\tUser auxUser = null;\n\t\tGroup auxGroup = null;\n\t\tGroup auxGroup2 = null;\n\n\t\tGroupManagerPermissions execCmd = null;\n\t\ttry {\n\t\t\texecCmd = GroupManagerPermissions.valueOf(cmd.getName());\n\t\t} catch (Exception e) {\n\t\t\t// this error happened once with someone. now im prepared... i think\n\t\t\tGroupManager.logger.severe(\"===================================================\");\n\t\t\tGroupManager.logger.severe(\"= ERROR REPORT START =\");\n\t\t\tGroupManager.logger.severe(\"===================================================\");\n\t\t\tGroupManager.logger.severe(\"= COPY AND PASTE THIS TO A GROUPMANAGER DEVELOPER =\");\n\t\t\tGroupManager.logger.severe(\"===================================================\");\n\t\t\tGroupManager.logger.severe(this.getDescription().getName());\n\t\t\tGroupManager.logger.severe(this.getDescription().getVersion());\n\t\t\tGroupManager.logger.severe(\"An error occured while trying to execute command:\");\n\t\t\tGroupManager.logger.severe(cmd.getName());\n\t\t\tGroupManager.logger.severe(\"With \" + args.length + \" arguments:\");\n\t\t\tfor (String ar : args) {\n\t\t\t\tGroupManager.logger.severe(ar);\n\t\t\t}\n\t\t\tGroupManager.logger.severe(\"The field '\" + cmd.getName() + \"' was not found in enum.\");\n\t\t\tGroupManager.logger.severe(\"And could not be parsed.\");\n\t\t\tGroupManager.logger.severe(\"FIELDS FOUND IN ENUM:\");\n\t\t\tfor (GroupManagerPermissions val : GroupManagerPermissions.values()) {\n\t\t\t\tGroupManager.logger.severe(val.name());\n\t\t\t}\n\t\t\tGroupManager.logger.severe(\"===================================================\");\n\t\t\tGroupManager.logger.severe(\"= ERROR REPORT ENDED =\");\n\t\t\tGroupManager.logger.severe(\"===================================================\");\n\t\t\tsender.sendMessage(\"An error occurred. Ask the admin to take a look at the console.\");\n\t\t}\n\n\t\tif (isConsole || playerCanDo) {\n\t\t\tswitch (execCmd) {\n\t\t\tcase manuadd:\n\n\t\t\t\t// Validating arguments\n\t\t\t\tif ((args.length != 2) && (args.length != 3)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manuadd <player> <group> | optional [world])\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Select the relevant world (if specified)\n\t\t\t\tif (args.length == 3) {\n\t\t\t\t\tdataHolder = worldsHolder.getWorldData(args[2]);\n\t\t\t\t\tpermissionHandler = dataHolder.getPermissionsHandler();\n\t\t\t\t}\n\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Players may not be members of GlobalGroups directly.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Validating permissions\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Can't modify a player with the same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The destination group can't be the same as yours, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getUUID(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getUUID(), auxGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player involving a group that you don't inherit.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Seems OK\n\t\t\t\tauxUser.setGroup(auxGroup);\n\t\t\t\tif (!sender.hasPermission(\"groupmanager.notify.other\") || (isConsole))\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You changed player '\" + auxUser.getLastName() + \"' group to '\" + auxGroup.getName() + \"' in world '\" + dataHolder.getName() + \"'.\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase manudel:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manudel <player>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tdataHolder.removeUser(auxUser.getUUID());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You changed player '\" + auxUser.getLastName() + \"' to default settings.\");\n\n\t\t\t\t// If the player is online, this will create new data for the user.\n\t\t\t\tif(auxUser.getUUID() != null) {\n\t\t\t\t\ttargetPlayer = this.getServer().getPlayer(UUID.fromString(auxUser.getUUID()));\n\t\t\t\t\tif (targetPlayer != null)\n\t\t\t\t\t\tBukkitPermissions.updatePermissions(targetPlayer);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase manuaddsub:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Couldn't retrieve your world. World selection is needed.\");\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Use /manselect <world>\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manuaddsub <player> <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The sub-group can't be the same as yours, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getUUID(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getUUID(), auxGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player involving a group that you don't inherit.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tif (auxUser.addSubGroup(auxGroup))\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You added subgroup '\" + auxGroup.getName() + \"' to player '\" + auxUser.getLastName() + \"'.\");\n\t\t\t\telse\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The subgroup '\" + auxGroup.getName() + \"' is already available to '\" + auxUser.getLastName() + \"'.\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase manudelsub:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manudelsub <user> <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxUser.removeSubGroup(auxGroup);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You removed subgroup '\" + auxGroup.getName() + \"' from player '\" + auxUser.getLastName() + \"' list.\");\n\n\t\t\t\t// targetPlayer = this.getServer().getPlayer(auxUser.getName());\n\t\t\t\t// if (targetPlayer != null)\n\t\t\t\t// BukkitPermissions.updatePermissions(targetPlayer);\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangadd:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangadd <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup != null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group already exists!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxGroup = dataHolder.createGroup(args[0]);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You created a group named: \" + auxGroup.getName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangdel:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangdel <group>)\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tdataHolder.removeGroup(auxGroup.getName());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You deleted a group named \" + auxGroup.getName() + \", it's users are default group now.\");\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\n\t\t\tcase manuaddp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manuaddp <player> <permission> [permission2] [permission3]...)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Validating your permissions\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Can't modify player with same group than you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i < args.length; i++)\n\t\t\t\t{\n\t\t\t\t\tauxString = args[i].replace(\"'\", \"\");\n\t\t\t\t\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't add a permission you don't have: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Validating permissions of user\n\t\t\t\t\tpermissionResult = permissionHandler.checkUserOnlyPermission(auxUser, auxString);\n\t\t\t\t\tif (checkPermissionExists(sender, auxString, permissionResult, \"user\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Seems Ok\n\t\t\t\t\tauxUser.addPermission(auxString);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You added '\" + auxString + \"' to player '\" + auxUser.getLastName() + \"' permissions.\");\n\t\t\t\t}\n\n\n\t\t\t\ttargetPlayer = this.getServer().getPlayer(auxUser.getLastName());\n\t\t\t\tif (targetPlayer != null)\n\t\t\t\t\tBukkitPermissions.updatePermissions(targetPlayer);\n\n\t\t\t\treturn true;\n\n\t\t\tcase manudelp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manudelp <player> <permission> [permission2] [permission3]...)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i < args.length; i++)\n\t\t\t\t{\n\t\t\t\t\tauxString = args[i].replace(\"'\", \"\");\n\t\t\t\t\n\t\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same group as you, or higher.\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Validating your permissions\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't remove a permission you don't have: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Validating permissions of user\n\t\t\t\t\tpermissionResult = permissionHandler.checkUserOnlyPermission(auxUser, auxString);\n\t\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The user doesn't have direct access to that permission: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!auxUser.hasSamePermissionNode(auxString)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"This permission node doesn't match any node.\");\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"But might match node: \" + permissionResult.accessLevel);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tauxUser.removePermission(auxString);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You removed '\" + auxString + \"' from player '\" + auxUser.getLastName() + \"' permissions.\");\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\n\t\t\t\ttargetPlayer = this.getServer().getPlayer(auxUser.getLastName());\n\t\t\t\tif (targetPlayer != null)\n\t\t\t\t\tBukkitPermissions.updatePermissions(targetPlayer);\n\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase manuclearp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manuclearp <player>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating your permissions\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same group as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tfor (String perm : auxUser.getPermissionList()) {\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, perm);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't remove a permission you don't have: '\" + perm + \"'.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tauxUser.removePermission(perm);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You removed all permissions from player '\" + auxUser.getLastName() + \"'.\");\n\n\t\t\t\ttargetPlayer = this.getServer().getPlayer(auxUser.getLastName());\n\t\t\t\tif (targetPlayer != null)\n\t\t\t\t\tBukkitPermissions.updatePermissions(targetPlayer);\n\n\t\t\t\treturn true;\n\n\t\t\tcase manulistp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif ((args.length == 0) || (args.length > 2)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manulistp <player> (+))\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String perm : auxUser.getPermissionList()) {\n\t\t\t\t\tauxString += perm + \", \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The player '\" + auxUser.getLastName() + \"' has following permissions: \" + ChatColor.WHITE + auxString);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And all permissions from group: \" + auxUser.getGroupName());\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (String subGroup : auxUser.subGroupListStringCopy()) {\n\t\t\t\t\t\tauxString += subGroup + \", \";\n\t\t\t\t\t}\n\t\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And all permissions from subgroups: \" + auxString);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The player '\" + auxUser.getLastName() + \"' has no specific permissions.\");\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Only all permissions from group: \" + auxUser.getGroupName());\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (String subGroup : auxUser.subGroupListStringCopy()) {\n\t\t\t\t\t\tauxString += subGroup + \", \";\n\t\t\t\t\t}\n\t\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And all permissions from subgroups: \" + auxString);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// bukkit perms\n\t\t\t\tif ((args.length == 2) && (args[1].equalsIgnoreCase(\"+\"))) {\n\t\t\t\t\ttargetPlayer = this.getServer().getPlayer(auxUser.getLastName());\n\t\t\t\t\tif (targetPlayer != null) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Superperms reports: \");\n\t\t\t\t\t\tfor (String line : BukkitPermissions.listPerms(targetPlayer))\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + line);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase manucheckp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manucheckp <player> <permission>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxString = args[1].replace(\"'\", \"\");\n\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\ttargetPlayer = this.getServer().getPlayer(auxUser.getLastName());\n\t\t\t\t// Validating permission\n\t\t\t\tpermissionResult = permissionHandler.checkFullGMPermission(auxUser, auxString, false);\n\n\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {\n\t\t\t\t\t// No permissions found in GM so fall through and check Bukkit.\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The player doesn't have access to that permission\");\n\n\t\t\t\t} else {\n\t\t\t\t\t// This permission was found in groupmanager.\n\t\t\t\t\tif (permissionResult.owner instanceof User) {\n\t\t\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user has directly a negation node for that permission.\");\n\t\t\t\t\t\t} else if (permissionResult.resultType.equals(PermissionCheckResult.Type.EXCEPTION)) {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user has directly an Exception node for that permission.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user has directly this permission.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Permission Node: \" + permissionResult.accessLevel);\n\t\t\t\t\t} else if (permissionResult.owner instanceof Group) {\n\t\t\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user inherits a negation permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t\t} else if (permissionResult.resultType.equals(PermissionCheckResult.Type.EXCEPTION)) {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user inherits an Exception permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user inherits the permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Permission Node: \" + permissionResult.accessLevel);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// superperms\n\t\t\t\tif (targetPlayer != null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"SuperPerms reports Node: \" + targetPlayer.hasPermission(args[1]) + ((!targetPlayer.hasPermission(args[1]) && targetPlayer.isPermissionSet(args[1])) ? \" (Negated)\": \"\"));\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangaddp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangaddp <group> <permission> [permission2] [permission3]...)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i < args.length; i++)\n\t\t\t\t{\n\t\t\t\t\tauxString = args[i].replace(\"'\", \"\");\n\t\t\t\t\n\t\t\t\t\t// Validating your permissions\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't add a permission you don't have: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Validating permissions of user\n\t\t\t\t\tpermissionResult = permissionHandler.checkGroupOnlyPermission(auxGroup, auxString);\n\t\t\t\t\tif (checkPermissionExists(sender, auxString, permissionResult, \"group\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Seems OK\n\t\t\t\t\tauxGroup.addPermission(auxString);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You added '\" + auxString + \"' to group '\" + auxGroup.getName() + \"' permissions.\");\n\t\t\t\t}\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangdelp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangdelp <group> <permission> [permission2] [permission3]...)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tfor (int i = 1; i < args.length; i++)\n\t\t\t\t{\n\t\t\t\t\tauxString = args[i].replace(\"'\", \"\");\n\t\t\t\t\n\t\t\t\t\t// Validating your permissions\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Can't remove a permission you don't have: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Validating permissions of user\n\t\t\t\t\tpermissionResult = permissionHandler.checkGroupOnlyPermission(auxGroup, auxString);\n\t\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group doesn't have direct access to that permission: '\" + auxString + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!auxGroup.hasSamePermissionNode(auxString)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"This permission node doesn't match any node.\");\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"But might match node: \" + permissionResult.accessLevel);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Seems OK\n\t\t\t\t\tauxGroup.removePermission(auxString);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You removed '\" + auxString + \"' from group '\" + auxGroup.getName() + \"' permissions.\");\n\t\t\t\t}\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase mangclearp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangclearp <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (String perm : auxGroup.getPermissionList()) {\n\t\t\t\t\tpermissionResult = permissionHandler.checkFullUserPermission(senderUser, perm);\n\t\t\t\t\tif (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Can't remove a permission you don't have: '\" + perm + \"'.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tauxGroup.removePermission(perm);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You removed all permissions from group '\" + auxGroup.getName() + \"'.\");\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\n\t\t\tcase manglistp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manglistp <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String perm : auxGroup.getPermissionList()) {\n\t\t\t\t\tauxString += perm + \", \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group '\" + auxGroup.getName() + \"' has following permissions: \" + ChatColor.WHITE + auxString);\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (String grp : auxGroup.getInherits()) {\n\t\t\t\t\t\tauxString += grp + \", \";\n\t\t\t\t\t}\n\t\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And all permissions from groups: \" + auxString);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group '\" + auxGroup.getName() + \"' has no specific permissions.\");\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (String grp : auxGroup.getInherits()) {\n\t\t\t\t\t\tauxString += grp + \", \";\n\t\t\t\t\t}\n\t\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Only all permissions from groups: \" + auxString);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\tcase mangcheckp:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangcheckp <group> <permission>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxString = args[1];\n\t\t\t\tif (auxString.startsWith(\"'\") && auxString.endsWith(\"'\"))\n\t\t\t\t{\n\t\t\t\t\tauxString = auxString.substring(1, auxString.length() - 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tpermissionResult = permissionHandler.checkGroupPermissionWithInheritance(auxGroup, auxString);\n\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group doesn't have access to that permission\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\t// auxString = permissionHandler.checkUserOnlyPermission(auxUser, args[1]);\n\t\t\t\tif (permissionResult.owner instanceof Group) {\n\t\t\t\t\tif (permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group inherits the negation permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t} else if (permissionResult.resultType.equals(PermissionCheckResult.Type.EXCEPTION)) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group inherits an Exception permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The group inherits the permission from group: \" + permissionResult.owner.getLastName());\n\t\t\t\t\t}\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Permission Node: \" + permissionResult.accessLevel);\n\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\tcase mangaddi:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangaddi <group1> <group2>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup2 = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup2 == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support inheritance.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Validating permission\n\t\t\t\tif (permissionHandler.hasGroupInInheritance(auxGroup, auxGroup2.getName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Group \" + auxGroup.getName() + \" already inherits \" + auxGroup2.getName() + \" (might not be directly)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxGroup.addInherits(auxGroup2);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Group \" + auxGroup2.getName() + \" is now in \" + auxGroup.getName() + \" inheritance list.\");\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangdeli:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangdeli <group1> <group2>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup2 = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup2 == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support inheritance.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Validating permission\n\t\t\t\tif (!permissionHandler.hasGroupInInheritance(auxGroup, auxGroup2.getName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Group \" + auxGroup.getName() + \" does not inherit \" + auxGroup2.getName() + \".\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!auxGroup.getInherits().contains(auxGroup2.getName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Group \" + auxGroup.getName() + \" does not inherit \" + auxGroup2.getName() + \" directly.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxGroup.removeInherits(auxGroup2.getName());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Group \" + auxGroup2.getName() + \" was removed from \" + auxGroup.getName() + \" inheritance list.\");\n\n\t\t\t\tBukkitPermissions.updateAllPlayers();\n\n\t\t\t\treturn true;\n\n\t\t\tcase manuaddv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 3) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manuaddv <user> <variable> <value>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (int i = 2; i < args.length; i++) {\n\t\t\t\t\tauxString += args[i];\n\t\t\t\t\tif ((i + 1) < args.length) {\n\t\t\t\t\t\tauxString += \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tauxString = auxString.replace(\"'\", \"\");\n\t\t\t\tauxUser.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variable \" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \":'\" + ChatColor.GREEN + auxString + ChatColor.YELLOW + \"' added to the user \" + auxUser.getLastName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase manudelv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manudelv <user> <variable>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!auxUser.getVariables().hasVar(args[1])) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The user doesn't have directly that variable!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxUser.getVariables().removeVar(args[1]);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variable \" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \" removed from the user \" + ChatColor.GREEN + auxUser.getLastName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase manulistv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manulistv <user>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String varKey : auxUser.getVariables().getVarKeyList()) {\n\t\t\t\t\tObject o = auxUser.getVariables().getVarObject(varKey);\n\t\t\t\t\tauxString += ChatColor.GOLD + varKey + ChatColor.WHITE + \":'\" + ChatColor.GREEN + o.toString() + ChatColor.WHITE + \"', \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variables of user \" + auxUser.getLastName() + \": \");\n\t\t\t\tsender.sendMessage(auxString + \".\");\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Plus all variables from group: \" + auxUser.getGroupName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase manucheckv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manucheckv <user> <variable>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tauxGroup = auxUser.getGroup();\n\t\t\t\tauxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1]);\n\n\t\t\t\tif (!auxUser.getVariables().hasVar(args[1])) {\n\t\t\t\t\t// Check sub groups\n\t\t\t\t\tif (!auxUser.isSubGroupsEmpty() && auxGroup2 == null)\n\t\t\t\t\t\tfor (Group subGroup : auxUser.subGroupListCopy()) {\n\t\t\t\t\t\t\tauxGroup2 = permissionHandler.nextGroupWithVariable(subGroup, args[1]);\n\t\t\t\t\t\t\tif (auxGroup2 != null)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\tif (auxGroup2 == null) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The user doesn't have access to that variable!\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tif (auxUser.getVariables().hasVar(auxString)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The value of variable '\" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \"' is: '\" + ChatColor.GREEN + auxUser.getVariables().getVarObject(args[1]).toString() + ChatColor.WHITE + \"'\");\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"This user own directly the variable\");\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The value of variable '\" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \"' is: '\" + ChatColor.GREEN + auxGroup2.getVariables().getVarObject(args[1]).toString() + ChatColor.WHITE + \"'\");\n\t\t\t\tif (!auxGroup.equals(auxGroup2)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And the value was inherited from group: \" + ChatColor.GREEN + auxGroup2.getName());\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangaddv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length < 3) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangaddv <group> <variable> <value>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support Info Nodes.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (int i = 2; i < args.length; i++) {\n\t\t\t\t\tauxString += args[i];\n\t\t\t\t\tif ((i + 1) < args.length) {\n\t\t\t\t\t\tauxString += \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxString = auxString.replace(\"'\", \"\");\n\t\t\t\tauxGroup.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variable \" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \":'\" + ChatColor.GREEN + auxString + ChatColor.YELLOW + \"' added to the group \" + auxGroup.getName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangdelv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangdelv <group> <variable>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support Info Nodes.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!auxGroup.getVariables().hasVar(args[1])) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The group doesn't have directly that variable!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxGroup.getVariables().removeVar(args[1]);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variable \" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \" removed from the group \" + ChatColor.GREEN + auxGroup.getName());\n\n\t\t\t\treturn true;\n\n\t\t\tcase manglistv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manglistv <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support Info Nodes.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\t// Seems OK\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String varKey : auxGroup.getVariables().getVarKeyList()) {\n\t\t\t\t\tObject o = auxGroup.getVariables().getVarObject(varKey);\n\t\t\t\t\tauxString += ChatColor.GOLD + varKey + ChatColor.WHITE + \":'\" + ChatColor.GREEN + o.toString() + ChatColor.WHITE + \"', \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Variables of group \" + auxGroup.getName() + \": \");\n\t\t\t\tsender.sendMessage(auxString + \".\");\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String grp : auxGroup.getInherits()) {\n\t\t\t\t\tauxString += grp + \", \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Plus all variables from groups: \" + auxString);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase mangcheckv:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mangcheckv <group> <variable>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[0]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[0] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"GlobalGroups do NOT support Info Nodes.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tauxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1]);\n\t\t\t\tif (auxGroup2 == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The group doesn't have access to that variable!\");\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The value of variable '\" + ChatColor.GOLD + args[1] + ChatColor.YELLOW + \"' is: '\" + ChatColor.GREEN + auxGroup2.getVariables().getVarObject(args[1]).toString() + ChatColor.WHITE + \"'\");\n\t\t\t\tif (!auxGroup.equals(auxGroup2)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"And the value was inherited from group: \" + ChatColor.GREEN + auxGroup2.getName());\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase manwhois:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manwhois <player>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Name: \" + ChatColor.GREEN + auxUser.getLastName());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Group: \" + ChatColor.GREEN + auxUser.getGroup().getName());\n\t\t\t\t// Compile a list of subgroups\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (String subGroup : auxUser.subGroupListStringCopy()) {\n\t\t\t\t\tauxString += subGroup + \", \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"subgroups: \" + auxString);\n\t\t\t\t}\n\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Overloaded: \" + ChatColor.GREEN + dataHolder.isOverloaded(auxUser.getUUID()));\n\t\t\t\tauxGroup = dataHolder.surpassOverload(auxUser.getUUID()).getGroup();\n\t\t\t\tif (!auxGroup.equals(auxUser.getGroup())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Original Group: \" + ChatColor.GREEN + auxGroup.getName());\n\t\t\t\t}\n\t\t\t\t// victim.permissions.add(args[1]);\n\t\t\t\treturn true;\n\n\t\t\tcase tempadd:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/tempadd <player>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Can't modify player with same permissions than you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tif (overloadedUsers.get(dataHolder.getName().toLowerCase()) == null) {\n\t\t\t\t\toverloadedUsers.put(dataHolder.getName().toLowerCase(), new ArrayList<User>());\n\t\t\t\t}\n\t\t\t\tdataHolder.overloadUser(auxUser.getUUID());\n\t\t\t\toverloadedUsers.get(dataHolder.getName().toLowerCase()).add(dataHolder.getUser(auxUser.getUUID()));\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Player set to overload mode!\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase tempdel:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/tempdel <player>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tif (overloadedUsers.get(dataHolder.getName().toLowerCase()) == null) {\n\t\t\t\t\toverloadedUsers.put(dataHolder.getName().toLowerCase(), new ArrayList<User>());\n\t\t\t\t}\n\t\t\t\tdataHolder.removeOverload(auxUser.getUUID());\n\t\t\t\tif (overloadedUsers.get(dataHolder.getName().toLowerCase()).contains(auxUser)) {\n\t\t\t\t\toverloadedUsers.get(dataHolder.getName().toLowerCase()).remove(auxUser);\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Player overload mode is now disabled.\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase templist:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// WORKING\n\t\t\t\tauxString = \"\";\n\t\t\t\tremoveList = new ArrayList<User>();\n\t\t\t\tcount = 0;\n\t\t\t\tfor (User u : overloadedUsers.get(dataHolder.getName().toLowerCase())) {\n\t\t\t\t\tif (!dataHolder.isOverloaded(u.getUUID())) {\n\t\t\t\t\t\tremoveList.add(u);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tauxString += u.getLastName() + \", \";\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count == 0) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"There are no users in overload mode.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\tif (overloadedUsers.get(dataHolder.getName().toLowerCase()) == null) {\n\t\t\t\t\toverloadedUsers.put(dataHolder.getName().toLowerCase(), new ArrayList<User>());\n\t\t\t\t}\n\t\t\t\toverloadedUsers.get(dataHolder.getName().toLowerCase()).removeAll(removeList);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \" \" + count + \" Users in overload mode: \" + ChatColor.WHITE + auxString);\n\n\t\t\t\treturn true;\n\n\t\t\tcase tempdelall:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// WORKING\n\t\t\t\tremoveList = new ArrayList<User>();\n\t\t\t\tcount = 0;\n\t\t\t\tfor (User u : overloadedUsers.get(dataHolder.getName().toLowerCase())) {\n\t\t\t\t\tif (dataHolder.isOverloaded(u.getUUID())) {\n\t\t\t\t\t\tdataHolder.removeOverload(u.getUUID());\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count == 0) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"There are no users in overload mode.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (overloadedUsers.get(dataHolder.getName().toLowerCase()) == null) {\n\t\t\t\t\toverloadedUsers.put(dataHolder.getName().toLowerCase(), new ArrayList<User>());\n\t\t\t\t}\n\t\t\t\toverloadedUsers.get(dataHolder.getName().toLowerCase()).clear();\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \" \" + count + \"All users in overload mode are now normal again.\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase mansave:\n\n\t\t\t\tboolean forced = false;\n\n\t\t\t\tif ((args.length == 1) && (args[0].equalsIgnoreCase(\"force\")))\n\t\t\t\t\tforced = true;\n\n\t\t\t\ttry {\n\t\t\t\t\tworldsHolder.saveChanges(forced);\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"All changes were saved.\");\n\t\t\t\t} catch (IllegalStateException ex) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + ex.getMessage());\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\tcase manload:\n\n\t\t\t\t/**\n\t\t\t\t * Attempt to reload a specific world\n\t\t\t\t */\n\t\t\t\tif (args.length > 0) {\n\n\t\t\t\t\tif (!lastError.isEmpty()) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"All commands are locked due to an error. \" + ChatColor.BOLD + \"\" + ChatColor.UNDERLINE + \"Check plugins/groupmanager/error.log or console\" + ChatColor.RESET + \"\" + ChatColor.RED + \" and then try a '/manload'.\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\t\t\t\tauxString += args[i];\n\t\t\t\t\t\tif ((i + 1) < args.length) {\n\t\t\t\t\t\t\tauxString += \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tisLoaded = false; // Disable Bukkit Perms update and event triggers\n\n\t\t\t\t\tglobalGroups.load();\n\t\t\t\t\tworldsHolder.loadWorld(auxString);\n\n\t\t\t\t\tsender.sendMessage(\"The request to reload world '\" + auxString + \"' was attempted.\");\n\n\t\t\t\t\tisLoaded = true;\n\n\t\t\t\t\tBukkitPermissions.reset();\n\n\t\t\t\t} else {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Reload all settings and data as no world was specified.\n\t\t\t\t\t */\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Attempting a fresh load.\n\t\t\t\t\t */\n\t\t\t\t\tonDisable(true);\n\t\t\t\t\tonEnable(true);\n\n\t\t\t\t\tsender.sendMessage(\"All settings and worlds were reloaded!\");\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Fire an event as none will have been triggered in the reload.\n\t\t\t\t */\n\t\t\t\tif (GroupManager.isLoaded())\n\t\t\t\t\tGroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.RELOADED);\n\n\t\t\t\treturn true;\n\n\t\t\tcase listgroups:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// WORKING\n\t\t\t\tauxString = \"\";\n\t\t\t\tString auxString2 = \"\";\n\t\t\t\tfor (Group g : dataHolder.getGroupList()) {\n\t\t\t\t\tauxString += g.getName() + \", \";\n\t\t\t\t}\n\t\t\t\tfor (Group g : getGlobalGroups().getGroupList()) {\n\t\t\t\t\tauxString2 += g.getName() + \", \";\n\t\t\t\t}\n\t\t\t\tif (auxString.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString = auxString.substring(0, auxString.lastIndexOf(\",\"));\n\t\t\t\t}\n\t\t\t\tif (auxString2.lastIndexOf(\",\") > 0) {\n\t\t\t\t\tauxString2 = auxString2.substring(0, auxString2.lastIndexOf(\",\"));\n\t\t\t\t}\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Groups Available: \" + ChatColor.WHITE + auxString);\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"GlobalGroups Available: \" + ChatColor.WHITE + auxString2);\n\n\t\t\t\treturn true;\n\n\t\t\tcase manpromote:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manpromote <player> <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Players may not be members of GlobalGroups directly.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The destination group can't be the same as yours, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getUUID(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getUUID(), auxGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player involving a group that you don't inherit.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!permissionHandler.hasGroupInInheritance(auxUser.getGroup(), auxGroup.getName()) && !permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player using groups with different heritage line.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The new group must be a higher rank.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxUser.setGroup(auxGroup);\n\t\t\t\tif (!sender.hasPermission(\"groupmanager.notify.other\") || (isConsole))\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You changed \" + auxUser.getLastName() + \" group to \" + auxGroup.getName() + \".\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase mandemote:\n\t\t\t\t// Validating state of sender\n\t\t\t\tif (dataHolder == null || permissionHandler == null) {\n\t\t\t\t\tif (!setDefaultWorldHandler(sender))\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating arguments\n\t\t\t\tif (args.length != 2) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mandemote <player> <group>)\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (match != null) {\n\t\t\t\t\tauxUser = dataHolder.getUser(match.get(0));\n\t\t\t\t} else {\n\t\t\t\t\tauxUser = dataHolder.getUser(args[0]);\n\t\t\t\t}\n\t\t\t\tauxGroup = dataHolder.getGroup(args[1]);\n\t\t\t\tif (auxGroup == null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"'\" + args[1] + \"' Group doesnt exist!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (auxGroup.isGlobal()) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Players may not be members of GlobalGroups directly.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Validating permission\n\t\t\t\tif (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getUUID(), senderGroup.getName()) : false)) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player with same permissions as you, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, senderGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The destination group can't be the same as yours, or higher.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!isConsole && !isOpOverride && (!permissionHandler.inGroup(senderUser.getUUID(), auxUser.getGroupName()) || !permissionHandler.inGroup(senderUser.getUUID(), auxGroup.getName()))) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player involving a group that you don't inherit.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (!permissionHandler.hasGroupInInheritance(auxUser.getGroup(), auxGroup.getName()) && !permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"You can't modify a player using groups with different inheritage line.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName())) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"The new group must be a lower rank.\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Seems OK\n\t\t\t\tauxUser.setGroup(auxGroup);\n\t\t\t\tif (!sender.hasPermission(\"groupmanager.notify.other\") || (isConsole))\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You changed \" + auxUser.getLastName() + \" group to \" + auxGroup.getName() + \".\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase mantogglevalidate:\n\t\t\t\tvalidateOnlinePlayer = !validateOnlinePlayer;\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Validate if player is online, now set to: \" + Boolean.toString(validateOnlinePlayer));\n\t\t\t\tif (!validateOnlinePlayer) {\n\t\t\t\t\tsender.sendMessage(ChatColor.GOLD + \"From now on you can edit players that are not connected... BUT:\");\n\t\t\t\t\tsender.sendMessage(ChatColor.LIGHT_PURPLE + \"From now on you should type the whole name of the player, correctly.\");\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\tcase mantogglesave:\n\t\t\t\tif (scheduler == null) {\n\t\t\t\t\tenableScheduler();\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The auto-saving is enabled!\");\n\t\t\t\t} else {\n\t\t\t\t\tdisableScheduler();\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"The auto-saving is disabled!\");\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\tcase manworld:\n\t\t\t\tauxString = selectedWorlds.get(sender.getName());\n\t\t\t\tif (auxString != null) {\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You have the world '\" + dataHolder.getName() + \"' in your selection.\");\n\t\t\t\t} else {\n\t\t\t\t\tif (dataHolder == null) {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"There is no world selected. And no world is available now.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You don't have a world in your selection..\");\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Working with the direct world where your player is.\");\n\t\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Your world now uses permissions of world name: '\" + dataHolder.getName() + \"' \");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\tcase manselect:\n\t\t\t\tif (args.length < 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/manselect <world>)\");\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Worlds available: \");\n\t\t\t\t\tArrayList<OverloadedWorldHolder> worlds = worldsHolder.allWorldsDataList();\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (int i = 0; i < worlds.size(); i++) {\n\t\t\t\t\t\tauxString += worlds.get(i).getName();\n\t\t\t\t\t\tif ((i + 1) < worlds.size()) {\n\t\t\t\t\t\t\tauxString += \", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + auxString);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\t\t\tif (args[i] == null) {\n\t\t\t\t\t\tlogger.warning(\"Bukkit gave invalid arguments array! Cmd: \" + cmd.getName() + \" args.length: \" + args.length);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tauxString += args[i];\n\t\t\t\t\tif (i < (args.length - 1)) {\n\t\t\t\t\t\tauxString += \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdataHolder = worldsHolder.getWorldData(auxString);\n\t\t\t\tpermissionHandler = dataHolder.getPermissionsHandler();\n\t\t\t\tselectedWorlds.put(sender.getName(), dataHolder.getName());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You have selected world '\" + dataHolder.getName() + \"'.\");\n\n\t\t\t\treturn true;\n\n\t\t\tcase manclear:\n\t\t\t\tif (args.length != 0) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count!\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tselectedWorlds.remove(sender.getName());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You have removed your world selection. Working with current world(if possible).\");\n\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase mancheckw:\n\t\t\t\tif (args.length < 1) {\n\t\t\t\t\tsender.sendMessage(ChatColor.RED + \"Review your arguments count! (/mancheckw <world>)\");\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Worlds available: \");\n\t\t\t\t\tArrayList<OverloadedWorldHolder> worlds = worldsHolder.allWorldsDataList();\n\t\t\t\t\tauxString = \"\";\n\t\t\t\t\tfor (int i = 0; i < worlds.size(); i++) {\n\t\t\t\t\t\tauxString += worlds.get(i).getName();\n\t\t\t\t\t\tif ((i + 1) < worlds.size()) {\n\t\t\t\t\t\t\tauxString += \", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsender.sendMessage(ChatColor.YELLOW + auxString);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tauxString = \"\";\n\t\t\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\t\t\tif (args[i] == null) {\n\t\t\t\t\t\tlogger.warning(\"Bukkit gave invalid arguments array! Cmd: \" + cmd.getName() + \" args.length: \" + args.length);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tauxString += args[i];\n\t\t\t\t\tif (i < (args.length - 1)) {\n\t\t\t\t\t\tauxString += \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdataHolder = worldsHolder.getWorldData(auxString);\n\t\t\t\t\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"You have selected world '\" + dataHolder.getName() + \"'.\");\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"This world is using the following data files..\");\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Groups:\" + ChatColor.GREEN + \" \" + dataHolder.getGroupsFile().getAbsolutePath());\n\t\t\t\tsender.sendMessage(ChatColor.YELLOW + \"Users:\" + ChatColor.GREEN + \" \" + dataHolder.getUsersFile().getAbsolutePath());\n\n\t\t\t\treturn true;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsender.sendMessage(ChatColor.RED + \"You are not allowed to use that command.\");\n\t\treturn true;\n\t}", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "public boolean adminInvitationSent(User user, Chatroom chatroom) {\n\t\tList<Chatroom> adminInvites = user.getChatroomAdminInvites();\n\t\tList<User> admins = chatroom.getAdminInvitees();\n\n\t\treturn admins.contains(user) && adminInvites.contains(chatroom);\n\t}", "@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}", "@Override\n public void notifyPrivilege() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyPrivilege();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending privilege error\");\n }\n }", "protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}", "private void sendActionBar(@NonNull final String message) {\n for(UUID playerID : getNewsRecipient()) {\n if(isOnline(playerID)) {\n @NonNull final CraftPlayer player = (CraftPlayer) Bukkit.getPlayer(playerID);\n final String actionMsg = \"{\\\"text\\\":\\\"\" + message + \"\\\"}\";\n final PacketPlayOutChat PACKET = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(actionMsg), (byte) 2);\n player.getHandle().playerConnection.sendPacket(PACKET);\n } else {\n getNewsRecipient().remove(playerID);\n }}\n\n }", "private void sendStatusUpdateMailToOperators()\n {\n if (sendMail == false) {\n return;\n }\n\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<String, RuntimeException>()\n {\n @Override\n public String call() throws RuntimeException\n {\n BranchFileStats stats = PlcUtils.getBranchFileStats(wikiContext);\n if (stats == null) {\n return StringUtils.EMPTY;\n }\n FileStatsDO statsForId = stats.getFileStatsForId(pageId);\n if (statsForId == null) {\n return StringUtils.EMPTY;\n }\n\n // retrieve operators and send email to each of them in their specisifed language (if no language is specified english will be taken\n // as default)\n final String currentUserName = wikiContext.getWikiWeb().getAuthorization().getCurrentUserName(wikiContext);\n for (final String operator : statsForId.getOperators()) {\n try {\n wikiContext.getWikiWeb().getAuthorization().runAsUser(operator, wikiContext,\n new CallableX<Void, RuntimeException>()\n {\n\n GWikiI18nProvider i18n = wikiContext.getWikiWeb().getI18nProvider();\n\n @Override\n public Void call() throws RuntimeException\n {\n String email = wikiContext.getWikiWeb().getAuthorization().getCurrentUserEmail(wikiContext);\n if (StringUtils.isEmpty(email) == true) {\n GLog.warn(GWikiLogCategory.Wiki, \"User has no mail specified. No status article update mail sent.\",\n new LogAttribute(GenomeAttributeType.UserEmail, operator));\n return null;\n }\n\n // prepare email contents\n String subject = i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.subject\",\n \"Article status updated\",\n getPageTitle());\n String bodyString = getBodyString(currentUserName);\n\n final Map<String, String> ctx = new HashMap<String, String>();\n ctx.put(GWikiEmailProvider.FROM, wikiContext.getWikiWeb().getWikiConfig().getSendEmail());\n ctx.put(GWikiEmailProvider.SUBJECT, subject);\n ctx.put(GWikiEmailProvider.TEXT, bodyString);\n ctx.put(GWikiEmailProvider.MAILTEMPLATE, \"edit/pagelifecycle/mailtemplates/StatusUpdateMailTemplate\");\n ctx.put(GWikiEmailProvider.TO, email);\n\n GLog.note(GWikiLogCategory.Wiki, \"Sent status update mail to: \" + email);\n wikiContext.getWikiWeb().getDaoContext().getEmailProvider().sendEmail(ctx);\n return null;\n }\n\n /**\n * Get body contents\n * \n * @param currentUserName\n * @return\n */\n private String getBodyString(final String currentUserName)\n {\n StringBuffer bodyString = new StringBuffer();\n String body = i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.body\", \"\",\n wikiContext.getWikiWeb()\n .getAuthorization().getCurrentUserName(wikiContext),\n getPageTitle(), wikiContext.globalUrl(pageId), currentUserName,\n newPageState);\n bodyString.append(body);\n if (StringUtils.isNotBlank(comment) == true) {\n bodyString.append(i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.comment\", \"\", comment));\n }\n bodyString.append(i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.foot\"));\n return bodyString.toString();\n }\n });\n } catch (AuthorizationFailedException ex) {\n GWikiLog.warn(\"Cannot determine email for user: \" + operator, ex);\n }\n }\n return null;\n }\n });\n }", "public void enableChat();", "public boolean Admin() {\n\t\tif (choiceAdmin.getSelectedIndex() == 0 || choiceAdmin.getSelectedIndex() == 2) {\n\t\t\tlblCorreoDelAdministrador.setVisible(true);\n\t\t\ttextField.setVisible(true);\n\t\t\tadmin = 0;\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlblCorreoDelAdministrador.setVisible(false);\n\t\t\ttextField.setVisible(false);\n\t\t\tadmin = 1;\n\t\t\treturn true;\n\t\t}\n\t}", "@ListenEvent(event = AddAdminMemberEvent.class)\n public void onAddAccountAdmin(AddAdminMemberEvent evt) throws BusinessException {\n\n logger.info(\"预置会议系统报表授权成功!\" + evt.getMember().getId());\n }", "void checkAdmin() throws HsqlException {\n Trace.check(isAdmin(), Trace.ACCESS_IS_DENIED);\n }", "public void welcomeMsg(){\r\n\t\tdisplay(\"***************************\");\r\n\t\tdisplay(\"Hi you and welcome on STYF!\");\r\n\t\tdisplay(\"Are you already registred(Y/N)?\");\r\n\t}", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }", "public void requestAppendLog(AppendLogCommand appendLogCmd) throws PandaException {\r\n\r\n //logger.info(\"request Append in ,UUID : {}\", cmd.getUuid());\r\n // uuid is handled ?\r\n \r\n if(this.counter.size() > 300) return ;\r\n\r\n if (uuidHadRequest(appendLogCmd)) {\r\n\r\n\r\n return;\r\n }\r\n \r\n \r\n\r\n\r\n counter.initCmdCounter(appendLogCmd, corePeer.getMemberPeers().size());\r\n\r\n\r\n corePeer.getStore().appendCommand(appendLogCmd);// leader store\r\n\r\n \r\n leaderHandler.sendToAllFollowers(appendLogCmd);\r\n\r\n\r\n\r\n }", "public void execute(){\n\t \tif(type == ClickableType.USERNAME)\n\t \t\tUserModerationWindow.createUserWindow(UserList.getUser(Window.getCurrentConnection(), ((String)value).toLowerCase()));\n\t \t//Emote was clicked: Opens window displaying information about the emote\n\t \telse if(type == ClickableType.EMOTE){\n\t \t\tEmote emote = (Emote)value;\n\t \t\tString print = \"Name: \" + emote.getName() + \n\t \t\t\t\t\"\\nChannel: \" + emote.getChannel() + \n\t \t\t\t\t\"\\nID: \" + emote.getID() + \n\t \t\t\t\t\"\\nFrom: \" + emote.getEmoteType().name();\n\t \t\t//If emote is Twitch emote\n\t \t\tif(emote.getEmoteType()!=EmoteType.TWITCH)\n\t \t\t\tprint += \"\\nCreator: \" + emote.getCreator(); \n\t \t\tDialogs.iconMessage(\"Emote - \" + emote.getName(), print, emote.getIcon());\n\t \t}\n\t \t//Badge icon was clicked: Opens window displaying information about the badge\n\t \telse if(type == ClickableType.BADGE){\n\t \t\tBadgeType type = (BadgeType)value;\n\t \t\tDialogs.iconMessage(\"Badge - \" + type.getAPIName(), \n\t \t\t\t\t\"Name: \" + type.getName() + \n\t \t\t\t\t\"\\nVersion: \" + type.getVersion() + \n\t \t\t\t\t\"\\nDescription: \"+ type.getDescription() + \n\t \t\t\t\t\"\\nShort Name: \" + type.getBadge().getShortName(), \n\t \t\t\t\ttype.getAttribute().getIcon());\n\t \t}\n\t \t//Ban icon was clicked: Bans the user from chat\n\t \telse if(type == ClickableType.BAN){\n\t \t\tUser user = (User)value;\n\t \t\tModerationTools.ban(user);\n\t \t}\n\t \t//Timeout icon was clicked: Bans user for 10 minutes\n\t \telse if(type == ClickableType.TIMEOUT){\n\t \t\tUser user = (User)value;\n\t \t\tModerationTools.timeout(user, 600);\n\t \t}\n\t }", "private void sendUsage(CommandType type) {\n switch (type) {\n case LIST:\n sendMsgToClient(\"@|bold,blue Usage:|@ @|blue list lecturer|subject|@\");\n break;\n case SEARCH:\n sendMsgToClient(\"@|bold,blue Usage:|@ @|blue search (lecturer|subject|room) <search term>|@\");\n break;\n }\n }", "private void postMessages() {\n List<models.MessageProbe> probes = new Model.Finder(String.class, models.MessageProbe.class).where().ne(\"curr_status\", 1).findList();\n for (models.MessageProbe currProbe : probes) {\n if ((currProbe.curr_status == models.MessageProbe.STATUS.WITH_ERROR) || (currProbe.curr_status == models.MessageProbe.STATUS.NEW)) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToPost());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.POSTED;\n currProbe.curr_error = null;\n postCounter++;\n }\n currProbe.update();\n }\n }\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.DELETED) {\n currProbe.delete();\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.EDITED) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToModify());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.WAIT_CONFIRM;\n currProbe.curr_error = null;\n editCounter++;\n }\n currProbe.update();\n }\n }\n }\n }\n }", "public static void sendNormalMOTD(Player target) {\n boolean somethingSent = false;\n\n //Send motd title\n if (motd.has(\"title\")) {\n target.sendMessage(ChatColor.translateAlternateColorCodes('&', motd.getString(\"title\")));\n somethingSent = true;\n }\n\n //Send priority messages\n if (motd.has(\"priority\")) {\n String[] priority = new String[motd.getJSONArray(\"priority\").length()];\n for (int i = 0; i < priority.length; i++) {\n priority[i] = ChatColor.GOLD + \" > \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"priority\").getString(i));\n }\n target.sendMessage(priority);\n somethingSent = true;\n }\n\n //send a few random daily's\n if (motd.has(\"normal\") && !motd.getJSONArray(\"normal\").isEmpty()) {\n Random r = new Random();\n int totalNormalMessages;\n\n if (motdNormalCount > motd.getJSONArray(\"normal\").length()) {\n totalNormalMessages = motd.getJSONArray(\"normal\").length();\n } else {\n totalNormalMessages = motdNormalCount;\n }\n\n String[] normalMessages = new String[totalNormalMessages];\n JSONArray used = new JSONArray();\n int itemNum = r.nextInt(motd.getJSONArray(\"normal\").length());\n normalMessages[0] = ChatColor.GREEN + \" > \" + ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(itemNum));\n used.put(itemNum);\n\n for (int i = 1; i < totalNormalMessages; i++) {\n while (used.toList().contains(itemNum)) {\n itemNum = r.nextInt(motd.getJSONArray(\"normal\").length());\n }\n normalMessages[i] = ChatColor.GREEN + \" > \" + ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(itemNum));\n }\n\n target.sendMessage(normalMessages);\n somethingSent = true;\n }\n\n }", "public void beforeSendingeGainChatRequest();", "private void onRequireSMSPermissionsDenied() {\r\n showToast(getString(R.string.contact_picker_requires_sms_permission), Toast.LENGTH_LONG);\r\n }", "private void sendMailLogInfo() {\n\t\tif (mChangedInfoList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// 1.导出信息\n\t\tString content = dumpLogInfoWithHtml();\n\t\t\n\t\t// 2. 更新收件人与标题\n\t\tmMailSender.updateMailToAndCc(mMailReceivers, mMailCcReceivers);\n\t\t\n\t\tLogger.println(\"==SvnLog send emal with subject \" + mMailSubject);\n\t\t\n\t\t// 3.发送信息send\n\t\tmMailSender.sendHtmlMail(mMailSubject, content);\n\t\t\n\t\t// 4.清理此轮信息\n\t\tclearInfo();\n\t}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command command, String label, String[] args)\n\t{\n\t\tif ((sender instanceof Player && !allowPlayer) || (!(sender instanceof Player) && !allowConsole))\n\t\t{\n\t\t\tsender.sendMessage(ChatUtility.getSettings().nickMessage + \"You can't do that from here\");\n\t\t\treturn false;\n\t\t}\n\t\tif (permission == null || sender.hasPermission(permission))\n\t\t\tonInvoked(sender, args);\n\t\telse\n\t\t\tsender.sendMessage(ChatUtility.getSettings().nickMessage + \"You don't have permission to do this\");\n\t\treturn true;\n\t}", "private void doSend(Message message, boolean toAdmin)\n throws IllegalArgumentException, IOException {\n // Could perform basic checks to save on RPCs in case of missing args etc.\n // I'm not doing this on purpose, to make sure the semantics of the two\n // implementations stay the same.\n // The benefit of not doing basic checks here is that we will pick up\n // changes in semantics (ie from address can now also be the logged-in user)\n // for free.\n\n MailMessage.Builder msgProto = MailMessage.newBuilder();\n if (message.getSender() != null) {\n msgProto.setSender(message.getSender());\n }\n if (message.getTo() != null) {\n msgProto.addAllTo(message.getTo());\n }\n if (message.getCc() != null) {\n msgProto.addAllCc(message.getCc());\n }\n if (message.getBcc() != null) {\n msgProto.addAllBcc(message.getBcc());\n }\n if (message.getReplyTo() != null) {\n msgProto.setReplyTo(message.getReplyTo());\n }\n if (message.getSubject() != null) {\n msgProto.setSubject(message.getSubject());\n }\n if (message.getTextBody() != null) {\n msgProto.setTextBody(message.getTextBody());\n }\n if (message.getHtmlBody() != null) {\n msgProto.setHtmlBody(message.getHtmlBody());\n }\n if (message.getAmpHtmlBody() != null) {\n msgProto.setAmpHtmlBody(message.getAmpHtmlBody());\n }\n if (message.getAttachments() != null) {\n for (Attachment attach : message.getAttachments()) {\n MailAttachment.Builder attachProto = MailAttachment.newBuilder();\n attachProto.setFileName(attach.getFileName());\n attachProto.setData(ByteString.copyFrom(attach.getData()));\n String contentId = attach.getContentID();\n if (contentId != null) {\n attachProto.setContentID(contentId);\n }\n msgProto.addAttachment(attachProto);\n }\n }\n if (message.getHeaders() != null) {\n for (Header header : message.getHeaders()) {\n msgProto.addHeader(\n MailHeader.newBuilder().setName(header.getName()).setValue(header.getValue()));\n }\n }\n\n byte[] msgBytes = msgProto.buildPartial().toByteArray();\n try {\n // Returns VoidProto -- just ignore the return value.\n if (toAdmin) {\n ApiProxy.makeSyncCall(PACKAGE, \"SendToAdmins\", msgBytes);\n } else {\n ApiProxy.makeSyncCall(PACKAGE, \"Send\", msgBytes);\n }\n } catch (ApiProxy.ApplicationException ex) {\n // Pass all the error details straight through (same as python).\n switch (ErrorCode.forNumber(ex.getApplicationError())) {\n case BAD_REQUEST:\n throw new IllegalArgumentException(\"Bad Request: \" +\n ex.getErrorDetail());\n case UNAUTHORIZED_SENDER:\n throw new IllegalArgumentException(\"Unauthorized Sender: \" +\n ex.getErrorDetail());\n case INVALID_ATTACHMENT_TYPE:\n throw new IllegalArgumentException(\"Invalid Attachment Type: \" +\n ex.getErrorDetail());\n case INVALID_HEADER_NAME:\n throw new IllegalArgumentException(\"Invalid Header Name: \" +\n ex.getErrorDetail());\n case INTERNAL_ERROR:\n default:\n throw new IOException(ex.getErrorDetail());\n }\n }\n }", "void doGetAdminInfo() {\n\t\tlog.config(\"doGetAdminInfo()...\");\n\t\tthis.rpcService.getAdminInfo(new AsyncCallback<DtoAdminInfo>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tString errorMessage = \"Error when getting admin info! : \" + caught.getMessage();\n\t\t\t\tlog.severe(errorMessage);\n\t\t\t\tgetAdminPanel().setActionResult(errorMessage, ResultType.error);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(DtoAdminInfo adminInfo) {\n\t\t\t\tlog.config(\"getAdminInfo() on success - \" + adminInfo.getListLogFilenames().size() + \" logs filenames.\");\n\t\t\t\tgetAdminPanel().setAdminInfo(adminInfo);\n\t\t\t}\n\t\t});\n\t}", "private void showHelp(CommandSender sender) {\n StringBuilder user = new StringBuilder();\n StringBuilder admin = new StringBuilder();\n\n for (Command cmd : commands.values()) {\n CommandInfo info = cmd.getClass().getAnnotation(CommandInfo.class);\n if(!PermHandler.hasPerm(sender, info.permission())) continue;\n\n StringBuilder buffy;\n if (info.permission().startsWith(\"dar.admin\"))\n buffy = admin;\n else \n buffy = user;\n \n buffy.append(\"\\n\")\n .append(ChatColor.RESET).append(info.usage()).append(\" \")\n .append(ChatColor.YELLOW).append(info.desc());\n }\n\n if (admin.length() == 0) {\n \tMessenger.sendMessage(sender, \"Available Commands: \"+user.toString());\n } else {\n \tMessenger.sendMessage(sender, \"User Commands: \"+user.toString());\n \tMessenger.sendMessage(sender, \"Admin Commands: \"+admin.toString());\n }\n }", "private void checkRunTimePermission() {\n\n if(checkPermission()){\n\n Toast.makeText(MainActivity.this, \"All Permissions Granted Successfully\", Toast.LENGTH_LONG).show();\n\n }\n else {\n\n requestPermission();\n }\n }", "protected boolean processShout(String username, String titles, String message){return false;}", "private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}", "public void OnRun()\r\n {\r\n try\r\n {\r\n Init();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.error(ex);\r\n }\r\n \r\n try\r\n {\r\n this.types = this.config.getTypes();\r\n \r\n// this.checkList = dao.CheckLastRun();\r\n \r\n// if (checkList.size()>0)\r\n// {\r\n// Vector<Integer> checkListLastRun = checkList;\r\n// \r\n// checkList = new Vector<Integer>();\r\n// \r\n// CollectInvitees(true);\r\n// CollectInvitees(false);\r\n// \r\n// // lasttime missing some mails\r\n// RemoveSearched(checkListLastRun);\r\n// }\r\n// else\r\n// {\r\n dao.CleanChecklist();\r\n \r\n CollectInvitees(true);\r\n CollectInvitees(false);\r\n \r\n for(Integer id : this.checkList)\r\n {\r\n dao.BuildChecklist(id);\r\n }\r\n// }\r\n \r\n SendEmails();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.warn(ex);\r\n }\r\n }", "protected boolean processTShout(String username, String titles, String message){return false;}", "public void writeAdmin(String fileName)\n {\n String message = \"\";\n String output = \"\";\n try\n {\n PrintWriter outputFile = new PrintWriter(fileName);\n for(int index = 0; index < getAllAdmin().length; index++)\n {\n if(getAdmin(index).getAdminEmail().equals(\"????\"))\n break;\n message = getAdmin(index).getAdminEmail() + \",\" + getAdmin(index).getAdminPassword()+\";\";\n output = output + message;\n }\n outputFile.println(output);\n outputFile.close();\n }\n catch(FileNotFoundException exception)\n {\n System.out.println(fileName + \" not found\");\n }\n catch(IOException exception)\n {\n System.out.println(\"Unexpected I/O error occured\");\n }\n }", "@Override\n\tpublic void onEnable() {\n\t\tMBEPlugin Mbes = (MBEPlugin) this.getPluginManager().getPlugin(\"MbEssentials\");\n\t\t\n\t\t//Get the LogManager from the plugin\n\t\tLogManager log = Mbes.getLogManager();\n\t\t\n\t\t//Make a logger. The string tells the logmanager where to create the log\n\t\tLogger myLog = new Logger(\"plugins\\\\\"); \n\t\t// You can do this Logger myLog = new Logger(new File(\"plugins\\\\mylog.txt\")); it will overide the default name \n\t\t\n\t\t//Attach logger to the logManager\n\t\tlog.attachLogger(myLog);\n\t\t\t\n\t\t\t//write to the log\n\t\t\tlog.writeLog(\"Im logging this\",myLog,false); //Its false so it can log it using the default formatting\n\t\t\t// You can also do this log.writeLog(\"Im logging this\",myLog.getId(),false);\n\t\t}", "public void run() {\n long startTime = 0;\n if (action.getClass().getName().contains(\"TooAction\")) {\n startTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sending a ToO alert...\");\n }\n\n action.doTriggerAction(change, handback);\n\n // Record the end time and warn if it took too long.\n if (startTime != 0) {\n long curTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sent ToO alert\");\n\n long elapsed = curTime - startTime;\n if (elapsed > 5000) {\n LOG.log(Level.WARNING, \"Long delay sending ToO alert: \" + elapsed);\n }\n }\n\n }", "public void powerOn() { //power_on\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.ON));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.ON) {\n isTurningOn = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }", "@Override\r\n\t\t\t\tpublic synchronized void handleMessage(Message msg) {\n\t\t\t\t\tswitch(msg.what){\r\n\t\t\t\t\t//--------------通用消息-------------------------//\r\n\t\t\t\t\tcase TEACHEREXIST:// 教师端存在,如果没有被初始化,向教师端请求信息\r\n\t\t\t\t\t\t//设置连接状态\r\n\t\t\t\t\t\tif(!initialed){//未初始化,请求初始化信息\r\n\t\t\t\t\t\t\t\t//设置教师端IP\r\n\t\t\t\t\t\t\t\tif(ServerIP == null){\r\n\t\t\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tus.SetIP(ServerIP);\r\n\t\t\t\t\t\t\t\t//发送学生信息请求\r\n\t\t\t\t\t\t\t\ttagCommandCode tcmd = new tagCommandCode(\" \",\" \",\" \");//否则为null!!!\r\n\t\t\t\t\t\t\t\ttcmd.SetCmdID(GETSTUINFO);\r\n\t\t\t\t\t\t\t\tus.SendMsg(tcmd.toByteArray());\r\n\t\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"GETSTUINFO\");\r\n\t\t\t\t\t\t\t\ttcmd.SetCmdID(LOGIN);// 在线ID\r\n\t\t\t\t\t\t\t\tus.SendMsg(tcmd.toByteArray());// 发送消息\r\n\t\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"Not Initialed\");\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tif(!connected){//发生改变时才操作\r\n\t\t\t\t\t\t\t\tconnected = true;\r\n\t\t\t\t\t\t\t\tpbLandlight.setImageResource(R.drawable.green);//设置为在线\r\n\t\t\t\t\t\t\t\tLog.i(\"LandLight========>\",\"Online!!!\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(ServerIP == null){\r\n\t\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcmd.SetCmdID(GETSTUINFO);\r\n\t\t\t\t\t\t\tus.SendMsg(cmd.toByteArray());\r\n\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"GETSTUINFO\");\r\n\t\t\t\t\t\t\tus.SetIP(ServerIP);\r\n\t\t\t\t\t\t\tcmd.SetCmdID(LOGIN);// 在线ID\r\n\t\t\t\t\t\t\tus.SendMsg(cmd.toByteArray());// 发送消息\r\n\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"Connected & Initialed\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase ACCEPT://与教师端连接,初始化系统参数\r\n\t\t\t\t\tcase GETSTUINFO_RETURN://获得学生信息\r\n\t\t\t\t\t\tLog.i(\"ActivityInfo---ACCEPT===>\", \"Initialed!\");\r\n\t\t\t\t\t\t//初始化命令\r\n\t\t\t\t\t\ttagCommandCode tcmd = new tagCommandCode(msg.getData().getByteArray(\"data\"));\r\n\t\t\t\t\t\t//初始化信息\r\n\t\t\t\t\t\tString StrLocalIP = getLocalIpAddress();//本地IP\r\n\t\t\t\t\t\tString subIP = StrLocalIP.substring(0, StrLocalIP.lastIndexOf(\".\")+1);//网段\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString StrName; \r\n\t\t\t\t\t\tif(tcmd.strName!= null){\r\n\t\t\t\t\t\t\tStrName = tcmd.strName;//学生姓名\r\n\t\t\t\t\t\t}else StrName =\"STU\"+StrLocalIP.substring(StrLocalIP.lastIndexOf(\".\"),StrLocalIP.length());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(ServerIP==null){\r\n\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//显示到界面\r\n\t\t\t\t\t\ttvIP.setText(StrLocalIP);\r\n\t\t\t\t\t\ttvName.setText(StrName);\r\n\t\t\t\t\t\tString strSeat = \"A1\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//写入\r\n\t\t\t\t\t\tif(cmd == null){\r\n\t\t\t\t\t\t\tcmd = new tagCommandCode(StrLocalIP,strSeat,StrName,subIP);//座位号!!!\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcmd.strIP = StrLocalIP;\r\n\t\t\t\t\t\t\tcmd.strName = StrName;\r\n\t\t\t\t\t\t\tcmd.subIP = subIP;\r\n\t\t\t\t\t\t\tcmd.strSeat = strSeat;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tUserInfo mycmd = ((UserInfo) getApplicationContext());\r\n\t\t\t\t\t\tmycmd.getInstant(cmd);\r\n\t\t\t\t\t\tmycmd.setIP(ServerIP);\r\n\t\t\t\t\t\t//标记位\r\n\t\t\t\t\t\tinitialed = true;\r\n\t\t\t\t\t\tconnected = true;\r\n\t\t\t\t\t\tpbLandlight.setImageResource(R.drawable.green);//设置为在线\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase TIMEOUTCONNECTION://掉线\r\n//\t\t\t\t\t\t//设置连接显示\r\n\t\t\t\t\t\tif (!initialed || connected) {\r\n\t\t\t\t\t\t\tunconnected();\r\n\t\t\t\t\t\t\tconnected = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase CLEARRAISEHAND:\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_on);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase ENABLERAISEHAND:\r\n\t\t\t\t\t\tHand.setEnabled(true);\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_on);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase DISRAISEHAND:\r\n\t\t\t\t\t\tHand.setEnabled(false);\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_disable);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase SETVOLUME://老师调节音量\r\n\t\t\t\t\t\ttagCommandCode t = new tagCommandCode(msg.getData().getByteArray(\"data\"));\r\n\t\t\t\t\t\tseekBar.setProgress(t.iReserver[0]);\r\n\t\t\t\t\t\taudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,t.iReserver[0], 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase NOTIFY:\r\n\t\t\t\t\t\t byte[] Note = new byte[480];\r\n\t\t\t\t\t\t System.arraycopy(msg.getData().getByteArray(\"data\"), DATALONG-480, Note, 0, 480);\r\n\t\t\t\t\t\tAlertDialog.Builder NotifyDialog= new AlertDialog.Builder(PlayerActivityfullscreen.this);\r\n\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tNotifyDialog.setTitle(\"通知\").setMessage(new String(Note,\"GBK\"))\r\n\t\t\t\t\t\t\t.setCancelable(false)\r\n\t\t\t\t\t\t\t.setNegativeButton(\"关闭\", new DialogInterface.OnClickListener() { \r\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) { \r\n\t\t\t\t\t\t\t dialog.cancel(); \r\n\t\t\t\t\t\t\t } \r\n\t\t\t\t\t\t\t }).create().show();\r\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\tcase CLASSRESUME://上课--跟读可用,录音等待命令,默认不允许,上课置灰\r\n\t\t\t\t\tcase SELFSTUDYOFF://取消自助学习-同上课\r\n\t\t\t\t\t\tIntent intent = new Intent().setClass(PlayerActivityfullscreen.this,\r\n\t\t\t\t\t\t\t\tClassTeachActivity.class);\r\n\t\t\t\t\t\tintent.setData(Uri.parse(\"0\"));\r\n\t\t\t\t\t\tPlayerActivityfullscreen.this.startActivity(intent);\r\n\t\t\t\t\t\tbreak;\r\n\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}", "public abstract void grantModerator(String nickname);", "public static void sendMOTDEdit(Player target) {\n if (motd.has(\"title\")){\n target.sendMessage(ChatColor.GREEN + \" > MOTD Title: \" + ChatColor.translateAlternateColorCodes('&', motd.getString(\"title\")));\n }\n \n if (motd.has(\"priority\")) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.GOLD + \" Priority messages. These will always show to the player.\");\n for (int i = 0; i < motd.getJSONArray(\"priority\").length(); i++) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.AQUA + String.valueOf(i) + \" \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"priority\").getString(i)));\n }\n if (motd.has(\"normal\")) {\n target.sendMessage(ChatColor.GREEN + \"--------------------------------------------------\");\n }\n } else {\n target.sendMessage(ChatColor.GREEN + \" > There are no priority messages\");\n }\n\n if (motd.has(\"normal\")) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.GOLD + \" Normal messages. A random \" + motdNormalCount + \" will be show to players each time.\");\n for (int i = 0; i < motd.getJSONArray(\"normal\").length(); i++) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.AQUA + String.valueOf(i) + \" \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(i)));\n }\n } else {\n target.sendMessage(ChatColor.GREEN + \" > There are no normal messages\");\n }\n }" ]
[ "0.63087976", "0.6261418", "0.62457657", "0.60884815", "0.6031792", "0.5784252", "0.5649035", "0.55559814", "0.5551763", "0.55121595", "0.5482707", "0.5466573", "0.5461011", "0.545419", "0.54426396", "0.54119664", "0.5403893", "0.5403192", "0.53968966", "0.5368278", "0.53424793", "0.5342074", "0.5339706", "0.53320205", "0.5328207", "0.5326316", "0.5323176", "0.53154725", "0.5314172", "0.5308313", "0.5307639", "0.53058773", "0.52999085", "0.5280389", "0.5274172", "0.5273728", "0.5270782", "0.5241811", "0.5240225", "0.5234286", "0.5230741", "0.5230729", "0.52262604", "0.52252895", "0.5221044", "0.521323", "0.52107406", "0.5203496", "0.5196216", "0.5188812", "0.51717484", "0.51625335", "0.51620245", "0.5148076", "0.5146519", "0.5130093", "0.51247245", "0.5123716", "0.5116674", "0.5102935", "0.5095874", "0.5093295", "0.50916994", "0.5088165", "0.50877804", "0.5082145", "0.50723374", "0.50694263", "0.50684285", "0.50633246", "0.5059621", "0.5050306", "0.50493526", "0.5047041", "0.50287116", "0.50204927", "0.50162053", "0.50088793", "0.5004583", "0.49897537", "0.49846116", "0.49838635", "0.4982591", "0.49811038", "0.49761665", "0.49720564", "0.49670354", "0.49638563", "0.49635556", "0.49632362", "0.49608144", "0.49601835", "0.49454737", "0.49440378", "0.49266192", "0.4924943", "0.4922076", "0.49216565", "0.49187535", "0.49161506" ]
0.53973854
18
TODO Autogenerated method stub
@Override public void comprar() { super.comprar(); }
{ "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 LinkedList<Armamento> getArmamento() { return super.getArmamento(); }
{ "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 Dinero getDinero() { return super.getDinero(); }
{ "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 int getPuntuacion() { return super.getPuntuacion(); }
{ "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
Return and clean produced errors
public List<String> takeErrors() { final List<String> result = new ArrayList<String>(errors); errors.clear(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanErrorMessages() {\r\n\r\n }", "boolean documentFreeOfErrors();", "public void clearErrors() {\n super.resetErrors();\n }", "@Override\n public void clearError() {\n\n }", "public void correctErrors();", "public Vector getErrors() {\n \t\tif (parser.hasErrors()) {\n \t\t\tsetError(parser.getErrors());\n \t\t}\n \t\tVector tmp = errors;\n \t\terrors = new Vector();\n \t\treturn tmp;\n \t}", "public void clearErrors() {\n mErrors = new ArrayList();\n }", "private void showErrors() {\n \t\tfor (Iterator it = this.errors.iterator(); it.hasNext();) {\n \t\t\ttry {\n \t\t\t\tObject err = it.next();\n \t\t\t\t\n \t\t\t\t/* errors can be represented by PositionedError, UnpositionedError or String */\n \t\t\t\tif (err instanceof PositionedError) {\n \t\t\t\t\tPositionedError error = (PositionedError)err;\n \t\t\t\t\tTokenReference token = error.getTokenReference();\n \t\n \t\t\t\t log.debug(\"file: \" + token.getFile() + \", \" + \"line: \" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\t\t\t\t\t+ token.getLine() + \", \" + \"path: \" //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t\t\t\t\t+ token.getPath());\n \n \t\t\t\t\tIResource resource = ProjectProperties.findResource(token\n \t\t\t\t\t\t\t.getPath().getAbsolutePath(), currentProject);\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = null;\n \t\t\t\t\tif (resource != null) {\n \t\t\t\t\t\tmarker = resource.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t\tif (token.getLine() > 0) {\n \t\t\t\t\t\t\tmarker.setAttribute(IMarker.LINE_NUMBER, token.getLine());\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\t// for the cases, when error refers to a generated piece of code\n \t\t\t\t\t\tmarker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t}\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, error\n \t\t\t\t\t\t\t.getFormattedMessage().getMessage());\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(\n \t\t\t\t\t\t\tIMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t\telse { /* create unpositioned error at the scope of the project */\t\t\t\t\t\n \t\t\t\t\tString msg;\n \t\t\t\t\tif (err instanceof UnpositionedError) {\n \t\t\t\t\t\tmsg = ((UnpositionedError)err).getFormattedMessage().getMessage();\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tmsg = (String)err; // for internal errors\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, msg);\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}", "private void clearErrors() {\n cvvTil.setError(null);\n cardExpiryTil.setError(null);\n cardNoTil.setError(null);\n\n cvvTil.setErrorEnabled(false);\n cardExpiryTil.setErrorEnabled(false);\n cardNoTil.setErrorEnabled(false);\n\n }", "boolean hadErrors();", "String getErrorsString();", "public void clearValidateExceptions();", "java.util.List<WorldUps.UErr> \n getErrorList();", "Set<ISOAError> getErrors();", "public void error();", "private <RT> String CompileErrorsFromResult(PlayFabErrors.PlayFabResult<RT> result)\n {\n if (result == null || result.Error == null)\n {\n return null;\n }\n\n String errorMessage = \"\";\n if (result.Error.errorMessage != null)\n {\n errorMessage += result.Error.errorMessage;\n }\n if (result.Error.errorDetails != null)\n {\n for (Map.Entry<String, List<String>> pair : result.Error.errorDetails.entrySet())\n {\n for (String msg : pair.getValue())\n {\n errorMessage += \"\\n\" + pair.getKey() + \": \" + msg;\n }\n }\n }\n return errorMessage;\n }", "private void clearErrorSource() {\n if ( _helper != null )\n _helper.clearErrorSource();\n }", "public void unsetErrors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(ERRORS$4, 0);\r\n }\r\n }", "public String muestraListaErrores(){\r\n \tString salida;\r\n \tsalida= \"\\n\";\r\n \tif (errors.size()==0){\r\n\t \tsalida=salida+\"No hubo errores\\n\";\r\n\t \treturn salida;\r\n \t}\r\n \telse {\r\n \t\tfor(TError error: errors) {\r\n \t\t\tsalida += error + \"\\n\";\r\n \t\t}\r\n \t\treturn salida;\r\n \t}\r\n }", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErr();", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "public boolean hasErrors();", "public java.util.List<WorldUps.UErr> getErrorList() {\n if (errorBuilder_ == null) {\n return java.util.Collections.unmodifiableList(error_);\n } else {\n return errorBuilder_.getMessageList();\n }\n }", "public String getErrorStrings() {\n return this.errorStrings;\n }", "private void clearOldErrorsFromViews() {\n clearGrid(nonFieldErrorGrid);\n clearGrid(fieldErrorGrid);\n showErrorBox(nonFieldErrorBox);\n showErrorBox(fieldErrorBox);\n }", "private void _groupErrors(JUnitError[] errors) {\n _errors = errors;\n\n // Create positions if non-null file\n if (_file != null) {\n _createPositionsArray();\n }\n else {\n _positions = new Position[0];\n }\n\n\n // DEBUG:\n /*\n for (int i = 0; i < _errors.length; i++) {\n DrJava.consoleErr().println(\"errormodel: error #\" + i + \": \" + _errors[i]);\n }\n\n DrJava.consoleErr().println();\n for (int i = 0; i < _positions.length; i++) {\n DrJava.consoleErr().println(\"errormodel: POS #\" + i + \": \" + _positions[i]);\n }\n\n DrJava.consoleErr().println();\n for (int i = 0; i < _errorsWithoutPositions.length; i++) {\n DrJava.consoleErr().println(\"errormode: errorNOP #\" + i + \": \" + _errorsWithoutPositions[i]);\n }\n */\n }", "public List<String> getErrors()\n {\n return _errors;\n }", "public Vector collectParseErrors() {\n \n \t\tNode n = null;\n \t\tDatum d = null;\n \t\tVector parseErrors = new Vector();\n \t\tString dependenciesErrors = null;\n \t\tString actionErrors = null;\n \t\tString answerChoicesErrors = null;\n \t\tString readbackErrors = null;\n \t\tVector nodeParseErrors = null;\n \t\tVector nodeNamingErrors = null;\n \t\tboolean hasErrors = false;\n \t\t\n \t\tparser.resetErrorCount();\n \n \t\tfor (int i=0;i<size();++i) {\n \t\t\tn = nodes.getNode(i);\n \t\t\tif (n == null)\n \t\t\t\tcontinue;\n \n \t\t\thasErrors = false;\n \t\t\tdependenciesErrors = null;\n \t\t\tactionErrors = null;\n \t\t\tanswerChoicesErrors = null;\n \t\t\treadbackErrors = null;\n \t\t\tnodeParseErrors = null;\n \t\t\tnodeNamingErrors = null;\n \n \t\t\tparser.booleanVal(evidence, n.getDependencies());\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tdependenciesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tint actionType = n.getQuestionOrEvalType();\n \t\t\tString s = n.getQuestionOrEval();\n \n \t\t\t/* Check questionOrEval for syntax errors */\n \t\t\tif (s != null) {\n \t\t\t\tif (actionType == Node.QUESTION) {\n \t\t\t\t\tparser.parseJSP(evidence, s);\n \t\t\t\t}\n \t\t\t\telse if (actionType == Node.EVAL) {\n \t\t\t\t\tparser.stringVal(evidence, s);\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t/* Check min & max range delimiters for syntax errors */\n \t\t\ts = n.getMinStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\ts = n.getMaxStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\t\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tactionErrors = parser.getErrors();\n \t\t\t}\n \t\t\t\n \t\t\tVector v = n.getAnswerChoices();\n \t\t\tif (v != null) {\n \t\t\t\tfor (int j=0;j<v.size();++j) {\n \t\t\t\t\tAnswerChoice ac = (AnswerChoice) v.elementAt(j);\n \t\t\t\t\tif (ac != null)\n \t\t\t\t\t\tac.parse(parser, evidence);\t// any errors will be associated with the parser, not the node (although this is misleading)\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tanswerChoicesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (n.hasParseErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeParseErrors = n.getParseErrors();\n \t\t\t}\n \t\t\tif (n.hasNamingErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeNamingErrors = n.getNamingErrors();\n \t\t\t}\n \t\t\t\n \t\t\tif (n.getReadback() != null) {\n \t\t\t\tparser.parseJSP(evidence,n.getReadback());\n \t\t\t}\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\treadbackErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (hasErrors) {\n \t\t\t\tparseErrors.addElement(new ParseError(n, dependenciesErrors, actionErrors, answerChoicesErrors, readbackErrors, nodeParseErrors, nodeNamingErrors));\n \t\t\t}\n \t\t}\n \t\treturn parseErrors;\n \t}", "public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }", "public static void startValidation() {\n errList = new ArrayList<>();\n }", "public String error();", "public List<Diagnostic<? extends JavaFileObject>> getErrors() {\n List<Diagnostic<? extends JavaFileObject>> err;\n err = new ArrayList<Diagnostic<? extends JavaFileObject>>();\n for (Diagnostic<? extends JavaFileObject> diagnostic : errors) {\n if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {\n err.add(diagnostic);\n }\n }\n return err;\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder clearErrorInfo() {\n errorInfo = null;\n errorInfoBuilder = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "public noNamespace.ErrorDocument.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrorDocument.Error[] result = new noNamespace.ErrorDocument.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "private String errors() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(impossibleLapTime());\n\t\tsb.append(multipleStartTimes());\n\t\treturn sb.toString();\n\t}", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "public boolean hasMoreErrors() {\n return false;\n }", "Object getFailonerror();", "Object getFailonerror();", "private void clearValidationError() {\n\n\t\tdataValid = false;\n\n\t\tvalidationErrorPending = false;\n\t\tvalidationErrorParent = null;\n\t\tvalidationErrorTitle = null;\n\t\tvalidationErrorMessage = null;\n\t\tvalidationErrorType = 0;\n\t}", "public PrintStream semantError() {\n \tsemantErrors++;\n \treturn errorStream;\n }", "public void printErrors() {\n final int size = _errors.size();\n if (size > 0) {\n System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));\n for (int i = 0; i < size; i++) {\n System.err.println(\" \" + _errors.get(i));\n }\n }\n }", "@Override\n\tpublic void adjustToError() {\n\t\t\n\t}", "public JUnitError[] getErrors() {\n return _errors;\n }", "public Builder clearError() {\n\n error_ = getDefaultInstance().getError();\n onChanged();\n return this;\n }", "boolean hasErrors();", "public List<String> getErrors ()\n\t{\n\t\treturn errors;\n\t}", "public boolean errors() {\n \treturn semantErrors != 0;\n }", "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "public boolean proceedOnErrors() {\n return false;\n }", "public void errorCleanUp(String strErr, boolean gcFlag) {\r\n\r\n if (gcFlag == true) {\r\n System.gc();\r\n }\r\n\r\n if (strErr != null) {\r\n displayError(strErr);\r\n }\r\n\r\n setCompleted(false);\r\n setThreadStopped(true);\r\n disposeProgressBar();\r\n\r\n if (destImage != null) {\r\n destImage.releaseLock();\r\n }\r\n }", "public static void error()\r\n {\r\n valid=false;\r\n\r\n }", "public void resetRecentError() throws OXException {\n errorHandler.removeRecentException();\n }", "public ImmutableList<SourceCompilerError> getSyntaxErrors() {\n return ImmutableList.copyOf(errors);\n }", "public List<Throwable> getErrors() {\n\t\tfinal List<Throwable> retval = new ArrayList<Throwable>();\n\t\tfor (final TestInfo testInfo : contractTestMap.listTestInfo()) {\n\t\t\tretval.addAll(testInfo.getErrors());\n\t\t}\n\t\treturn retval;\n\t}", "public boolean applyErrors() {\n\t\t/*\n\t\tdouble erreur = Math.random(); // on genere un nombre entre 0 et 1\n\t\tSystem.out.print(this.error*erreur + \"\\n\");\n\t\tif (erreur * this.error < 0.07) { // on multiplie l'erreur aleatoire par l'error de la sonde (qui sera aussi compris entre 0 et 1)\n\t\t\treturn true;\t\t\t\t// si l'erreur finle (produit des deux erreur) est inferieur a 20%\n\t\t}\n\t\treturn false;\n\t\t*/\n\t\treturn true;\n\t}", "protected void finalizeSystemErr() {}", "@Override\n\tpublic HashMap<String, String> getErrors() {\n\t\treturn errors;\n\t}", "@Override\n public void clean() {\n\n }", "public ValidationErrors getErrors() {\n if (errors == null) errors = new ValidationErrors();\n return errors;\n }", "public CErrors getErrors() {\n\treturn this.mErrors;\n}", "String[] getError() {\n return error;\n }", "public CErrors getErrors() {\n\t\treturn mErrors;\n\t}", "@Override\n\tpublic String doError() {\n\t\treturn null;\n\t}", "public void clearErrorCount() {\n\t\terrorCount = 0;\n\t}", "public List<String> getErrors() {\n\t\treturn errors;\n\t}", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] result = new noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "void setError();", "long invalidations();", "protected boolean errors()\n \t{\n\t\treturn !errors.isEmpty();\n \t}", "void setupInvalidators() {\n mergeResults(exprResult);\n }", "public void clearErrors() {\n\t\tnameCG.setClassName(\"control-group\");\n\t\tdescriptionCG.setClassName(\"control-group\");\n\t\tpriceCG.setClassName(\"control-group\");\n\n\t\tvalidationButton.setVisible(false);\n\t\tvalidationPanel.setVisible(false);\n\t}", "public void printErrors() {\r\n\t\tif (this.syntaxError) {\r\n\t\t\tSystem.err.println(\"\\nErrors found running the parser:\");\r\n\t\t\tfor (String error : errors) {\r\n\t\t\t\tSystem.err.println(\"\\t => \" + error);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CErrors getErrors() {\n\t\treturn this.mErrors;\n\t}", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "public Builder clearErrorInfo() {\n \n errorInfo_ = getDefaultInstance().getErrorInfo();\n onChanged();\n return this;\n }", "public Builder clearErrorInfo() {\n \n errorInfo_ = getDefaultInstance().getErrorInfo();\n onChanged();\n return this;\n }", "public Builder clearErrorInfo() {\n \n errorInfo_ = getDefaultInstance().getErrorInfo();\n onChanged();\n return this;\n }", "public Builder clearErrorInfo() {\n \n errorInfo_ = getDefaultInstance().getErrorInfo();\n onChanged();\n return this;\n }", "public void resetDiagnostics() {\n this.diagnostics.clear();\n this.hasErrors = false;\n }", "public void makeError(){\n\t\tisError = true;\n\t}", "void reloadStandardErrorMessages();", "@Override\r\n\tpublic boolean hasErrors() {\n\t\treturn hasErrors;\r\n\t}", "static Optional<String> validate(Errors errors) {\n if (errors.hasErrors()) {\n return Optional.of(errors.getAllErrors()\n .stream()\n .map(DefaultMessageSourceResolvable::getDefaultMessage)\n .collect(Collectors.joining(\",\")));\n }\n\n return Optional.empty();\n }", "@Override\n\tpublic void calculateError() {\n\t\t\n\t}", "public Builder clearError() {\n if (errorBuilder_ == null) {\n error_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000020);\n onChanged();\n } else {\n errorBuilder_.clear();\n }\n return this;\n }", "public List<String> validate()\n {\n List<String> errs = new ArrayList<String>();\n\n if (StringUtils.isEmpty(startingUrl))\n errs.add(\"Missing starting URL.\");\n else\n {\n String[] schemes = {\"http\", \"https\"};\n UrlValidator urlValidator = new UrlValidator(schemes);\n if (!urlValidator.isValid(startingUrl))\n errs.add(\"Invalid starting URL.\");\n }\n\n if (StringUtils.isEmpty(outputPath))\n errs.add(\"Missing output path.\");\n else\n {\n try\n {\n Path path = Paths.get(outputPath);\n File dir = path.toFile();\n if (!dir.exists())\n dir.mkdirs();\n else if (!dir.isDirectory())\n errs.add(\"Output path exists but is not a directory.\");\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid output path or unable to create the directory.\");\n }\n }\n\n if (StringUtils.isEmpty(resultFile))\n errs.add(\"Missing result file.\");\n else if (errs.isEmpty())\n {\n // Only do this check if the output path is valid.\n try\n {\n Paths.get(outputPath, resultFile);\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid result file.\");\n }\n }\n\n if (numThreads < CrawlerImpl.MIN_THREADS)\n numThreads = CrawlerImpl.MIN_THREADS;\n\n if (crawlTimeoutSeconds < MIN_CRAWL_TIMEOUT_SECONDS)\n crawlTimeoutSeconds = MIN_CRAWL_TIMEOUT_SECONDS;\n\n return errs;\n }", "void clean();", "void clean();", "void clean();", "public List<String> getListOfErrors() {\n return listOfErrors;\n }", "private ErrorFactory() {\r\n\t}", "public List<NaaccrValidationError> getAllValidationErrors() {\n List<NaaccrValidationError> results = new ArrayList<>(getValidationErrors());\n results.addAll(getItems().stream().filter(item -> item.getValidationError() != null).map(Item::getValidationError).collect(Collectors.toList()));\n for (Tumor tumor : getTumors())\n results.addAll(tumor.getAllValidationErrors());\n return results;\n }" ]
[ "0.7273696", "0.683058", "0.65925854", "0.65839463", "0.6328371", "0.6281578", "0.62322223", "0.6127737", "0.6039607", "0.5996237", "0.5971219", "0.5958195", "0.5917344", "0.5904514", "0.5901027", "0.58798873", "0.5854199", "0.5807448", "0.58068234", "0.5789681", "0.5789681", "0.5789681", "0.5789681", "0.57815975", "0.57774276", "0.57774276", "0.57774276", "0.5772357", "0.5766314", "0.57288265", "0.57022953", "0.56937313", "0.5688191", "0.5676622", "0.56591535", "0.56576157", "0.5637302", "0.5629314", "0.5624477", "0.56155175", "0.5614847", "0.56141967", "0.56004596", "0.56000847", "0.5598419", "0.5598419", "0.5590158", "0.55709004", "0.55653036", "0.5562514", "0.55557317", "0.5552525", "0.5532511", "0.5529378", "0.55290383", "0.5525628", "0.5504555", "0.5500391", "0.5495468", "0.5488364", "0.5479763", "0.54761285", "0.5450584", "0.5433548", "0.5430486", "0.542756", "0.54264873", "0.54229933", "0.5422212", "0.54179555", "0.54179513", "0.54155725", "0.5413275", "0.5412606", "0.540991", "0.5407607", "0.54023", "0.54016817", "0.5400219", "0.5397384", "0.5394098", "0.53904855", "0.53829706", "0.53829706", "0.53829706", "0.53829706", "0.5369657", "0.53640443", "0.53533846", "0.53512967", "0.534721", "0.53420794", "0.5340922", "0.5338958", "0.53143865", "0.53143865", "0.53143865", "0.53067803", "0.52949196", "0.5287222" ]
0.66124296
2
Builds a classifier from given inputData
public abstract void build(ClassifierData<U> inputData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }", "@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }", "@Override\n\tpublic void buildClassifier(Instances data) throws Exception {\n decision_tree = new MyID3();\n\t\tdecision_tree.buildClassifier(data);\n\n//\t\tSystem.out.println(decision_tree.toString());\n\n train_data = data;\n\n set_of_rule = convertTreeIntoRules(decision_tree);\n\n\n // DONT DELETE THISSSS\n set_of_rule.setTrainData(data);\n\n List<Rule> listrule = set_of_rule.getList_rule();\n System.out.println(\"\\n\\n\\nBEFORE PRUNEDDD\");\n for (int i = 0; i < listrule.size(); i++ ){\n System.out.println(\"Rule \"+i+\" :\");\n Rule rule = listrule.get(i);\n List<Edge> edges = rule.getPreconditions();\n for (int j=0; j< edges.size(); j++) {\n System.out.println(\"\\t-\"+edges.get(j).getAttribute_name() + \" = \" + edges.get(j).getAttribute_value());\n }\n System.out.println(\"\\tClass = \"+rule.getClass_value());\n }\n\n// selectBestSetofRule();\n\n\t}", "public void buildClassifier(Instances data) throws Exception {\n\n // can classifier tree handle the trainData?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n\n buildTree(data, m_subtreeRaising || !m_cleanup);\n if (m_pruneTheTree) {\n prune(data);\n }\n if (m_cleanup) {\n cleanup(new Instances(data, 0));\n }\n }", "Classifier getClassifier();", "public void buildClassifier(Instances instances) throws Exception {\r\n\t\tif (instances.checkForStringAttributes()) {\r\n\t\t\tthrow new UnsupportedAttributeTypeException(\"Cannot handle string attributes!\");\r\n\t\t} \r\n\t\tif (instances.numInstances() == 0) {\r\n\t\t\t//throw new IllegalArgumentException(\"No training instances.\");\r\n\t\t}\r\n\t\tif (instances.numAttributes() == 1) {\r\n\t\t\tSystem.err.println(\"No training instances found - only classes.\");\r\n\t\t\tthrow new IllegalArgumentException(\"No training instances found - only classes.\");\r\n\t\t}\r\n\t\t\r\n\t\tinstances = initClassifier(instances);\r\n\r\n\t\tcreateInputLayer(instances);\r\n\t\tcreateOutputLayer(instances);\r\n\t\tcreateHiddenLayer();\r\n\r\n\t\t// connections done.\r\n\t\t// learnClassifier(instances);\r\n\t}", "public abstract double test(ClassifierData<U> testData);", "public void classify() throws IOException\n {\n TrainingParameters tp = new TrainingParameters();\n tp.put(TrainingParameters.ITERATIONS_PARAM, 100);\n tp.put(TrainingParameters.CUTOFF_PARAM, 0);\n\n DoccatFactory doccatFactory = new DoccatFactory();\n DoccatModel model = DocumentCategorizerME.train(\"en\", new IntentsObjectStream(), tp, doccatFactory);\n\n DocumentCategorizerME categorizerME = new DocumentCategorizerME(model);\n\n try (Scanner scanner = new Scanner(System.in))\n {\n while (true)\n {\n String input = scanner.nextLine();\n if (input.equals(\"exit\"))\n {\n break;\n }\n\n double[] classDistribution = categorizerME.categorize(new String[]{input});\n String predictedCategory =\n Arrays.stream(classDistribution).filter(cd -> cd > 0.5D).count() > 0? categorizerME.getBestCategory(classDistribution): \"I don't understand\";\n System.out.println(String.format(\"Model prediction for '%s' is: '%s'\", input, predictedCategory));\n }\n }\n }", "@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "public String execute(String input) {\n Data data = Serializer.parse(input, Data.class);\n\n // Step #2: Check the discriminator\n final String discriminator = data.getDiscriminator();\n if (discriminator.equals(Discriminators.Uri.ERROR)) {\n // Return the input unchanged.\n return input;\n }\n\n // Create a series of pipes to process the training files\n ArrayList<Pipe> pipeList = new ArrayList<>();\n pipeList.add(new Input2CharSequence(\"UTF-8\"));\n // Pipes: lowercase, tokenize, remove stopwords, map to features\n pipeList.add( new CharSequenceLowercase() );\n pipeList.add( new CharSequence2TokenSequence(Pattern.compile(\"\\\\p{L}[\\\\p{L}\\\\p{P}]+\\\\p{L}\")) );\n pipeList.add( new TokenSequenceRemoveStopwords());\n pipeList.add( new TokenSequence2FeatureSequence());\n pipe = new SerialPipes(pipeList);\n\n // put the directory of files used for training through the pipes\n String directory = data.getParameter(\"directory\").toString();\n InstanceList instances = readDirectory(new File(directory));\n\n // create a topic to be trained\n int numberOfTopics = (Integer) data.getParameter(\"numTopics\");\n ParallelTopicModel topicModel = new ParallelTopicModel(numberOfTopics);\n topicModel.addInstances(instances);\n\n // train the model\n try {\n topicModel.estimate();\n } catch (IOException e){\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to train the model\").asJson();\n }\n\n // write topic keys file\n String path = data.getParameter(\"path\").toString();\n String keysName = data.getParameter(\"keysName\").toString();\n int wordsPerTopic = (Integer) data.getParameter(\"wordsPerTopic\");\n try {\n topicModel.printTopWords(new File(path + \"/\" + keysName), wordsPerTopic, false);\n } catch (IOException e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the topic keys to \" + path + \"/\" + keysName).asJson();\n }\n\n // write the .inferencer file\n String inferencerName = data.getParameter(\"inferencerName\").toString();\n try {\n ObjectOutputStream oos =\n new ObjectOutputStream (new FileOutputStream (path + \"/\" + inferencerName));\n oos.writeObject (topicModel.getInferencer());\n oos.close();\n } catch (Exception e) {\n e.printStackTrace();\n return new Data<>(Discriminators.Uri.ERROR,\n \"Unable to write the inferencer to \" + path + \"/\" + inferencerName).asJson();\n }\n\n // Success\n return new Data<>(Discriminators.Uri.TEXT, \"Success\").asJson();\n }", "public Classifier selectBestConjunctive(Instances data) throws Exception{\r\n\t\tSystem.out.println(\"Build ConjunctiveRule\");\r\n\r\n\t\t// setup classifier\r\n\t\tCVParameterSelection ps = new CVParameterSelection();\r\n\t\tps.setClassifier(new ConjunctiveRule());\r\n\t\tps.setNumFolds(2);\r\n\t\tps.addCVParameter(\"N 2 6 2\");\r\n\t\tps.addCVParameter(\"M 1.0 5.0 4\");\r\n\t\tps.addCVParameter(\"P -1 3 2\");\r\n\t\tps.addCVParameter(\"S 1 5 3\");\r\n\r\n\t\t// build and output best options\r\n\t\tps.buildClassifier(data);\r\n\r\n\r\n\t\treturn ps;\r\n\r\n\t}", "private static void CreateClassifierVec(Dataset set, int dim_num,\n\t\t\tArrayList<KDNode> class_buff, int vec_offset) {\n\t\t\t\n\t\tAttribute atts[] = new Attribute[set.size()];\n\t\t// Declare the class attribute along with its values\n\t\t FastVector fvClassVal = new FastVector(4);\n\t\t fvClassVal.addElement(\"n2\");\n\t\t fvClassVal.addElement(\"n1\");\n\t\t fvClassVal.addElement(\"p1\");\n\t\t fvClassVal.addElement(\"p2\");\n\t\t Attribute ClassAttribute = new Attribute(\"theClass\", fvClassVal);\n\t \n\t\tFastVector fvWekaAttributes = new FastVector(set.size() + 1);\n\t for(int i=0; i<set.size(); i++) {\n\t \tatts[i] = new Attribute(\"att\"+i);\n\t \tfvWekaAttributes.addElement(atts[i]);\n\t }\n\t \n\t fvWekaAttributes.addElement(ClassAttribute);\n\t \n\t Instances isTrainingSet = new Instances(\"Rel\", fvWekaAttributes, class_buff.size()); \n\t isTrainingSet.setClassIndex(set.size());\n\t\t\n\t for(int k=0; k<class_buff.size(); k++) {\n\t \t\n\t \tArrayList<Integer> data_set = new ArrayList<Integer>();\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\t\n\t\t\t\t\tint offset = 0;\n\t\t\t\t\tSet<Entry<Integer, Double>> s = set.instance(j).entrySet();\n\t\t\t\t\tdouble sample[] = new double[dim_num];\n\t\t\t\t\tfor(Entry<Integer, Double> val : s) {\n\t\t\t\t\t\tsample[offset++] = val.getValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint output = class_buff.get(k).classifier.Output(sample);\n\t\t\t\t\tdata_set.add(output);\n\t\t\t}\n\t\t\t\n\t\t\tif(data_set.size() != set.size()) {\n\t\t\t\tSystem.out.println(\"dim mis\");System.exit(0);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tInstance iExample = new Instance(set.size() + 1);\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\tiExample.setValue(j, data_set.get(j));\n\t\t\t}\n\t\t\t\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"n1\"); \n\t\t\t} else {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"p1\"); \n\t\t\t}\n\t\t\t \n\t\t\t// add the instance\n\t\t\tisTrainingSet.add(iExample);\n\t }\n\t\t\n\t System.out.println(dim_num+\" *************\");\n\t int select_num = 16;\n\t\tPrincipalComponents pca = new PrincipalComponents();\n\t\t//pca.setVarianceCovered(0.1);\n Ranker ranker = new Ranker();\n ranker.setNumToSelect(select_num);\n AttributeSelection selection = new AttributeSelection();\n selection.setEvaluator(pca);\n \n Normalize normalizer = new Normalize();\n try {\n normalizer.setInputFormat(isTrainingSet);\n isTrainingSet = Filter.useFilter(isTrainingSet, normalizer);\n \n selection.setSearch(ranker);\n selection.SelectAttributes(isTrainingSet);\n isTrainingSet = selection.reduceDimensionality(isTrainingSet);\n\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(0);\n }\n \n for(int i=0; i<class_buff.size(); i++) {\n \tInstance inst = isTrainingSet.instance(i);\n \tdouble val[] = inst.toDoubleArray();\n \tint offset = vec_offset;\n \t\n \tfloat length = 0;\n \tfor(int j=0; j<select_num; j++) {\n \t\tlength += val[j] * val[j];\n \t}\n \t\n \tlength = (float) Math.sqrt(length);\n \tfor(int j=0; j<select_num; j++) {\n \t\tclass_buff.get(i).class_vect[offset++] = val[j] / length;\n \t}\n }\n\t}", "protected MLlibClassifier[]\n phaseOneBuildClassifiers(JavaRDD<Instance> dataset, int folds, int seed,\n Instances headerWithSummary) throws DistributedWekaException {\n\n Instances headerNoSummary =\n CSVToARFFHeaderReduceTask.stripSummaryAtts(headerWithSummary);\n headerNoSummary.setClassIndex(headerWithSummary.classIndex());\n\n MLlibClassifier[] classifiers = new MLlibClassifier[folds];\n JavaRDD<FoldMaker> foldRDD =\n createFolds(dataset, headerNoSummary, folds, seed);\n\n logMessage(\"[MLlib evaluation] Phase 1 - building fold classifiers\");\n try {\n for (int i = 1; i <= folds; i++) {\n logMessage(\"[MLlib evaluation] Getting training fold \" + i);\n JavaRDD<Instance> training = getTrainingFold(foldRDD, i);\n logMessage(\"[MLlib evaluation] Building model for fold \" + i);\n MLlibClassifier toTrain = m_classifier.getClass().newInstance();\n toTrain.setOptions(m_classifier.getOptions());\n toTrain.buildClassifier(training, headerWithSummary, m_preprocessors,\n getCachingStrategy());\n classifiers[i - 1] = toTrain;\n training.unpersist();\n }\n } catch (Exception ex) {\n throw new DistributedWekaException(ex);\n }\n\n foldRDD.unpersist(); // no longer needed\n\n return classifiers;\n }", "public NBClassifier(String trainDataFolder, int trainPortion)\n\t{\n\t\ttrainingDocs = new ArrayList<String>();\n\t\tallDocs = new ArrayList<String>();\n\t\tnumClasses = 2;\n\t\tclassCounts = new int[numClasses];\n\t\tclassStrings = new String[numClasses];\n\t\tclassTokenCounts = new int[numClasses];\n\t\tcondProb = new HashMap[numClasses];\n\t\tvocabulary = new HashSet<String>();\n\t\tfor(int i=0;i<numClasses;i++){ //just initialization\n\t\t\tclassStrings[i] = \"\";\n\t\t\tcondProb[i] = new HashMap<String,Double>();\n\t\t}\n\t\ttotalDocs = 5574;\n\t\toffset = Math.round(totalDocs) * trainPortion / 100;\n\t\tSystem.out.println(\"Numer of Documents For Training: \"+offset);\n\t\tSystem.out.println(\"Numer of Documents For Testing: \"+(totalDocs-offset));\n\t\tpreprocess(trainDataFolder);\n\t\t\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tString[] tokens = classStrings[i].split(\" \");\n\t\t\tclassTokenCounts[i] = tokens.length;\n\t\t\t//collecting the counts\n\t\t\tfor(String token:tokens){\n\t\t\t\t//System.out.println(token);\n\t\t\t\tvocabulary.add(token);\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tdouble count = condProb[i].get(token);\n\t\t\t\t\tcondProb[i].put(token, count+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcondProb[i].put(token, 1.0);\n\t\t\t\t//System.out.println(token+\" : \"+condProb[i].get(token));\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tIterator<Map.Entry<String, Double>> iterator = condProb[i].entrySet().iterator();\n\t\t\tint vSize = vocabulary.size();\n\t\t\twhile(iterator.hasNext())\n\t\t\t{\n\t\t\t\tMap.Entry<String, Double> entry = iterator.next();\n\t\t\t\tString token = entry.getKey();\n\t\t\t\tDouble count = entry.getValue();\n\t\t\t\t//System.out.println(count+1+\" / ( \"+classTokenCounts[i]+\" + \"+vSize+\" )\");\n\t\t\t\tcount = (count+1)/(classTokenCounts[i]+vSize);\n\t\t\t\tcondProb[i].put(token, count);\n\t\t\t}\n\t\t\t//System.out.println(\"dekho: \"+condProb[i]);\n\t\t}\n\t\ttestModel();\n\t}", "private double[] classify(ArrayList<Product> newData,\n\t\t\tArrayList<Product> trainData) {\n\t\tdouble[] labels = new double[newData.size()];\n\t\tfor (int i = 0; i < newData.size(); i++) {\n\t\t\tSim[] kNearest = findNeighbors(newData.get(i), trainData, k);\n\t\t\tdouble weightedVal = 0;\n\t\t\tdouble sumWeight = 0;\n\t\t\tfor (Sim sim : kNearest) {\n\t\t\t\tweightedVal += (sim.getSim() * sim.getProduct().label);\n\t\t\t\tsumWeight += sim.getSim();\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat(\".00\");\n\t\t\tdouble formattedLabel = Double.parseDouble(df.format(weightedVal\n\t\t\t\t\t/ sumWeight));\n\t\t\tlabels[i] = formattedLabel;\n\t\t}\n\t\treturn labels;\n\t}", "private Classifier createDummyClassifier(String action, String con, Classifier[] parent_classifier ){\n String cName = \"DUMMY\";\n Classifier father = parent_classifier[0];\n Classifier mother = parent_classifier[1];\n double newPred = (father.getPrediction() + mother.getPrediction()) / 2;\n double newPreErr = (father.getPredictionError() + mother.getPredictionError()) / 2;\n double newFit = (father.getFitness() + mother.getFitness()) / 2;\n Classifier classifier_Child = new Classifier(\n cName,\n newPred,\n newPreErr,\n newFit,\n con,\n action);\n return classifier_Child;\n }", "public abstract void fit(BinaryData trainingData);", "public PredictRequest build() {\n\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(url), \"url is required\");\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(service), \"service name is required\");\n\t\t\tcheckArgument(data != null, \"data is required\");\n\n\t\t\tPredictRequest request = new PredictRequest();\n\t\t\trequest.baseURL = url;\n\t\t\tJsonObject requestData = new JsonObject();\n\t\t\trequestData.addProperty(\"service\", service);\n\n\t\t\tJsonObject paramsObj = new JsonObject();\n\t\t\tif (input != null)\n\t\t\t\tparamsObj.add(\"input\", input);\n\t\t\tif (output != null)\n\t\t\t\tparamsObj.add(\"output\", output);\n\t\t\tif (mllibParams != null)\n\t\t\t\tparamsObj.add(\"mllib\", mllibParams);\n\n\t\t\tif (!paramsObj.isJsonNull()) {\n\t\t\t\trequestData.add(\"parameters\", paramsObj);\n\t\t\t}\n\n\t\t\trequestData.add(\"data\", data);\n\n\t\t\trequest.data = requestData;\n\t\t\treturn request;\n\t\t}", "public ArrayList<Classifier> select(Instances data) throws Exception {\r\n\t\tArrayList<Classifier> classifiers = new ArrayList<Classifier>();\r\n\r\n\t\tclassifiers.add(selectBestJ48(data));\r\n\t\tclassifiers.add(selectBestZeroR(data));\r\n\t\tclassifiers.add(selectBestConjunctive(data));\r\n\t\tclassifiers.add(selectBestOneR(data));\r\n\t\tclassifiers.add(selectBestVFI(data));\r\n\t\tclassifiers.add(selectBestNaiveBayes(data));\r\n\t\tclassifiers.add(selectBestBayesNet(data));\r\n\t\tclassifiers.add(selectBestRBFNetwork(data));\r\n\r\n\t\treturn classifiers;\r\n\t}", "Classifier getBase_Classifier();", "public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}", "@Override\n\tpublic ContextLabel recognize(KinectData input, String timeStamp) {\n\t\tdouble inputD[][] = new double[30][75];\n\t\tfor(int i = 0; i<input.getAry().size(); i++){\n\t\t\tinputD[i] = input.getAry().get(i);\n\t\t}\n\t\t\n\t\t/*\n\t\tfor(double[] ad1 : inputD){\n\t\t\tfor(double ad2 : ad1){\n\t\t\t\tSystem.out.print(ad2 + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}*/\n\t\tfeatureExtractor.setInputData(inputD);\n\t\tdouble[] inputFeatures = featureExtractor.extractFeatures();\n\t\t// siD and sjD are read from txt file. I do not know how to input this file. Help me!\n\t\t\n\t\tString rlt = ar.Classify(inputFeatures);\n\t\tif(verbose)logger.info(\"Output of Var Thien \" + userID + \"\\t\" + rlt + \"\\t\" + timeStamp);\n\t\treturn new ContextLabel(userID, rlt, timeStamp, ContextType.Activity);\n\t}", "public static void main(String[] args) {\n\t\tCreateClassificationData test = new CreateClassificationData(\"originalData/Data.txt\");\n\t}", "public void train(String input, String category) {\n\t\tint nGram = 8;\n\t\tif(mClassifier instanceof DynamicLMClassifier)\n\t\t\tmClassifier = (DynamicLMClassifier<NGramProcessLM>) mClassifier;\n\t\telse\n\t\t\tmClassifier = DynamicLMClassifier.createNGramProcess(mCategories, nGram);\n\t\t\n\t\tClassification classification = new Classification(category);\n\t\tClassified<CharSequence> classified = new Classified<CharSequence>(input, classification);\n\t\t((DynamicLMClassifier<NGramProcessLM>)mClassifier).handle(classified);\n\t}", "public interface MultiLabelClassifier extends Serializable{\n int getNumClasses();\n MultiLabel predict(Vector vector);\n default MultiLabel[] predict(MultiLabelClfDataSet dataSet){\n\n List<MultiLabel> results = IntStream.range(0,dataSet.getNumDataPoints()).parallel()\n .mapToObj(i -> predict(dataSet.getRow(i)))\n .collect(Collectors.toList());\n return results.toArray(new MultiLabel[results.size()]);\n }\n\n default void serialize(File file) throws Exception{\n File parent = file.getParentFile();\n if (!parent.exists()){\n parent.mkdirs();\n }\n try (\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(bufferedOutputStream);\n ){\n objectOutputStream.writeObject(this);\n }\n }\n\n default void serialize(String file) throws Exception{\n serialize(new File(file));\n }\n\n\n FeatureList getFeatureList();\n\n LabelTranslator getLabelTranslator();\n\n interface ClassScoreEstimator extends MultiLabelClassifier{\n double predictClassScore(Vector vector, int k);\n default double[] predictClassScores(Vector vector){\n return IntStream.range(0,getNumClasses()).mapToDouble(k -> predictClassScore(vector,k))\n .toArray();\n\n }\n }\n\n\n\n interface ClassProbEstimator extends MultiLabelClassifier{\n double[] predictClassProbs(Vector vector);\n\n /**\n * in some cases, this can be implemented more efficiently\n * @param vector\n * @param classIndex\n * @return\n */\n default double predictClassProb(Vector vector, int classIndex){\n return predictClassProbs(vector)[classIndex];\n }\n }\n\n interface AssignmentProbEstimator extends MultiLabelClassifier{\n double predictLogAssignmentProb(Vector vector, MultiLabel assignment);\n default double predictAssignmentProb(Vector vector, MultiLabel assignment){\n return Math.exp(predictLogAssignmentProb(vector, assignment));\n }\n\n /**\n * batch version\n * can be implemented more efficiently in individual classifiers\n * @param vector\n * @param assignments\n * @return\n */\n default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }\n\n\n default double[] predictLogAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n double[] logProbs = new double[assignments.size()];\n for (int c=0;c<assignments.size();c++){\n logProbs[c] = predictLogAssignmentProb(vector, assignments.get(c));\n }\n return logProbs;\n }\n }\n\n}", "public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }", "public AutoClassification(ClassificationModel classificationModel) {\r\n this.classificationModel = classificationModel;\r\n }", "public List<String> useTreeOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || data == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = root.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}", "static ResultEvent classify(byte[][][][] data, int version, byte[] target) throws IOException {\n if (logger.isDebugEnabled()){\n logger.debug(\"Performing prediction...\");\n }\n\n String result = API.predict(PORT, Yolo.modelName, version, data, Yolo.signatureString);\n Gson g = new Gson();\n YoloResults yoloResults = g.fromJson(result, YoloResults.class);\n\n // Output tensor dimensions of YOLO\n float[][][][] predictions = new float[data.length][19][19][425];\n for(int i=0; i<data.length; i++){\n for(int x=0; x<19; x++){\n for(int y=0; y<19; y++){\n System.arraycopy(yoloResults.predictions[i][x][y], 0, predictions[i][x][y], 0, 425);\n }\n }\n }\n\n float[] certainty = null;\n\n return new ResultEvent(Configuration.ModelName.YOLO, target, predictions, certainty);\n }", "@Override\n\tprotected void postprocess(Classifier classifier, PipelineData data) throws Exception {\n\t}", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "public List<HashMap<Integer,AttributeInfo>> generateTrainingSetDataseAttributes(Dataset dataset, Properties properties) throws Exception {\n List<HashMap<Integer,AttributeInfo>> candidateAttributesList = new ArrayList<>();\n String[] classifiers = properties.getProperty(\"classifiersForMLAttributesGeneration\").split(\",\");\n\n //obtaining the attributes for the dataset itself is straightforward\n DatasetBasedAttributes dba = new DatasetBasedAttributes();\n for (String classifier : classifiers) {\n\n //For each dataset and classifier combination, we need to get the results on the \"original\" dataset so we can later compare\n Evaluation evaluationResults = runClassifier(classifier, dataset.generateSet(true), dataset.generateSet(false), properties);\n double originalAuc = CalculateAUC(evaluationResults, dataset);\n\n //Generate the dataset attributes\n HashMap<Integer, AttributeInfo> datasetAttributes = dba.getDatasetBasedFeatures(dataset, classifier, properties);\n\n //Add the identifier of the classifier that was used\n\n AttributeInfo classifierAttribute = new AttributeInfo(\"Classifier\", Column.columnType.Discrete, getClassifierIndex(classifier), 3);\n datasetAttributes.put(datasetAttributes.size(), classifierAttribute);\n\n\n //now we need to generate the candidate attributes and evaluate them. This requires a few preliminary steps:\n // 1) Replicate the dataset and create the discretized features and add them to the dataset\n OperatorsAssignmentsManager oam = new OperatorsAssignmentsManager(properties);\n List<Operator> unaryOperators = oam.getUnaryOperatorsList();\n //The unary operators need to be evaluated like all other operator assignments (i.e. attribtues generation)\n List<OperatorAssignment> unaryOperatorAssignments = oam.getOperatorAssignments(dataset, null, unaryOperators, Integer.parseInt(properties.getProperty(\"maxNumOfAttsInOperatorSource\")));\n Dataset replicatedDataset = generateDatasetReplicaWithDiscretizedAttributes(dataset, unaryOperatorAssignments, oam);\n\n // 2) Obtain all other operator assignments (non-unary). IMPORTANT: this is applied on the REPLICATED dataset so we can take advantage of the discretized features\n List<Operator> nonUnaryOperators = oam.getNonUnaryOperatorsList();\n List<OperatorAssignment> nonUnaryOperatorAssignments = oam.getOperatorAssignments(replicatedDataset, null, nonUnaryOperators, Integer.parseInt(properties.getProperty(\"maxNumOfAttsInOperatorSource\")));\n\n // 3) Generate the candidate attribute and generate its attributes\n nonUnaryOperatorAssignments.addAll(unaryOperatorAssignments);\n\n //oaList.parallelStream().forEach(oa -> {\n int counter = 0;\n //for (OperatorAssignment oa : nonUnaryOperatorAssignments) {\n ReentrantLock wrapperResultsLock = new ReentrantLock();\n nonUnaryOperatorAssignments.parallelStream().forEach(oa -> {\n try {\n OperatorsAssignmentsManager oam1 = new OperatorsAssignmentsManager(properties);\n Dataset datasetReplica = dataset.replicateDataset();\n ColumnInfo candidateAttribute = null;\n try {\n candidateAttribute = oam1.generateColumn(datasetReplica, oa, true);\n }\n catch (Exception ex) {\n candidateAttribute = oam1.generateColumn(datasetReplica, oa, true);\n }\n\n\n OperatorAssignmentBasedAttributes oaba = new OperatorAssignmentBasedAttributes();\n HashMap<Integer, AttributeInfo> candidateAttributes = oaba.getOperatorAssignmentBasedAttributes(dataset, oa, candidateAttribute, properties);\n\n datasetReplica.addColumn(candidateAttribute);\n Evaluation evaluationResults1 = runClassifier(classifier, datasetReplica.generateSet(true), datasetReplica.generateSet(false), properties);\n\n double auc = CalculateAUC(evaluationResults1, datasetReplica);\n double deltaAuc = auc - originalAuc;\n AttributeInfo classAttrubute;\n if (deltaAuc > 0.01) {\n classAttrubute = new AttributeInfo(\"classAttribute\", Column.columnType.Discrete, 1,2);\n System.out.println(\"found positive match\");\n } else {\n classAttrubute = new AttributeInfo(\"classAttribute\", Column.columnType.Discrete, 0,2);\n }\n\n //finally, we need to add the dataset attribtues and the class attribute\n for (AttributeInfo datasetAttInfo : datasetAttributes.values()) {\n candidateAttributes.put(candidateAttributes.size(), datasetAttInfo);\n }\n\n candidateAttributes.put(candidateAttributes.size(), classAttrubute);\n wrapperResultsLock.lock();\n candidateAttributesList.add(candidateAttributes);\n wrapperResultsLock.unlock();\n }\n catch (Exception ex) {\n System.out.println(\"Error in ML features generation : \" + oa.getName() + \" : \" + ex.getMessage());\n }\n });\n }\n\n return candidateAttributesList;\n }", "public interface Aggregator {\n /**\n * Determines the final class recognized\n * @param confidence Confidence values produced by a recognizer\n * (one confidence value per class)\n * @return The final prediction given by a classifier\n */\n public Prediction apply( double[] confidence );\n\n}", "public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}", "@NonNull\n public TextClassificationContext build() {\n return new TextClassificationContext(mPackageName, mWidgetType, mWidgetVersion);\n }", "public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) {\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tfor (ArrayList<String> testItem : testData) {\r\n\t\t\tString str=getFeatureLabel(dataset, testItem, k);\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tif (testItem.get((testData.get(0).size()-1)).equals(str)) {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类正确\");\r\n\t\t\t\tcount ++;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类错误\");\r\n\t\t\t}\r\n\t\t\tindex ++;\r\n\t\t}\r\n\t\tSystem.out.println(\"正确率为\"+count*1.0/testData.size());\r\n\t}", "public List<String> useBaselineClassifierOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = baselineNode.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}", "public static Classifier create(final AssetManager assetManager,\n final String modelFilename,\n final String labelFilename,\n final int inputSize,\n final boolean isQuantized) throws IOException {\n final TFLiteRecognitionAPIModel d = new TFLiteRecognitionAPIModel();\n\n d.labels = readLabelFile(assetManager, labelFilename);\n d.inputSize = inputSize;\n\n // NEW: Prepare GPU delegate.\n //GpuDelegate delegate = new org.tensorflow.lite.Delegate();\n //Interpreter.Options options = (new Interpreter.Options()).addDelegate(delegate);\n\n try {\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), modelFilename);\n d.tfLite = new Interpreter(file);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n d.isModelQuantized = isQuantized;\n // Pre-allocate buffers.\n int numBytesPerChannel;\n if (d.isModelQuantized) {\n numBytesPerChannel = 1; // Quantized\n } else {\n numBytesPerChannel = 4; // Floating point\n }\n d.imgData = ByteBuffer.allocateDirect(1 * d.inputSize * d.inputSize * 3 * numBytesPerChannel); ////////////////////// 3 -> 2\n d.imgData.order(ByteOrder.nativeOrder());\n d.intValues = new int[d.inputSize * d.inputSize];\n\n d.tfLite.setNumThreads(NUM_THREADS);\n d.tfoutput_recognize = new float[1][NUM_CLASSES];\n /*d.outputLocations = new float[1][NUM_DETECTIONS][4];\n d.outputClasses = new float[1][NUM_DETECTIONS];\n d.outputScores = new float[1][NUM_DETECTIONS];\n d.numDetections = new float[1];*/\n return d;\n }", "@Override\n public MLData compute(final MLData input) {\n\n if (this.model == null) {\n throw new EncogError(\n \"Can't use the SVM yet, it has not been trained, \" +\n \"and no model exists.\");\n }\n\n final MLData result = new BasicMLData(1);\n\n final svm_node[] formattedInput = makeSparse(input);\n\n final double d = svm.svm_predict(this.model, formattedInput);\n result.setData(0, d);\n\n return result;\n }", "@Override\n public CreateDocumentClassifierResult createDocumentClassifier(CreateDocumentClassifierRequest request) {\n request = beforeClientExecution(request);\n return executeCreateDocumentClassifier(request);\n }", "public NBayesClassifier(int type, boolean[] farray) {\n\t\t\n\t\tif(type == SUBTYPE_NGRAM)\n\t\t\tsuper.setID(\"Naive Bayes + NGram\");\n\t\telse\n\t\t\tsuper.setID(\"Naive Bayes + TextClassifier\");\n\t\t//hasModel = false;\n\t\ttxt_type = type;\n\t\tfeatureArray = farray;\n\t\tif (farray != null)\n\t\t\tsetupStuff();\n\n\t\tif (txtclass == null) {\n\t\t\tSystem.out.println(\"building sub model class:\"+txt_type);\n\t\t\tif (txt_type == NBayesClassifier.SUBTYPE_NGRAM)\n\t\t\t\ttxtclass = new NGram();\n\t\t\telse\n\t\t\t\ttxtclass = new TextClassifier();\n\n\t\t\ttxtclass.setTargetLabel(getTargetLabel());\n\t\t\ttxtclass.setProgress(false);//we dont want to show subclass\n\t\t\t// progresses.\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic ConfusionMatrix calculate_confusion_matrix(Instance[] testData) {\n\n\t\t// Count the true positives, true negatives, false positives, false negatives\n\t\tint TP, FP, FN, TN;\n\t\tTP = 0;\n\t\tFP = 0;\n\t\tFN = 0;\n\t\tTN = 0;\n\n\t\tfor (Instance ins : testData) {\n\t\t\t// if True SPORTS\n\t\t\tif (ins.label == Label.SPORTS) {\n\t\t\t\t// if TP\n\t\t\t\tif (classify(ins.words).label == Label.SPORTS) {\n\t\t\t\t\tTP += 1;\n\t\t\t\t}\n\t\t\t\t// else FN\n\t\t\t\telse {\n\t\t\t\t\tFN += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if True BUSINESS\n\t\t\telse {\n\t\t\t\t// if TN\n\t\t\t\tif (classify(ins.words).label == Label.BUSINESS) {\n\t\t\t\t\tTN += 1;\n\t\t\t\t}\n\t\t\t\t// else FP\n\t\t\t\telse {\n\t\t\t\t\tFP += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfusionMatrix(TP, FP, FN, TN);\n\t}", "protected Prediction(Parcel in) {\n this.tagId = in.readString();\n this._tag = in.readString();\n this.probability = in.readDouble();\n }", "public void preprocess(String trainDataFolder)\n\t{\n\t\tFile folder = new File(trainDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\t\ttry{\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tString allLines = new String();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tint tabIndex;\n\t\t\t\t\tString type, msg;\n\t\t\t\t\tint label;\n\t\t\t\t\tint line_count = 0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\tallDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(allDocs.size());\n\t\t\t\t\t//System.out.println(offset);\n\t\t\t\t\tfor(int s=0;s<offset;s++){\n\t\t\t\t\t\tline = allDocs.get(s);\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\ttype = line.substring(0, tabIndex);\n\t\t\t\t\t\tmsg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){label = 0;}\n\t\t\t\t\t\telse{label = 1;}\n\t\t\t\t\t\tclassStrings[label] += (line + \" \");\n\t\t\t\t\t\tclassCounts[label]++;\n\t\t\t\t\t\ttrainingDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(IOException ioe){ioe.printStackTrace();}\n\t\t}\n\t\t/*System.out.println(\"number of ham tokens \"+classStrings[0].length());\n\t\tSystem.out.println(\"number of spam tokens \" +classStrings[1].length());\n\t\t*/\n\t\tSystem.out.println(\"Training Data Class Distribution:\");\n\t\tSystem.out.println(\"Ham: \"+classCounts[0]+\"(\"+Math.round(classCounts[0]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Spam: \"+classCounts[1]+\"(\"+Math.round(classCounts[1]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Total: \"+trainingDocs.size());\n\t}", "@BeforeClass\r\n public static void generateConfigurationOfClassifiersAndLoadData() {\r\n\r\n //one classifier in the ensemble will be ClassifierModel (Model for enach output class)\r\n GaussianMultiModelConfig gmc = new GaussianMultiModelConfig();\r\n gmc.setTrainerClassName(\"QuasiNewtonTrainer\");\r\n gmc.setTrainerCfg(new QuasiNewtonConfig());\r\n LinearModelConfig lmcpso = new LinearModelConfig();\r\n lmcpso.setTrainerClassName(\"PSOTrainer\");\r\n lmcpso.setTrainerCfg(new PSOConfig());\r\n ClassifierModelConfig clc = new ClassifierModelConfig();\r\n clc.setClassModelsDef(BaseModelsDefinition.RANDOM);\r\n clc.addClassModelCfg(lmcpso);\r\n clc.addClassModelCfg(gmc);\r\n clc.setClassRef(ClassifierModel.class);\r\n\r\n //todo second classifier in the ensemble will be Weka decision tree\r\n\r\n ClassifierBaggingConfig bagc = new ClassifierBaggingConfig();\r\n bagc.setClassifiersNumber(2);\r\n bagc.setBaseClassifiersDef(BaseModelsDefinition.UNIFORM);\r\n bagc.addBaseClassifierCfg(clc);\r\n\r\n generatedCfg = bagc;\r\n ConfigurationFactory.saveConfiguration(generatedCfg, cfgfilename);\r\n\r\n data = new FileGameData(datafilename);\r\n\r\n }", "protected abstract String getPreprocessingModel(PipelineData data);", "public static FilteredClassifier createFilteredClassifier(Classifier baseClassifier,\r\n\t\t\tInstances inputFormat, String indicesToIgnore) throws Exception {\r\n\t\tFilteredClassifier filteredClassifier = new FilteredClassifier();\r\n\t\tfilteredClassifier.setClassifier(baseClassifier);\r\n\t\tRemove rem = new Remove();\r\n\t\trem.setAttributeIndices(indicesToIgnore);\r\n\t\trem.setInputFormat(inputFormat);\r\n\t\tfilteredClassifier.setFilter(rem);\r\n\t\treturn filteredClassifier;\r\n\t}", "public Classifier generateBackgroundClassificationModel(Dataset dataset, Properties properties) throws Exception {\n String backgroundFilePath = properties.getProperty(\"backgroundClassifierLocation\") + \"_background_\" + dataset.getName() + \"_classifier_obj\";\n Path path = Paths.get(backgroundFilePath);\n\n //If the classification model already exists, load and return it\n if (Files.exists(path)) {\n FileInputStream streamIn = new FileInputStream(backgroundFilePath);\n ObjectInputStream objectinputstream = new ObjectInputStream(streamIn);\n try {\n Classifier backgroundModel = (Classifier) objectinputstream.readObject();\n objectinputstream.close();\n return backgroundModel;\n }\n catch (Exception ex) {\n System.out.println(\"Error reading Instances from file: \" + dataset.getName() + \" : \" + ex.getMessage());\n return null;\n }\n }\n //Otherwise, generate, save and return it (WARNING - takes time)\n else {\n File folder = new File(properties.getProperty(\"DatasetInstancesFilesLocation\"));\n File[] filesArray = folder.listFiles();\n\n boolean addHeader = true;\n boolean foundDatasets = false;\n for (int i = 0; i < filesArray.length; i++) {\n //for (int i = 0; i < 1; i++) {\n //we're making sure that the analyzed item is both a file AND not generated from the dataset we're currently analyzing\n if (filesArray[i].isFile() && !filesArray[i].getName().contains(dataset.getName()) && filesArray[i].getPath().contains(\".arff\")) {\n addArffFileContentToTargetFile(backgroundFilePath, filesArray[i].getAbsolutePath(), addHeader);\n addHeader = false;\n foundDatasets = true;\n }\n else {\n System.out.println(\"skipping file: \" + filesArray[i].getName());\n }\n }\n if (!foundDatasets) {\n throw new Exception(\"If no background model is trained, please provide additional Datasets at \" + properties.getProperty(\"DatasetInstancesFilesLocation\"));\n }\n //now we load the contents of the ARFF file into an Instances object and train the classifier\n BufferedReader reader = new BufferedReader(new FileReader(backgroundFilePath + \".arff\"));\n //Instances data = new Instances(reader);\n //reader.close();\n\n ArffLoader.ArffReader arffReader = new ArffLoader.ArffReader(reader);\n //Instances structure = arffReader.getStructure();\n Instances data = arffReader.getData();\n\n data.setClassIndex(data.numAttributes() - 1);\n\n //the chosen classifier\n RandomForest classifier = new RandomForest();\n classifier.setNumExecutionSlots(Integer.parseInt(properties.getProperty(\"numOfThreads\")));\n\n classifier.buildClassifier(data);\n\n File file = new File(backgroundFilePath + \".arff\");\n file.delete();\n\n //now we write the classifier to file prior to returning the object\n FileOutputStream out = new FileOutputStream(backgroundFilePath);\n ObjectOutputStream oout = new ObjectOutputStream(out);\n oout.writeObject(classifier);\n oout.flush();\n oout.close();\n\n return classifier;\n }\n }", "public static void BuildHierarchyTree(Dataset d, int dim_num,\n\t\t\tArrayList<KDNode> class_buff) throws IOException {\n\t\t\n\t\tfor(int k=0; k<class_buff.size(); k++) {\n\t\t\tclass_buff.get(k).class_vect = new double[20];\n\t\t}\n\t\t\n\t\tCreateClassifierVec(d, dim_num, class_buff, 0);\n\t\t\n\t\twhile(root_map.size() > 4) {\n\t\t\t\n\t\t\tSystem.out.println(\"Root Size: \"+root_map.size());\n\t\t\tArrayList<KDNode> root_buff = new ArrayList<KDNode>();\n\t\t\tfor(KDNode k : root_map) {\n\t\t\t\troot_buff.add(k);\n\t\t\t\t\n\t\t\t\tfloat length = 0;\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tlength += k.class_vect[i] * k.class_vect[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlength = (float) Math.sqrt(length);\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tk.class_vect[i] /= length;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat max = -99999999;\n\t\t\tTable max_join = new Table();\n\t\t\tfor(int j=0; j<root_buff.size(); j++) {\n\t\t\t\t\n\t\t\t\tfor(int i=j+1; i<root_buff.size(); i++) {\n\n\t\t\t\t\tKDNode dim1 = root_buff.get(j);\n\t\t\t\t\tKDNode dim2 = root_buff.get(i);\n\t\t\t\t\t\n\t\t\t\t\tfloat dot_product = 0;\n\t\t\t\t\tfor(int k=0; k<dim1.class_vect.length; k++) {\n\t\t\t\t\t\tdot_product += dim1.class_vect[k] * dim2.class_vect[k];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdot_product /= (dim1.LeafNodeNum() + dim2.LeafNodeNum());\n\t\t\t\t\t\n\t\t\t\t\tif(dot_product > max) {\n\t\t\t\t\t\tmax = dot_product;\n\t\t\t\t\t\tmax_join.dim1 = dim1;\n\t\t\t\t\t\tmax_join.dim2 = dim2;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tmax_join.dim1.RemoveRootNode();\n\t\t\tmax_join.dim2.RemoveRootNode();\n\t\t\t\n\t\t\tKDNode parent = new KDNode(null, 0);\n\t\t\tparent.left_ptr = max_join.dim1;\n\t\t\tparent.right_ptr = max_join.dim2;\n\t\t\tparent.node_corr = max;\n\t\t\t\n\t\t\tparent.class_vect = new double[max_join.dim1.class_vect.length];\n\t\t\tfor(int k=0; k<max_join.dim1.class_vect.length; k++) {\n\t\t\t\tparent.class_vect[k] = (max_join.dim1.class_vect[k] + max_join.dim2.class_vect[k]) / 2;\n\t\t\t}\n\t\t\t\n\t\t\tfloat length = 0;\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tlength += parent.class_vect[i] * parent.class_vect[i];\n\t\t\t}\n\t\t\t\n\t\t\tlength = (float) Math.sqrt(length);\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tparent.class_vect[i] /= length;\n\t\t\t}\n\t\t\t\n\t\t\tparent.left_ptr.parent_ptr = parent;\n\t\t\tparent.right_ptr.parent_ptr = parent;\n\t\t}\n\t\t\n\t\tint offset = 0;\n\t\tSampleSpace s = new SampleSpace();\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tKDNodeDim dim = new KDNodeDim(k, offset++);\n\t\t\ts.k_neighbour.add(dim);\n\t\t\ts.kdnode_dim.add(dim);\n\t\t}\n\t\t\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tk.space = s;\n\t\t}\n\t}", "@Override\n public Data build(String input) {\n return null;\n }", "public AdaBoostClassifier (DataSet dataSet){\n\t\tthis.numberRounds = 200;\n\t\tdouble error;\n\t\tthis.dSC = new DecisionStumpClassifier[dataSet.numAttrs];\n\t\tthis.weights = new double[dataSet.numTrainExs];\n\t\t// Initializing the weights of all the training examples\n\t\tinitWeights(dataSet.numTrainExs);\n\t\tthis.classifiedCorrectly = new boolean[dataSet.numAttrs][dataSet.numTrainExs];\n\t\tthis.alpha = new double[this.numberRounds];\n\t\tthis.hypothesis = new int[this.numberRounds];\n\t\tfor (int attributeIndex = 0; attributeIndex < dataSet.numAttrs; attributeIndex++){\n\t\t\t//System.out.println(attributeIndex);\n\t\t\tthis.dSC[attributeIndex] = new DecisionStumpClassifier (dataSet, attributeIndex); \n\t\t\t\n\t\t\tfor (int sampleIndex = 0; sampleIndex < dataSet.numTrainExs; sampleIndex++){\n\t\t\t\tclassifiedCorrectly[attributeIndex][sampleIndex] = \n\t\t\t\t\t\t(this.dSC[attributeIndex].predict(dataSet.trainEx[sampleIndex]) == dataSet.trainLabel[sampleIndex]);\n\t\t\t}\n\t\t}\n\t\tfor (int currentRound = 0; currentRound < this.numberRounds; currentRound++){\n\t\t\terror = getMinimumWeightedError(dataSet.numTrainExs, dataSet.numAttrs, currentRound);\n\t\t\tthis.alpha[currentRound] = 0.5 * Math.log((1 - error) / (error));\n\t\t\tupdateWeights (dataSet.numTrainExs, error, \n\t\t\t\t\tthis.classifiedCorrectly[this.hypothesis[currentRound]], this.alpha[currentRound]);\n\t\t}\n\t}", "public Classifier selectBestOneR(Instances data) throws Exception{\r\n\t\tSystem.out.println(\"Build OneR\");\r\n\r\n\t\tCVParameterSelection ps = new CVParameterSelection();\r\n\t\tps.setClassifier(new OneR());\r\n\t\tps.setNumFolds(2);\r\n\t\tps.addCVParameter(\"B 1 5 10\");\r\n\r\n\t\t// build and output best options\r\n\t\tps.buildClassifier(data);\r\n\r\n\r\n\t\treturn ps;\r\n\t}", "public Classifier selectBestVFI(Instances data) throws Exception{\r\n\t\tSystem.out.println(\"Build VFI\");\r\n\r\n\t\tCVParameterSelection ps = new CVParameterSelection();\r\n\t\tps.setClassifier(new VFI());\r\n\t\tps.setNumFolds(2);\r\n\t\tps.addCVParameter(\"B 0.1 1 20\");\r\n\r\n\t\t// build and output best options\r\n\t\tps.buildClassifier(data);\r\n\r\n\t\treturn ps;\r\n\t}", "org.landxml.schema.landXML11.ClassificationDocument.Classification addNewClassification();", "private static void analyzeData(Instances inputData, \n\t\t\tClassifierID method, String outputFileName) throws Exception\n\t{\n\t\tPrintWriter pw = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Method: \" + method.name());\n\t\t\t\n\t\t\tint[] results = new int[inputData.size()];\n\n\t\t\t// Load the local resource\n\t\t\t// This allows the file to be packaged inside the Jar\t\n\t\t\tInputStream is = SimpleSpamAnalysisApp.class.\n\t\t\t\t\tgetResourceAsStream(classifiers[method.ordinal()]);\n\t\t\n\t\t\t// Generate the classifier from model\n\t\t\tClassifier classifier = (Classifier) SerializationHelper.read(is);\n\t\t\t\n\t\t\tint numInstances = inputData.size();\n\t\t\t\n\t\t\t// Compute the expected value of each instance\n\t\t\tfor(int i=0; i<numInstances; i++)\n\t\t\t{\n\t\t\t\tresults[i] = (int)classifier.classifyInstance(inputData.get(i));\n\t\t\t}\n\n\t\t\t// Output the results to the file\n\t\t\tpw = new PrintWriter(outputFileName);\n\t\t\tfor(int r : results)\n\t\t\t\tpw.println(r);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t// Make sure the file stream is closed\n\t\t\tif(pw != null)\n\t\t\t\tpw.close();\n\t\t}\n\t}", "public Classifier selectBestJ48(Instances data) throws Exception{\r\n\t\t// setup classifier\r\n\t\tSystem.out.println(\"Build J48\");\r\n\t\tCVParameterSelection ps = new CVParameterSelection();\r\n\t\tps.setClassifier(new J48());\r\n\t\tps.setNumFolds(2);\r\n\t\tps.addCVParameter(\"C 0.1 0.5 5\");\r\n\r\n\t\t// build and output best options\r\n\r\n\t\tps.buildClassifier(data);\r\n\r\n\t\treturn ps;\r\n\t}", "public void dmall() {\n \r\n BufferedReader datafile = readDataFile(\"Work//weka-malware.arff\");\r\n \r\n Instances data = null;\r\n\t\ttry {\r\n\t\t\tdata = new Instances(datafile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n data.setClassIndex(data.numAttributes() - 1);\r\n \r\n // Choose a type of validation split\r\n Instances[][] split = crossValidationSplit(data, 10);\r\n \r\n // Separate split into training and testing arrays\r\n Instances[] trainingSplits = split[0];\r\n Instances[] testingSplits = split[1];\r\n \r\n // Choose a set of classifiers\r\n Classifier[] models = { new J48(),\r\n new DecisionTable(),\r\n new DecisionStump(),\r\n new BayesianLogisticRegression() };\r\n \r\n // Run for each classifier model\r\n//for(int j = 0; j < models.length; j++) {\r\n int j = 0;\r\n \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\tcase \"J48\":\r\n\t\t\t\tj = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionTable\":\r\n\t\t\t\tj = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionStump\":\r\n\t\t\t\tj = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\tj = 3;\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\r\n\r\n // Collect every group of predictions for current model in a FastVector\r\n FastVector predictions = new FastVector();\r\n \r\n // For each training-testing split pair, train and test the classifier\r\n for(int i = 0; i < trainingSplits.length; i++) {\r\n Evaluation validation = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\r\n\t\t\t\t} catch (Exception 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 predictions.appendElements(validation.predictions());\r\n \r\n // Uncomment to see the summary for each training-testing pair.\r\n// textArea.append(models[j].toString() + \"\\n\");\r\n textArea.setText(models[j].toString() + \"\\n\");\r\n// System.out.println(models[j].toString());\r\n }\r\n \r\n // Calculate overall accuracy of current classifier on all splits\r\n double accuracy = calculateAccuracy(predictions);\r\n \r\n // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//}\r\n \r\n\t}", "public HashGroupify(int capacity, \n ARXConfigurationInternal config,\n int dataAnalyzedNumberOfColumns,\n DataMatrix input,\n DataMatrix output,\n DataMatrix analyzed,\n int[] suppressedCodes) {\n \n // Store\n this.dataInput = input;\n this.dataOutput = output;\n this.dataAnalyzed = analyzed;\n this.dataAnalyzedNumberOfColumns = dataAnalyzedNumberOfColumns;\n this.suppressedCodes = suppressedCodes;\n this.suppressedHashCode = dataOutput.hashCode(suppressedCodes);\n \n // Set capacity\n capacity = HashTableUtil.calculateCapacity(capacity);\n this.hashTableElementCount = 0;\n this.hashTableBuckets = new HashGroupifyEntry[capacity];\n this.hashTableThreshold = HashTableUtil.calculateThreshold(hashTableBuckets.length, hashTableLoadFactor);\n \n // Set params\n this.currentNumOutliers = 0;\n this.suppressionLimit = config.getAbsoluteSuppressionLimit();\n this.utilityMeasure = config.getQualityModel();\n this.heuristicForSampleBasedCriteria = config.isUseHeuristicForSampleBasedCriteria();\n \n // Extract research subset\n if (config.getSubset() != null) {\n this.privacyModelDefinesSubset = config.getSubset().getSet();\n } else {\n this.privacyModelDefinesSubset = null;\n }\n \n // Extract criteria\n this.classBasedCriteria = config.getClassBasedPrivacyModelsAsArray();\n this.sampleBasedCriteria = config.getSampleBasedPrivacyModelsAsArray();\n this.minimalClassSize = config.getMinimalGroupSize();\n \n // Sanity check: by convention, d-presence must be the first criterion\n // See analyze() and isAnonymous(Entry) for more details\n for (int i = 1; i < classBasedCriteria.length; i++) {\n if (classBasedCriteria[i] instanceof DPresence) {\n throw new RuntimeException(\"D-Presence must be the first criterion in the array\");\n }\n }\n \n // Remember, if (real) d-presence is part of the criteria that must be enforced\n privacyModelContainsDPresence = (classBasedCriteria.length > 0 && (classBasedCriteria[0] instanceof DPresence) && !(classBasedCriteria[0] instanceof Inclusion));\n }", "public static void buildTrainData() throws IOException {\n\t\tString negativePath = \"./corpus/20ng-train-all-terms.txt\";\n\t\tString positivePath = \"./corpus/r8-train-all-terms.txt\";\n\t\tString fileout = \"./corpus/trainData\";\n\t\tFileReader fr1 = new FileReader(negativePath);\n\t\tFileReader fr2 = new FileReader(positivePath);\n\t\tFileWriter fw = new FileWriter(fileout);\n\t\tBufferedReader br1 = new BufferedReader(fr1);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tHashtable<String, Integer> map = new Hashtable<String, Integer>();\n\t\tString readoneline;\n\t\twhile (((readoneline = br1.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\n\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\tbw.newLine();\n\t\t\t} else {\n\t\t\t\tInteger num = map.get(topic);\n\t\t\t\tif (num < 50) {\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (((readoneline = br2.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\t\t\tif (topic.equals(\"acq\") || topic.equals(\"earn\")\n\t\t\t\t\t|| topic.equals(\"money-fx\") || topic.equals(\"trade\")\n\t\t\t\t\t|| topic.equals(\"interest\")) {\n\t\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t} else {\n\t\t\t\t\tInteger num = map.get(topic);\n\t\t\t\t\tif (topic.equals(\"acq\") && num < 300) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"earn\") && num < 450) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"money-fx\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"trade\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"interest\") && num < 50) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbw.flush();\n\t\tbr1.close();\n\t\tbw.close();\n\t\tfw.close();\n\n\t}", "public BinID3(String[] label, boolean[][] input, String[] output,\r\n\t\t\tString[] classes) {\r\n\t\tthis.input = input;\r\n\t\tthis.output = output;\r\n\t\tthis.label = label;\r\n\t\tthis.classes = classes;\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Normalized norm = new Normalized();\n double c = 1;\n\n double[][] data = norm.Inputdata(\"input.txt\");\n double[][] w = new double[35][10];\n double[][] last = new double[35][10];\n\n for (int i = 0; i < 35; i++) {\n for (int j = 0; j < 10; j++) {\n w[i][j] = 1;\n last[i][j] = 1;\n\n }\n }\n\n /* for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 35; j++) {\n System.out.print(data[i][j]);\n System.out.print(\" \");\n \n \n }\n System.out.print(\"\\n\");\n }\n */\n //System.out.print(w[5][5]);\n double[] ErrMap = norm.Inputdata2(\"TestMap.txt\");\n //System.out.print(ErrMap[0]);\n\n //System.out.print(\"\\n\");\n w = training(data, w, last, c);\n\n int out = 2;\n\n out = classify(w, ErrMap, c);\n System.out.print(\"product \" + out + \" is max\\n\");\n System.out.print(\"the number classify to \" + out + \"\\n\");\n }", "@Override\n public double classifyInstance(Instance testdata) {\n // get a copy of testdata Instance with only the matched attributes\n Instance ntest = this.mm.getMatchedTestInstance(testdata);\n\n double ret = 0.0;\n try {\n ret = this.classifier.classifyInstance(ntest);\n }\n catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n\n return ret;\n }", "public static ClassifiedFeature createClassifiedFeature(Feature feature, Classifier classifier) {\n ClassifiedFeature classifiedFeature = ClassificationFactory.eINSTANCE.createClassifiedFeature();\n classifiedFeature.setFeature(feature);\n classifiedFeature.setClassified(classifier);\n return classifiedFeature;\n }", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Classifier selectBestZeroR(Instances data) throws Exception{\r\n\t\tSystem.out.println(\"Build ZeroR\");\r\n\r\n\t\t// setup classifier\r\n\t\tZeroR ps = new ZeroR();\r\n\t\tps.buildClassifier(data);\r\n\r\n\t\treturn ps;\r\n\r\n\t}", "public Report createReportFromInputData(InputData inputData)\n {\n List<ReportRow> rows = generateRows(inputData.compact, inputData);\n \n Report reportModel = new Report();\n reportModel.setTitle(inputData.title);\n reportModel.setSubtitle(inputData.subtitle);\n reportModel.setDates(inputData.dates);\n \n reportModel.addColumn(\"Manufacturer\", \"manufacturerName\");\n reportModel.addColumn(\"Product Name/Code\", \"productNameAndCode\");\n if (!inputData.compact)\n reportModel.addColumn(\"Contract\", \"contractName\");\n \n int asize = inputData.distributors.size();\n for (int i = 0; i < asize; i++)\n {\n reportModel.addColumn(inputData.distributors.get(i), \"formattedPrices[\" + i + \"]\");\n }\n for (ReportRow row : rows)\n reportModel.addRow(row);\n return reportModel;\n }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "@Override\n public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(\n final InputType input)\n {\n final DefaultDataDistribution<CategoryType> votes =\n this.evaluateAsVotes(input);\n\n // Get the maximum value of the votes.\n final CategoryType bestCategory = votes.getMaxValueKey();\n final double bestFraction = votes.getFraction(bestCategory);\n return DefaultWeightedValueDiscriminant.create(\n bestCategory, bestFraction);\n }", "public List<String> classifiers()\n\t{\n\t\t//If the classifier list has not yet been constructed then go ahead and do it\n\t\tif (c.isEmpty())\n\t\t{\n\t\t\tfor(DataSetMember<t> member : _data)\n\t\t\t{\n\t\t\t\tif (!c.contains(member.getCategory()))\n\t\t\t\t\t\tc.add(member.getCategory().toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn c;\n\t}", "public static void KNNClassifier() throws IOException {\n\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\n\t\tClassifier knn = new KNearestNeighbors(5);\n\t\tknn.buildClassifier(data);\n\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\n\t\tint correct = 0, wrong = 0;\n\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\tObject predictedClassValue = knn.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse\n\t\t\t\twrong++;\n\t\t}\n\t\tSystem.out.println(\"Correct predictions \" + correct);\n\t\tSystem.out.println(\"Wrong predictions \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}", "org.landxml.schema.landXML11.ClassificationDocument.Classification getClassificationArray(int i);", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "public T Create(String input) {\n\t\t\n\t\tArrayList<String> params = ParseInput(input);\n\n\t\tClass<T> cls = classMap.get(params.get(0));\n\n\t\tif(cls == null) {\n\t\t\t//Class is not registered, error.\n\t\t\tMain.error(params.get(0) + \" is not recognized by Factory\");\n\t\t}\n\n\t\ttry{\n\t\t Method make = cls.getDeclaredMethod(\"Make\",new Class[] {ArrayList.class});\n\t\t T ret = cls.cast(make.invoke(null,new Object[]{params}));\n\t\t return ret;\n\t\t} catch(java.lang.NoSuchMethodException e){\n\t\t\tMain.error(params.get(0) + \" does not have required Make method\");\n\t\t} catch(java.lang.IllegalAccessException e){\n\t\t\tMain.error(\"Access problems with constructor for \" +\n\t\t\t\t params.get(0));\n\t\t} catch(java.lang.reflect.InvocationTargetException e){\n\t\t Main.error(\"Make method for \" + params.get(0) +\n\t\t\t \" threw an exception. Check code\");\n\t\t} catch(java.lang.Exception e){\n\t\t Main.error(\"Problems with \"+params.get(0)+\"; check code.\");\n\t\t}\n\n\t\t//We never get here\n\t\tMain.error(\"Reached end of creation method without creating \"\n\t\t\t + params.get(0));\n\t\treturn null;\n\t}", "public BinTree induceTree(int[] partition, int[] features) {\r\n\t\t// if the partition is empty, we can not return a tree\r\n\t\tif (partition.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// check if all entries in partition belong to the same class. If so,\r\n\t\t// return node, labeled with class value\r\n\t\t// you may want to check if pruning is applicable here (and then just\r\n\t\t// return the majority class).\r\n\t\tint[] classCnt = new int[classes.length];\r\n\t\tString sameValue = null;\r\n\t\tboolean sameClass = true;\r\n\t\tfor (int p = 0; p < partition.length; p++) {\r\n\t\t\tString targetValue = output[partition[p]];\r\n\t\t\tfor (int n = 0; n < classes.length; n++) {\r\n\t\t\t\tif (targetValue.equals(classes[n])) {\r\n\t\t\t\t\tclassCnt[n]++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (p == 0)\r\n\t\t\t\tsameValue = targetValue;\r\n\t\t\telse {\r\n\t\t\t\tif (!sameValue.equalsIgnoreCase(targetValue)) {\r\n\t\t\t\t\tsameClass = 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\tif (sameClass) {\r\n\t\t\treturn new BinTree(sameValue);\r\n\t\t} else {\r\n\t\t\tint max = 0;\r\n\t\t\tfor (int n = 1; n < classes.length; n++)\r\n\t\t\t\tif (classCnt[max] < classCnt[n])\r\n\t\t\t\t\tmax = n;\r\n\t\t\tif ((double) classCnt[max] / (double) partition.length > 0.50\r\n\t\t\t\t\t|| partition.length < 5) { // if more than 50% of samples\r\n\t\t\t\t\t\t\t\t\t\t\t\t// in partition are of the same\r\n\t\t\t\t\t\t\t\t\t\t\t\t// class OR fewer than 5 samples\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t\treturn new BinTree(classes[max]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if no features are available, we can not return a tree\r\n\t\tif (features.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// class values are not equal so we select a particular feature to split\r\n\t\t// the partition\r\n\t\tint selectedFeature = selectFeature(partition, features);\r\n\r\n\t\t// create new partition of samples\r\n\t\t// use only corresponding subset of full partition\r\n\t\tint[] partTrue = matches(partition, selectedFeature, true);\r\n\t\tint[] partFalse = matches(partition, selectedFeature, false);\r\n\t\t// remove the feature from the new set (to be sent to subtrees)\r\n\t\tint[] nextFeatures = new int[features.length - 1];\r\n\t\tint cnt = 0;\r\n\t\tfor (int f = 0; f < features.length; f++) {\r\n\t\t\tif (features[f] != selectedFeature)\r\n\t\t\t\tnextFeatures[cnt++] = features[f];\r\n\t\t}\r\n\t\t// construct the subtrees using the new partitions and reduced set of\r\n\t\t// features\r\n\t\tBinTree branchTrue = induceTree(partTrue, nextFeatures);\r\n\t\tBinTree branchFalse = induceTree(partFalse, nextFeatures);\r\n\r\n\t\t// if either of the subtrees failed, we have confronted a problem, use\r\n\t\t// the most likely class value of the current partition\r\n\t\tBinTree defaultTree = null;\r\n\t\tif (branchTrue == null || branchFalse == null) {\r\n\t\t\t// indicate a majority vote\r\n\t\t\tint[] freq = new int[classes.length];\r\n\t\t\tint most = 0;\r\n\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\tint[] pos = matches(partition, classes[c]);\r\n\t\t\t\tfreq[c] = pos.length;\r\n\t\t\t\tif (freq[c] >= freq[most])\r\n\t\t\t\t\tmost = c;\r\n\t\t\t}\r\n\t\t\t// the majority class value can replace any null trees...\r\n\t\t\tdefaultTree = new BinTree(classes[most]);\r\n\t\t\tif (branchTrue == null && branchFalse == null)\r\n\t\t\t\treturn defaultTree;\r\n\t\t\telse\r\n\t\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\t\treturn new BinTree(labelFeature(selectedFeature),\r\n\t\t\t\t\t\t(branchTrue == null ? defaultTree : branchTrue),\r\n\t\t\t\t\t\t(branchFalse == null ? defaultTree : branchFalse));\r\n\t\t} else { // if both subtrees were successfully created we can either\r\n\t\t\tif (branchTrue.classValue != null && branchFalse.classValue != null) {\r\n\t\t\t\tif (branchTrue.classValue.equals(branchFalse.classValue)) {\r\n\t\t\t\t\t// return the the current node with the classlabel common to\r\n\t\t\t\t\t// both subtrees, or\r\n\t\t\t\t\treturn new BinTree(branchTrue.classValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\treturn new BinTree(labelFeature(selectedFeature), branchTrue,\r\n\t\t\t\t\tbranchFalse);\r\n\t\t}\r\n\t}", "public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Problem found when classifying the text\");\n\t\t}\t\t\n\t}", "@Override\n\tpublic ClassifyResult classify(List<String> words) {\n\t\t// TODO : Implement\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tdouble log_POSITIVE = Math.log(p_l(Label.POSITIVE));\n\t\tfor (String word : words)\n\t\t\tlog_POSITIVE += Math.log(p_w_given_l(word, Label.POSITIVE));\n\n\t\tdouble log_NEGATIVE = Math.log(p_l(Label.NEGATIVE));\n\t\tfor (String word : words)\n\t\t\tlog_NEGATIVE += Math.log(p_w_given_l(word, Label.NEGATIVE));\n\n\t\t// Create the ClassifyResult\n\t\tClassifyResult result = new ClassifyResult();\n\t\tresult.logProbPerLabel = new HashMap<Label, Double>();\n\t\tresult.logProbPerLabel.put(Label.POSITIVE, log_POSITIVE);\n\t\tresult.logProbPerLabel.put(Label.NEGATIVE, log_NEGATIVE);\n\t\t\n\t\tif (log_POSITIVE > log_NEGATIVE)\n\t\t\tresult.label = Label.POSITIVE;\n\t\telse\n\t\t\tresult.label = Label.NEGATIVE;\n\n\t\treturn result;\n\t}", "public static Classifier classify(List<List<Double>> features,List<Double> labels) throws Exception\n\t {\n\t\t\n\t\t String RF_CSV = \"res/diabetic_data_rf.csv\";\n\t\t String RF_Arff = \"res/rf_output.arff\";\n\t\t Helper.createCSV(RF_CSV,features,labels);\n\t\t Instances data_rf = Helper.createARFF(RF_CSV, RF_Arff);\n\t\t RandomForest rf = new RandomForest();\n\t\t System.out.println(\"Random Forest...\");\n\t\t rf.setNumTrees(100);\n\t\t rf.setMaxDepth(8);\n\t\t rf.buildClassifier(data_rf);\n\t\t \n\t\t Evaluation eval = new Evaluation(data_rf);\n\t\t Random rand = new Random(1); // using seed = 1\n\t\t int folds = 4;\n\t\t eval.crossValidateModel(rf, data_rf, folds, rand);\n\t\t System.out.println(eval.toSummaryString());\n\t\t \n\t\t return rf;\n\t }", "protected ClassifierTree getNewTree(Instances data) throws Exception {\n\n myC45PruneableClassifierTree newTree =\n new myC45PruneableClassifierTree(m_toSelectModel, m_pruneTheTree, m_CF,\n m_subtreeRaising, m_cleanup);\n newTree.buildTree((Instances) data, m_subtreeRaising || !m_cleanup);\n\n return newTree;\n }", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "public Recommender buildRecommender(DataModel dataModel) \n\t throws TasteException {\n\t \tUserSimilarity userSim=new PearsonCorrelationSimilarity(dataModel);\n\t \tUserNeighborhood nbh = new NearestNUserNeighborhood(10, userSim, dataModel);\n\t \t\t\treturn new GenericUserBasedRecommender(dataModel, nbh, userSim);\n\t }", "public ResultDTO classifyASD(String features) {\n\n DataSource testData = null;\n String prediction = null;\n double output;\n try {\n testData = new DataSource(filePathFinder.getTestDataFile());\n Instances test = testData.getDataSet();\n test.setClassIndex(test.numAttributes() - 1);\n\n MultilayerPerceptron mlp = (MultilayerPerceptron) learningModel.getModel(MULTILAYER_PERCEPTRON);\n // Getting the last row of the csv as the test data\n Instance inst = test.instance(test.numInstances()-1);\n// Instance inst1 =\n output = mlp.classifyInstance(inst);\n prediction = test.classAttribute().value((int) output);\n } catch (Exception ignored) {\n }\n return ResultBuilder.getInstance().buildResultDTO(prediction);\n }", "@Test\n\tpublic void classificationTest(){\n\n\t\tJavaPairRDD<String, Set<String>> javaRDD = javaSparkContext.textFile(\"/Downloads/book2-master/2rd_data/ch02/Gowalla_totalCheckins.txt\")\n\t\t\t\t.map(line -> line.split(\"~\"))\n\t\t\t\t.map(s -> new AppDto(s[0],s[1],s[2],s[3],s[4]))\n\t\t\t\t.mapToPair(app -> {\n\t\t\t\t\tSet<String> setIntro = Arrays.stream(app.getIntroduction().split(\" \"))\n\t\t\t\t\t\t\t.map(s -> s.split(\"/\"))\n\t\t\t\t\t\t\t.filter(ss -> ss[0].length()>1 && (ss[1].equals(\"v\") || ss[1].indexOf(\"n\")>-1))\n\t\t\t\t\t\t\t.map(ss -> ss[0]).collect(Collectors.toSet());\n\n\t\t\t\t\treturn new Tuple2<>(app.getCls(), setIntro);\n\t\t\t\t});\n\n\t\tjavaRDD.map(t -> t._2).zipWithIndex();\n\t}", "public void process(byte[] inputClass) throws IOException {\n\t\tClassNode classNode = BytecodeUtils.getClassNode(inputClass);\n\t\t// TODO: address innerclasses, classNode.innerClasses, could these even be found from class files? they would be different files...\n\t\tif(classNode.invisibleAnnotations != null){\n\t\t\tfor(Object annotationObject : classNode.invisibleAnnotations){\n\t\t\t\tAnnotationNode annotationNode = (AnnotationNode) annotationObject;\n\t\t\t\tJREFAnnotationIdentifier checker = new JREFAnnotationIdentifier();\n\t\t\t\tchecker.visitAnnotation(annotationNode.desc, false);\n\t\t\t\tif(checker.isJREFAnnotation()){\n\t\t\t\t\tString qualifiedClassName = classNode.name + \".class\";\n\t\t\t\t\tif(checker.isDefineTypeAnnotation()){\n\t\t\t\t\t\tif(runtimeModifications.getJarEntrySet().contains(qualifiedClassName)){\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, true);\n//\t\t\t\t\t\t\tLog.info(\"Replaced: \" + qualifiedClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, false);\n//\t\t\t\t\t\t\tLog.info(\"Inserted: \" + qualifiedClassName + \" into \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(checker.isMergeTypeAnnotation()){\n\t\t\t\t\t\tString qualifiedParentClassName = classNode.superName + \".class\";\n\t\t\t\t\t\tbyte[] baseClass = runtimeModifications.extractEntry(qualifiedParentClassName);\n\t\t\t\t\t\tbyte[] mergedClass = mergeClasses(baseClass, inputClass);\n\t\t\t\t\t\truntimeModifications.add(qualifiedParentClassName, mergedClass, true);\n\t\t\t\t\t\t// TODO: clean up outputClass somehow, probably need to make a local temp\n\t\t\t\t\t\t// directory which gets deleted at the end of the build\n//\t\t\t\t\t\tLog.info(\"Merged: \" + qualifiedClassName + \" into \" + qualifiedParentClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t/*Tuple[] tuples = new Tuple[]{\n\t\t\tnew Tuple(\"0 0 1 0 0\", \"1 3\", ' '),\n\t\t\tnew Tuple(\"1 0 0 1 1\", \"1 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 1\", \"1 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"2 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 0\", \"3 3\", ' '),\n\t\t\tnew Tuple(\"0 1 0 1 1\", \"2 3\", ' ')\n\t\t};\n\t\tdata = new DataSet(tuples);*/\n\t\t\n\t\t//data = Parser.parseAttributes(\"Corel5k-train.arff\", 374);\n\t\tdata = Parser.parseShortNotation(\"diabetes.txt\", 1, new NumericalItemSet(new int[]{}));\n\t\ts = data.s();\n\t\tn = data.getTuples().length;\n\t\tm = data.getTuples()[0].getClassValues().length;\n\t\t\n\t\t/*double u = 0;\n\t\tlong l = 0;\n\t\tfor(int j = 0; j < 10; j++) {\n\t\t\tdouble t = System.currentTimeMillis();\n\t\t\tfor(int i = 0; i < 10000; i++)\n\t\t\t\tu = data.getBluePrint().getOneItemSet(2, 48).ub();\n\t\t\tl += (System.currentTimeMillis() - t);\n\t\t}\n\t\tSystem.out.println(((double)l/10));*/\n\t\n\t\t\n\t\tSystem.out.println(\"Data loaded, \"+data.getTuples().length+\" tuples, \"+\n\t\t\t\tdata.getTuples()[0].getItemSet().getLength()+\" items, \"+\n\t\t\t\tdata.getTuples()[0].getClassValues().length+\" class values\");\n\t\t\t\t\n\t\tStopWatch.tic(\"Full time\");\n\t\tSystem.out.println(icc());\n\t\tStopWatch.printToc(\"Full time\");\n\t}", "public Instances preprocess(PipelineData data) throws Exception {\n\t\tInstances instances = filterData(data);\n\n\t\tmodelString = getPreprocessingModel(data);\n\t\tanalyzeSystem(data);\n\t\tsaveAnalysis();\n\n\t\treturn instances;\n\t}", "public EnsembleLibraryModel(Classifier classifier) {\n \n m_Classifier = classifier;\n \n //this may seem redundant and stupid, but it really is a good idea \n //to cache the stringRepresentation to minimize the amount of work \n //that needs to be done when these Models are rendered\n m_StringRepresentation = toString();\n \n updateDescriptionText();\n }", "public static void main(String[] args) throws Exception {\n int numLinesToSkip = 0;\n String delimiter = \",\"; //这是csv文件中的分隔符\n RecordReader recordReader = new CSVRecordReader(numLinesToSkip,delimiter);\n recordReader.initialize(new FileSplit(new ClassPathResource(\"dataSet20170119.csv\").getFile()));\n\n //Second: the RecordReaderDataSetIterator handles conversion to DataSet objects, ready for use in neural network\n\n /**\n * 这是标签(类别)所在列的序号\n */\n int labelIndex = 0; //5 values in each row of the iris.txt CSV: 4 input features followed by an integer label (class) index. Labels are the 5th value (index 4) in each row\n //类别的总数\n int numClasses = 2; //3 classes (types of iris flowers) in the iris data set. Classes have integer values 0, 1 or 2\n\n //一次读取多少条数据。当数据量较大时可以分几次读取,每次读取后就训练。这就是随机梯度下降\n int batchSize = 2000; //Iris data set: 150 examples total. We are loading all of them into one DataSet (not recommended for large data sets)\n\n DataSetIterator iterator = new RecordReaderDataSetIterator(recordReader,batchSize,labelIndex,numClasses);\n //因为我在这里写的2000是总的数据量大小,一次读完,所以一次next就完了。如果分批的话要几次next\n DataSet allData = iterator.next();\n// allData.\n allData.shuffle();\n SplitTestAndTrain testAndTrain = allData.splitTestAndTrain(0.8); //Use 65% of data for training\n\n DataSet trainingData = testAndTrain.getTrain();\n DataSet testData = testAndTrain.getTest();\n //We need to normalize our data. We'll use NormalizeStandardize (which gives us mean 0, unit variance):\n //数据归一化的步骤,非常重要,不做可能会导致梯度中的几个无法收敛\n DataNormalization normalizer = new NormalizerStandardize();\n normalizer.fit(trainingData); //Collect the statistics (mean/stdev) from the training data. This does not modify the input data\n normalizer.transform(trainingData); //Apply normalization to the training data\n normalizer.transform(testData); //Apply normalization to the test data. This is using statistics calculated from the *training* set\n\n\n final int numInputs = 9202;\n int outputNum = 2;\n int iterations = 1000;\n long seed = 142;\n int numEpochs = 50; // number of epochs to perform\n\n log.info(\"Build model....\");\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)\n .iterations(iterations)\n .activation(Activation.SIGMOID)\n .weightInit(WeightInit.ZERO) //参数初始化的方法,全部置零\n .learningRate(1e-3) //经过测试,这里的学习率在1e-3比较合适\n .regularization(true).l2(5e-5) //正则化项,防止参数过多导致过拟合。2阶范数乘一个比率\n .list()\n\n .layer(0, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(Activation.SIGMOID)\n .nIn(numInputs).nOut(outputNum).build())\n .backprop(true).pretrain(false)\n .build();\n\n //run the model\n MultiLayerNetwork model = new MultiLayerNetwork(conf);\n model.init();\n model.setListeners(new ScoreIterationListener(100));\n\n\n log.info(\"Train model....\");\n for( int i=0; i<numEpochs; i++ ){\n log.info(\"Epoch \" + i);\n model.fit(trainingData);\n\n //每个epoch结束后立马观察模型估计的效果,方便及早停止\n Evaluation eval = new Evaluation(numClasses);\n INDArray output = model.output(testData.getFeatureMatrix());\n eval.eval(testData.getLabels(), output);\n log.info(eval.stats());\n }\n\n }", "public static int fastClassify(Model M, int[][] x){\n //dont call other classes\n\t //look out for terms that you can take out\n//\t int d =0;\n//\t double joint;\n//\t double t= 1.0;\n//\t\tdouble high;\n//\t\t//Double tot1;\n//\t\tdouble higher;\n//\t\tdouble tot =1.0;\n//\t\tdouble tot1= 1.0;\n//\t int digit =0;\n//\t for(int i=0; i<x.length; i++){\n//\t\tfor(int j=0;j<x[i].length; j++){\n//\n//\t\t//probability at 0;\n//\t\t\ttot*=conditionalProbabilityXijgD(M,i,j,x[i][j],0); \n//\t\t \n//\t\t high = M.getPD(0)*tot;\n//\t\t\twhile(d<10){\n//\t\t\t\ttot1*=conditionalProbabilityXijgD(M,i,j,x[i][j],d); \n//\t\t\t\thigher = M.getPD(d)*tot1;\n//\t\t\t\t\n//\t\t\t\tif(high <higher){\n//\t\t\t\t\thigh = higher;\n//\t\t\t\t\tdigit =d;\n//\t\t\t\t}\n//\t\t\t\td++;\n//\t\t\t}\n//\t\t \n//\t }\n//\t \n//\t }\n\t double high=0.0;\n\t int digit =0;\n\t int i=0;\n\t while(i<10){\n\t\t double tot =jointProbabilityXD(M,x,i);\n\t \t\n\t if(high<tot){\n\t\t high=tot;\n\t \t\tdigit =i; \n\t \t}\n\t\t i++;\n\t \t//System.out.println(0.988809344056389 < 0.011080326918292818);\n\t \n\t\t// System.out.println(tot);\n\t }\n\t return digit;\n\t \n \n}", "public void build() throws ClusException, IOException {\n m_List = getRun().getDataSet(ClusRun.TRAINSET).getData(); // m_Data;\n }", "@RecentlyNonNull\n/* */ public TextClassificationContext build() {\n/* 105 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "abstract void train(Matrix features, Matrix labels);", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n FilteredClassifier filteredClassifier0 = new FilteredClassifier();\n try { \n Evaluation.evaluateModel((Classifier) filteredClassifier0, testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -g\n // \\tOnly outputs the graph representation of the classifier.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.meta.FilteredClassifier:\n // \n // -F <filter specification>\n // \\tFull class name of filter to use, followed\n // \\tby filter options.\n // \\teg: \\\"weka.filters.unsupervised.attribute.Remove -V -R 1,2\\\"\n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n // -W\n // \\tFull name of base classifier.\n // \\t(default: weka.classifiers.trees.J48)\n // \n // Options specific to classifier weka.classifiers.trees.J48:\n // \n // -U\n // \\tUse unpruned tree.\n // -O\n // \\tDo not collapse tree.\n // -C <pruning confidence>\n // \\tSet confidence threshold for pruning.\n // \\t(default 0.25)\n // -M <minimum number of instances>\n // \\tSet minimum number of instances per leaf.\n // \\t(default 2)\n // -R\n // \\tUse reduced error pruning.\n // -N <number of folds>\n // \\tSet number of folds for reduced error\n // \\tpruning. One fold is used as pruning set.\n // \\t(default 3)\n // -B\n // \\tUse binary splits only.\n // -S\n // \\tDon't perform subtree raising.\n // -L\n // \\tDo not clean up after the tree has been built.\n // -A\n // \\tLaplace smoothing for predicted probabilities.\n // -J\n // \\tDo not use MDL correction for info gain on numeric attributes.\n // -Q <seed>\n // \\tSeed for random data shuffling (default 1).\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public double classifyAll(String testDataFolder)\n\t{\n\t\tFile folder = new File(testDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tdouble accuracy = 0.0;\n\t\tint correct_classifications = 0;\n\t\tint testdata = 0;\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\tString doc = \"\";\n\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tint count = 0;\n\t\t\t\t\tint actual_count = 0;\n\t\t\t\t\tint class_=0;\n\t\t\t\t\tint[] correct = new int[numClasses];\n\t\t\t\t\tint[] test = new int[numClasses];\n\t\t\t\t\tString line = \"\";\n\t\t\t\t\tint tabIndex=0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\ttestdata++;\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\tString type = line.substring(0, tabIndex);\n\t\t\t\t\t\tString msg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){class_ = 0;}\n\t\t\t\t\t\telse{class_ = 1;}\n\t\t\t\t\t\ttest[class_]++;\n\t\t\t\t\t\tactual_count = actual_count + class_;\n\t\t\t\t\t\tint label = classify(msg);\n\t\t\t\t\t\tcount = count + label;\n\t\t\t\t\t\t//System.out.println(label+\"/\"+class_+\" \"+count);\n\t\t\t\t\t\tif(label-class_==0){\n\t\t\t\t\t\t\tcorrect_classifications++;\n\t\t\t\t\t\t\tcorrect[class_]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tint label = classify(doc);\n\t\t\t\tif(label - class_==0){correct[class_]++;}\n\t\t\t} \n\t\t\tcatch (IOException e){e.printStackTrace();}\n\t\t}\n\t\taccuracy = Math.round(correct_classifications * 1000.0 / testdata)/1000.0;\n\t\tSystem.out.println(\"Accuracy: \"+accuracy);\n\t\treturn accuracy;\n\t}", "@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}", "public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}", "public ConstructedObjectInput(AppContext c,Class<T> target){\n \tthis(c,target,c.getClassMap(target));\n }", "public static void writeAsOrange(InputData data, String fileName) throws IOException {\n Logger.getLogger(\"at.tuwien.ifs.somtoolbox\").info(\"Writing input data as Orange file to '\" + fileName + \"'.\");\n PrintWriter writer = FileUtils.openFileForWriting(\"Orange data\", fileName, false);\n\n TemplateVector tv = data.templateVector();\n if (tv == null) {\n Logger.getLogger(\"at.tuwien.ifs.somtoolbox\").info(\"Template vector not loaded - creating a generic one.\");\n tv = new SOMLibTemplateVector(data.numVectors(), data.dim());\n }\n SOMLibClassInformation classInformation = data.classInformation();\n boolean haveClassInfo = classInformation != null;\n\n /* - first the tab-separated names of the features\n - then the types of the features\n - and then the indicator whether a feature is the class assignment\n e.g. for IRIS:\n sepallength sepalwidth petallength petalwidth class\n continuous continuous continuous continuous discrete\n class\n */\n\n // row 1: tab-separated label names\n writer.print(StringUtils.toString(tv.getLabels(), \"\", \"\", \"\\t\"));\n if (haveClassInfo) { // and optionally the class\n writer.print(\"\\tclass\");\n }\n writer.println();\n\n // row 2: data types\n for (int i = 0; i < tv.dim(); i++) {\n writer.print(\"continuous\"); // all are continuous\n if (i + 1 < tv.dim()) {\n writer.print(\"\\t\");\n }\n }\n if (haveClassInfo) {\n writer.print(\"\\tdiscrete\"); // just the class is discrete\n }\n writer.println();\n\n // row 3: indicating options to the attributes\n writer.print(StringUtils.repeatString(tv.dim() - 1, \"\\t\"));\n if (haveClassInfo) {\n writer.print(\"\\tclass\"); // the class attribute\n }\n writer.println();\n\n // now the data, tab separated, and optionally with the class assignment\n\n // now all data, appended by the class name\n for (int i = 0; i < data.numVectors(); i++) {\n for (int j = 0; j < data.dim(); j++) {\n writer.print(data.getValue(i, j));\n if (j + 1 < data.dim()) {\n writer.print(\"\\t\");\n }\n }\n if (haveClassInfo) {\n writer.print(\"\\t\" + classInformation.getClassName(i));\n }\n writer.println();\n }\n writer.close();\n }", "private List<Bin> discretizeRow(List<String> rawData) {\n\t\tList<Bin> binForThisAttr = new ArrayList<>();\n\t\tList<Double> procData = new ArrayList<>();\n\t\t// are we working with numbers or actual Strings\n\t\t// convert strings into Double, add to data attributes\n\t\tfor (int i = 0; i < rawData.size(); i++) {\n\t\t\tString raw = rawData.get(i);\n\t\t\t// check current attribute value for String type or floating point type\n\t\t\tif ((rawData.get(i).chars().allMatch(Character::isDigit) || rawData.get(i).contains(\".\"))) {\n\t\t\t\t//convert number strings into Doubles, or strings into unique Doubles\n\t\t\t\tprocData.add(Double.valueOf(raw));\n\t\t\t} else {\n\t\t\t\t// convert Strings into unique integers, add to data attributes\n\t\t\t\tprocData.add((double) raw.hashCode());\n\t\t\t} // end if-else\n\t\t}\n\n\t\t// sort data into ascending list of values\n\t\tCollections.sort(procData);\n\n\t\t// generate bins based on Naive Estimator Process\n\t\tfor (int i = 0; i < procData.size(); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\t// append bin with lowest possible value\n\t\t\t\tbinForThisAttr.add(new Bin(Double.MIN_VALUE, procData.get(i), i));\n\t\t\t\t// binForThisAttr.get(binForT i = 0; i hisAttr.size() - 1).incrementFreq();\n\t\t\t} else if (i == procData.size() - 1) {\n\t\t\t\t// append bin with highest possible value\n\t\t\t\tbinForThisAttr.add(new Bin(procData.get(i), Double.MAX_VALUE, i));\n\t\t\t\t// binForThisAttr.get(binForThisAttr.size() - 1).incrementFreq();\n\t\t\t} else {\n\t\t\t\t// estimate the range of bin based on nearby points of data\n\t\t\t\tdouble lowBound = (procData.get(i - 1) + procData.get(i)) / 2;\n\t\t\t\tdouble highBound = (procData.get(i) + procData.get(i + 1)) / 2;\n\t\t\t\tbinForThisAttr.add(new Bin(lowBound, highBound, i));\n\t\t\t\t// binForThisAttr.get(binForThisAttr.size() - 1).incrementFreq();\n\t\t\t} // end if-else statement\n\t\t} // end for\n\t\treturn binForThisAttr;\n\t}" ]
[ "0.70181465", "0.659205", "0.6389859", "0.6239377", "0.61966723", "0.5941471", "0.57358193", "0.5596247", "0.5580028", "0.55186665", "0.5491505", "0.5419674", "0.54111576", "0.53776443", "0.5286592", "0.5285821", "0.52788794", "0.526152", "0.52452314", "0.5187351", "0.51756626", "0.517006", "0.516525", "0.51037574", "0.5087081", "0.5081844", "0.5072272", "0.50415045", "0.5022244", "0.50048715", "0.5003366", "0.49786225", "0.49583834", "0.49572858", "0.4932497", "0.49035785", "0.48584166", "0.48390597", "0.48202974", "0.48130944", "0.4803252", "0.47895193", "0.47862232", "0.47683176", "0.4754397", "0.47526842", "0.47523105", "0.47517076", "0.47472367", "0.4742801", "0.4740599", "0.47221583", "0.46768704", "0.46593055", "0.4653948", "0.46527645", "0.46452212", "0.4622645", "0.4618128", "0.4608106", "0.46078473", "0.45991066", "0.4596458", "0.4594787", "0.45608327", "0.45448664", "0.4544392", "0.45400923", "0.45378938", "0.4532409", "0.45314327", "0.45276752", "0.45271447", "0.45224208", "0.45198748", "0.45136374", "0.45102945", "0.45072353", "0.45050046", "0.4490655", "0.44906193", "0.4483269", "0.44742092", "0.44577903", "0.44576097", "0.4456378", "0.44530237", "0.44525647", "0.44521067", "0.44476995", "0.4446735", "0.44296613", "0.44195896", "0.441676", "0.44132414", "0.4409047", "0.44073144", "0.44043884", "0.4394365", "0.43880725" ]
0.8239396
0
Tests the accuracy of the classifier on the given testData
public abstract double test(ClassifierData<U> testData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test(Corpus testData) {\n\t\t// cross validation\n\t\ttestBigramWithNB(testData);\n\t\ttestUnigramWithNB(testData);\n\t}", "public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) {\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tfor (ArrayList<String> testItem : testData) {\r\n\t\t\tString str=getFeatureLabel(dataset, testItem, k);\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tif (testItem.get((testData.get(0).size()-1)).equals(str)) {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类正确\");\r\n\t\t\t\tcount ++;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类错误\");\r\n\t\t\t}\r\n\t\t\tindex ++;\r\n\t\t}\r\n\t\tSystem.out.println(\"正确率为\"+count*1.0/testData.size());\r\n\t}", "public double classifyAll(String testDataFolder)\n\t{\n\t\tFile folder = new File(testDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tdouble accuracy = 0.0;\n\t\tint correct_classifications = 0;\n\t\tint testdata = 0;\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\tString doc = \"\";\n\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tint count = 0;\n\t\t\t\t\tint actual_count = 0;\n\t\t\t\t\tint class_=0;\n\t\t\t\t\tint[] correct = new int[numClasses];\n\t\t\t\t\tint[] test = new int[numClasses];\n\t\t\t\t\tString line = \"\";\n\t\t\t\t\tint tabIndex=0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\ttestdata++;\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\tString type = line.substring(0, tabIndex);\n\t\t\t\t\t\tString msg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){class_ = 0;}\n\t\t\t\t\t\telse{class_ = 1;}\n\t\t\t\t\t\ttest[class_]++;\n\t\t\t\t\t\tactual_count = actual_count + class_;\n\t\t\t\t\t\tint label = classify(msg);\n\t\t\t\t\t\tcount = count + label;\n\t\t\t\t\t\t//System.out.println(label+\"/\"+class_+\" \"+count);\n\t\t\t\t\t\tif(label-class_==0){\n\t\t\t\t\t\t\tcorrect_classifications++;\n\t\t\t\t\t\t\tcorrect[class_]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tint label = classify(doc);\n\t\t\t\tif(label - class_==0){correct[class_]++;}\n\t\t\t} \n\t\t\tcatch (IOException e){e.printStackTrace();}\n\t\t}\n\t\taccuracy = Math.round(correct_classifications * 1000.0 / testdata)/1000.0;\n\t\tSystem.out.println(\"Accuracy: \"+accuracy);\n\t\treturn accuracy;\n\t}", "public static double predictionAccuracy(List<CSVAttribute[]> ulTestData, List<CSVAttribute[]> validationData,\n DecisionTreeNode tree, int labelAttribute){\n\n List<CSVAttribute[]> predictedTestData = TreeModel.predict(ulTestData, tree, labelAttribute);\n\n int correct = 0;\n for (int j = 0; j < predictedTestData.size(); j++) {\n if (predictedTestData.get(j)[labelAttribute].equals(validationData.get(j)[labelAttribute])) correct++;\n }\n\n return (double) correct / (double) predictedTestData.size();\n }", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "@Test\r\n\tpublic void classifyTest(){\r\n\t\tClassification[] expectedClass = {Classification.First,Classification.UpperSecond,Classification.LowerSecond,Classification.Third,Classification.Fail};\r\n\t\tint[] pointGrades = {3,6,10,13,18};\r\n\t\tfor(int i=0;i<pointGrades.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(expectedClass[i],new PointGrade(pointGrades[i]).classify());\r\n\t\t}\r\n\t}", "private void test() {\r\n \ttry {\r\n\t\t\ttestWriter.write(\"Testing started...\");\r\n\t\t\r\n\t\t\tpredictions = new HashMap<>();\r\n \trightAnswers = new HashMap<>();\r\n\r\n\r\n \t// Get results and check them\r\n \tEvaluation eval = new Evaluation(numLabels);\r\n \tfinalTestIterator.reset();\r\n\r\n \tint metaDataCounter = 0;\r\n \tint addrCounter = 0;\r\n\r\n \twhile(finalTestIterator.hasNext()) {\r\n \t// If iterator has next dataset\r\n \tfinalTestData = finalTestIterator.next();\r\n \t// Get meta-data from this dataset\r\n\r\n \t@SuppressWarnings(\"rawtypes\")\r\n \tList<?> exampleMetaData = finalTestData.getExampleMetaData();\r\n \tIterator<?> exampleMetaDataIterator = exampleMetaData.iterator();\r\n \ttestWriter.write(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n \tSystem.out.println(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n\r\n \t// Normalize data\r\n \tnormalizer.fit(finalTestData);\r\n\r\n \t// Count processed images\r\n \tnumProcessed = (metaDataCounter + 1) * batchSizeTesting;\r\n \tloaded.setText(\"Loaded and processed: \" + numProcessed + \" pictures\");\r\n\r\n \tINDArray features = finalTestData.getFeatures();\r\n \tINDArray labels = finalTestData.getLabels();\r\n \tSystem.out.println(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \t// Get right answers of NN for every input object\r\n \tint[][] rightLabels = labels.toIntMatrix();\r\n \tfor (int i = 0; i < rightLabels.length; i++) {\r\n \tRecordMetaDataURI metaDataUri = (RecordMetaDataURI) exampleMetaDataIterator.next();\r\n \t// Print address of image\r\n \tSystem.out.println(metaDataUri.getLocation());\r\n \tfor (int j = 0; j < rightLabels[i].length; j++) {\r\n \tif(rightLabels[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=right class label\r\n \trightAnswers.put(metaDataUri.getLocation(), j);\r\n \tthis.addresses.add(metaDataUri.getLocation());\r\n \t}\r\n \t}\r\n \t}\r\n \tSystem.out.println(\"\\nRight answers:\");\r\n \ttestWriter.write(\"\\nRight answers:\");\r\n \t// Print right answers\r\n \tfor(Map.Entry<String, Integer> answer : predictions.entrySet()){\r\n \t\ttestWriter.write(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \tSystem.out.printf(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \t}\r\n\r\n \t// Evaluate on the test data\r\n \tINDArray predicted = vgg16Transfer.outputSingle(features);\r\n \tint predFoundCounter = 0;\r\n \tSystem.out.println(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \t// Get predictions of NN for every input object\r\n \tint[][] labelsPredicted = predicted.toIntMatrix();\r\n \tfor (int i = 0; i < labelsPredicted.length; i++) {\r\n \tfor (int j = 0; j < labelsPredicted[i].length; j++) {\r\n \tpredFoundCounter++;\r\n \tif(labelsPredicted[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=predicted class label\r\n \tpredFoundCounter = 0;\r\n \tthis.predictions.put(this.addresses.get(addrCounter), j);\r\n \t}\r\n \telse {\r\n \tif (predFoundCounter == 3) {\r\n \t// To fix bug when searching positive predictions\r\n \tthis.predictions.put(this.addresses.get(addrCounter), 2);\r\n \t}\r\n \t}\r\n \t}\r\n \taddrCounter++;\r\n \t}\r\n \tSystem.out.println(\"\\nPredicted:\");\r\n \ttestWriter.write(\"\\nPredicted:\");\r\n \t// Print predictions\r\n \tfor(Map.Entry<String, Integer> pred : rightAnswers.entrySet()){\r\n \tSystem.out.printf(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString());\r\n \ttestWriter.write(String.format(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString()));\r\n \t}\r\n \tmetaDataCounter++;\r\n\r\n \teval.eval(labels, predicted);\r\n \t}\r\n\r\n \tSystem.out.println(\"\\n\\n Cheack loaded model on test data...\");\r\n \tSystem.out.println(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \tSystem.out.println(eval.stats());\r\n \tSystem.out.println(eval.confusionToString());\r\n \ttestWriter.write(\"\\n\\n Cheack loaded model on test data...\");\r\n \ttestWriter.write(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \ttestWriter.write(eval.stats());\r\n \ttestWriter.write(eval.confusionToString());\r\n\r\n \t// Save test rates\r\n \tthis.f1_score = eval.f1();\r\n \tthis.recall_score = eval.recall();\r\n \tthis.accuracy_score = eval.accuracy();\r\n \tthis.precision_score = eval.precision();\r\n \tthis.falseNegativeRate_score = eval.falseNegativeRate();\r\n \tthis.falsePositiveRate_score = eval.falsePositiveRate();\r\n\r\n \tthis.f1.setText(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \tthis.recall.setText(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \tthis.accuracy.setText(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \tthis.precision.setText(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \tthis.falseNegativeRate.setText(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \tthis.falsePositiveRate.setText(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n \r\n \ttestWriter.write(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \ttestWriter.write(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \ttestWriter.write(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \ttestWriter.write(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \ttestWriter.write(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \ttestWriter.write(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n\r\n \tshowBarChart();\r\n \t} catch (IOException e) {\r\n \t\tSystem.err.println(\"Error while writing to log file\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "@Override\n public double classifyInstance(Instance testdata) {\n // get a copy of testdata Instance with only the matched attributes\n Instance ntest = this.mm.getMatchedTestInstance(testdata);\n\n double ret = 0.0;\n try {\n ret = this.classifier.classifyInstance(ntest);\n }\n catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n\n return ret;\n }", "public double computeAccuracy(Node node,\n\t\t\tArrayList<ArrayList<String>> dataSet) {\n\t\tdouble accuracy = 0;\n\t\tint positiveExamples = 0;\n\t\tArrayList<String> attributes = dataSet.get(0);\n\n\t\tfor (ArrayList<String> dataRow : dataSet.subList(1, dataSet.size())) {\n\t\t\tboolean verifyData = verifyTreeRow(node, dataRow, attributes);\n\t\t\tif (verifyData) {\n\t\t\t\tpositiveExamples++;\n\t\t\t}\n\t\t}\n\t\taccuracy = (((double) positiveExamples / (double) (dataSet.size() - 1)) * 100.00);\n\t\treturn accuracy;\n\t}", "public void doValidation(int currentRound)\n {\n getData(currentRound);\n// System.out.println(\"training unterminated ones\");\n kMeans.setItems(trainingData.get(0));\n kMeans.k=k1;\n kMeans.init();\n List<Cluster> unterminatedClusters=kMeans.doCluster();\n for (int i=0;i<unterminatedClusters.size();i++)\n {\n unterminatedClusters.get(i).label=0;\n }\n \n// System.out.println(\"training terminated ones\");\n kMeans.setItems(trainingData.get(1));\n kMeans.k=k2;\n kMeans.init();\n List<Cluster> terminatedClusters=kMeans.doCluster();\n for (int i=0;i<terminatedClusters.size();i++)\n {\n terminatedClusters.get(i).label=1;\n }\n \n List<Cluster> clusters=new ArrayList<Cluster>();\n clusters.addAll(unterminatedClusters);\n clusters.addAll(terminatedClusters);\n kMeans.setClusters(clusters);\n int[] corrects=new int[2];\n int[] counts=new int[2];\n for (int i=0;i<2;i++)\n {\n corrects[i]=0;\n counts[i]=0;\n }\n for (Item item:testData)\n {\n int label=kMeans.getNearestCluster(item).label;\n counts[label]++;\n if (label==item.type)\n {\n corrects[item.type]++;\n }\n }\n correctness+=corrects[1]*1.0/counts[1];\n correctCount+=corrects[1];\n// for (int i=0;i<2;i++)\n// System.out.println(\"for type \"+i+\": \" +corrects[i]+\" correct out of \"+counts[i]+\" in total (\"+corrects[i]*1.0/counts[i]+\")\");\n }", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n FilteredClassifier filteredClassifier0 = new FilteredClassifier();\n try { \n Evaluation.evaluateModel((Classifier) filteredClassifier0, testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -g\n // \\tOnly outputs the graph representation of the classifier.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.meta.FilteredClassifier:\n // \n // -F <filter specification>\n // \\tFull class name of filter to use, followed\n // \\tby filter options.\n // \\teg: \\\"weka.filters.unsupervised.attribute.Remove -V -R 1,2\\\"\n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n // -W\n // \\tFull name of base classifier.\n // \\t(default: weka.classifiers.trees.J48)\n // \n // Options specific to classifier weka.classifiers.trees.J48:\n // \n // -U\n // \\tUse unpruned tree.\n // -O\n // \\tDo not collapse tree.\n // -C <pruning confidence>\n // \\tSet confidence threshold for pruning.\n // \\t(default 0.25)\n // -M <minimum number of instances>\n // \\tSet minimum number of instances per leaf.\n // \\t(default 2)\n // -R\n // \\tUse reduced error pruning.\n // -N <number of folds>\n // \\tSet number of folds for reduced error\n // \\tpruning. One fold is used as pruning set.\n // \\t(default 3)\n // -B\n // \\tUse binary splits only.\n // -S\n // \\tDon't perform subtree raising.\n // -L\n // \\tDo not clean up after the tree has been built.\n // -A\n // \\tLaplace smoothing for predicted probabilities.\n // -J\n // \\tDo not use MDL correction for info gain on numeric attributes.\n // -Q <seed>\n // \\tSeed for random data shuffling (default 1).\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "private double crossValidate(Instances data) throws Exception {\r\n\t\tbuildClassifier(data);\r\n\r\n\t\tdouble correct = 0;\r\n\t\tfor (int i = 0; i < data.numInstances(); ++i) {\r\n\t\t\tif (classifyInstance(i) == data.get(i).classValue()) {\r\n\t\t\t\t++correct;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn correct / data.numInstances();\r\n\t}", "protected void calculateAccuracyOfTrainFile( double threshold )\n\t{\n\t\tint result = 0, n = this.class_data.attribute_data.size();\n\t\tdouble sum, total = 0;\n\t\tAttribute temp;\n\n\t\tfor ( int i = 0; i < n; i++ )\n\t\t{\n\t\t\tsum = 0;\n\t\t\tfor ( int j = 0; j < this.attribute_list.size(); j++ )\n\t\t\t{\n\t\t\t\ttemp = this.attribute_list.get( j );\n\t\t\t\tsum += temp.attribute_data.get( i ) * temp.getWeigth();\n\t\t\t}\n\n\t\t\tif ( sum < threshold )\n\t\t\t\tresult = 0;\n\t\t\telse\n\t\t\t\tresult = 1;\n\n\t\t\tif ( result == this.class_data.attribute_data.get( i ) )\n\t\t\t\ttotal++;\n\t\t}\n\n\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\tSystem.out.println( \"Accuracy of training file ( \" + n + \" instance ) = \" + df.format( (total * 100.00 / n) ) );\n\t}", "protected void calculateAccuracyOfTestFile( double threshold, String test_file_name ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile test_file = new File( test_file_name );\n\t\t\tScanner in;\n\t\t\tString[] tokens;\n\t\t\tint total_tokens = 0, total_matched = 0, n, result;\n\t\t\tdouble sum;\n\t\t\tAttribute temp;\n\n\t\t\tin = new Scanner( test_file );\n\t\t\tin.nextLine();\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tn = tokens.length;\n\t\t\t\tif ( n > 1 )\n\t\t\t\t{\n\t\t\t\t\ttemp = this.attribute_list.get( 0 );\n\t\t\t\t\tsum = temp.getWeigth();\n\n\t\t\t\t\tfor ( int i = 1; i < n; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp = this.attribute_list.get( i );\n\t\t\t\t\t\tsum += Integer.parseInt( tokens[ i - 1 ] ) * temp.getWeigth();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( sum < threshold )\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tresult = 1;\n\n\t\t\t\t\tif ( Integer.parseInt( tokens[ n - 1 ] ) == result )\n\t\t\t\t\t\ttotal_matched++;\n\n\t\t\t\t\ttotal_tokens++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\t\tSystem.out.println( \"Accuracy of test data ( \" + total_tokens + \" instances ) = \" + df.format( total_matched * 100.00 / total_tokens ) );\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find test file - \" + test_file_name );\n\t\t\tthrow e;\n\t\t}\n\t}", "public void test(List<String> modelFiles, String testFile, String prpFile) {\n/* 1014 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1015 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1018 */ int nFold = modelFiles.size();\n/* */ \n/* 1020 */ List<RankList> samples = readInput(testFile);\n/* */ \n/* 1022 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1023 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1024 */ System.out.println(\"[Done.]\");\n/* 1025 */ double rankScore = 0.0D;\n/* 1026 */ List<String> ids = new ArrayList<>();\n/* 1027 */ List<Double> scores = new ArrayList<>();\n/* 1028 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1030 */ List<RankList> test = testData.get(f);\n/* 1031 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1032 */ int[] features = ranker.getFeatures();\n/* 1033 */ if (normalize) {\n/* 1034 */ normalize(test, features);\n/* */ }\n/* 1036 */ for (RankList aTest : test) {\n/* 1037 */ RankList l = ranker.rank(aTest);\n/* 1038 */ double score = this.testScorer.score(l);\n/* 1039 */ ids.add(l.getID());\n/* 1040 */ scores.add(Double.valueOf(score));\n/* 1041 */ rankScore += score;\n/* */ } \n/* */ } \n/* 1044 */ rankScore /= ids.size();\n/* 1045 */ ids.add(\"all\");\n/* 1046 */ scores.add(Double.valueOf(rankScore));\n/* 1047 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ \n/* 1049 */ if (!prpFile.isEmpty()) {\n/* */ \n/* 1051 */ savePerRankListPerformanceFile(ids, scores, prpFile);\n/* 1052 */ System.out.println(\"Per-ranked list performance saved to: \" + prpFile);\n/* */ } \n/* */ }", "private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }", "@Override\n public int[] test(DataSet test_set) {\n // check\n Example first = test_set.getExample(0);\n if (!(first.get(\"INPUT\").getValue() instanceof Double[])) {\n throw new RuntimeException(\"NeuralNetworkLearner inputs must be passed as a Double[] in the \\\"INPUT\\\" attribute\");\n }\n if (!(first.getOutput() instanceof Double[])) {\n throw new RuntimeException(\"NeuralNetworkLearner output must be set to a Double[]\");\n }\n // test\n int[] results = new int[]{0, 0};\n for (Example e : test_set) {\n System.out.println(Arrays.toString(this.predict(e)));\n System.out.println(Arrays.toString((Double[]) e.getOutput()));\n if (Arrays.equals((Double[]) e.getOutput(), this.predict(e))) {\n results[0]++;\n } else {\n results[1]++;\n }\n }\n // return\n return results;\n }", "public void dmall() {\n \r\n BufferedReader datafile = readDataFile(\"Work//weka-malware.arff\");\r\n \r\n Instances data = null;\r\n\t\ttry {\r\n\t\t\tdata = new Instances(datafile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n data.setClassIndex(data.numAttributes() - 1);\r\n \r\n // Choose a type of validation split\r\n Instances[][] split = crossValidationSplit(data, 10);\r\n \r\n // Separate split into training and testing arrays\r\n Instances[] trainingSplits = split[0];\r\n Instances[] testingSplits = split[1];\r\n \r\n // Choose a set of classifiers\r\n Classifier[] models = { new J48(),\r\n new DecisionTable(),\r\n new DecisionStump(),\r\n new BayesianLogisticRegression() };\r\n \r\n // Run for each classifier model\r\n//for(int j = 0; j < models.length; j++) {\r\n int j = 0;\r\n \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\tcase \"J48\":\r\n\t\t\t\tj = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionTable\":\r\n\t\t\t\tj = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionStump\":\r\n\t\t\t\tj = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\tj = 3;\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\r\n\r\n // Collect every group of predictions for current model in a FastVector\r\n FastVector predictions = new FastVector();\r\n \r\n // For each training-testing split pair, train and test the classifier\r\n for(int i = 0; i < trainingSplits.length; i++) {\r\n Evaluation validation = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\r\n\t\t\t\t} catch (Exception 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 predictions.appendElements(validation.predictions());\r\n \r\n // Uncomment to see the summary for each training-testing pair.\r\n// textArea.append(models[j].toString() + \"\\n\");\r\n textArea.setText(models[j].toString() + \"\\n\");\r\n// System.out.println(models[j].toString());\r\n }\r\n \r\n // Calculate overall accuracy of current classifier on all splits\r\n double accuracy = calculateAccuracy(predictions);\r\n \r\n // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//}\r\n \r\n\t}", "public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }", "private static String test(double[][] test_data) {\n\n\t\t// Holds score for each word\n\t\tHashMap<Integer, Integer> scores = new HashMap<Integer, Integer>();\n\n\t\t// Euclidean distances hashamp for <Word, Distances> for each row\n\t\t// HashMap<String, double[]> distances = new HashMap<String,\n\t\t// double[]>();\n\t\tdouble[][] distances = new double[training_data.size()][test_data[0].length];\n\n\t\t// Just class names\n\t\tString[] classnames = training_data.keySet().toArray(new String[1]);\n\t\t// names = classnames;\n\t\t// System.out.println(Arrays.toString(classnames));\n\n\t\t// Initialize scores for each word to be 0\n\t\tfor (int i = 0; i < classnames.length; i++) {\n\t\t\tscores.put(i, 0);\n\t\t}\n\n\t\t// Convert MxN test data matrix to NxM for ease of use\n\t\ttest_data = Data.rotate(test_data);\n\n\t\t// Calculate scores for each row and populate the distances matrix\n\t\tfor (int i = 0; i < test_data.length; i++) {\n\t\t\tdouble min = Double.MAX_VALUE;\n\t\t\tint min_index = 0;\n\t\t\tint c = 0;\n\t\t\tfor (String name : training_data.keySet()) {\n\t\t\t\tdouble[][] train = training_data.get(name);\n\t\t\t\ttrain = Data.rotate(train);\n\t\t\t\t// System.out.println(\"Testing \" + name);\n\t\t\t\t// System.out.println(\"Calculating euc distance between: \" +\n\t\t\t\t// Arrays.toString(test_data[i]));\n\t\t\t\t// System.out.println(\" and: \" +\n\t\t\t\t// Arrays.toString(train[i]));\n\t\t\t\tdistances[c][i] = Data.calcEuclideanDistance(test_data[i],\n\t\t\t\t\t\ttrain[i]);\n\t\t\t\t// System.out.println(\"Distance: \" + distances[c][i]);\n\t\t\t\t// new Scanner(System.in).nextLine();\n\t\t\t\tif (min > distances[c][i]) {\n\t\t\t\t\tmin = distances[c][i];\n\t\t\t\t\tmin_index = c;\n\t\t\t\t}\n\t\t\t\tc++;\n\t\t\t}\n\t\t\t// System.out.print(\"\\n\"+classnames[min_index] + \" won with \" +\n\t\t\t// min);\n\t\t\tscores.put(min_index, scores.get(min_index) + 1);\n\t\t}\n\n\t\t// for (int i =0; i < distances.length; i++) {\n\t\t// for (int j = 0; j < distances[0].length; j++) {\n\t\t// System.out.print(distances[i][j] + \" \");\n\t\t// }\n\t\t// System.out.print(\"\\n\");\n\t\t// }\n\n\t\t// Word with the highest score wins\n\t\tdouble max = Double.MIN_VALUE;\n\t\tint index = 0;\n\t\tfor (Integer i : scores.keySet()) {\n\t\t\t// System.out.print(scores.get(i) + \",\");\n\t\t\tif (max < scores.get(i)) {\n\t\t\t\tmax = scores.get(i);\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tconfusion_matrix.add(scores);\n\t\treturn classnames[index];\n\t}", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "@Override\n\tpublic ConfusionMatrix calculate_confusion_matrix(Instance[] testData) {\n\n\t\t// Count the true positives, true negatives, false positives, false negatives\n\t\tint TP, FP, FN, TN;\n\t\tTP = 0;\n\t\tFP = 0;\n\t\tFN = 0;\n\t\tTN = 0;\n\n\t\tfor (Instance ins : testData) {\n\t\t\t// if True SPORTS\n\t\t\tif (ins.label == Label.SPORTS) {\n\t\t\t\t// if TP\n\t\t\t\tif (classify(ins.words).label == Label.SPORTS) {\n\t\t\t\t\tTP += 1;\n\t\t\t\t}\n\t\t\t\t// else FN\n\t\t\t\telse {\n\t\t\t\t\tFN += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if True BUSINESS\n\t\t\telse {\n\t\t\t\t// if TN\n\t\t\t\tif (classify(ins.words).label == Label.BUSINESS) {\n\t\t\t\t\tTN += 1;\n\t\t\t\t}\n\t\t\t\t// else FP\n\t\t\t\telse {\n\t\t\t\t\tFP += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfusionMatrix(TP, FP, FN, TN);\n\t}", "@Test\n public void testTrain() {\n System.out.println(\"train\");\n TokenizedLine tokenizedLine = null;\n ArrayList<Words> expResult = null;\n ArrayList<Words> result = Training.train(tokenizedLine);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public static void main(String[] args) {\n String pathToTrain = \"train.csv\";\n String pathToTest = \"test.csv\";\n try {\n ArrayList<String> trainSentences = readCSV(pathToTrain);\n trainSentences.remove(0);\n ArrayList<String> testSentences = readCSV(pathToTest);\n testSentences.remove(0);\n\n ArrayList<String[]> trainWords = preprocess(trainSentences);\n NaiveBayesClassifier model = new NaiveBayesClassifier();\n model.fit(trainWords);\n\n ArrayList<String[]> testWords = preprocess(testSentences);\n double accuracy = evaluate(testWords, model);\n model.writeParams(\"params.json\");\n System.out.printf(\"Accuracy of the model is: %.4f%n\", accuracy);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void irisTest() throws Exception {\n\t\tint numIters = 10;\n\t\tInstances data = loadIris();\n\t\tDl4jMlpClassifier cls = getMlp();\n\t\tcls.setTrainBatchSize(50);\n\t\tcls.setNumIterations(numIters);\n\t\tString tmpFile = System.getProperty(\"java.io.tmpdir\") + File.separator + \"irisTest.txt\";\n\t\tSystem.err.println(\"irisTest() tmp file: \" + tmpFile);\n\t\tcls.setDebugFile(tmpFile);\n\t\tcls.buildClassifier(data);\n\t\tcls.distributionsForInstances(data);\n\t\tList<String> lines = Files.readAllLines(new File(tmpFile).toPath());\n\t\tassertEquals(lines.size(), numIters+1);\n\t}", "public static void KNNClassifier() throws IOException {\n\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\n\t\tClassifier knn = new KNearestNeighbors(5);\n\t\tknn.buildClassifier(data);\n\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\n\t\tint correct = 0, wrong = 0;\n\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\tObject predictedClassValue = knn.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse\n\t\t\t\twrong++;\n\t\t}\n\t\tSystem.out.println(\"Correct predictions \" + correct);\n\t\tSystem.out.println(\"Wrong predictions \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public List<Test> getAccuracyTests() throws ApiException {\n ApiResponse<List<Test>> resp = getAccuracyTestsWithHttpInfo();\n return resp.getData();\n }", "public void evaluate(String sampleFile, String validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public abstract int predict(double[] testingData);", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public static DecisionTreeNode performCrossValidation(List<CSVAttribute[]> dataset, int labelAttribute,\n BiFunction<List<CSVAttribute[]>, Integer, DecisionTreeNode> trainFunction,\n int numFolds) {\n\n List<Double> foldPerfResults = new ArrayList<>();\n\n // Split dataset\n DecisionTreeNode learnedTree = null;\n\n List<CSVAttribute[]> trainData;\n List<CSVAttribute[]> ulTestData;\n List<CSVAttribute[]> lTestData;\n\n // inintialize confusion matrix with zeros\n int[][] confusionMatrix = new int[][]{{0,0},{0,0}};\n\n for (int i = 0; i < numFolds; i++) {\n List<List<CSVAttribute[]>> splitData = getTrainData(dataset, numFolds, labelAttribute);\n\n trainData = splitData.get(0);\n ulTestData = splitData.get(1);\n lTestData = splitData.get(2);\n\n // learn from training subset\n learnedTree = trainFunction.apply(trainData, labelAttribute);\n\n // gather results in list\n foldPerfResults.add(predictionAccuracy(ulTestData, lTestData, learnedTree, labelAttribute));\n\n int[][] newConfusionMatrix = getConfusionMatrix(ulTestData, lTestData, labelAttribute);\n confusionMatrix[0][0] += newConfusionMatrix[0][0];\n confusionMatrix[0][1] += newConfusionMatrix[0][1];\n confusionMatrix[1][0] += newConfusionMatrix[1][0];\n confusionMatrix[1][1] += newConfusionMatrix[1][1];\n }\n\n int tp = confusionMatrix[0][0];\n int fp = confusionMatrix[0][1];\n int fn = confusionMatrix[1][0];\n int tn = confusionMatrix[1][1];\n float posPrecision = (float) tp / (tp + fp);\n float negPrecision = (float) tn / (tn + fn);\n float posRecall = (float) tp / (tp + fn);\n float negRecall = (float) tn / (tn + fp);\n\n double averageAccuracy = foldPerfResults.stream()\n .mapToDouble(d -> d)\n .average()\n .orElse(0.0);\n double standardDeviation = Math.sqrt((foldPerfResults.stream()\n .mapToDouble(d -> d)\n .map(x -> Math.pow((x - averageAccuracy),2))\n .sum()) / foldPerfResults.size());\n\n System.out.println(\"accuracy: \" + averageAccuracy * 100 + \"% +/- \" + standardDeviation * 100 + \"%\");\n System.out.println();\n System.out.println(\" true 1 | true 0 | class precision\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"pred. 1 | \"+tp+\" | \"+fp+\" | \"+posPrecision*100+\"%\");\n System.out.println(\"pred. 0 | \"+fn+\" | \"+tn+\" | \"+negPrecision*100+\"%\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"class recall | \"+posRecall*100+\"% | \"+negRecall*100+\"% | \");\n\n return learnedTree;\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n MockRandom mockRandom0 = new MockRandom(1);\n try { \n evaluation0.crossValidateModel((Classifier) costSensitiveClassifier0, instances0, 2, (Random) mockRandom0, (Object[]) costSensitiveClassifier0.TAGS_MATRIX_SOURCE);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // weka.core.Tag cannot be cast to weka.classifiers.evaluation.output.prediction.AbstractOutput\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }", "public static void LibSVMClassifier() throws IOException {\n\n\t\t/* Load a data set */\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\t\t/*\n\t\t * Contruct a LibSVM classifier with default settings.\n\t\t */\n\t\tClassifier svm = new LibSVM();\n\t\tsvm.buildClassifier(data);\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tint correct = 0, wrong = 0;\n\t\t\n\t\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\tObject predictedClassValue = svm.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse\n\t\t\t\twrong++;\n\t\t}\n\t\tSystem.out.println(\"Correct predictions \" + correct);\n\t\tSystem.out.println(\"Wrong predictions \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}", "public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}", "public TestResult Test(DataSet<?> ds, Hashtable<String, Boolean> Classifier, List<Integer> Attributes)\n\t{\t\n\t\tTestResult ret = new TestResult();\n\t\tboolean IsOK = true;\n\t\t\t\n\t\t//Iterate through all data set members confirming validity with current weight configuration\n\t\tfor(int i = 0; i < ds.getMembers().size(); i++)\n\t\t{\n\t\t\t//Get a reference to the next data set member to be tested\n\t\t\tDataSetMember<?> dsm = ds.getMemberAt(i);\n\t\t\t\t\t\n\t\t\t//Update input values to the values from the data set member being tested\n\t\t\t//Note: starting the iteration at index 1 avoids updating the bias value\n\t\t\tint inputIndex = 1;\n\t\t\tfor (int att : Attributes)\n\t\t\t{\n\t\t\t\t//Set the attribute value of the input to that of the data set member under test\n\t\t\t\tgetInputAt(inputIndex).setValueObject(dsm.getIValueAt(att));\n\t\t\t\tinputIndex ++;\n\t\t\t}\n\t\t\t\n\t\t\t//Test if expected output is generated by the unit and record result\n\t\t\tif (Classifier.get(dsm.getCategory()) == getOutput(Boolean.class))\n\t\t\t{\n\t\t\t\tret._correctClassifications ++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tret._incorrectClassifications ++;\n\t\t\t\tIsOK = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tret._testPassed = IsOK;\n\t\treturn ret;\n\t}", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n MockRandom mockRandom0 = new MockRandom((-1));\n try { \n evaluation0.crossValidateModel((Classifier) naiveBayesMultinomial0, instances0, (-1), (Random) mockRandom0, (Object[]) testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Number of folds must be greater than 1\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString();\n assertEquals(\"=== Detailed Accuracy By Class ===\\n\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double AccuracyLossTestSet()\n\t{\n\t\tdouble accuracyLoss = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++) \n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++) \n\t\t\t\taccuracyLoss += AccuracyLoss(i, c); \n\t\t}\n\t\treturn accuracyLoss;\n\t}", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "public void runTest() throws InterruptedException {\n //Run Tests using Threads\n List<Thread> threads= new LinkedList<>();\n\n for (int i=0;i<calculatorList.size();i++){\n Thread t= new MyThread(i) {\n @Override\n public void run() {\n testMethodList.get(getK()).runTest();\n }\n };\n threads.add(t);\n }\n\n for (Thread t: threads){\n t.run();\n }\n for (Thread t: threads){\n t.join();\n }\n //Calculate Accuracy\n // - String Calculator Name,\n // - accuracy rate\n //- tests print\n List<Object[]> info=new ArrayList<>();\n for (int i=0;i<calculatorList.size();i++){\n Object[] calculatorInfo=new Object[3];\n calculatorInfo[0]=calculatorList.get(i).getName();\n TestMethod testMethod= testMethodList.get(i);\n calculatorInfo[1]=formula.evaluate(testMethod.getSuccess(),testMethod.getFails());\n calculatorInfo[2]=testMethod.getTestsPrint().toString();\n info.add(calculatorInfo);\n }\n printer.printByFormat(info);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "private double[] classify(ArrayList<Product> newData,\n\t\t\tArrayList<Product> trainData) {\n\t\tdouble[] labels = new double[newData.size()];\n\t\tfor (int i = 0; i < newData.size(); i++) {\n\t\t\tSim[] kNearest = findNeighbors(newData.get(i), trainData, k);\n\t\t\tdouble weightedVal = 0;\n\t\t\tdouble sumWeight = 0;\n\t\t\tfor (Sim sim : kNearest) {\n\t\t\t\tweightedVal += (sim.getSim() * sim.getProduct().label);\n\t\t\t\tsumWeight += sim.getSim();\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat(\".00\");\n\t\t\tdouble formattedLabel = Double.parseDouble(df.format(weightedVal\n\t\t\t\t\t/ sumWeight));\n\t\t\tlabels[i] = formattedLabel;\n\t\t}\n\t\treturn labels;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString [] words ={\"good\", \"bad\"};\n\t\tNaiveBayes nb =new NaiveBayes(words);\n\t\tnb.trainClassifier(new File(\"traindata.txt\"));\n\t\tnb.classifyFile(new File(\"newdata.txt\"),new File(\"classifications.txt\"));\n\t\t\n\t\t\n\t\t//To test the accuracy. Still in work\n\t\t\n//\t\tString [] words ={\"good\", \"bad\"};\n//\t\tNaiveBayes nb =new NaiveBayes(words);\n//\t\tnb.trainClassifier(new File(\"traindata.txt\"));\n//\t\tConfusionMatrix cm = nb.computeAccuracy(new File(\"testdata.txt\"));\n//\t\tSystem.out.println(cm.getTruePositives());\n//\t\tSystem.out.println(cm.getFalsePositives());\n//\t\tSystem.out.println(cm.getTrueNegatives());\n//\t\tSystem.out.println(cm.getFalseNegatives());\n\t\t\n\t}", "public Map<String,TestResult> classify(DoubleDataTable tstTable, Progress prog) throws InterruptedException\n {\n // klasyfikacja tabeli testowej\n if (tstTable.noOfObjects()<=0) throw new RuntimeException(\"ClassificationController of an empty table\");\n NominalAttribute decAttr = tstTable.attributes().nominalDecisionAttribute();\n Map<String,int[][]> mapOfConfusionMatrices = new HashMap<String,int[][]>();\n prog.set(\"Classifing test table\", tstTable.noOfObjects());\n for (DoubleData dObj : tstTable.getDataObjects())\n {\n int objDecLocalCode = decAttr.localValueCode(((DoubleDataWithDecision)dObj).getDecision());\n for (Map.Entry<String,Classifier> cl : m_Classifiers.entrySet())\n {\n int[][] confusionMatrix = (int[][])mapOfConfusionMatrices.get(cl.getKey());\n if (confusionMatrix==null)\n {\n confusionMatrix = new int[decAttr.noOfValues()][];\n for (int i = 0; i < confusionMatrix.length; i++)\n confusionMatrix[i] = new int[decAttr.noOfValues()];\n mapOfConfusionMatrices.put(cl.getKey(), confusionMatrix);\n }\n try\n {\n double dec = cl.getValue().classify(dObj);\n if (!Double.isNaN(dec))\n \tconfusionMatrix[objDecLocalCode][decAttr.localValueCode(dec)]++;\n }\n catch (RuntimeException e)\n {\n Report.exception(e);\n }\n catch (PropertyConfigurationException e)\n {\n Report.exception(e);\n }\n }\n prog.step();\n }\n // przygotowanie wynikow klasyfikacji\n Map<String,TestResult> resultMap = new HashMap<String,TestResult>();\n for (Map.Entry<String,Classifier> cl : m_Classifiers.entrySet())\n {\n int[][] confusionMatrix = (int[][])mapOfConfusionMatrices.get(cl.getKey());\n cl.getValue().calculateStatistics();\n TestResult results = new TestResult(decAttr, tstTable.getDecisionDistribution(), confusionMatrix, ((ConfigurationWithStatistics)cl.getValue()).getStatistics());\n resultMap.put(cl.getKey(), results);\n }\n return resultMap;\n }", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-398.0145), 360.0);\n assertEquals(Double.NaN, evaluation0.rootMeanPriorSquaredError(), 0.01);\n }", "public int predict(int[] testData) {\n /*\n * kNN algorithm:\n * \n * This algorithm compare the distance of every training data to the test data using \n * the euclidean distance algorithm, and find a specfic amount of training data \n * that are closest to the test data (the value of k determine that amount). \n * \n * After that, the algorithm compare those data, and determine whether more of those\n * data are labeled with 0, or 1. And use that to give the guess\n * \n * To determine k: sqrt(amount of training data)\n */\n\n /*\n * Problem:\n * Since results and distances will be stored in different arrays, but in the same order,\n * sorting distances will mess up the label, which mess up the predictions\n * \n * Solution:\n * Instead of sorting distances, use a search algorithm, search for the smallest distance, and then\n * the second smallest number, and so on. Get the index of that number, use the index to \n * find the result, and store it in a new ArrayList for evaluation\n */\n\n // Step 1 : Determine k \n double k = Math.sqrt(this.trainingData.size());\n k = 3.0;\n\n // Step 2: Calculate distances\n // Create an ArrayList to hold all the distances calculated\n ArrayList<Double> distances = new ArrayList<Double>();\n // Create another ArrayList to store the results\n ArrayList<Integer> results = new ArrayList<Integer>();\n for (int[] i : this.trainingData) {\n // Create a temp array with the last item (result) eliminated\n int[] temp = Arrays.copyOf(i, i.length - 1);\n double distance = this.eucDistance(temp, testData);\n // Add both the result and the distance into associated arraylists\n results.add(i[i.length - 1]);\n distances.add(distance);\n }\n\n // Step 3: Search for the amount of highest points according to k\n ArrayList<Integer> closestResultLst = new ArrayList<Integer>();\n for (int i = 0; i < k; i++) {\n double smallestDistance = Collections.min(distances);\n int indexOfSmallestDistance = distances.indexOf(smallestDistance);\n int resultOfSmallestDistance = results.get(indexOfSmallestDistance);\n closestResultLst.add(resultOfSmallestDistance);\n // Set the smallest distance to null, so it won't be searched again\n distances.set(indexOfSmallestDistance, 10.0);\n }\n\n // Step 4: Determine which one should be the result by looking at the majority of the numbers\n int yes = 0, no = 0;\n for (int i : closestResultLst) {\n if (i == 1) {\n yes++;\n } else if (i == 0) {\n no++;\n }\n }\n\n // Step 5: Return the result\n // test code\n // System.out.println(yes);\n // System.out.println(no);\n if (yes >= no) {\n return 1;\n } else {\n return 0;\n }\n }", "public void checkTraining() {\r\n loadGenome();\r\n MLDataSet trainingSet;\r\n float sum = 0;\r\n try (Stream<Path> walk = Files.walk(Paths.get(\"check_train_data\"))) {\r\n\r\n List<String> result = walk.filter(Files::isRegularFile)\r\n .map(x -> x.toString()).collect(Collectors.toList());\r\n\r\n for (int i = 0; i < result.size(); i++) {\r\n trainingSet = new CSVNeuralDataSet(result.get(i), input, output, true);\r\n sum += network.calculateError(trainingSet);\r\n }\r\n System.out.println(\"Validation, Average error: \" + sum / result.size());\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }", "protected void calculateAccuracyIndicators( DataSet dataSet )\n {\n // Note that the model has been initialized\n initialized = true;\n \n // Reset various helper summations\n double sumErr = 0.0;\n double sumAbsErr = 0.0;\n double sumAbsPercentErr = 0.0;\n double sumErrSquared = 0.0;\n \n String timeVariable = getTimeVariable();\n double timeDiff = getTimeInterval();\n \n // Calculate the Sum of the Absolute Errors\n Iterator<DataPoint> it = dataSet.iterator();\n while ( it.hasNext() )\n {\n // Get next data point\n DataPoint dp = it.next();\n double x = dp.getDependentValue();\n double time = dp.getIndependentValue( timeVariable );\n double previousTime = time - timeDiff;\n \n // Get next forecast value, using one-period-ahead forecast\n double forecastValue\n = getForecastValue( previousTime )\n + getSlope( previousTime );\n \n // Calculate error in forecast, and update sums appropriately\n double error = forecastValue - x;\n sumErr += error;\n sumAbsErr += Math.abs( error );\n sumAbsPercentErr += Math.abs( error / x );\n sumErrSquared += error*error;\n }\n \n // Initialize the accuracy indicators\n int n = dataSet.size();\n \n accuracyIndicators.setBias( sumErr / n );\n accuracyIndicators.setMAD( sumAbsErr / n );\n accuracyIndicators.setMAPE( sumAbsPercentErr / n );\n accuracyIndicators.setMSE( sumErrSquared / n );\n accuracyIndicators.setSAE( sumAbsErr );\n }", "public static void main(String[] args) {\n\t\tint[] featuresRemoved = new int[]{14,15,0,3,7,8,9,13}; //removed age,education,relationship,race,sex,country\n\t\t\n\t\tCrossValidation.Allow_testSet_to_be_Appended = true;\n\t\tDataManager.SetRegex(\"?\");\n\t\tDataManager.SetSeed(0l); //debugging for deterministic random\n\t\t\n\t\tArrayList<String[]> dataSet = DataManager.ReadCSV(\"data/adult.train.5fold.csv\",false);\n\t\tdataSet = DataManager.ReplaceMissingValues(dataSet);\n\t\tDoubleMatrix M = DataManager.dataSetToMatrix(dataSet,14);\n\t\tList<DoubleMatrix> bins = DataManager.split(M, 15);\n\t\t//List<DoubleMatrix> bins = DataManager.splitFold(M, 5,true); //random via permutation debugging\n\t\t\n\t\tArrayList<String[]> testSet = DataManager.ReadCSV(\"data/adult.test.csv\",false);\n\t\ttestSet = DataManager.ReplaceMissingValues(testSet);\n\t\tDoubleMatrix test = DataManager.dataSetToMatrix(testSet,14);\n\t\tList<DoubleMatrix> testBins = DataManager.splitFold(test, 8, false);\n\t\t\n\t\t\n\t\t//initiate threads \n\t\tint threadPool = 16;\n\t\tExecutorService executor = Executors.newFixedThreadPool(threadPool);\n\t\tList<Callable<Record[]>> callable = new ArrayList<Callable<Record[]>>();\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis(); //debugging - test for optimisation \n\t\t\n\t\t\n\t\t\n\t\t//unweighted\n\t\tSystem.out.println(\"Validating Unweighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\t\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,false);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> unweightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tunweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\t\n\t\n\t\tcallable.clear();\n\t\t\n\t\t\n\t\t\n\t\t//weighted\n\t\tSystem.out.println(\"Validating Weighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,true);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> weightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find best parameter \n\t\tint bestKNN = 0;\n\t\tdouble bestAccuracy = 0;\n\t\tboolean weighted = false;\n\t\tint validationIndex = 0;\n\t\tfor(int i = 0; i < unweightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < unweightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ unweightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = unweightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy > bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = false;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : unweighted : \" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : unweighted : \" + currentAccuracy);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < weightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < weightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ weightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = weightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy >= bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = true;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : weighted :\" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : weighted :\" + currentAccuracy);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tList<Record[]> bestValidation = new ArrayList<Record[]>();\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tif(weighted) {\n\t\t\t\tbestValidation.add(new Record[]{ weightedRecords.get(i)[validationIndex]});\n\t\t\t} else {\n\t\t\t\tbestValidation.add(new Record[]{ unweightedRecords.get(i)[validationIndex]});\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Testing...\");\n\t\t\n\t\t//KNN on test set\n\t\tcallable.clear();\n\t\t\n\t\t//build worker threads\n\t\tfor(int i = 0; i < testBins.size(); i++) {\n\t\t\tCrossValidation fold = new CrossValidation(M, testBins.get(i),14,featuresRemoved,bestKNN,bestKNN,weighted);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\tList<Record[]> testRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\ttestRecords.add(recordFold.get());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tint[][] testM = DataManager.combineMat(testRecords);\n\t\tdouble testAccuracy = DataManager.getAccuracy(testM);\n\t\t//double teststd = DataManager.GetStd(testRecords);\n\t\t\n\t\t//print stuff\n\t\tSystem.out.println(bestKNN + \" : \"+ weighted + \" : \" + testAccuracy);\n\t\tSystem.out.println(testM[0][0] + \", \" + testM[0][1] +\", \" + testM[1][0] + \", \" + testM[1][1]);\n\t\t\n\t\t//delete all worker threads\n\t\texecutor.shutdownNow();\n\t\t\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(\"Run time(millisecond): \" + totalTime );\n\t\tSystem.out.println(\"Thread pool: \" + threadPool );\n\t\tSystem.out.println(\"Cores: \" + Runtime.getRuntime().availableProcessors());\n\t\t\n\t\t//prints to file\n\t\tDataManager.saveRecord(\"data/grid.results.txt\", 14, featuresRemoved,\"<=50k\", bestKNN, weighted, bestValidation, testRecords, testRecords.get(0)[0].classType, 5, totalTime, threadPool);\n\t}", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }", "public static AUCResult appendProcessedResult(BasicNetwork network, DataSet dataSet, int epoch) {\n MLDataSet dataSetTestingAdapted = new EncogMLDataSetTestingAdaptor(dataSet);\n\n double currentSignalAUC = 0.0;\n double step = 0.01;\n double previousOneMinusBackgroundRate = 0;\n double previousSignalRate = 0.0;\n\n // For each different threshold, calculate both signal and background rates.\n for( double threshold = 0.0; threshold < 1.0; threshold += step ) {\n int totalCorrectSignalSamples = 0;\n int totalWrongSignalSamples = 0;\n int totalCorrectBackgroundSamples = 0;\n int totalWrongBackgroundSamples = 0;\n int totalSamples = 0;\n int totalIdealSignalSamples = 0;\n int totalIdealBackgroundSamples = 0;\n \n int totalTrueSignal = 0;\n int totalTrueBackground = 0;\n \n // Go over the full testing set and check results.\n for ( MLDataPair pair : dataSetTestingAdapted ) {\n final MLData output = network.compute(pair.getInput());\n\n // This is specific to our case were we expect either one class or the other\n boolean netSignal = output.getData(0) > threshold ? true : false;\n boolean netBackground = output.getData(1) > threshold ? true : false;\n boolean idealSignal = pair.getIdeal().getData(0) > 0.5 ? true : false;\n \n if ( netSignal != netBackground ) {\n if ( idealSignal && netSignal ) {\n \ttotalCorrectSignalSamples++;\n \ttotalTrueSignal++;\n }\n if ( idealSignal && !netSignal ) totalWrongSignalSamples++;\n if ( !idealSignal && netSignal ) totalWrongBackgroundSamples++;\n if ( !idealSignal && !netSignal ) {\n \ttotalCorrectBackgroundSamples++;\n \ttotalTrueBackground++;\n }\n if ( idealSignal ) totalIdealSignalSamples++;\n if ( !idealSignal ) totalIdealBackgroundSamples++;\n }\n else {\n // Both classes cannot be of the same value, therefore resolution comes with where \n \t// values are: if above or below the threshold, and if ideal is signal or background.\n double doubleNetSignal = output.getData(0);\n double doubleNetBackground = output.getData(1);\n \n if ( idealSignal ) {\n \t// We are measuring only signal here.\n \t\ttotalIdealSignalSamples++;\n \t\tif ( doubleNetSignal < threshold ) totalWrongSignalSamples++;\n \t\tif ( doubleNetSignal > threshold ) totalCorrectSignalSamples++;\n \t}\n \telse {\n \t\t// We are measuring only background here.\n \t\ttotalIdealBackgroundSamples++;\n \t\tif ( threshold < doubleNetBackground ) totalCorrectBackgroundSamples++;\n \t\tif ( threshold > doubleNetBackground ) totalWrongBackgroundSamples++;\n \t}\n }\n\n totalSamples++;\n }\n\n double signalRate = (double) totalCorrectSignalSamples / (double) totalIdealSignalSamples;\n double backgroundRate = (double) totalCorrectBackgroundSamples / (double) totalIdealBackgroundSamples;\n double oneMinusBackgroundRate = 1.0 - backgroundRate;\n\n \tappend(epoch \n \t\t+ \",\" + threshold\n \t\t+ \",\" + totalCorrectSignalSamples\n \t\t+ \",\" + totalCorrectBackgroundSamples\n \t\t+ \",\" + totalWrongSignalSamples\n \t\t+ \",\" + totalWrongBackgroundSamples\n \t\t+ \",\" + totalIdealSignalSamples\n \t\t+ \",\" + totalIdealBackgroundSamples\n \t\t+ \",\" + totalSamples\n \t\t+ \",\" + signalRate\n \t\t+ \",\" + backgroundRate\n \t\t+ \",\" + oneMinusBackgroundRate\n \t\t+ \",\" + totalTrueSignal\n \t\t+ \",\" + totalTrueBackground\n \t\t+ \",\" + (totalTrueSignal + totalTrueBackground)\n );\n\n \tdouble xDelta = oneMinusBackgroundRate - previousOneMinusBackgroundRate;\n \tdouble ySignal = signalRate + previousSignalRate;\n \t\n \tdouble tempSignalAUC = ( ySignal * xDelta ) / 2.0;\n \tcurrentSignalAUC += tempSignalAUC;\n\n \tpreviousOneMinusBackgroundRate = oneMinusBackgroundRate;\n \tpreviousSignalRate = signalRate;\n }\n \n return new AUCResult(epoch, currentSignalAUC);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void testGetImportanceStats() {\n System.out.println(\"getImportanceStats\");\n MDA instance = new MDA();\n\n // make the circles close to force tree to do lots of splits / make it harder\n ClassificationDataSet train = getHarderC(10000, RandomUtil.getRandom());\n int good_featres = 2;\n\n DecisionTree tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n double[] importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n // categorical features, make space wider b/c we lose resolution\n train = getHarderC(10000, RandomUtil.getRandom());\n\n train.applyTransform(new NumericalToHistogram(train, 7));\n tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString();\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\"\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n\tpublic void test1() {\n\t\tTriangleType type = TriangleClassifier.classify(2,2, 1);\n\t\tassertEquals(type,TriangleType.ISOSCELES);\n\t}", "public void train(){\n recoApp.training(idsToTest);\n }", "public void printPrediction() {\n\t\tfor (int i = 0; i < testData.size(); i++) {\n\t\n\t\t\tSystem.out.print(testData.get(i) + \", Predicted label:\"\n\t\t\t\t\t+ predictLabels[i]);\n\t\t\tif (predictLabels[i] >= 20) System.out.println(\" Successful\");\n\t\t\telse System.out.println(\" Failed\");\n\t\t}\n\t}", "public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}", "public void soaktest() {\n\t\ttry {\n\t\t\tint errCount = 0;\n\n\t\t\tfor (int i = 1; i <= 100; i++) {\n\t\t\t\tRegression test = new Regression();\n\t\t\t\ttest0();\n\t\t\t\ttest.test1(m1);\n\t\t\t\ttest.test2(m1);\n\t\t\t\ttest.test3(m1);\n\t\t\t\ttest.test4(m1);\n\t\t\t\ttest.test5(m1);\n\t\t\t\ttest.test6(m1);\n\t\t\t\ttest.test7(m1, m2);\n\t\t\t\ttest.test8(m1);\n\t\t\t\ttest.test9(m2);\n\t\t\t\ttest.test10(m3);\n\t\t\t\ttest.test11(m1, m2);\n\t\t\t\ttest.test12(m1);\n\t\t\t\ttest.test13(m1);\n\t\t\t\ttest.test14(m1);\n\t\t\t\ttest.test15(m1);\n\t\t\t\ttest.test16(m1);\n\t\t\t\ttest.test17(m1);\n\t\t\t\ttest.test18(m4);\n\t\t\t\ttest.test19(m2, m3);\n\t\t\t\ttest.test97(m1);\n\t\t\t\tif (test.getErrors())\n\t\t\t\t\terrCount++;\n\t\t\t\tif ((i % 10) == 0) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"error count = \" + errCount + \" rounds = \" + i);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\tassertTrue(false);\n\t\t}\n\t}", "public static void test() throws IOException {\n\t\tModel trainModel = Trainer.train(\"-i ./data/in -n fales\");\n\t\ttrainModel.saveModel(\"./data/kdTree\");\n\t\t\n\t\t\n\t\tModel model = Model.loadModel(\"./data/kdTree\");\n//\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/test\");\n\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/kd_test\");\n\t\tint all = 0;\n\t\tint right = 0;\n\t\tfor (Instance ins : corpus.getInstanceList()) {\n\t\t\tPredicter.predict(ins, model);\n\t\t\tSystem.out.println(String.format(\"%s %s\", ins.getLabel(), ins.getPredictLabel()));\n\t\t\tSystem.out.println(\"instance: \"+ins.getFeatures());\n\t\t\tSystem.out.println(\"neighbour: \"+ins.getNeighbour().get(0).getFeatures());\n\t\t\t++all;\n\t\t\tif (ins.getLabel().equals(ins.getPredictLabel())) {\n\t\t\t\t++right;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(right+\"/\"+all);\n\t}", "public void score(List<String> modelFiles, String testFile, String outputFile) {\n/* 1180 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1181 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1184 */ int nFold = modelFiles.size();\n/* */ \n/* 1186 */ List<RankList> samples = readInput(testFile);\n/* 1187 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1188 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1189 */ System.out.println(\"[Done.]\");\n/* */ try {\n/* 1191 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"));\n/* 1192 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1194 */ List<RankList> test = testData.get(f);\n/* 1195 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1196 */ int[] features = ranker.getFeatures();\n/* 1197 */ if (normalize)\n/* 1198 */ normalize(test, features); \n/* 1199 */ for (RankList l : test) {\n/* 1200 */ for (int j = 0; j < l.size(); j++) {\n/* 1201 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1202 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1206 */ out.close();\n/* */ }\n/* 1208 */ catch (IOException ex) {\n/* */ \n/* 1210 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderROC();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "public void evaluate ( String predictionFileName ) \n\t\t\t\tthrows IOException\t\n\t{\n\t\tdouble MAE = 0.0, RMSE = 0.0;\n\t\tint countRatings = 0, countTotal = 0;\n\t\t\t\t\n\t\tBufferedWriter wr = new BufferedWriter(new FileWriter(predictionFileName));\n\t\tfor (Integer user : dao.getTestUsers())\t{\n\t\t\tfor (Integer item : dao.getTestItems(user))\t{\n\t\t\t\tcountTotal++;\n\t\t\t\tdouble P = predict(user, item);\n\t\t\t\t// A prediction of -INF is used to indicate that the prediction cannot be made\n\t\t\t\tif (P == Double.NEGATIVE_INFINITY)\n\t\t\t\t\tcontinue;\n\t\t\t\tcountRatings++;\n\t\t\t\tdouble R = dao.getTestRating(user, item);\n\t\t\t\tdouble tmp = P - R;\n\t\t\t\tMAE += Math.abs(tmp);\n\t\t\t\tRMSE += tmp * tmp;\n\t\t\t\twr.write(String.format(\"%d %d %f %f\\n\", user, item, R, P));\n\t\t\t}\n\t\t}\n\t\twr.flush();\n\t\twr.close();\n\n\t\tSystem.out.println(\"Recommender evaluation on test data...\");\n\t\tif (countRatings == 0)\n\t\t\tSystem.out.println(\"Coverage : 0%\");\n\t\telse {\n\t\t\tMAE /= countRatings;\n\t\t\tRMSE = Math.sqrt(RMSE / countRatings);\n\t\t\tSystem.out.printf(\"Coverage %f%%\\n\", (countRatings * 100.0) / countTotal);\n\t\t\tSystem.out.printf(\"MAE : %f\\n\", MAE);\n\t\t\tSystem.out.printf(\"RMSE : %f\\n\", RMSE);\n\t\t}\t\t\n\t}", "@Override\n\tpublic void buildClassifier(Instances data) throws Exception {\n decision_tree = new MyID3();\n\t\tdecision_tree.buildClassifier(data);\n\n//\t\tSystem.out.println(decision_tree.toString());\n\n train_data = data;\n\n set_of_rule = convertTreeIntoRules(decision_tree);\n\n\n // DONT DELETE THISSSS\n set_of_rule.setTrainData(data);\n\n List<Rule> listrule = set_of_rule.getList_rule();\n System.out.println(\"\\n\\n\\nBEFORE PRUNEDDD\");\n for (int i = 0; i < listrule.size(); i++ ){\n System.out.println(\"Rule \"+i+\" :\");\n Rule rule = listrule.get(i);\n List<Edge> edges = rule.getPreconditions();\n for (int j=0; j< edges.size(); j++) {\n System.out.println(\"\\t-\"+edges.get(j).getAttribute_name() + \" = \" + edges.get(j).getAttribute_value());\n }\n System.out.println(\"\\tClass = \"+rule.getClass_value());\n }\n\n// selectBestSetofRule();\n\n\t}", "@Test\n\tpublic void test2() {\n\t\tTriangleType type = TriangleClassifier.classify(5,5,4);\n\t\tassertEquals(type,TriangleType.ISOSCELES);\n\t}", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.unclassified();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Test\n\tpublic void classificationTest(){\n\n\t\tJavaPairRDD<String, Set<String>> javaRDD = javaSparkContext.textFile(\"/Downloads/book2-master/2rd_data/ch02/Gowalla_totalCheckins.txt\")\n\t\t\t\t.map(line -> line.split(\"~\"))\n\t\t\t\t.map(s -> new AppDto(s[0],s[1],s[2],s[3],s[4]))\n\t\t\t\t.mapToPair(app -> {\n\t\t\t\t\tSet<String> setIntro = Arrays.stream(app.getIntroduction().split(\" \"))\n\t\t\t\t\t\t\t.map(s -> s.split(\"/\"))\n\t\t\t\t\t\t\t.filter(ss -> ss[0].length()>1 && (ss[1].equals(\"v\") || ss[1].indexOf(\"n\")>-1))\n\t\t\t\t\t\t\t.map(ss -> ss[0]).collect(Collectors.toSet());\n\n\t\t\t\t\treturn new Tuple2<>(app.getCls(), setIntro);\n\t\t\t\t});\n\n\t\tjavaRDD.map(t -> t._2).zipWithIndex();\n\t}", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "private double validate(int k) {\n\t\tArrayList<Product> allData = trainData;\n\t\tshuffle(allData);\n\t\tArrayList<Double> accurs = new ArrayList<Double>();\n\t\tif (k < 1 || k > allData.size()) return -1;\n\t\tint foldLength = allData.size() / k;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tArrayList<Product> fold = new ArrayList<Product>();\n\t\t\tArrayList<Product> rest = new ArrayList<Product>();\n\t\t\tfold.addAll(allData.subList(i * foldLength, (i + 1) * foldLength));\n\t\t\trest.addAll(allData.subList(0, i * foldLength));\n\t\t\trest.addAll(allData.subList((i + 1) * foldLength, allData.size()));\n\t\t\tdouble[] predict = classify(fold, rest);\n\t\t\tdouble[] real = getLabels(fold);\n\t\t\taccurs.add(getAccuracyBinary(predict, real));\n\t\t}\n\t\tdouble accur = 0;\n\t\tfor (int i = 0; i < accurs.size(); i++) {\n\t\t\taccur += accurs.get(i);\n\t\t}\n\t\taccur /= accurs.size();\n\t\treturn accur;\n\t}", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}", "public static void evalDistance(double[][] testAttributes, double[][] trainAttributes, String[] testClass,\n\t\t\tString[] trainClass) {\n\n\t\tString[] predictClass = new String[75]; // predictClass array will house the predicted training class label\n\n\t\tint count = 0;\n\n\t\t// loop taking one testing row (species) at a time\n\t\tfor (int testRow = 0; testRow < 75; testRow++) {\n\t\t\tint currentMinTrainRow = 0; // variable tracking minimum training row below\n\t\t\tdouble currentMinDist = 100; // initializing with a \"high\" number that will exceed any dist return\n\t\t\t\n\n\t\t\tfor (int trainRow = 0; trainRow < 75; trainRow++) { // nested for loop pitting the above test row against the entirety of the training file\n\t\t\t\t// call distanceCalc method\n\t\t\t\tdouble currentDist = NearestNeighbor.distanceCalc(testAttributes[testRow], trainAttributes[trainRow]); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (currentDist < currentMinDist) { // updates minimum distance\n\t\t\t\t\tcurrentMinDist = currentDist;\n\t\t\t\t\tcurrentMinTrainRow = trainRow;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// print NNN training class species names across from the testing species at issue\n\t\t\tpredictClass[testRow] = trainClass[currentMinTrainRow];\n\t\t\tSystem.out.println((testRow + 1) + \":\" + \" \" + testClass[testRow] + \" \" + predictClass[testRow]);\n\n\t\t\t// number of matches- calls classCompare method on each line of the above evaluation\n\t\t\tif (NearestNeighbor.classCompare(testRow, currentMinTrainRow, testClass, trainClass)) {\n\t\t\t\tcount += 1;\n\t\t\t}\n\n\t\t}\n\n\t\t// % match\n\t\tSystem.out.println(\"ACCURACY: \" + (double) count / 75);\n\t}", "@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n objectArray0[0] = (Object) instances0;\n try { \n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // weka.core.Instances cannot be cast to weka.classifiers.evaluation.output.prediction.AbstractOutput\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@BeforeClass\r\n public static void generateConfigurationOfClassifiersAndLoadData() {\r\n\r\n //one classifier in the ensemble will be ClassifierModel (Model for enach output class)\r\n GaussianMultiModelConfig gmc = new GaussianMultiModelConfig();\r\n gmc.setTrainerClassName(\"QuasiNewtonTrainer\");\r\n gmc.setTrainerCfg(new QuasiNewtonConfig());\r\n LinearModelConfig lmcpso = new LinearModelConfig();\r\n lmcpso.setTrainerClassName(\"PSOTrainer\");\r\n lmcpso.setTrainerCfg(new PSOConfig());\r\n ClassifierModelConfig clc = new ClassifierModelConfig();\r\n clc.setClassModelsDef(BaseModelsDefinition.RANDOM);\r\n clc.addClassModelCfg(lmcpso);\r\n clc.addClassModelCfg(gmc);\r\n clc.setClassRef(ClassifierModel.class);\r\n\r\n //todo second classifier in the ensemble will be Weka decision tree\r\n\r\n ClassifierBaggingConfig bagc = new ClassifierBaggingConfig();\r\n bagc.setClassifiersNumber(2);\r\n bagc.setBaseClassifiersDef(BaseModelsDefinition.UNIFORM);\r\n bagc.addBaseClassifierCfg(clc);\r\n\r\n generatedCfg = bagc;\r\n ConfigurationFactory.saveConfiguration(generatedCfg, cfgfilename);\r\n\r\n data = new FileGameData(datafilename);\r\n\r\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "public static void main(String[] args) {\n\t\tKNN knn = new KNN();\n\t\tknn.classifyTestData();\n\t\t/*\n\t\t * List<Data> knearest = knn.kNearestNeighbors(30, knn.testData.get(0));\n\t\t * for (Data data : knearest) {\n\t\t * System.out.println(data.getEuclideanDistance()); }\n\t\t */\n\t\tSystem.out.println(\"OK\");\n\t}", "protected void doClassificationReport(ClassificationAlgorithm algorithm)\n\t{\n\t\t// Test report name\n\t\tString testReportFilename = \"TestClassificationReport.txt\";\n\t\t// Train report name\n\t\tString trainReportFilename = \"TrainClassificationReport.txt\";\n\t\t// Test report file\n\t\tFile testReportFile = new File(reportDirectory, testReportFilename);\n\t\t// Train report file\n\t\tFile trainReportFile = new File(reportDirectory, trainReportFilename);\n\t\t// Test file writer\n\t\tFileWriter testFile = null;\n\t\t// Train file writer\n\t\tFileWriter trainFile = null;\n\t\t// Number of conditions\n\t\tint conditions = 0;\n\t\t// Classifier\n\t\tIClassifier classifier = algorithm.getClassifier();\n\n\t\tint[][] confusionMatrixTrain = classifier.getConfusionMatrix(algorithm.getTrainSet());\n\t\tint[][] confusionMatrixTest = classifier.getConfusionMatrix(algorithm.getTestSet());\n\n\t\tint[] numberInstancesTrain = new int[confusionMatrixTrain.length];\n\t\tint[] numberInstancesTest = new int[confusionMatrixTest.length];\n\t\tint correctedClassifiedTrain = 0, correctedClassifiedTest = 0;\n\n\t\tfor(int i = 0; i < confusionMatrixTrain.length; i++)\n\t\t{\n\t\t\tcorrectedClassifiedTrain += confusionMatrixTrain[i][i];\n\t\t\tcorrectedClassifiedTest += confusionMatrixTest[i][i];\n\n\t\t\tfor(int j = 0; j < confusionMatrixTrain.length; j++)\n\t\t\t{\n\t\t\t\tnumberInstancesTrain[i] += confusionMatrixTrain[i][j];\n\t\t\t\tnumberInstancesTest[i] += confusionMatrixTest[i][j];\n\t\t\t}\n\t\t}\n\n\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tDecimalFormat df4 = new DecimalFormat(\"0.0000\");\n\n\t\ttry {\n\t\t\ttestReportFile.createNewFile();\n\t\t\ttrainReportFile.createNewFile();\n\t\t\ttestFile = new FileWriter (testReportFile);\n\t\t\ttrainFile = new FileWriter (trainReportFile);\n\n\t\t\t// Dataset metadata\n\t\t\tIMetadata metadata = algorithm.getTrainSet().getMetadata();\n\n\t\t\t// Get the classifier\n\t\t\tList<Rule> classificationRules = ((RuleBase) classifier).getClassificationRules();\n\n\t\t\t// Obtain the number of conditions\n\t\t\tconditions = ((RuleBase) classifier).getConditions();\n\n\t\t\t// Obtain the number of classes\n\t\t\tCategoricalAttribute catAttribute = (CategoricalAttribute) metadata.getAttribute(metadata.getClassIndex());\n\t\t\tint numClasses = catAttribute.getCategories().size();\n\n\t\t\t// Train data\n\t\t\ttrainFile.write(\"File name: \" + ((FileDataset) algorithm.getTrainSet()).getFileName());\n\t\t\ttrainFile.write((\"\\nRuntime (s): \" + (((double)(endTime-initTime)) / 1000.0)));\n\t\t\ttrainFile.write(\"\\nMemory Usage(bytes): \" + (afterUsedMem-beforeUsedMem));\n\t\t\ttrainFile.write(\"\\nNumber of rules: \" + (classificationRules.size()+1));\n\t\t\t//trainFile.write(\"\\nNumber of conditions: \"+ conditions);\n\t\t\t//trainFile.write(\"\\nAverage number of conditions per rule: \" + (double)conditions/((double)classificationRules.size()+1.0));\n\t\t\ttrainFile.write(\"\\nAccuracy: \" + df4.format((correctedClassifiedTrain / (double) algorithm.getTrainSet().getInstances().size())));\n\n\t\t\t// Write the geometric mean\n\t\t\t//trainFile.write(\"\\nGeometric mean: \" + df4.format(mediaGeoTrain));\n\t\t\t//trainFile.write(\"\\nCohen's Kappa rate: \" + df4.format(kappaRateTrain));\n\t\t\t//trainFile.write(\"\\nAUC: \" + df4.format(aucTrain));\n\n\t\t\ttrainFile.write(\"\\n\\n#Percentage of correct predictions per class\");\n\n\t\t\t// Test data\n\t\t\ttestFile.write(\"File name: \" + ((FileDataset) algorithm.getTestSet()).getFileName());\n\t\t\ttestFile.write((\"\\nRuntime (s): \" + (((double)(endTime-initTime)) / 1000.0)));\n\t\t\ttrainFile.write(\"\\nMemory Usage(bytes): \" + (afterUsedMem-beforeUsedMem));\n\t\t\t//\ttestFile.write(\"\\nNumber of different attributes: \" + (metadata.numberOfAttributes()-1));\n\t\t\ttestFile.write(\"\\nNumber of rules: \" + (classificationRules.size()+1));\n\t\t\t//\ttestFile.write(\"\\nNumber of conditions: \"+ conditions);\n\t\t\t//\ttestFile.write(\"\\nAverage number of conditions per rule: \" + (double)conditions/((double)classificationRules.size()+1.0));\n\t\t\ttestFile.write(\"\\nAccuracy: \" + df4.format((correctedClassifiedTest / (double) algorithm.getTestSet().getInstances().size())));\n\n\t\t\t// Write the geometric mean\n\t\t\t//testFile.write(\"\\nGeometric mean: \" + df4.format(mediaGeoTest));\n\t\t\t//testFile.write(\"\\nCohen's Kappa rate: \" + df4.format(kappaRateTest));\n\t\t\t//testFile.write(\"\\nAUC: \" + df4.format(aucTest));\n\n\t\t\ttestFile.write(\"\\n\\n#Percentage of correct predictions per class\");\n\n\t\t\t// Check if the report directory name is in a file\n\t\t\tString aux = \"\";\n\t\t\tif(getReportDirName().split(\"/\").length>1)\n\t\t\t\taux = getReportDirName().split(\"/\")[0]+\"/\";\n\t\t\telse\n\t\t\t\taux = \"./\";\n\n\t\t\t// Global report for train\n\t\t\tString nameFileTrain = aux +getGlobalReportName() + \"-train.txt\";\n\t\t\tFile fileTrain = new File(nameFileTrain);\n\t\t\tBufferedWriter bwTrain;\n\n\t\t\t// Global report for test\n\t\t\tString nameFileTest = aux +getGlobalReportName() + \"-test.txt\";\n\t\t\tFile fileTest = new File(nameFileTest);\n\t\t\tBufferedWriter bwTest;\n\n\t\t\t// If the global report for train exist\n\t\t\tif(fileTrain.exists())\n\t\t\t{\n\t\t\t\tbwTrain = new BufferedWriter (new FileWriter(nameFileTrain,true));\n\t\t\t\tbwTrain.write(System.getProperty(\"line.separator\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbwTrain = new BufferedWriter (new FileWriter(nameFileTrain));\n\t\t\t\tbwTrain.write(\"Dataset \t\t\t\t\t\t\t|| Accuracy || Execution time(s) || Memory Usage (bytes)\\n\");\t\t\t}\n\n\t\t\t// If the global report for test exist\n\t\t\tif(fileTest.exists())\n\t\t\t{\n\t\t\t\tbwTest = new BufferedWriter (new FileWriter(nameFileTest,true));\n\t\t\t\tbwTest.write(System.getProperty(\"line.separator\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbwTest = new BufferedWriter (new FileWriter(nameFileTest));\n\n\t\t\t\tbwTest.write(\"Dataset \t\t\t\t\t\t\t\t|| Accuracy || Execution time(s) || Memory Usage (bytes)\\n\");\n\n\t\t\t}\n\n\t\t\t//Write the train dataset name\n\t\t\tbwTrain.write(((FileDataset) algorithm.getTrainSet()).getFileName() + \"||\");\n\t\t\t//Write the test dataset name\n\t\t\tbwTest.write(((FileDataset) algorithm.getTestSet()).getFileName() + \"||\");\n\t\t\t//Write the percentage of correct predictions\n\t\t\tbwTrain.write(((correctedClassifiedTrain / (double) algorithm.getTrainSet().getInstances().size())) + \",\");\n\n\t\t\t//bwTrain.write(kappaRateTrain + \",\");\n\t\t\t//bwTrain.write(aucTrain + \",\");\n\n\t\t\tfor(int i=0; i<numClasses; i++)\n\t\t\t{\n\t\t\t\tString result = new String();\n\n\t\t\t\tresult = \"\\n Class \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \":\";\n\t\t\t\tif(numberInstancesTrain[i] == 0)\n\t\t\t\t{\n\t\t\t\t\tresult += \" 100.00\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult += \" \" + df.format((confusionMatrixTrain[i][i] / (double) numberInstancesTrain[i]) * 100) + \"%\";\n\t\t\t\t}\n\n\t\t\t\ttrainFile.write(result);\n\t\t\t}\n\n\t\t\ttrainFile.write(\"\\n#End percentage of correct predictions per class\");\n\n\n\t\t\t bwTrain.write((((double)(endTime-initTime)) / 1000.0) + \"\");\n\n\t\t\ttrainFile.write(\"\\n\\n#Classifier\\n\");\n\n\t\t\ttrainFile.write(classifier.toString(metadata));\n\n\t\t\t// Write the Percentage of correct predictions\n\t\t\tbwTest.write(((correctedClassifiedTest / (double) algorithm.getTestSet().getInstances().size())) + \",\");\n\t\t\t//bwTest.write(kappaRateTest + \",\");\n\t\t\t//bwTest.write(aucTest + \",\");\n\n\t\t\tfor(int i=0; i<numClasses; i++)\n\t\t\t{\n\t\t\t\tString result = new String();\n\n\t\t\t\tresult = \"\\n Class \" + metadata.getAttribute(metadata.getClassIndex()).show(i) +\":\";\n\t\t\t\tif(numberInstancesTest[i] == 0)\n\t\t\t\t{\n\t\t\t\t\tresult += \" 100.00\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult += \" \" + df.format((confusionMatrixTest[i][i] / (double) numberInstancesTest[i]) *100) + \"%\";\n\t\t\t\t}\n\t\t\t\ttestFile.write(result);\n\t\t\t}\n\n\t\t\ttestFile.write(\"\\n#End percentage of correct predictions per class\");\n\n\t\t\t//bwTest.write(mediaGeoTest + \",\");\n\t\t\t//bwTest.write((classificationRules.size()+1) + \",\");\n\t\t\t//bwTest.write(conditions + \",\");\n\t\t\t//bwTest.write((double)conditions/((double)classificationRules.size()+1.0) + \",\");\n\t\t\t//bwTest.write(algorithm.getEvaluator().getNumberOfEvaluations()+\",\");\n\t\t\tbwTest.write((((double)(endTime-initTime)) / 1000.0) + \"\");\n\n\t\t\ttestFile.write(\"\\n\\n#Classifier\\n\");\n\n\t\t\ttestFile.write(classifier.toString(metadata));\n\n\t\t\ttestFile.write(\"\\n#Test Classification Confusion Matrix\\n\");\n\n\t\t\ttestFile.write(\"\\t\\t\\tPredicted\\n\\t\\t\\t\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t\ttestFile.write(\"C\"+ i + \"\\t\");\n\n\t\t\ttestFile.write(\"|\\nActual\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t{\n\t\t\t\tif(i != 0)\n\t\t\t\t\ttestFile.write(\"\\t\");\n\n\t\t\t\ttestFile.write(\"\\tC\" + i + \"\\t\");\n\n\t\t\t\tfor(int j = 0; j < metadata.numberOfClasses(); j++)\n\t\t\t\t\ttestFile.write(confusionMatrixTest[i][j] + \"\\t\");\n\n\t\t\t\ttestFile.write(\"|\\tC\" + i + \" = \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \"\\n\");\n\t\t\t}\n\n\t\t\ttrainFile.write(\"\\n#Train Classification Confusion Matrix\\n\");\n\n\t\t\ttrainFile.write(\"\\t\\t\\tPredicted\\n\\t\\t\\t\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t\ttrainFile.write(\"C\"+ i + \"\\t\");\n\n\t\t\ttrainFile.write(\"|\\nActual\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t{\n\t\t\t\tif(i != 0)\n\t\t\t\t\ttrainFile.write(\"\\t\");\n\n\t\t\t\ttrainFile.write(\"\\tC\" + i + \"\\t\");\n\n\t\t\t\tfor(int j = 0; j < metadata.numberOfClasses(); j++)\n\t\t\t\t\ttrainFile.write(confusionMatrixTrain[i][j] + \"\\t\");\n\n\t\t\t\ttrainFile.write(\"||\\tC\" + i + \" = \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \"\\n\");\n\t\t\t}\n\n\t\t\t// Close the files\n\t\t\tbwTest.close();\n\t\t\tbwTrain.close();\n\t\t\ttestFile.close();\n\t\t\ttrainFile.close();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<Integer, Boolean> testCategorization(String topic, String[] features) {\n\n\t\tint n = trainingSet.size(); // Count docs.\n\n\t\t// Count docs in class.\n\t\tint nc = 0;\n\t\tfor (Integer id : trainingSet) {\n\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\tif (inClass)\n\t\t\t\tnc++;\n\t\t}\n\n\t\tdouble prior_c = nc / (double) n;\n\t\tdouble prior_cbar = (n - nc) / (double) n;\n\n\t\tMap<String, Double> condProb_c = new HashMap<String, Double>();\n\t\tMap<String, Double> condProb_cbar = new HashMap<String, Double>();\n\n\t\t// Count docs in class containing term.\n\t\tfor (String term : features) {\n\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\tint nct_c = 0, nct_cbar = 0;\n\t\t\tfor (Integer id : trainingSet) {\n\t\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\t\tif (postings.contains(id)) { // document contains the term\n\t\t\t\t\tif (inClass)\n\t\t\t\t\t\tnct_c++;\n\t\t\t\t\telse\n\t\t\t\t\t\tnct_cbar++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// And calculate conditional probabilities.\n\t\t\tcondProb_c.put(term, (nct_c + 1) / (double) (nc + 2));\n\t\t\tcondProb_cbar.put(term, (nct_cbar + 1) / (double) ((n - nc) + 2));\n\t\t}\n\n\t\t// ---APPLY BERNOULLI----\n\n\t\tMap<Integer, Boolean> marked = new HashMap<Integer, Boolean>();\n\t\tfor (Integer id : testSet) {\n\t\t\tdouble score_c = Math.log(prior_c);\n\t\t\tdouble score_cbar = Math.log(prior_cbar);\n\t\t\tfor (String term : features) {\n\t\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\t\tif (postings.contains(id)) {\n\t\t\t\t\tscore_c += Math.log(condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(condProb_cbar.get(term));\n\t\t\t\t} else {\n\t\t\t\t\tscore_c += Math.log(1 - condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(1 - condProb_cbar.get(term));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (score_c > score_cbar)\n\t\t\t\tmarked.put(id, true);\n\t\t\telse\n\t\t\t\tmarked.put(id, false);\n\t\t}\n\t\treturn marked;\n\t}", "@Test\n public void testPercentages(){\n assertTrue(Results.percentages());\n }", "public void loadTestClassifier() {\n\t\tbinaryTestClassifier = LinearClassifier.readClassifier(BINARY_CLASSIFIER_FILENAME);\n\t\tmultiTestClassifier = LinearClassifier.readClassifier(MULTI_CLASSIFIER_FILENAME);\n\t}", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctUnclassified();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }", "@Test\n public void testTrain_RegressionDataSet() {\n System.out.println(\"train\");\n RegressionDataSet trainSet = FixedProblems.getSimpleRegression1(150, new Random(2));\n RegressionDataSet testSet = FixedProblems.getSimpleRegression1(50, new Random(3));\n\n for (boolean modification1 : new boolean[] { true, false })\n for (SupportVectorLearner.CacheMode cacheMode : SupportVectorLearner.CacheMode.values()) {\n PlattSMO smo = new PlattSMO(new RBFKernel(0.5));\n smo.setCacheMode(cacheMode);\n smo.setC(1);\n smo.setEpsilon(0.1);\n smo.setModificationOne(modification1);\n smo.train(trainSet);\n\n double errors = 0;\n for (int i = 0; i < testSet.size(); i++)\n errors += Math.pow(testSet.getTargetValue(i) - smo.regress(testSet.getDataPoint(i)), 2);\n assertTrue(errors / testSet.size() < 1);\n }\n }" ]
[ "0.7577974", "0.71972775", "0.70916194", "0.6758265", "0.67397976", "0.6687084", "0.6682531", "0.65563893", "0.65116054", "0.6481559", "0.6467696", "0.64302254", "0.64166844", "0.63232535", "0.6304048", "0.6284697", "0.6256022", "0.62079793", "0.61998457", "0.61796933", "0.6175303", "0.6110921", "0.6110918", "0.6096294", "0.602883", "0.60251373", "0.60229355", "0.6012002", "0.6009197", "0.5998213", "0.59958285", "0.59731585", "0.59723544", "0.593696", "0.5935943", "0.5919996", "0.5889879", "0.58728933", "0.58719105", "0.58601785", "0.58572346", "0.58441716", "0.58398825", "0.5832978", "0.58299613", "0.5822913", "0.58097404", "0.5807888", "0.57835954", "0.5783261", "0.5777222", "0.57631874", "0.575847", "0.5746708", "0.5742604", "0.5716208", "0.5716151", "0.57158864", "0.57083046", "0.5686182", "0.5682023", "0.56611526", "0.5657563", "0.5651553", "0.56490767", "0.56466687", "0.5645244", "0.56435263", "0.5640769", "0.56407535", "0.56407374", "0.5637174", "0.56288636", "0.56184435", "0.5608157", "0.5607992", "0.5602701", "0.55989194", "0.55944103", "0.55937093", "0.5590053", "0.55851346", "0.55848026", "0.55758154", "0.55690634", "0.5567587", "0.55654365", "0.5563891", "0.5556078", "0.5555692", "0.5554186", "0.5542394", "0.55313814", "0.5522616", "0.55204016", "0.55186385", "0.551357", "0.55113256", "0.5505969", "0.5502176" ]
0.7553824
1
Prints the built classifier
public abstract void printClassifier();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n\n String s;\n Exemplar cur = m_Exemplars;\n int i;\t\n\n if (m_MinArray == null) {\n return \"No classifier built\";\n }\n int[] nbHypClass = new int[m_Train.numClasses()];\n int[] nbSingleClass = new int[m_Train.numClasses()];\n for(i = 0; i<nbHypClass.length; i++){\n nbHypClass[i] = 0;\n nbSingleClass[i] = 0;\n }\n int nbHyp = 0, nbSingle = 0;\n\n s = \"\\nNNGE classifier\\n\\nRules generated :\\n\";\n\n while(cur != null){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value((int) cur.classValue()) + \" IF : \";\n s += cur.toRules() + \"\\n\";\n nbHyp++;\n nbHypClass[(int) cur.classValue()]++;\t \n if (cur.numInstances() == 1){\n\tnbSingle++;\n\tnbSingleClass[(int) cur.classValue()]++;\n }\n cur = cur.next;\n }\n s += \"\\nStat :\\n\";\n for(i = 0; i<nbHypClass.length; i++){\n s += \"\\tclass \" + m_Train.attribute(m_Train.classIndex()).value(i) + \n\t\" : \" + Integer.toString(nbHypClass[i]) + \" exemplar(s) including \" + \n\tInteger.toString(nbHypClass[i] - nbSingleClass[i]) + \" Hyperrectangle(s) and \" +\n\tInteger.toString(nbSingleClass[i]) + \" Single(s).\\n\";\n }\n s += \"\\n\\tTotal : \" + Integer.toString(nbHyp) + \" exemplars(s) including \" + \n Integer.toString(nbHyp - nbSingle) + \" Hyperrectangle(s) and \" +\n Integer.toString(nbSingle) + \" Single(s).\\n\";\n\t\n s += \"\\n\";\n\t\n s += \"\\tFeature weights : \";\n\n String space = \"[\";\n for(int ii = 0; ii < m_Train.numAttributes(); ii++){\n if(ii != m_Train.classIndex()){\n\ts += space + Double.toString(attrWeight(ii));\n\tspace = \" \";\n }\n }\n s += \"]\";\n s += \"\\n\\n\";\n return s;\n }", "public String toString() {\n \n String str = m_Classifier.getClass().getName();\n \n str += \" \"\n + Utils\n .joinOptions(((OptionHandler) m_Classifier)\n\t .getOptions());\n \n return str;\n \n }", "public String toString() {\n\n try {\n\tStringBuffer text = new StringBuffer();\n\tif (m_test != null) {\n\t text.append(\"If \");\n\t for (Test t = m_test; t != null; t = t.m_next) {\n\t if (t.m_attr == -1) {\n\t text.append(\"?\");\n\t } else {\n\t text.append(m_instances.attribute(t.m_attr).name() + \" = \" +\n\t\t\t m_instances.attribute(t.m_attr).value(t.m_val));\n\t }\n\t if (t.m_next != null) {\n\t text.append(\"\\n and \");\n\t }\n\t }\n\t text.append(\" then \");\n\t}\n\ttext.append(m_instances.classAttribute().value(m_classification) + \"\\n\");\n\tif (m_next != null) {\n\t text.append(m_next.toString());\n\t}\n\treturn text.toString();\n } catch (Exception e) {\n\treturn \"Can't print Prism classifier!\";\n }\n }", "Classifier getClassifier();", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "@Override\n\tpublic String toString() {\n\t\treturn fileName + \" \" + features + \" -> \" + lemma + \", \" + classification;\n\t}", "public static String printLabelings(Classifier classifier, String tweet, PrintWriter out) throws IOException {\n\n CsvIterator reader = new CsvIterator(new StringReader(tweet), \"(\\\\w+)\\\\s+(\\\\w+)\\\\s+(.*)\", 3, 2, 1); // (data, label, name) field indices \n\n // Create an iterator that will pass each instance through \n // the same pipe that was used to create the training data \n // for the classifier. \n Iterator instances = classifier.getInstancePipe().newIteratorFrom(reader);\n\n // Classifier.classify() returns a Classification object \n // that includes the instance, the classifier, and the \n // classification results (the labeling). Here we only \n // care about the Labeling. \n String responseObj = \"{\";\n while (instances.hasNext()) {\n Labeling labeling = classifier.classify(instances.next()).getLabeling();\n for (int rank = 0; rank < labeling.numLocations(); rank++){\n responseObj += \"\\\"\"+labeling.getLabelAtRank(rank) + \"\\\":\" + labeling.getValueAtRank(rank);\n if (rank < labeling.numLocations()-1)\n \tresponseObj += \", \";\n }\n // System.out.println();\n }\n \tresponseObj += \"}\";\n \treturn responseObj;\n }", "public void printPrediction() {\n\t\tfor (int i = 0; i < testData.size(); i++) {\n\t\n\t\t\tSystem.out.print(testData.get(i) + \", Predicted label:\"\n\t\t\t\t\t+ predictLabels[i]);\n\t\t\tif (predictLabels[i] >= 20) System.out.println(\" Successful\");\n\t\t\telse System.out.println(\" Failed\");\n\t\t}\n\t}", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "private void printNetworks() {\n// for (GeneticNeuralNetwork network : networks)\n// System.out.println(network);\n// System.out.println(\"----------***----------\");\n// ////\n }", "public void print() {\n \n for (int i=0 ; i< getNumberOfCases() ; i++) {\n Configuration conf = get(i);\n conf.print();\n System.out.print(\"\\n\");\n }\n}", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "@Test\n public void test06() throws Throwable {\n String string0 = Evaluation.makeOptionString((Classifier) null, true);\n assertEquals(\"\\n\\nGeneral options:\\n\\n-h or -help\\n\\tOutput help information.\\n-synopsis or -info\\n\\tOutput synopsis for classifier (use in conjunction with -h)\\n-t <name of training file>\\n\\tSets training file.\\n-T <name of test file>\\n\\tSets test file. If missing, a cross-validation will be performed\\n\\ton the training data.\\n-c <class index>\\n\\tSets index of class attribute (default: last).\\n-x <number of folds>\\n\\tSets number of folds for cross-validation (default: 10).\\n-no-cv\\n\\tDo not perform any cross validation.\\n-split-percentage <percentage>\\n\\tSets the percentage for the train/test set split, e.g., 66.\\n-preserve-order\\n\\tPreserves the order in the percentage split.\\n-s <random number seed>\\n\\tSets random number seed for cross-validation or percentage split\\n\\t(default: 1).\\n-m <name of file with cost matrix>\\n\\tSets file with cost matrix.\\n-l <name of input file>\\n\\tSets model input file. In case the filename ends with '.xml',\\n\\ta PMML file is loaded or, if that fails, options are loaded\\n\\tfrom the XML file.\\n-d <name of output file>\\n\\tSets model output file. In case the filename ends with '.xml',\\n\\tonly the options are saved to the XML file, not the model.\\n-v\\n\\tOutputs no statistics for training data.\\n-o\\n\\tOutputs statistics only, not the classifier.\\n-i\\n\\tOutputs detailed information-retrieval statistics for each class.\\n-k\\n\\tOutputs information-theoretic statistics.\\n-classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\\n\\tUses the specified class for generating the classification output.\\n\\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\\n-p range\\n\\tOutputs predictions for test instances (or the train instances if\\n\\tno test instances provided and -no-cv is used), along with the \\n\\tattributes in the specified range (and nothing else). \\n\\tUse '-p 0' if no attributes are desired.\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-distribution\\n\\tOutputs the distribution instead of only the prediction\\n\\tin conjunction with the '-p' option (only nominal classes).\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-r\\n\\tOnly outputs cumulative margin distribution.\\n-xml filename | xml-string\\n\\tRetrieves the options from the XML-data instead of the command line.\\n-threshold-file <file>\\n\\tThe file to save the threshold data to.\\n\\tThe format is determined by the extensions, e.g., '.arff' for ARFF \\n\\tformat or '.csv' for CSV.\\n-threshold-label <label>\\n\\tThe class label to determine the threshold data for\\n\\t(default is the first label)\\n\", string0);\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public String getClassifier() {\n return _classifier;\n }", "public void printState(PrintWriter out) throws IOException {\n\t\tint doc = 0;\n\n\t\tfor (ArrayList<Integer> fs: training) {\n\t\t\tint seqLen = fs.size();\n\t\t\tint[] docLevels = levels[doc];\n\t\t\tNCRPNode node;\n\t\t\tint type, token, level;\n\n\t\t\tStringBuffer path = new StringBuffer();\n\t\t\t\n\t\t\t// Start with the leaf, and build a string describing the path for this doc\n\t\t\tnode = documentLeaves[doc];\n\t\t\tfor (level = numLevels - 1; level >= 0; level--) {\n\t\t\t\tpath.append(node.nodeID + \" \");\n\t\t\t\tnode = node.parent;\n\t\t\t}\n\n\t\t\tfor (token = 0; token < seqLen; token++) {\n\t\t\t\ttype = fs.get(token);\n\t\t\t\tlevel = docLevels[token];\n\t\t\t\t\n\t\t\t\t// The \"\" just tells java we're not trying to add a string and an int\n\t\t\t\tout.println(path + \"\" + type + \" \" + vocab.get(type) + \" \" + level + \" \");\n\t\t\t}\n\t\t\tdoc++;\n\t\t}\n\t}", "static private void printDot(DecisionTree tree) {\n\tSystem.out.println((new DecisionTreeToDot(tree)).produce());\n }", "static private void printDot(DecisionTree tree) {\n\tSystem.out.println((new DecisionTreeToDot(tree)).produce());\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void printLDR() {\n if(!empty()) {\n printLDRNodes(root);\n System.out.println();\n }\n }", "public String classOut() {\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(objective());\n\t\ts.append(' ');\n\t\ts.append(optimal() ? 1 : 0);\n\t\ts.append('\\n');\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts.append(item(i) ? 1 : 0);\n\t\t\ts.append(i < n - 1 ? ' ' : '\\n');\n\t\t}\n\t\treturn s.toString();\n\t}", "public synchronized String toString() {\n StringBuffer oBuffer = new StringBuffer();\n\n oBuffer\n .append(\"Preprocessing params: \").append(this.oPreprocessingParams).append(\"\\n\")\n .append(\"Feature extraction params: \").append(this.oFeatureExtractionParams).append(\"\\n\")\n .append(\"Classification params: \").append(this.oClassificationParams);\n\n return oBuffer.toString();\n }", "@Override\n\tpublic void assemble() {\n\t\tSystem.out.println(\"Basic Dress features\");\n\t}", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "public void print() {\n\t\tfor(String subj : subjects) {\n\t\t\tSystem.out.println(subj);\n\t\t}\n\t\tSystem.out.println(\"==========\");\n\t\t\n\t\tfor(StudentMarks ssm : studMarks) {\n\t\t\tSystem.out.println(ssm.student);\n\t\t\tfor(Byte m : ssm.marks) {\n\t\t\t\tSystem.out.print(m + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n\tpublic void buildClassifier(Instances data) throws Exception {\n decision_tree = new MyID3();\n\t\tdecision_tree.buildClassifier(data);\n\n//\t\tSystem.out.println(decision_tree.toString());\n\n train_data = data;\n\n set_of_rule = convertTreeIntoRules(decision_tree);\n\n\n // DONT DELETE THISSSS\n set_of_rule.setTrainData(data);\n\n List<Rule> listrule = set_of_rule.getList_rule();\n System.out.println(\"\\n\\n\\nBEFORE PRUNEDDD\");\n for (int i = 0; i < listrule.size(); i++ ){\n System.out.println(\"Rule \"+i+\" :\");\n Rule rule = listrule.get(i);\n List<Edge> edges = rule.getPreconditions();\n for (int j=0; j< edges.size(); j++) {\n System.out.println(\"\\t-\"+edges.get(j).getAttribute_name() + \" = \" + edges.get(j).getAttribute_value());\n }\n System.out.println(\"\\tClass = \"+rule.getClass_value());\n }\n\n// selectBestSetofRule();\n\n\t}", "public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }", "public void PrintClassVector() {\n\t\tfor(int i=0; i<class_vect.length; i++) {\n\t\t\tSystem.out.print(class_vect[i]+\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}", "public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Problem found when classifying the text\");\n\t\t}\t\t\n\t}", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "public void printTree() {\n Object[] nodeArray = this.toArray();\n for (int i = 0; i < nodeArray.length; i++) {\n System.out.println(nodeArray[i]);\n }\n }", "@Test\n public void test07() throws Throwable {\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n String string0 = Evaluation.makeOptionString(costSensitiveClassifier0, false);\n assertEquals(\"\\n\\nGeneral options:\\n\\n-h or -help\\n\\tOutput help information.\\n-synopsis or -info\\n\\tOutput synopsis for classifier (use in conjunction with -h)\\n-t <name of training file>\\n\\tSets training file.\\n-T <name of test file>\\n\\tSets test file. If missing, a cross-validation will be performed\\n\\ton the training data.\\n-c <class index>\\n\\tSets index of class attribute (default: last).\\n-x <number of folds>\\n\\tSets number of folds for cross-validation (default: 10).\\n-no-cv\\n\\tDo not perform any cross validation.\\n-split-percentage <percentage>\\n\\tSets the percentage for the train/test set split, e.g., 66.\\n-preserve-order\\n\\tPreserves the order in the percentage split.\\n-s <random number seed>\\n\\tSets random number seed for cross-validation or percentage split\\n\\t(default: 1).\\n-m <name of file with cost matrix>\\n\\tSets file with cost matrix.\\n-l <name of input file>\\n\\tSets model input file. In case the filename ends with '.xml',\\n\\ta PMML file is loaded or, if that fails, options are loaded\\n\\tfrom the XML file.\\n-d <name of output file>\\n\\tSets model output file. In case the filename ends with '.xml',\\n\\tonly the options are saved to the XML file, not the model.\\n-v\\n\\tOutputs no statistics for training data.\\n-o\\n\\tOutputs statistics only, not the classifier.\\n-i\\n\\tOutputs detailed information-retrieval statistics for each class.\\n-k\\n\\tOutputs information-theoretic statistics.\\n-classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\\n\\tUses the specified class for generating the classification output.\\n\\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\\n-p range\\n\\tOutputs predictions for test instances (or the train instances if\\n\\tno test instances provided and -no-cv is used), along with the \\n\\tattributes in the specified range (and nothing else). \\n\\tUse '-p 0' if no attributes are desired.\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-distribution\\n\\tOutputs the distribution instead of only the prediction\\n\\tin conjunction with the '-p' option (only nominal classes).\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-r\\n\\tOnly outputs cumulative margin distribution.\\n-g\\n\\tOnly outputs the graph representation of the classifier.\\n-xml filename | xml-string\\n\\tRetrieves the options from the XML-data instead of the command line.\\n-threshold-file <file>\\n\\tThe file to save the threshold data to.\\n\\tThe format is determined by the extensions, e.g., '.arff' for ARFF \\n\\tformat or '.csv' for CSV.\\n-threshold-label <label>\\n\\tThe class label to determine the threshold data for\\n\\t(default is the first label)\\n\\nOptions specific to weka.classifiers.meta.CostSensitiveClassifier:\\n\\n-M\\n\\tMinimize expected misclassification cost. Default is to\\n\\treweight training instances according to costs per class\\n-C <cost file name>\\n\\tFile name of a cost matrix to use. If this is not supplied,\\n\\ta cost matrix will be loaded on demand. The name of the\\n\\ton-demand file is the relation name of the training data\\n\\tplus \\\".cost\\\", and the path to the on-demand file is\\n\\tspecified with the -N option.\\n-N <directory>\\n\\tName of a directory to search for cost files when loading\\n\\tcosts on demand (default current directory).\\n-cost-matrix <matrix>\\n\\tThe cost matrix in Matlab single line format.\\n-S <num>\\n\\tRandom number seed.\\n\\t(default 1)\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n-W\\n\\tFull name of base classifier.\\n\\t(default: weka.classifiers.rules.ZeroR)\\n\\nOptions specific to classifier weka.classifiers.rules.ZeroR:\\n\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n\", string0);\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }", "public void printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Classification [imageUUID=\" + imageUUID + \", speciesName=\" + speciesName + \"]\";\r\n\t}", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "@Override\n\tpublic void print() {\n System.out.println(\"Leaf [isbn=\"+number+\", title=\"+title+\"]\");\n\t}", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "public void printAllComponentsOnStdOut() {\r\n System.out.println(\"PackageComponent: \" + this.getName());\r\n System.out.println(\"Contains these ClassDiagramComponents: \");\r\n int counter = 1;\r\n for (ComponentBase component : classDiagramComponents) {\r\n System.out.println(\"Component no.\" + counter + \": \\t\" + component.getName());\r\n counter++;\r\n }\r\n }", "public void print() {\n System.out.println(toString());\n }", "void print() {\n for (Process process : workload) {\n System.out.println(process);\n }\n }", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getClassification() != null) sb.append(\"Classification: \" + getClassification() + \",\");\n if (getConfigurations() != null) sb.append(\"Configurations: \" + getConfigurations() + \",\");\n if (getProperties() != null) sb.append(\"Properties: \" + getProperties() );\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn visability + \" class \" + className + \"{ \\n \";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn visability + \" \" + hierarchy + \" class \" + className\n\t\t\t\t\t+ \"{ \\n \";\n\t\t}\n\t}", "public void print ( InstanceAttributes instAttributes ){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void print() {\n\t\tSystem.out.println(\\u000a);\n\t\tSystem.out.println(this.getClass().getName());\n\t\tClassB classB = new ClassB();\n\t\tclassB.print();\n\t}", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void print(){\r\n System.out.println(toString());\r\n }", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}", "public static void main(String[] args) {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"This program requires two parameters, not \"+args.length+\". The first is a training file and the second is a data file.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tDecisionLearningTree dt = new DecisionLearningTree(args[0],args[1]);\n\t\tList<String> rs = dt.useBaselineClassifierOnData(); //dt.useTreeOnData();\n\t\tfor (String r : rs) {\n\t\t\tSystem.out.println(r);\n\t\t}\n\t\tSystem.out.println(\"==========================================================\");\n\t\tSystem.out.println(\"Reporting tree:\");\n\t\tdt.report();\t\t\n\t}", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "public void print() {\n System.out.println(\"Scheme print:\");\n System.out.println(\" Blocks:\");\n for (Block block : this.blocks) {\n // System.out.println(\" \" + block.getName() + \" (\" + block.getID() + \")\");\n for (Integer id : block.getConnections()) {\n System.out.println(\" \" + id);\n }\n //System.out.println(\" \" + block.outputs.getFirst().getDstID());\n }\n /*System.out.println(\" Connections:\");\n for (Con connection : this.connections) {\n System.out.println(\" [\" + connection.src + \"]---[\" + connection.dst + \"]\");\n }*/\n if(this.queue_set){\n System.out.println(\" Queue: \" + this.queue);\n }\n else{\n System.out.println(\" Queue not loaded\");\n }\n }", "public String printToList() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn \"<HTML>\" + visability + \" class \" + className\n\t\t\t\t\t+ \"{ <BR> <BR>\";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn \"<HTML>\" + visability + \" \" + hierarchy + \" class \"\n\t\t\t\t\t+ className + \"{ <BR> <BR>\";\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\ttry (InputStream modelInputStream = new FileInputStream(new File(\"en-frograt.bin\"));) {\r\n\r\n\t\t\tString testString = \"Amphibians are animals that dwell in wet environments\";\r\n\t\t\t\r\n\t\t\tDoccatModel documentCategorizationModel = new DoccatModel(modelInputStream);\r\n\t\t\tDocumentCategorizerME documentCategorizer = new \r\n\t\t\tDocumentCategorizerME(documentCategorizationModel);\r\n\t\t\t\r\n\t\t\tdouble[] probabilities = documentCategorizer.categorize(testString);\r\n\t\t\tString bestCategory = documentCategorizer.getBestCategory(probabilities);\r\n\t\t\tSystem.out.println(\"The best fit is: \" + bestCategory);\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < documentCategorizer.getNumberOfCategories(); i++) {\r\n\t\t\t System.out.printf(\"Category: %-4s - %4.2f\\n\", \r\n\t\t\t documentCategorizer.getCategory(i), probabilities[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(documentCategorizer.getAllResults(probabilities));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t // Handle exceptions\r\n\t\t} catch (IOException e) {\r\n\t\t // Handle exceptions\r\n\t\t}\r\n\t}", "void printClassCcft(ClassCcft iClassCcft)\n {\n System.out.println(iClassCcft.getElementValue());\n }", "public void print()\n {\n System.out.println(\"Course: \" + title + \" \" + codeNumber);\n \n module1.print();\n module2.print();\n module3.print();\n module4.print();\n \n System.out.println(\"Final mark: \" + finalMark + \".\");\n }", "public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}", "void displayInnnerClass() {\r\n\t\tNestedClass nestedClassObj = new NestedClass();\r\n\t\tnestedClassObj.displayPrint();\r\n\t}", "public void buildClassDescription() {\n\t\twriter.writeClassDescription();\n\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(subjects);\n\t}", "public static void main(String [] argv) {\n runClassifier(new NNge(), argv);\n }", "public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}", "public static void printConstructors(Class cl) {\n\t\tConstructor[] constructors = cl.getConstructors();\n\t\tfor ( Constructor con : constructors)\n\t\t\tSystem.out.println(con.toString());\n\t}", "public static void showNCCInfo(NERClassifierCombiner ncc) {\n System.err.println(\"\");\n System.err.println(\"info for this NERClassifierCombiner: \");\n ClassifierCombiner.showCCInfo(ncc);\n System.err.println(\"useSUTime: \"+ncc.useSUTime);\n System.err.println(\"applyNumericClassifier: \"+ncc.applyNumericClassifiers);\n System.err.println(\"\");\n }", "default void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }", "@Test\n public void test08() throws Throwable {\n DecisionStump decisionStump0 = new DecisionStump();\n String string0 = Evaluation.makeOptionString(decisionStump0, false);\n assertEquals(\"\\n\\nGeneral options:\\n\\n-h or -help\\n\\tOutput help information.\\n-synopsis or -info\\n\\tOutput synopsis for classifier (use in conjunction with -h)\\n-t <name of training file>\\n\\tSets training file.\\n-T <name of test file>\\n\\tSets test file. If missing, a cross-validation will be performed\\n\\ton the training data.\\n-c <class index>\\n\\tSets index of class attribute (default: last).\\n-x <number of folds>\\n\\tSets number of folds for cross-validation (default: 10).\\n-no-cv\\n\\tDo not perform any cross validation.\\n-split-percentage <percentage>\\n\\tSets the percentage for the train/test set split, e.g., 66.\\n-preserve-order\\n\\tPreserves the order in the percentage split.\\n-s <random number seed>\\n\\tSets random number seed for cross-validation or percentage split\\n\\t(default: 1).\\n-m <name of file with cost matrix>\\n\\tSets file with cost matrix.\\n-l <name of input file>\\n\\tSets model input file. In case the filename ends with '.xml',\\n\\ta PMML file is loaded or, if that fails, options are loaded\\n\\tfrom the XML file.\\n-d <name of output file>\\n\\tSets model output file. In case the filename ends with '.xml',\\n\\tonly the options are saved to the XML file, not the model.\\n-v\\n\\tOutputs no statistics for training data.\\n-o\\n\\tOutputs statistics only, not the classifier.\\n-i\\n\\tOutputs detailed information-retrieval statistics for each class.\\n-k\\n\\tOutputs information-theoretic statistics.\\n-classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\\n\\tUses the specified class for generating the classification output.\\n\\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\\n-p range\\n\\tOutputs predictions for test instances (or the train instances if\\n\\tno test instances provided and -no-cv is used), along with the \\n\\tattributes in the specified range (and nothing else). \\n\\tUse '-p 0' if no attributes are desired.\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-distribution\\n\\tOutputs the distribution instead of only the prediction\\n\\tin conjunction with the '-p' option (only nominal classes).\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-r\\n\\tOnly outputs cumulative margin distribution.\\n-z <class name>\\n\\tOnly outputs the source representation of the classifier,\\n\\tgiving it the supplied name.\\n-xml filename | xml-string\\n\\tRetrieves the options from the XML-data instead of the command line.\\n-threshold-file <file>\\n\\tThe file to save the threshold data to.\\n\\tThe format is determined by the extensions, e.g., '.arff' for ARFF \\n\\tformat or '.csv' for CSV.\\n-threshold-label <label>\\n\\tThe class label to determine the threshold data for\\n\\t(default is the first label)\\n\\nOptions specific to weka.classifiers.trees.DecisionStump:\\n\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n\", string0);\n }", "public static void printIndications() {\n\t\tSystem.out.println(\"\\n\" + \"Usage :\"\n\t\t\t\t+ \"\\n\\t\" + \"java -jar <jar-file> nodeScopeDirectoryPath windowSize\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath is the path of the directory where the tagged corpus is located\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"windowSize is the size of the sliding window; it must be an integer (usually 2)\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Other input parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the candidates terms must be located at src/main/resources/concepts/candidates.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the reference terms must be located at src/main/resources/concepts/reference_samples.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the stopwords must be located at src/main/resources/stopwords/stopwords_users.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Output parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/pat_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/med_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/frequency.json\"\n\t\t\t\t+ \"\\n\"\n\t\t\t\t);\n\t}", "public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }", "public void print() {\n mat.print();\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "public static void main(String[] args) {\n\t\t/*Tuple[] tuples = new Tuple[]{\n\t\t\tnew Tuple(\"0 0 1 0 0\", \"1 3\", ' '),\n\t\t\tnew Tuple(\"1 0 0 1 1\", \"1 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 1\", \"1 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"2 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 1\", ' '),\n\t\t\tnew Tuple(\"1 1 0 0 1\", \"3 2\", ' '),\n\t\t\tnew Tuple(\"0 0 0 1 0\", \"3 3\", ' '),\n\t\t\tnew Tuple(\"0 1 0 1 1\", \"2 3\", ' ')\n\t\t};\n\t\tdata = new DataSet(tuples);*/\n\t\t\n\t\t//data = Parser.parseAttributes(\"Corel5k-train.arff\", 374);\n\t\tdata = Parser.parseShortNotation(\"diabetes.txt\", 1, new NumericalItemSet(new int[]{}));\n\t\ts = data.s();\n\t\tn = data.getTuples().length;\n\t\tm = data.getTuples()[0].getClassValues().length;\n\t\t\n\t\t/*double u = 0;\n\t\tlong l = 0;\n\t\tfor(int j = 0; j < 10; j++) {\n\t\t\tdouble t = System.currentTimeMillis();\n\t\t\tfor(int i = 0; i < 10000; i++)\n\t\t\t\tu = data.getBluePrint().getOneItemSet(2, 48).ub();\n\t\t\tl += (System.currentTimeMillis() - t);\n\t\t}\n\t\tSystem.out.println(((double)l/10));*/\n\t\n\t\t\n\t\tSystem.out.println(\"Data loaded, \"+data.getTuples().length+\" tuples, \"+\n\t\t\t\tdata.getTuples()[0].getItemSet().getLength()+\" items, \"+\n\t\t\t\tdata.getTuples()[0].getClassValues().length+\" class values\");\n\t\t\t\t\n\t\tStopWatch.tic(\"Full time\");\n\t\tSystem.out.println(icc());\n\t\tStopWatch.printToc(\"Full time\");\n\t}", "public static void PrintDatasetCharacter(Instances dts){\n\n\t\tMap<Object, Integer> classes = new TreeMap<Object, Integer>();\n\n\t\tSystem.out.println(\"Nbr of features: \" + (dts.numAttributes()-1));\n\t\tSystem.out.println(\"Nbr of instances: \" + dts.numInstances());\n\n\t\t// Set classes = new HashSet();\n\n\t\tfor(int i = 0; i< dts.numInstances(); i++){\n\t\t\t// System.out.println(dts.instance(i).toString());\n\t\t\tif (classes.containsKey(dts.instance(i).classValue()))\n\t\t\t\tclasses.put(dts.instance(i).classValue(), classes.get(dts.instance(i).classValue())+1);\n\t\t\telse\n\t\t\t\tclasses.put(dts.instance(i).classValue(), 1);\n\t\t}\n\n\t\tIterator<Object> keySetIterator = classes.keySet().iterator();\n\n\t\twhile(keySetIterator.hasNext()){\n\t\t\tObject key = keySetIterator.next();\n\t\t\tSystem.out.printf(\"Class: %s nbr. of instances: %d (%.2f%%)\\n\", key , classes.get(key) , (double)classes.get(key) * 100 /dts.numInstances() );\n\t\t}\n\n\t\t// System.out.println(\"Class set: \" + classes.toString());\n\t}", "public String toString(){\n \tint longest = longestClassName;\n StringBuffer sb = new StringBuffer();\n PrintfFormat\tformat = null;\n \n if (attributeDefinitions.getLongestName() > longest)\n \tlongest = attributeDefinitions.getLongestName();\n \n String\tlongestStr = \"\" + longest;\n format = new PrintfFormat(\"%-\" + longestStr + \"s \");\n\n sb.append(\"*** Attributes\\n\");\n TreeMap<DefinitionName,AttributeDefinition> sattrs = new TreeMap<DefinitionName, AttributeDefinition>();\n \n for(AttributeDefinition ad: attributeDefinitions.values())\n \tsattrs.put(ad.getName(), ad);\n \n for(AttributeDefinition ad : sattrs.values())\n sb.append(format.sprintf(ad.getObjectName()) + ad.getDefinedIn().getName() + \"\\n\");\n \n sb.append(\"*** Classes\\n\");\n// TreeMap<DefinitionName,ClassDefinition> scdefs = new TreeMap<DefinitionName, ClassDefinition>();\n// \n// for(ClassDefinition cd : classDefs.values())\n// \tscdefs.put(cd.getName(), cd);\n// \n// for(ClassDefinition cd : scdefs.values()){\n// sb.append(format.sprintf(cd.getObjectName()));\n// if (cd.getAbbrev() != null)\n// sb.append(\" AB \" + cd.getAbbrev());\n// sb.append(cd.getDefinedIn().getName() + \"\\n\");\n// }\n \n for(ClassDefinition cd : classDefinitions.values()){\n sb.append(format.sprintf(cd.getObjectName()));\n if (cd.getAbbrev() != null)\n sb.append(\" AB \" + cd.getAbbrev());\n sb.append(cd.getDefinedIn().getName() + \"\\n\");\n }\n \n return(new String(sb.toString()));\n }", "@Override\r\n\tpublic void print() {\n\t}", "public NBClassifier(String trainDataFolder, int trainPortion)\n\t{\n\t\ttrainingDocs = new ArrayList<String>();\n\t\tallDocs = new ArrayList<String>();\n\t\tnumClasses = 2;\n\t\tclassCounts = new int[numClasses];\n\t\tclassStrings = new String[numClasses];\n\t\tclassTokenCounts = new int[numClasses];\n\t\tcondProb = new HashMap[numClasses];\n\t\tvocabulary = new HashSet<String>();\n\t\tfor(int i=0;i<numClasses;i++){ //just initialization\n\t\t\tclassStrings[i] = \"\";\n\t\t\tcondProb[i] = new HashMap<String,Double>();\n\t\t}\n\t\ttotalDocs = 5574;\n\t\toffset = Math.round(totalDocs) * trainPortion / 100;\n\t\tSystem.out.println(\"Numer of Documents For Training: \"+offset);\n\t\tSystem.out.println(\"Numer of Documents For Testing: \"+(totalDocs-offset));\n\t\tpreprocess(trainDataFolder);\n\t\t\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tString[] tokens = classStrings[i].split(\" \");\n\t\t\tclassTokenCounts[i] = tokens.length;\n\t\t\t//collecting the counts\n\t\t\tfor(String token:tokens){\n\t\t\t\t//System.out.println(token);\n\t\t\t\tvocabulary.add(token);\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tdouble count = condProb[i].get(token);\n\t\t\t\t\tcondProb[i].put(token, count+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcondProb[i].put(token, 1.0);\n\t\t\t\t//System.out.println(token+\" : \"+condProb[i].get(token));\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tIterator<Map.Entry<String, Double>> iterator = condProb[i].entrySet().iterator();\n\t\t\tint vSize = vocabulary.size();\n\t\t\twhile(iterator.hasNext())\n\t\t\t{\n\t\t\t\tMap.Entry<String, Double> entry = iterator.next();\n\t\t\t\tString token = entry.getKey();\n\t\t\t\tDouble count = entry.getValue();\n\t\t\t\t//System.out.println(count+1+\" / ( \"+classTokenCounts[i]+\" + \"+vSize+\" )\");\n\t\t\t\tcount = (count+1)/(classTokenCounts[i]+vSize);\n\t\t\t\tcondProb[i].put(token, count);\n\t\t\t}\n\t\t\t//System.out.println(\"dekho: \"+condProb[i]);\n\t\t}\n\t\ttestModel();\n\t}", "public String printfull(){\r\n\t\tString ans = this.toString() + \" \\n\";\r\n\t\t\r\n\t\tArrayList <String> details = getOpDetails();\r\n\t\tfor(String d: details){\r\n\t\t\tans = ans + d + \" \\n\";\r\n\t\t}\r\n\t\t\r\n\t\tans = ans + \"Input Files:\\n\" ;\r\n\t\tFileInfo fileIndex = (FileInfo)input.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo)fileIndex.getNextSibling();\r\n\t\t}//end input while\r\n\t\t\r\n\t\t\r\n\t\tans = ans + \"Output Files:\\n\";\r\n\t\tfileIndex = (FileInfo)output.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo) fileIndex.getNextSibling();\r\n\t\t}//end output while\r\n\t\treturn ans;\r\n\t}", "public void print() {\n System.out.println(this.toString());\n }", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public void dump()\n {\n System.out.println(toString());\n }", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void print (InstanceAttributes instAttributes, PrintWriter out){\r\n\t\tout.print(\" > Inputs: \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\tout.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\tout.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\tout.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tout.print(\"\\n > Outputs: \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\tout.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\tout.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\tout.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tout.print(\"\\n > Undefined: \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\tout.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\tout.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\tout.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\tbreak;\r\n\t\t\t} \r\n\t\t}\r\n\t}", "private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }", "public String getClassification() {\n return classification;\n }", "@Override\n public Classifier getClassifier() {\n return this.classifier;\n }", "public void classify() throws IOException\n {\n TrainingParameters tp = new TrainingParameters();\n tp.put(TrainingParameters.ITERATIONS_PARAM, 100);\n tp.put(TrainingParameters.CUTOFF_PARAM, 0);\n\n DoccatFactory doccatFactory = new DoccatFactory();\n DoccatModel model = DocumentCategorizerME.train(\"en\", new IntentsObjectStream(), tp, doccatFactory);\n\n DocumentCategorizerME categorizerME = new DocumentCategorizerME(model);\n\n try (Scanner scanner = new Scanner(System.in))\n {\n while (true)\n {\n String input = scanner.nextLine();\n if (input.equals(\"exit\"))\n {\n break;\n }\n\n double[] classDistribution = categorizerME.categorize(new String[]{input});\n String predictedCategory =\n Arrays.stream(classDistribution).filter(cd -> cd > 0.5D).count() > 0? categorizerME.getBestCategory(classDistribution): \"I don't understand\";\n System.out.println(String.format(\"Model prediction for '%s' is: '%s'\", input, predictedCategory));\n }\n }\n }", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "public String getClassification() {\n return classification;\n }" ]
[ "0.6725894", "0.6609139", "0.65836513", "0.6440624", "0.6259621", "0.61800796", "0.61357594", "0.60527164", "0.5941675", "0.5925126", "0.5848697", "0.5835162", "0.58067584", "0.5791836", "0.57693756", "0.5766604", "0.5752819", "0.5740322", "0.57210916", "0.5696799", "0.5696799", "0.5692395", "0.56917655", "0.5683984", "0.5664294", "0.56567675", "0.56541765", "0.5631799", "0.5627447", "0.5624136", "0.5623441", "0.56210965", "0.5618701", "0.5616058", "0.5614542", "0.5599713", "0.55947435", "0.55923826", "0.5576391", "0.55747557", "0.55664086", "0.55658084", "0.556544", "0.5561995", "0.5561881", "0.5561511", "0.555307", "0.55508715", "0.5549774", "0.553835", "0.5536174", "0.55353284", "0.55346096", "0.5520549", "0.55193764", "0.55061054", "0.55022126", "0.5500022", "0.5497419", "0.5490178", "0.5486803", "0.54798234", "0.54766536", "0.54593", "0.54564595", "0.5456333", "0.5451959", "0.5450939", "0.5448327", "0.5445596", "0.54422414", "0.54419386", "0.5441225", "0.54323107", "0.5430361", "0.54285", "0.54256403", "0.54137385", "0.54093605", "0.54028344", "0.54015803", "0.5398943", "0.53900814", "0.5384669", "0.53773797", "0.53772914", "0.5373602", "0.5371141", "0.536977", "0.53663266", "0.5361873", "0.5361556", "0.53615415", "0.5358274", "0.53547126", "0.535414", "0.5353401", "0.5351851", "0.53485465", "0.5348517" ]
0.8001508
0
Function to encrpyt a plaintext with ChaCha20, returns the ciphertext
public static byte[] encryptChacha20(byte[] plainText, Key key, byte[] nonce, int counter) throws Exception { Cipher cipher = Cipher.getInstance("ChaCha20"); //Initialize the cipher for chacha20 ChaCha20ParameterSpec chacha20ParameterSpec = new ChaCha20ParameterSpec(nonce, counter); //Specify nonce and counter cipher.init(Cipher.ENCRYPT_MODE, key, chacha20ParameterSpec); //Initialize the cipher as encryption mode, with the key and param (counter + nonce) return cipher.doFinal(plainText); //Return the encrypted plaintext }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int x = (str.charAt(i) + key.charAt(i)) %26;\n // convert into alphabets(ASCII)\n x += 'A';\n \n cipher_text+=(char)(x);}\n }\n return cipher_text;\n}", "public String encrypt(String geheimtext);", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }", "private String encStr(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tbyte[] newCBCIV;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (nNumBytes - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, nNumBytes);\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tString strEncrypt = EQBinConverter.bytesToHexStr(buf, 0, nNumBytes);\n\t\tnewCBCIV = new byte[EQBlowfishECB.BLOCKSIZE];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, newCBCIV, 0);\n\t\tString strCBCIV = EQBinConverter.bytesToHexStr(newCBCIV, 0, EQBlowfishECB.BLOCKSIZE);\n\t\t// System.out.println(\"encrypt = [\" + strEncrypt + \"]\");\n\t\t// System.out.println(\"strCBCIV = [\" + strCBCIV + \"]\");\n\t\treturn strCBCIV + strEncrypt;\n\t}", "public String encrypt(String plainText);", "public static String caesarCypherEncryptor(String str, int key) {\n /* StringBuilder cipher = new StringBuilder();\n for (char ch : str.toCharArray()) {\n char shiftedChar = (char) (((ch - 'a' + key) % 26) + 'a');\n cipher.append(shiftedChar);\n }\n return cipher.toString();*/\n\n return str.chars()\n .mapToObj(ch -> (char) (((ch - 'a' + key) % 26) + 'a'))\n .map(String::valueOf)\n .collect(Collectors.joining());\n }", "public char encrypt(char ch) {\n \n char chUC = Character.toUpperCase(ch);\n int cInd = ALPHABET.indexOf(chUC);\n \n // do not translate non letters\n if (cInd==-1) return ch;\n \n // index of encoded character\n int enInd = (cInd+key)%26;\n // encoded character\n char enCh = ALPHABET.charAt(enInd);\n \n // check the case of character and return appropriate\n if (Character.isUpperCase(ch)) return enCh;\n else return Character.toLowerCase(enCh);\n \n }", "public String encrypt(String text) {\n\t\t\n\t\t//If key is shorter than the text, repeat keyword along length of text\n\t\tif(key.length() < text.length()) {\n\t\t\trepeatKey(text);\n\t\t}\n\t\t\n\t\ttext = text.toLowerCase();\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(int i = 0 ; i < text.length(); i++) {\n\t\t\tchar textLetter = text.charAt(i);\n\t\t\tchar keyLetter = key.charAt(i);\n\t\t\t\t\t\t\n\t\t\t//Char to encode's position in alphabet\n\t\t\tint textCharacterIndex = alphabet.indexOf(textLetter);\n\t\t\t\n\t\t\t//Only encrypt letters\n\t\t\tif(Character.isLetter(textLetter)) {\n\t\t\t\t\n\t\t\t\t//If character is in the second half of cipher A-M\n\t\t\t\tif(charMap.get(textLetter) > 12 && charMap.get(textLetter) <= 25) {\n\t\t\t\t\t\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftLeft(baseCipherRHS, keyValue);\t\t\t\t\t\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftRight(baseCipherLHS, keyValue);\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsb.append(text.charAt(i));\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "public static String caesarCypherEncryptor(String str, int key) {\n\n key = key % 26;\n\n char[] array = str.toCharArray();\n\n for (int i = 0; i < array.length; i++) {\n int value = array[i] + key;\n if(value <= 122)\n array[i] = (char) value;\n else\n array[i] = (char) (96 + value - 122);\n }\n\n return new String(array);\n }", "private String encStr(String plainText, long newCBCIV) {\n int strlen = plainText.length();\n byte[] buf = new byte[((strlen << 1) & ~7) + 8];\n int pos = 0;\n for (int i = 0; i < strlen; i++) {\n char achar = plainText.charAt(i);\n buf[pos++] = (byte) ((achar >> 8) & 0x0ff);\n buf[pos++] = (byte) (achar & 0x0ff);\n }\n byte padval = (byte) (buf.length - (strlen << 1));\n while (pos < buf.length) {\n buf[pos++] = padval;\n }\n this.bfc.setCBCIV(newCBCIV);\n this.bfc.encrypt(buf, 0, buf, 0, buf.length);\n byte[] newIV = new byte[Blowfish.BLOCKSIZE];\n BinConverter.longToByteArray(newCBCIV, newIV, 0);\n return BinConverter.bytesToHexStr(newIV, 0, Blowfish.BLOCKSIZE) + BinConverter.bytesToHexStr(buf, 0, buf.length);\n }", "public CryptObject reencrypt(Ciphertext ciphertext);", "public static String encryptCaesar(String plainText, int key) {\r\n\t\t// Checks\r\n\t\tif (!stringInBounds(plainText)) { return \"\"; } // If the string is not in bounds, return a empty string\r\n\t\t//if (plainText.length() <= 0) { return \"\"; }\r\n\t\t\r\n\t\t// Variables\r\n\t\tString encrypted = \"\"; // Encrypted string, to be built, char by char\r\n\t\t\r\n\t\t// Loops\r\n\t\tfor (int i = 0; i < plainText.length(); i++) {\r\n\t\t\t// Variables\r\n\t\t\tchar c = plainText.charAt(i); // Decrypted character at index i of string plainText\r\n\t\t\tint ec = (int)c + key;\r\n\t\t\t\r\n\t\t\t// Loops\r\n\t\t\twhile (ec > UPPER_BOUND) { ec -= RANGE; }\r\n\t\t\t\r\n\t\t\t// Append to string\r\n\t\t\tencrypted += (char) ec;\r\n\t\t}\r\n\t\t\r\n\t\t// Return\r\n\t\treturn encrypted;\r\n\t}", "public String originalText(String cipher_text, String key)\n{\n String orig_text=\"\";\n \n for (int i = 0 ; i < cipher_text.length() && \n i < key.length(); i++)\n {\n if(cipher_text.charAt(i) == ' ' || cipher_text.charAt(i) == '\\n')\n orig_text+=cipher_text.charAt(i);\n else{\n // converting in range 0-25\n int x = (cipher_text.charAt(i) - \n key.charAt(i) + 26) %26; \n // convert into alphabets(ASCII)\n x += 'A';\n orig_text+=(char)(x);\n }\n }\n return orig_text;\n}", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }", "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n if (letter >= 'a' && letter <= 'z') {\n encMsg[ind] = (char) ('a' + ((letter - 'a' + key) % 26));\n } else if (letter >= 'A' && letter <= 'Z') {\n encMsg[ind] = (char) ('A' + ((letter - 'A' + key) % 26));\n } else {\n encMsg[ind] = letter;\n }\n }\n return new String(encMsg);\n }\n }", "Encryption encryption();", "public String ebcEncrypt(String plaintext, String key) {\n\t\treturn AESEBC.AESEncrypt(plaintext, key);\n\t}", "public static String encipher(String string, String key){\n key = key != null ? key : defaultKey;\n String newString = \"\";\n string = Enigma.handleStringOnInput(string);\n string = string.toUpperCase();\n for (int i = 0; i < string.length(); i++){\n int temp = alphabetL.indexOf(string.charAt(i));\n newString += key.charAt(temp);\n }\n return newString;\n }", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "public static String encryptCaesar(String plainText, int key) {\r\n\t\t\r\n\t\tchar [] pText = plainText.toCharArray();\r\n\t\tchar [] eText = new char[plainText.length()];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tdo {\r\n\t\t\tfor(char t: pText) {\r\n\t\t\t\t\r\n\t\t\t\tt +=key;\r\n\t\t\t\teText[i] = t;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tString st = String.valueOf(eText);\r\n\t\treturn st;\r\n\t}", "@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n encMsg[ind] = (char) ((letter + key) % 65536);\n }\n return new String(encMsg);\n }\n }", "byte[] encrypt(String plaintext);", "public static String encrypt(String text) {\r\n\t\tString modifiedText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character + 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\tmodifiedText += Character.toString(character);\r\n\t\t}\r\n\t\treturn modifiedText;\r\n\t}", "public void testCaesar(){\n int key1 = 23;\n int key2 = 17;\n String encrypted = encrypt(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 15);\n System.out.println(\"key is 15\" + \"\\n\" + encrypted);\n String encrypted2 = encryptTwoKeys(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 8, 21);\n System.out.println(\"key are 8 and 21\" + \"\\n\" + encrypted2);\n }", "private String teaEncrypt(String plaintext, String password) {\n if (plaintext.length() == 0) {\n return (\"\"); // nothing to encrypt\n }\n // 'escape' plaintext so chars outside ISO-8859-1 work in single-byte packing, but keep\n // spaces as spaces (not '%20') so encrypted text doesn't grow too long (quick & dirty)\n String asciitext = plaintext;\n int[] v = strToLongs(asciitext); // convert string to array of longs\n\n if (v.length <= 1) {\n int[] temp = new int[2];\n temp[0] = 0; // algorithm doesn't work for n<2 so fudge by adding a null\n temp[1] = v[0];\n v = temp;\n }\n int[] k = strToLongs(password.substring(0, 16).toLowerCase()); // simply convert first 16 chars of password as\n // key\n int n = v.length;\n\n // int z = v[n - 1], y = v[0], delta = 0x9E3779B9;\n // int mx, e, q = (int) Math.floor(6 + 52 / n), sum = 0;\n int z = v[n - 1];\n int y = v[0];\n int delta = 0x9E3779B9;\n int mx;\n int e;\n int q = (int) Math.floor(6 + 52 / n);\n int sum = 0;\n\n while (q-- > 0) { // 6 + 52/n operations gives between 6 & 32 mixes on each word\n sum += delta;\n e = sum >>> 2 & 3;\n for (int p = 0; p < n; p++) {\n y = v[(p + 1) % n];\n mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);\n z = v[p] += mx;\n }\n }\n\n String ciphertext = longsToHexStr(v);\n\n return ciphertext;\n }", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "private String encodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n SubstCipher encodingText = new SubstCipher(this.shiftAlea);\n encodingText.buildShiftedTextFor(text);\n String encoding = encodingText.getLastShiftedText();\n return encodageMot(encoding);\n }", "public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }", "@Override\n public byte[] encrypt(byte[] plaintext) {\n java.security.spec.ECPoint point = hashIntoTheCurveInternal(plaintext);\n return encrypt(convertECPoint(point));\n }", "public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "@Override\n public byte[] reEncrypt(byte[] ciphertext) {\n ECPoint point = checkPointOnCurve(ciphertext);\n return encrypt(point);\n }", "void encrypt(ChannelBuffer buffer, Channel c);", "public abstract String encryptMsg(String msg);", "public static String encrypt(String str)\n {\n StringBuilder sb = new StringBuilder(str);\n\n int lenStr = str.length();\n int lenKey = key.length();\n\n //\n // For each character in our string, encrypt it...\n for ( int i = 0, j = 0; i < lenStr; i++, j++ )\n {\n if ( j >= lenKey ) j = 0; // Wrap 'round to beginning of key string.\n\n //\n // XOR the chars together. Must cast back to char to avoid compile error.\n //\n sb.setCharAt(i, (char)(str.charAt(i) ^ key.charAt(j)));\n }\n\n return sb.toString();\n }", "String encryption(Long key, String encryptionContent);", "public String encrypt(String word) {\n String [] encr = new String[word.length()];\n StringBuilder encrRet = new StringBuilder();\n for (int i = 0; i<word.length();i++)\n {\n char shift = (char) (((word.charAt(i) - 'a' + 3) % 26) + 'a');\n encrRet = encrRet.append(shift);\n }\n\n return encrRet.toString();\n }", "public BigInteger Encryption(String text){\n \tcypherText = BigInteger.valueOf(0);\n \tint bposition = 0;\n \t/*\n \t * Cursor move from 128 to 1 each time. Do & operation between chvalue\n \t * and cursor, if not 0, means in bit format this position is 1, add\n \t * the corresponding BigInteger in the b list to cypherText.\n \t */\n \tfor(byte ch: text.getBytes()){\n \t\tint cursor = 128;\n \t\tint chvalue = ch;\n \t\tfor(int i = 0;i < 8;i++){\n \t\t\tif((chvalue & cursor) != 0){\n \t\t\t\tcypherText = cypherText.add(b[bposition]);\n \t\t\t}\n \t\t\tcursor >>= 1;\n \t\t bposition ++;\n \t\t}\n \t}\n \treturn cypherText;\n }", "void encryptText() {\n\n ArrayList<Character> punctuation = new ArrayList<>(\n Arrays.asList('\\'', ':', ',', '-', '-', '.', '!', '(', ')', '?', '\\\"', ';'));\n\n for (int i = 0; i < text.length(); ++i) {\n\n if (punctuation.contains(this.text.charAt(i))) {\n\n // only remove punctuation if not ? or . at the very end\n if (!((i == text.length() - 1) && (this.text.charAt(i) == '?' || this.text.charAt(i) == '.'))) {\n this.text.deleteCharAt(i);\n\n // go back to previous position since current char was deleted,\n // meaning the length of the string is now 1 less than before\n --i;\n }\n }\n }\n \n \n // Step 2: convert phrase to lowerCase\n\n this.setText(new StringBuilder(this.text.toString().toLowerCase()));\n\n \n // Step 3: split the phrase up into words and encrypt each word separately using secret key\n\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n \n // Step 3.1:\n\n ArrayList<Character> vowels = new ArrayList<>(Arrays.asList('a', 'e', 'i', 'o', 'u'));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if first char is vowel, add y1x3x4 to the end of word\n if (vowels.contains(words.get(i).charAt(0))) \n words.set(i, words.get(i).substring(0, words.get(i).length()) + this.secretKey.substring(3, 6));\n\n // otherwise, move first char to end of the word, then add x1x2 to the end of word\n else \n words.set(i, words.get(i).substring(1, words.get(i).length()) + words.get(i).charAt(0) + this.secretKey.substring(0, 2));\n }\n\n StringBuilder temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n\n \n // Step 3.2:\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // if position is a multiple of z, insert the special char y2\n if ((i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) && (i != 0)) {\n this.getText().replace(0, this.getText().length(), this.getText().substring(0, i) + this.secretKey.charAt(8)\n + this.getText().substring(i, this.getText().length()));\n }\n }\n \n }", "private String encrypt (String password){\r\n String encrypted = \"\";\r\n char temp;\r\n int ASCII;\r\n //For each letter in password.\r\n for (int i = 0; i < password.length(); i++){\r\n temp = password.charAt(i);\r\n ASCII = (int) temp;\r\n //If the letter is a character.\r\n if (ASCII >= 32 && ASCII <= 127){\r\n int x = ASCII - 32;\r\n x = (x + 6) % 96; /*Mod the characters so that it cannot go over the amount.\r\n The letters are all shifted plus 6 characters along. */\r\n encrypted += (char) (x + 32);\r\n }\r\n }\r\n return encrypted;\r\n }", "public static String caesarify(String text, int key) {\r\n String newText = \"\";\r\n String alpha = shiftAlphabet(0);\r\n String newAlpha = shiftAlphabet(key);\r\n\r\n for (int i = 0; i < text.length(); i++) {\r\n String currentLetter = String.valueOf(text.charAt(i));\r\n int indexOfLetter = alpha.indexOf(currentLetter);\r\n String letterReplacement = String.valueOf(newAlpha.charAt(indexOfLetter));\r\n\r\n newText += letterReplacement;\r\n\r\n }\r\n return newText;\r\n }", "public String encrypt(String text) {\n return content.encrypt(text);\n }", "public static String encrypt(String text, int key) {\n StringBuilder sb = new StringBuilder();\n for (char c : text.toCharArray()) {\n if (Character.isLetter(c)) {\n sb.append(shift(c, key));\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public String encrypt (String input) {\n // parameter checks. If input has nothing, or both keys\n // are zero, we have no work to do.\n if (!hasValue(input)) return \"\";\n if (mainKey1 == 0 && mainKey2 == 0) return input;\n\n // Start with a StringBuilder we can update below.\n StringBuilder encrypted = new StringBuilder(input);\n\n // Walk the input string and transform each letter that exists in\n // our alphabet\n for (int i = 0; i < encrypted.length(); i++) {\n char currChar = encrypted.charAt(i);\n int idx = alphabet.indexOf(currChar);\n if (idx != -1) {\n // Which alphabet do I use? even i is key1, odd i is key2\n String shiftedAlphabet = (i % 2 == 0) ? shiftedAlphabet1: shiftedAlphabet2;\n char newChar = shiftedAlphabet.charAt(idx);\n encrypted.setCharAt(i, newChar);\n }\n }\n\n return encrypted.toString();\n }", "private byte[] encStrToBytes(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"text = [\");\n\t\t// for (int i = 0; i < sPlainText.length; i++ ) {\n\t\t// System.out.print( sPlainText[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Alocated \" + nNumBytes + \" byte buffer\");\n\t\t// System.out.println(\"Buffer length = \" + buf.length + \" bytes\");\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (buf.length - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// int bytesPrinted = 0;\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// bytesPrinted++;\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Buf length check \" + nNumBytes + \" = \" + buf.length);\n\t\t// System.out.println(\"Bytes printed = \" + bytesPrinted);\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, buf.length);\n\t\t// System.out.println(\"Encrypted buffer length = \" + buf.length + \" bytes\");\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tint totalNumBytes = EQBlowfishECB.BLOCKSIZE + buf.length;\n\t\tbyte[] result = new byte[totalNumBytes];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, result, 0);\n\t\tint count = 0;\n\t\tfor (int i = EQBlowfishECB.BLOCKSIZE; i < totalNumBytes; i++)\n\t\t{\n\t\t\tresult[i] = buf[count++];\n\t\t}\n\t\t// System.out.print(\" CBCIV bytes=[\");\n\t\t// for (int i = 0; i < EQBlowfishCBC.BLOCKSIZE; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Final Buffer length = \" + result.length + \" bytes\");\n\t\t// System.out.print(\" final bytes=[\");\n\t\t// for (int i = 0; i < totalNumBytes; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\treturn result;\n\t}", "public static String encryptBellaso(String plainText, String bellasoStr) {\r\n\t\tString encryptedText = \"\";\r\n\t\t\r\n\t\tchar [] enText = new char[plainText.length()];\r\n\t\t\r\n\t\t\r\n\t mappingKeyToMessage(bellasoStr,plainText);\r\n\t \r\n\t char [] plText = plainText.toCharArray();\r\n\t\tchar [] blText = bellasoStr.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint sum = 0;\r\n\t\t\r\n\t\tsum = sum + plText[i];\r\n\t\tsum = sum + blText[1];\r\n\t\tsum -= RANGE;\r\n\t\tSystem.out.print(sum);\r\n\t\tdo {\r\n\t\t\tfor(char m: plText) {\r\n\t\t\t\r\n\t\t\t\tif (sum >95) {\r\n\t\t\t\t\tsum -= RANGE;\r\n\t\t\t\t\tm += sum;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tm +=sum;\r\n\t\t\t\t\tenText[i] = m;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tencryptedText = String.valueOf(enText);\r\n\t\t\r\n\t \r\n\t return encryptedText; \r\n\t}", "public String cbcEncrypt(String plaintext, String key, String IV) {\n\t\treturn AESCBC.AESEncrypt(plaintext, key, IV);\n\t}", "private String encryptMessage(String message) {\n int MESSAGE_LENGTH = message.length();\n //TODO: throw SizeTooBigException for message requirements\n if(MESSAGE_LENGTH > 1300){\n\n throw new SizeTooBigException();\n }\n\n final int length = message.length();\n String encryptedMessage = \"\";\n for (int i = 0; i < length; i++) {\n //TODO: throw InvalidCharacterException for message requirements\n int m = message.charAt(i);\n int k = this.kissKey.keyAt(i) - 'a';\n int value = m ^ k;\n encryptedMessage += (char) value;\n }\n return encryptedMessage;\n }", "public String encrypt(String message) {\t\n\n\t\tchar [] letters = new char [message.length()];\n\t\tString newMessage = \"\";\n\n\t\t//create an array of characters from message\n\t\tfor(int i=0; i< message.length(); i++){\n\t\t\tletters[i]= message.charAt(i);\n\t\t}\n\n\t\tfor(int i=0; i<letters.length; i++){\n\t\t\tif(Character.isLetter(letters[i])){ //check to see if letter\n\t\t\t\tif(Character.isUpperCase(letters[i])){ //check to see if it is uppercase\n\t\t\t\t\tnewMessage += letters[i]; //add that character to new string\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//this creates an array with the numbers that are keys \n\t\tint [] numberOfLetters = new int[newMessage.length()];\n\t\tString alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t\tfor(int i=0; i< newMessage.length(); i++){\n\t\t\tfor(int j=0; j< alphabet.length(); j++){\n\t\t\t\tif(newMessage.charAt(i) == alphabet.charAt(j)){ //if they have the same letter\n\t\t\t\t\tnumberOfLetters[i]=j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\n\t\t//creates an array of the keys\n\t\tint [] key = new int[numberOfLetters.length];\n\t\tint keys;\n\t\tfor(int i=0; i< numberOfLetters.length; i++){\n\t\t\tkeys = getKey();\n\t\t\tkey[i] = keys;\n\t\t}\n\t\n\t\t//create an array for what we encrypted \n\t\tint [] encryptNum = new int[key.length];\n\t\tfor(int i=0; i< key.length; i++){\n\t\t\tint value = numberOfLetters[i] + key[i];\n\t\t\tif(value > 26){\n\t\t\t\tvalue = value-26;\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}else{\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}\n\t\t}\n\n\t\t//turn encryption into letters \n\t\tString encrypt = \"\";\n\t\tchar [] let = new char [encryptNum.length];\n\n\t\tfor(int i=0; i< encryptNum.length; i++){\n\t\t\tint x = encryptNum[i]-1;\n\t\t\tlet[i] = alphabet.charAt(x);\n\t\t}\n\n\t\tfor(int j=0; j< let.length; j++){\n\t\t\tencrypt += let[j];\n\t\t}\n\n\t\t// COMPLETE THIS METHOD\n\t\t// THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE\n\n\t\treturn encrypt;\n\t}", "public static Cipher getCypher(int mode) throws NoSuchAlgorithmException, NoSuchPaddingException,\r\n InvalidKeyException {\n Key aesKey = new SecretKeySpec(ENC_KEY.getBytes(), \"AES\");\r\n Cipher cipher = Cipher.getInstance(\"AES\");\r\n // encrypt the text\r\n cipher.init(mode, aesKey);\r\n return cipher;\r\n }", "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public String encryptText(String input) {\n\n String inputUC = input.toUpperCase();\n\n StringBuilder outputSB = new StringBuilder();\n\n for (int i = 0; i < input.length(); i++) {\n\n if (Character.toString(inputUC.charAt(i)).equalsIgnoreCase(\" \")) {\n\n outputSB.append(Character.toString(inputUC.charAt(i)));\n }\n else {\n for (int j = 0; j < this.charLibrary.length(); j++) {\n if (Character.toString(inputUC.charAt(i)).equalsIgnoreCase(Character.toString(this.charLibrary.charAt(j)))) {\n\n outputSB.append(this.key.charAt(j));\n }\n }\n }\n }\n return outputSB.toString();\n }", "private static String encrypt(String in){\n\n\t String alphabet = \"1234567890\";\n\n\t String scramble1 = \"<;\\'_$,.?:|)\";\n\t String scramble2 = \"XYZVKJUTHM\";\n\t String scramble3 = \"tuvwxyz&*}\";\n\t String scramble4 = \"~!-+=<>%@#\";\n\t String scramble5 = \"PUDHCKSXWZ\";\n\n\t char messageIn[] = in.toCharArray();\n\t String r = \"\";\n\n\t for(int i = 0; i < in.length(); i++){\n\n\t int letterIndex = alphabet.indexOf(in.charAt(i));\n\n\t if(i % 3 == 0){\n\t r += scramble1.charAt(letterIndex);\n\t }else if (i % 3 == 1){\n\t \tr += scramble2.charAt(letterIndex);\n\t }else if(i % 3 == 2){\n\t \tr += scramble3.charAt(letterIndex);\n\t }\n\t }\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\" Encoded Message: \" + r);\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\\n\\n\");\n\t\treturn r;\n\t}", "@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }", "char cipher(int charToCipher);", "public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }", "@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}", "public String encrypt(String message, int key)\n\t{\n\t\tString encryptedMessage = \"\";\n\t\tchar ch;\n \n\t\tfor(int i = 0; i < message.length(); ++i){\n\t\t\tch = message.charAt(i);\n\t\t\t\n\t\t\tif(ch >= 'a' && ch <= 'z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'z'){\n\t ch = (char)(ch - 'z' + 'a' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else if(ch >= 'A' && ch <= 'Z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'Z'){\n\t ch = (char)(ch - 'Z' + 'A' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else {\n\t \tencryptedMessage += ch;\n\t }\n\t\t}\n return encryptedMessage;\n\t}", "public String encrypt(String word) {\n char[] encrypted = word.toCharArray();\n for (int i = 0; i < encrypted.length; i++){\n if (encrypted[i] == 'x' || encrypted[i] == 'y' || encrypted[i] == 'z'){\n encrypted[i] -= 23;\n } else {\n encrypted[i] += 3;\n }\n \n }\n String encryptedResult = new String(encrypted);\n return encryptedResult;\n }", "public static String encrypt(byte[] plaintext, byte key) {\n\t\tfor (int i = 0; i < plaintext.length; i++) {\n\t\t\tplaintext[i] = (byte) (plaintext[i] ^ key);\n\t\t}\n\t\treturn Base64.getEncoder().encodeToString(plaintext);\n\t}", "public static String encrypt(byte[] plaintext, byte key) {\n\t\tfor (int i = 0; i < plaintext.length; i++) {\n\t\t\tplaintext[i] = (byte) (plaintext[i] ^ key);\n\t\t}\n\t\treturn Base64.getEncoder().encodeToString(plaintext);\n\t}", "public synchronized void encryptText() {\n setSalt(ContentCrypto.generateSalt());\n try {\n mText = ContentCrypto.encrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static String encrypt(byte[] plaintext, byte key) {\n for (int i = 0; i < plaintext.length; i++) {\n plaintext[i] = (byte) (plaintext[i] ^ key);\n }\n return Base64.getEncoder().encodeToString(plaintext);\n }", "public String encrypt(String input)\n {\n StringBuilder encrypted = new StringBuilder(input);\n\n String alphabetLower = alphabet.toLowerCase();\n String shiftedAlphabetLower1 = shiftedAlphabet1.toLowerCase();\n String shiftedAlphabetLower2 = shiftedAlphabet2.toLowerCase();\n\n for (int k = 0; k < encrypted.length() ; k++)\n {\n char currentChar = encrypted.charAt(k);\n int indexOfCurrentCharAlphabet = alphabet.indexOf(currentChar);\n int indexOfCurrentCharLower = alphabetLower.indexOf(currentChar);\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 == 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet1.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 != 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet2.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 == 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower1.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 != 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower2.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n }\n return encrypted.toString();\n }", "public String encrypt(PGCard card, boolean includeCVV) {\n\t\treturn this.encrypt(card.getDirectPostString(includeCVV));\n\t}", "@Override\n public void encrypt(byte[] text) throws IllegalArgumentException {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n ciper.setKey(key);\n xor_nonce(text);\n ciper.encrypt(text);\n System.arraycopy(text, 0, nonce, 0, blockSize());\n }", "public static String encrypt(String message) {\n\t\tStringBuilder encryption = new StringBuilder();\n\t\tfor(int i=0;i<message.length();i++) {\n\t\t\tchar letter = message.charAt(i);\n\t\t\tif(letter >= 'a' && letter <= 'm') {\n\t\t\t\tletter +=13;\n\t\t\t}if(letter >= 'n' && letter <= 'z') {\n\t\t\t\tletter -=13;\n\t\t\t}if(letter >= 'A' && letter <= 'M') {\n\t\t\t\tletter +=13;\n\t\t\t}if(letter >= 'N' && letter <= 'Z') {\n\t\t\t\tletter -=13;\n\t\t\t}encryption.append(letter);\n\t\t}\n\t\treturn encryption.toString();\n\t}", "String encrypt(String input) throws IllegalArgumentException, EncryptionException;", "public String encryptString(char[] sPlainText)\n\t{\n\t\tlong lCBCIV = _rnd.nextLong();\n\t\treturn encStr(sPlainText, lCBCIV);\n\t}", "private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "@Override\n public String encrypt(String text) {\n if (StringUtils.isBlank(text)) {\n return null;\n }\n\n try {\n byte[] iv = new byte[GCM_IV_LENGTH];\n RandomUtils.RANDOM.nextBytes(iv);\n\n Cipher cipher = Cipher.getInstance(ENCRYPT_ALGORITHM);\n GCMParameterSpec ivSpec = new GCMParameterSpec(GCM_TAG_LENGTH * Byte.SIZE, iv);\n cipher.init(Cipher.ENCRYPT_MODE, getKeyFromPassword(), ivSpec);\n\n byte[] ciphertext = cipher.doFinal(text.getBytes(StandardCharsets.UTF_8));\n byte[] encrypted = new byte[iv.length + ciphertext.length];\n System.arraycopy(iv, 0, encrypted, 0, iv.length);\n System.arraycopy(ciphertext, 0, encrypted, iv.length, ciphertext.length);\n\n return Base64.getEncoder().encodeToString(encrypted);\n } catch (NoSuchAlgorithmException\n | IllegalArgumentException\n | InvalidKeyException\n | InvalidAlgorithmParameterException\n | IllegalBlockSizeException\n | BadPaddingException\n | NoSuchPaddingException e) {\n LOG.debug(ERROR_ENCRYPTING_DATA, e);\n throw new EncryptionException(e);\n }\n }", "public String encrypt() throws LRException\n\t{\n\t\treturn LUEncrypt.encrypt(getFields(),\n\t\t\t((DataHRecordData)getData()).encryptKey.getStringValue());\n\t}", "public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;", "public String encrypt(String word){\n\tint modulus = rsaKeyA * rsaKeyB;\n\tint totient = (rsaKeyA - 1)*(rsaKeyB - 1);\n\tpublicE = calculateExponent(totient);\n\tprivateD = 1 + ((int)Math.random()*10)*totient;\n \n\tif(word == null||word.length()==0) throw new IllegalArgumentException();\n\tString result = \"\";\n\tString wordLower = word.toLowerCase();\n\n\tfor(int i=0; i<wordLower.length(); i++){\n\t if(wordLower.charAt(i)<97 || wordLower.charAt(i)>122)\n\t\tthrow new IllegalArgumentException();\n\t int a = (wordLower.charAt(i)-97);\n\t int b = (int)Math.pow(a,publicE);\n\t int k = (b%26)+97;\n\t result += Character.toString((char)k);\n\t}\n\treturn result;\n }", "public String encrypt(String input) {\n \n StringBuilder sb = new StringBuilder(input);\n \n for (int i=0; i< sb.length(); i++) {\n char encrypted = encrypt(sb.charAt(i));\n sb.setCharAt(i, encrypted);\n }\n \n return sb.toString();\n }", "public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}", "public static byte[] encryptCtsTail(byte[] plainText, SecretKey key)\n {\n\n byte[] b1 = Arrays.copyOfRange(plainText, 0, 16);\n byte[] c1 = encryptBlocks(b1, key);\n\n byte[] b2 = new byte[16];\n System.arraycopy(plainText, 16, b2, 0, plainText.length - 16);\n System.arraycopy(c1, plainText.length - 16, b2, plainText.length - 16, 32 - plainText.length);\n byte[] c2 = encryptBlocks(b2, key);\n\n byte[] cipherText = new byte[plainText.length];\n System.arraycopy(c1, 0, cipherText, 0, plainText.length - 16);\n System.arraycopy(c2, 0, cipherText, plainText.length - 16, 16);\n\n return cipherText;\n }", "public char encryptChar(char c){\r\n\t\tc = Character.toUpperCase(c);\r\n\t\tchar a = c;\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(c);\r\n\t\t}\r\n\t\ta = rotors.encrypt(a);\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(a);\r\n\t\t}\r\n\t\treturn a;\r\n\t}", "public static String encrypt(String seed, String plain) throws Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] encrypted = encrypt(rawKey, plain.getBytes());\r\nreturn Base64.encodeToString(encrypted, Base64.DEFAULT);\r\n}", "public CaesarCipherOne(int key) {this.key=key;}", "public static String encrypt(String data){\n\t\tif (data.equals(\"\") || data.equals(\"null\"))\n\t\t\treturn data;\n\t\ttry{\n\t\t\tjavax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER);\n\t\t\tcipher.init(javax.crypto.Cipher.ENCRYPT_MODE, new SecretKeySpec(ENCRYPTION_KEY.getBytes(Charset.forName(\"UTF-8\")), \"AES\"), new IvParameterSpec(new byte[16]));\n\t\t\tbyte[] encryptedBytes = cipher.doFinal(data.getBytes(Charset.forName(\"UTF-8\")));\n\t\t\treturn ENCRYPTION_PREFIX + new String(Base64.encodeBase64(encryptedBytes), Charset.forName(\"UTF-8\"));\n\t\t}catch (Exception e) {\n\t\t\tSystem.err.println( \"Error in EncryptionUtil.encrypt: \" + e );\n\t\t\treturn data;\n\t\t}\n\t}", "public static byte[] encryptText(String plainText, String key) throws Exception {\n\t\tSystem.out.println(\"key is \"+key);\n\t\tSecretKey secKey=decodeKeyFromString(key);\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.ENCRYPT_MODE, secKey);\n\n\t\tbyte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\n\n\t\t\n\t\t\n\t\treturn byteCipherText;\n\n\t}", "public static String encrypt(String strClearText,byte[] digest) throws Exception {\n \n \tString strData=\"\";\n byte [] encrypted = null;\n\n try {\n \t\n SecretKeySpec skeyspec=new SecretKeySpec(digest,\"AES\");\n Cipher cipher=Cipher.getInstance(\"AES\");\n cipher.init(Cipher.ENCRYPT_MODE, skeyspec);\n encrypted=cipher.doFinal(strClearText.getBytes());\n strData=new String(encrypted, \"ISO-8859-1\");\n \n\n } \n catch (Exception ex) {\n \t\n ex.printStackTrace();\n throw new Exception(ex);\n \n }\n \n return strData;\n }", "static String caesarCipher(String s, int k) {\n char[] chars = s.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n chars[i] = shift(chars[i], k);\n }\n return new String(chars);\n }", "@Override\n public void finalEncrypt(byte[] text, int n) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n text[n] = (byte)0x80;\n for( int i = n+1; i < blockSize(); ++i){\n text[i] = (byte)0x00;\n }\n encrypt(text);\n }", "String encryptString(String toEncrypt) throws NoUserSelectedException;", "protected char encode(char current) {\n int index = 0;\n charactersRead++;\n int startPos = charactersRead % keyword.length();\n changeCipher(keyword.charAt(startPos));\n\n for(int i = 0; i < ALPHABET.length; i++) {\n if (ALPHABET[i] == current) {\n index = i;\n }\n }\n return cipher[index];\n }", "public String cbcExample() {\n\t\tString ret = AESCBC.AESEncrypt(blockPlaintext, key, IV);\n\t\tret += \"\\n\\n\" + AESCBC.AESDecrypt(cbcCiphertext, key, IV);\n\t\treturn ret;\n\t}", "public String encryptString(String s){\r\n\t\tchar[] cArr = s.toCharArray();\r\n\t\tString rStr = \"\";\r\n\t\tfor(char c : cArr){\r\n\t\t\trStr += encryptChar(c);\r\n\t\t}\r\n\t\treturn rStr;\r\n\t}", "public String encryptUnicode(String input, int key) {\n StringBuilder encrypted = new StringBuilder(input);\n for (int i = 0; i < input.length(); i++) {\n char newChar = (char) (encrypted.charAt(i) + key);\n encrypted.setCharAt(i, newChar);\n }\n return encrypted.toString();\n }", "public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequence[17][i];\n flipped_last2_cipher_rounds[32 + i] = DES_cipher_sequence[16][i];\n }\n DES_ciphertext = select(flipped_last2_cipher_rounds, FP);\n }", "public CryptObject reencrypt(Ciphertext ciphertext, BigIntegerMod r);", "public static byte[] decryptChaCha20(byte[] cipherText, Key key, byte[] nonce, int counter) throws Exception {\n Cipher cipher = Cipher.getInstance(\"ChaCha20\"); //Initialize the cipher for chacha20\n ChaCha20ParameterSpec chacha20ParameterSpec = new ChaCha20ParameterSpec(nonce, counter); //Specify nonce and counter\n cipher.init(Cipher.DECRYPT_MODE, key, chacha20ParameterSpec); //Initialize the cipher as decryption mode, with the key and param (counter + nonce)\n return cipher.doFinal(cipherText); //Return the decrypted ciphertext\n }", "@Override\n public String encrypt(String word, int cipher) {\n String result = \"\";\n int postcipher = 0;\n boolean wasUpper = false;\n for(int i = 0; i < word.length(); i++)\n {\n char c = word.charAt(i);\n postcipher = c;\n if(Character.isLetter(c)) {\n if (c < ASCII_LOWER_BEGIN) { //change to lowercase\n c += ASCII_DIFF;\n wasUpper = true;\n }\n postcipher = ((c + cipher - ASCII_LOWER_BEGIN) % NUM_ALPHABET + ASCII_LOWER_BEGIN); //shift by cipher amount\n if (wasUpper)\n postcipher -= ASCII_DIFF; //turn back into uppercase if it was uppercase\n wasUpper = false;\n }\n result += (char)postcipher; //add letter by letter into string\n }\n return result;\n }", "@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }", "@Override\n\tpublic String encryptAES(byte[] key, String plainText) {\n\t\ttry {\n\t\t\tbyte[] clean = plainText.getBytes();\n\t\n\t // Generating IV.\n\t int ivSize = 16;\n\t byte[] iv = new byte[ivSize];\n\t SecureRandom random = new SecureRandom();\n\t random.nextBytes(iv);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] encrypted = cipher.doFinal(clean);\n\t byte[] encryptedIVAndText = new byte[ivSize + encrypted.length];\n\t System.arraycopy(iv, 0, encryptedIVAndText, 0, ivSize);\n\t System.arraycopy(encrypted, 0, encryptedIVAndText, ivSize, encrypted.length);\n\n\t return DatatypeConverter.printHexBinary(encryptedIVAndText);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public interface EncryptionAlgorithm {\n\n public String encrypt(String plaintext);\n\n}", "@org.junit.Test\n public void testCipher() {\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", true));\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", false));\n\n Assert.assertEquals(\"B\", Vigenere.cipher(\"A\", \"B\", true));\n Assert.assertEquals(\"A\", Vigenere.cipher(\"B\", \"B\", false));\n\n String plain = \"DUCOFIJMA\";\n String key = \"ABC\";\n String shouldEncryptTo = \"DVEOGKJNC\";\n String actualEncrypted = Vigenere.cipher(plain, key, true);\n Assert.assertEquals(shouldEncryptTo, actualEncrypted);\n String decrypted = Vigenere.cipher(shouldEncryptTo, key, false);\n Assert.assertEquals(plain, decrypted);\n }", "public String encrypt(String unencryptedString) throws InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException {\n String encryptedString = null;\n try{\n cipher.init(Cipher.ENCRYPT_MODE, key);\n byte[] plainText = unencryptedString.getBytes(UNICODE_FORMAT);\n byte[] encryptedText = cipher.doFinal(plainText);\n BASE64Encoder base64encoder = new BASE64Encoder();\n // encryptedString = base64encoder.<span class=\"\\IL_AD\\\" id=\"\\IL_AD9\\\">encode</span>(encryptedText);\n encryptedString = base64encoder.encode(encryptedText);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n return encryptedString;\n }", "public String encrypt(String input) {\n String result = \"\";\n for (int i = 0; i < input.length(); i += 2) {\n result += input.charAt(i);\n }\n for (int i = 1; i < input.length(); i += 2) {\n result += input.charAt(i);\n }\n return result;\n }" ]
[ "0.7086696", "0.6985176", "0.6875467", "0.6873842", "0.6805941", "0.67243826", "0.67189014", "0.6568994", "0.6519845", "0.65049404", "0.6499346", "0.64381886", "0.64348227", "0.64136004", "0.6408063", "0.6394528", "0.6369852", "0.63625664", "0.63569003", "0.6326768", "0.62626696", "0.62384504", "0.62272567", "0.62186205", "0.6217432", "0.62138116", "0.61944383", "0.6174513", "0.6167791", "0.61402816", "0.6132639", "0.6097325", "0.60896033", "0.6072588", "0.6067489", "0.6047951", "0.60375786", "0.60352576", "0.60328525", "0.597689", "0.5961181", "0.59559405", "0.59242916", "0.58853406", "0.58821654", "0.58796585", "0.5859817", "0.5854601", "0.5846491", "0.58315694", "0.5780119", "0.57606584", "0.5753296", "0.5744355", "0.57429564", "0.57300484", "0.57285804", "0.57162535", "0.5698158", "0.56977093", "0.56977093", "0.5693708", "0.56810176", "0.56684923", "0.5663528", "0.56634843", "0.56543356", "0.5636102", "0.5629292", "0.562598", "0.5624514", "0.5618716", "0.56138957", "0.5598412", "0.5598286", "0.55919546", "0.558228", "0.5563817", "0.55601287", "0.5547738", "0.5541455", "0.5532133", "0.55302405", "0.5527545", "0.55260545", "0.55230904", "0.5517071", "0.5515089", "0.55127436", "0.5502886", "0.5498297", "0.54952323", "0.54921746", "0.5491668", "0.5483912", "0.54813915", "0.5471987", "0.546695", "0.5460005", "0.5458521" ]
0.7125038
0
Function to decrypt a ciphertext with ChaCha20, returns the plain text
public static byte[] decryptChaCha20(byte[] cipherText, Key key, byte[] nonce, int counter) throws Exception { Cipher cipher = Cipher.getInstance("ChaCha20"); //Initialize the cipher for chacha20 ChaCha20ParameterSpec chacha20ParameterSpec = new ChaCha20ParameterSpec(nonce, counter); //Specify nonce and counter cipher.init(Cipher.DECRYPT_MODE, key, chacha20ParameterSpec); //Initialize the cipher as decryption mode, with the key and param (counter + nonce) return cipher.doFinal(cipherText); //Return the decrypted ciphertext }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String decrypt(String cipherText);", "public static void dec(String cipherText, String key) {\n char msg[] = cipherText.toCharArray();\n int msglen = msg.length;\n int i,j;\n \n // Creating new char arrays\n char keygenerator[] = new char[msglen];\n char encMsg[] = new char[msglen];\n char decdMsg[] = new char[msglen];\n \n /* Generate key, using keyword in cyclic manner equal to the length of original message i.e plaintext */\n for(i = 0, j = 0; i <msglen; ++i, ++j)\n {\n if(j == key.length() - 1)\n {\n j = 0;\n }\n keygenerator[i] = key.charAt(j);\n }\n \n //Decryption\n for(i = 0; i < msglen; ++i) {\n decdMsg[i] = (char)((((encMsg[i] - keygenerator[i]) + 26) % 26) + 'A');\n }\n\n System.out.println(\"Decrypted Message: \" + String.valueOf(decdMsg));\n }", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.DECRYPT_MODE, secKey);\r\n\r\n byte[] bytePlainText = aesCipher.doFinal(byteCipherText);\r\n\r\n return new String(bytePlainText);\r\n\r\n}", "void decrypt(ChannelBuffer buffer, Channel c);", "public static String decryptCaesar(String encryptedText, int key) {\r\n\t\tchar [] eText = encryptedText.toCharArray();\r\n\t\tchar [] pText = new char[encryptedText.length()];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tdo {\r\n\t\t\tfor(char t: eText) {\r\n\t\t\t\t\r\n\t\t\t\tt -=key;\r\n\t\t\t\tpText[i] = t;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}while(i<encryptedText.length());\r\n\t\tString st = String.valueOf(pText);\r\n\t\treturn st;\r\n\t}", "public static StringBuffer decrypt(String text) {\r\n int s = 5;\r\n byte ctoi[];\r\n int check;\r\n StringBuffer result = new StringBuffer();\r\n ctoi = text.getBytes();\r\n for (int i = 0; i < text.length(); i++) {\r\n if (Character.isUpperCase(text.charAt(i))) {\r\n check = 0;\r\n check = ((ctoi[i] - s) - 65) % 26;\r\n if (check < 0) {\r\n char ch = (char) ((((((int) text.charAt(i) - s) - 65) % 26) + 65) + 26);\r\n result.append(ch);\r\n } else {\r\n char ch = (char) (((((int) text.charAt(i) - s) - 65) % 26) + 65);\r\n result.append(ch);\r\n }\r\n\r\n } else if (Character.isLowerCase(text.charAt(i))) {\r\n check = 0;\r\n check = ((ctoi[i] - s) - 97) % 26;\r\n if (check < 0) {\r\n char ch = (char) ((((((int) text.charAt(i) - s) - 97) % 26) + 97) + 26);\r\n result.append(ch);\r\n } else {\r\n char ch = (char) (((((int) text.charAt(i) - s) - 97) % 26) + 97);\r\n result.append(ch);\r\n }\r\n\r\n } else {\r\n char ch = text.charAt(i);\r\n result.append(ch);\r\n }\r\n }\r\n return result;\r\n }", "public static String decryptCaesar(String encryptedText, int key) {\r\n\t\t// copying plaintext into char array.\r\n\t\tchar[] ipArr = encryptedText.toCharArray();\r\n\t\tchar[] opArr = new char[ipArr.length];\r\n\t\tint tmp = '0';\r\n\t\twhile(key > RANGE)\r\n\t\t{\r\n\t\t\tkey=key-RANGE;\r\n\t\t}\t\t\t\r\n\t\tfor (int i = 0; i < ipArr.length; i++) {\r\n\t\t\t\r\n\t\t\t\ttmp = (ipArr[i]+RANGE)-key;\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tif(tmp>UPPER_BOUND) \r\n\t\t\t\t{\r\n\t\t\t\t\ttmp=tmp-RANGE;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(tmp<LOWER_BOUND) \r\n\t\t\t\t{\r\n\t\t\t\t\ttmp=tmp+RANGE;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\topArr[i]=(char)tmp;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn new String(opArr);\r\n\t}", "public String cbcDecrypt(String ciphertext, String key, String IV) {\n\t\treturn AESCBC.AESDecrypt(ciphertext, key, IV);\n\t}", "public String ebcDecrypt(String ciphertext, String key) {\n\t\treturn AESEBC.AESDecrypt(ciphertext, key);\n\t}", "public BigIntegerMod decrypt(Ciphertext ciphertext);", "private String teaDecrypt(String ciphertext, String password) {\n if (ciphertext.length() == 0) {\n return (\"\");\n }\n int[] v = hexStrToLongs(ciphertext);\n int[] k = strToLongs(password.substring(0, 16).toLowerCase());\n int n = v.length;\n\n // int z = v[n - 1], y = v[0], delta = 0x9E3779B9;\n // int mx, e, q = (int) Math.floor(6 + 52 / n), sum = q * delta;\n int z = v[n - 1];\n int y = v[0];\n int delta = 0x9E3779B9;\n int mx;\n int e;\n int q = (int) Math.floor(6 + 52 / n);\n int sum = q * delta;\n\n while (sum != 0) {\n e = sum >>> 2 & 3;\n for (int p = n - 1; p >= 0; p--) {\n z = v[p > 0 ? p - 1 : n - 1];\n mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);\n y = v[p] -= mx;\n }\n sum -= delta;\n }\n\n String plaintext = longsToStr(v);\n\n // strip trailing null chars resulting from filling 4-char blocks:\n\n return plaintext;\n }", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\t\t\n\t\t\n\n\t\tSystem.out.println(secKey.toString());\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.DECRYPT_MODE, secKey);\n\n\t\tbyte[] bytePlainText = aesCipher.doFinal(byteCipherText);\n\t\t\n\t\t\n\n\t\treturn new String(bytePlainText);\n\n\t}", "public static byte[] decryptCtsTail(byte[] cipherText, SecretKey key)\n {\n\n byte[] b1 = Arrays.copyOfRange(cipherText, cipherText.length - 16, cipherText.length);\n byte[] c1 = decryptBlocks(b1, key);\n\n byte[] b2 = new byte[16];\n System.arraycopy(cipherText, 0, b2, 0, cipherText.length - 16);\n System.arraycopy(c1, cipherText.length - 16, b2, cipherText.length - 16, 32 - cipherText.length);\n byte[] c2 = decryptBlocks(b2, key);\n\n byte[] plainText = new byte[cipherText.length];\n System.arraycopy(c1, 0, plainText, 16, cipherText.length - 16);\n System.arraycopy(c2, 0, plainText, 0, 16);\n\n return plainText;\n }", "public static String decryptCaesar(String encryptedText, int key) {\r\n\t\t// Variables\r\n\t\tString decrypted = \"\"; // Decrypted text string, needs to be built character by character\r\n\t\t\r\n\t\t// Loops\r\n\t\tfor (int i = 0; i < encryptedText.length(); i++) {\r\n\t\t\tchar c = encryptedText.charAt(i); // Encrypted character at index i of string encryptedText\r\n\t\t\tint dc = (int)c - key;\r\n\t\t\t\r\n\t\t\t// Loops\r\n\t\t\twhile (dc < LOWER_BOUND) { dc += RANGE; }\r\n\t\t\t\r\n\t\t\t// Append to string\r\n\t\t\tdecrypted += (char) dc;\r\n\t\t}\r\n\t\t\r\n\t\t// Return\r\n\t\treturn decrypted;\r\n\t}", "public String Decrypt(String s);", "String decrypt(String text) {\n\t\tchar letter;\n\t\tString finalString = \"\";\t\t\t\t\t// slutliga klartexten\n\t\tint start = key.getStart();\t\t\t\t\t// deklarerar nyckelns startläge\n\t\tint k ;\t\t\t\t\t\t\t\t\t\t// variabel för bokstavens startläge i vanliga alfabetet\n\t\tStringBuilder sb = new StringBuilder();\t\t\t\t\t// skapar en stringbuilder som kan modifieras, bygger upp textsträngar av olika variabler\n\t\t\t\t\t\t\n\t\t// loopen går igenom alla tecken i min krypterade text \t\t\t\n\t\tfor(int i = 0; i < text.length(); i++) {\t\t\t// for-loop för att gå igenom hela texten\t\t\t\t\n\t\t\tletter = text.charAt(i);\t\t\t\t\t\t// ger bokstaven på platsen 0,1,2,3.....\n\t\t\tif(letter == ' ') {\t\t\t\t\t\t\t\t// om det är ett blanktecken så ska det vara ett blanktecken\n\t\t\t\tsb.append(' ');\t\t\t\t\t\t\t\t// sparar blanksteg i en stringBuilder\n\t\t\t} else {\n\t\t\t\tint index=0;\n\t\t\t\tstart=start%26;\t\t\t\t\t\t\t\t// vi behöver endast 26 värden\n\t\t\t\tkey.getStart();\n\n\t\t\t\t\n\t\t\t\twhile(index<26 &&(letter!=key.getLetter(index))) {\t\t// så länge som chiffret inte motsvarar förskjutningen\n\t\t\t\t\tindex++;\t\t\t\t\t\t\t\t\t\t\t// så fortsätter den leta\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tk=index-start;\n\t\t\t\t\n\t\t\t\tif(k>=0)\n\t\t\t\t\tletter=(char)('A'+k);\n\t\t\t\telse letter=(char)('Z'-(start-1-index));\t\t\t\t// räknar från index, om index mindre än start så räknar den bakåt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// så att det inte blir tokigt mellan Z och A.\n\t\t\t\t\n\t\t\t\tsb.append(letter);\t\t\t\t\t\t\t\t\t\t//lagrar bokstav i stringBuilder\n\t\t\t\tstart++;\t\t\t\t\t\t\t\t\t\t\t\t//chiffret börjar om\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\n\t\t\t}\n\t\treturn sb.toString();\t\t\t\t\t\t\t\t\t\t// returnerar sluttexten\n\t\t}", "public String decrypt(String text) {\n byte[] dectyptedText = null;\n try {\n // decrypt the text using the private key\n cipher.init(Cipher.DECRYPT_MODE, publicKey);\n byte[] data=Base64.decode(text, Base64.NO_WRAP);\n String str=\"\";\n for(int i=0;i<data.length;i++)\n {\n str+=data[i]+\"\\n\";\n }\n android.util.Log.d(\"ali\",str);\n dectyptedText = cipher.doFinal(Base64.decode(text, Base64.NO_WRAP));\n return new String(dectyptedText);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public static String decipher(String ciphertext, String key) {\n\t\treturn encipher(ciphertext, key, -1);\n\t}", "public String decrypt(String text) {\n return content.decrypt(text);\n }", "@Override\n public byte[] decrypt(byte[] ciphertext) {\n ECPoint point = checkPointOnCurve(ciphertext);\n BigInteger privateKeyInverse = privateKey.getS().modInverse(privateKey.getParams().getOrder());\n return point.multiply(privateKeyInverse).getEncoded(true);\n }", "public String decrypt(String msg) {\n \n StringBuilder sb = new StringBuilder(msg);\n \n for (int i=0; i< sb.length(); i++) {\n char decrypted = decrypt(sb.charAt(i));\n sb.setCharAt(i, decrypted);\n }\n \n return sb.toString();\n }", "public String decrypt(String key);", "public String decrypt(String text) {\n\t\t\n\t\t//Porta encryption is symmetric so no additional decryption implementation is necessary\n\t\treturn encrypt(text);\n\t}", "public String tableDecrypt(String ciphertext, String key) {\n\t\treturn AESMain2.AESDecrypt(ciphertext, key);\n\t}", "public static String decrypt(String text) {\r\n\t\tString originalText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character - 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\toriginalText += Character.toString(character);\r\n\t\t}\r\n\t\treturn originalText;\r\n\t}", "@Override\n public void decrypt(byte[] text) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n byte []temp = new byte[nonce.length];\n System.arraycopy(text, 0, temp, 0, blockSize());\n ciper.setKey(key);\n ciper.decrypt(text);\n xor_nonce(text);\n System.arraycopy(temp, 0, nonce, 0, blockSize());\n }", "@Override\n\tpublic String decryptAES(byte[] key, String cipherText) {\n\t\ttry{\n\t\t\tbyte[] encryptedIvTextBytes = DatatypeConverter.parseHexBinary(cipherText);\n\t int ivSize = 16;\n\n\t byte[] iv = new byte[ivSize];\n\t System.arraycopy(encryptedIvTextBytes, 0, iv, 0, iv.length);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t int encryptedSize = encryptedIvTextBytes.length - ivSize;\n\t byte[] encryptedBytes = new byte[encryptedSize];\n\t System.arraycopy(encryptedIvTextBytes, ivSize, encryptedBytes, 0, encryptedSize);\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t Cipher cipherDecrypt = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t cipherDecrypt.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] decrypted = cipherDecrypt.doFinal(encryptedBytes);\n\n\t return new String(decrypted);\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "private char decrypt(char ch) {\n char chUC = Character.toUpperCase(ch);\n int cind = ALPHABET.indexOf(chUC);\n // do not decrypt non letters\n if (cind == -1) return ch;\n \n // index of decrypted character\n int dind = (cind - key) % 26;\n \n // java can return negative from modulo:\n if (dind <0) dind+=26;\n \n // decrypted uppercase character\n char dch = ALPHABET.charAt(dind);\n \n // check original case and return decrypted char\n if (Character.isUpperCase(ch)) return dch;\n else return Character.toLowerCase(dch);\n }", "public abstract String decryptMsg(String msg);", "public String decrypt( String nonce, String ciphertext ) throws Exception\n\t{\n\t\t// read key from file\n\t\tBufferedReader buf = new BufferedReader( new FileReader(keyFile) );\n\t\tString keystr = buf.readLine();\n\t\tbuf.close();\n\n\t\t// create secret key\n\t\tString keyType = \"PBEWithMD5AndDES\";\n\t\tchar[] keyChars = keystr.toCharArray();\n\t\tbyte[] nonceBytes = nonce.getBytes();\n \tSecretKeyFactory factory = SecretKeyFactory.getInstance( keyType );\n \tPBEKeySpec spec = new PBEKeySpec( keyChars, nonceBytes, 1024, 128 );\n \tSecretKey raw = factory.generateSecret( spec );\n \tSecretKey key = new SecretKeySpec( raw.getEncoded(), \"AES\" );\n\n\t\t// decode and decrypt\n\t\tbyte[] decoded = Base64.decodeBase64( ciphertext );\n\t\tCipher cipher = Cipher.getInstance( \"AES/CBC/PKCS5Padding\" );\n\t\tIvParameterSpec params = new IvParameterSpec( nonceBytes );\n\t\tcipher.init( Cipher.DECRYPT_MODE, key, params );\n\t\treturn new String( cipher.doFinal(decoded) );\n\t}", "public static byte[] decrypt(byte[] cipherText)\r\n {\r\n try {\r\n SecretKeySpec secretKey = new SecretKeySpec(key, ALGORITHM);\r\n Cipher cipher = Cipher.getInstance(ALGORITHM);\r\n cipher.init(Cipher.DECRYPT_MODE, secretKey);\r\n return cipher.doFinal(cipherText);\r\n \r\n } catch (Exception exc) {\r\n exc.printStackTrace();\r\n }\r\n return null;\r\n }", "private static String decryptAES() {\n\t\tString inFilename = \"7hex.txt\";\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inFilename);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\tfinal String keyHex = asciiToHex(\"YELLOW SUBMARINE\");\n\t\t\tfinal String cipherHex = br.readLine();\n\n\t\t\tSecretKey key = new SecretKeySpec(DatatypeConverter.parseHexBinary(keyHex), \"AES\");\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/ECB/NoPadding\");\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key);\n\t\t\tbyte[] result = cipher.doFinal(DatatypeConverter.parseHexBinary(cipherHex));\n\n\t\t\tbr.close();\n\t\t\tfr.close();\n\n\t\t\treturn new String(result);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public static byte [] decrypt(byte [] cipherText, SecretKey key){\r\n\t\ttry {\r\n\t\t\tbyte [] initVector = unpackFromByteArray(cipherText, 0);\r\n\t\t\tint cursor = initVector.length+2;\t\t\t\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(initVector));\t\t\t\r\n\t\t\treturn cipher.doFinal(cipherText,cursor,cipherText.length-cursor);\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(ExceptionReason.INVALID_PARAMETER, \"Error decrypting cipherText \"+cipherText,e);\r\n\t\t}\r\n\t}", "void decryptMessage(String Password);", "public static String decrypt(String encrypted, Keys keys) throws GeneralSecurityException {\n Cipher cipher = Cipher.getInstance(ENC_SYSTEM);\n String[] data = COLON.split(encrypted);\n if (data.length != 3) {\n throw new GeneralSecurityException(\"Invalid encrypted data!\");\n }\n String mac = data[0];\n String iv = data[1];\n String cipherText = data[2];\n\n // Verify that the ciphertext and IV haven't been tampered with first\n String dataToAuth = iv + \":\" + cipherText;\n if (!computeMac(dataToAuth, keys.getMacKey()).equals(mac)) {\n throw new GeneralSecurityException(\"Incorrect MAC!\");\n }\n\n // Decrypt the ciphertext\n byte[] ivBytes = decodeBase64(iv);\n cipher.init(Cipher.DECRYPT_MODE, keys.getEncKey(), new IvParameterSpec(ivBytes));\n byte[] bytes = cipher.doFinal(decodeBase64(cipherText));\n\n // Decode the plaintext bytes into a String\n CharsetDecoder decoder = Charset.defaultCharset().newDecoder();\n decoder.onMalformedInput(CodingErrorAction.REPORT);\n decoder.onUnmappableCharacter(CodingErrorAction.REPORT);\n /*\n * We are coding UTF-8 (guaranteed to be the default charset on\n * Android) to Java chars (UTF-16, 2 bytes per char). For valid UTF-8\n * sequences, then:\n * 1 byte in UTF-8 (US-ASCII) -> 1 char in UTF-16\n * 2-3 bytes in UTF-8 (BMP) -> 1 char in UTF-16\n * 4 bytes in UTF-8 (non-BMP) -> 2 chars in UTF-16 (surrogate pair)\n * The decoded output is therefore guaranteed to fit into a char\n * array the same length as the input byte array.\n */\n CharBuffer out = CharBuffer.allocate(bytes.length);\n CoderResult result = decoder.decode(ByteBuffer.wrap(bytes), out, true);\n if (result.isError()) {\n /* The input was supposed to be the result of encrypting a String,\n * so something is very wrong if it cannot be decoded into one! */\n throw new GeneralSecurityException(\"Corrupt decrypted data!\");\n }\n decoder.flush(out);\n return out.flip().toString();\n }", "public static byte [] decrypt(byte [] cipherText, char [] password){\r\n\t\tint cursor = 0;\r\n\t\tbyte [] salt = unpackFromByteArray(cipherText,cursor);\r\n\t\tSecretKey key = generateSecretKey(salt, password);\r\n\t\tcursor += salt.length+2;\r\n\t\tbyte [] encoded = unpackFromByteArray(cipherText,cursor);\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(salt) );\r\n\t\t\treturn cipher.doFinal(encoded);\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error decrypting cipherText \"+cipherText,e);\r\n\t\t}\r\n\t}", "public String decrypt(String encryptedText) throws IOException\n {\n int len = encryptedText.length();\n if ((len % 32) != 0)\n throw new IOException(\"Serious error: decryption string has incorrect length \"\n + \"- please contact Simon\");\n byte[] encrypted = new byte[len/2];\n for (int i=0; i<len; i+=2)\n {\n encrypted[i/2] = (byte) ((Character.digit(encryptedText.charAt(i), 16) << 4)\n + Character.digit(encryptedText.charAt(i+1), 16));\n }\n\n try\n {\n SecretKeySpec key = new SecretKeySpec(secretKeyBytes, \"AES\");\n Cipher cipher = Cipher.getInstance(\"AES\");\n\n cipher.init(Cipher.DECRYPT_MODE, key);\n byte[] decrypted = cipher.doFinal(encrypted);\n return new String(decrypted, \"UTF-8\");\n }\n catch (Exception ex)\n {\n throw new IOException(\"Serious error: Password decryption failed \"\n + \"- please contact Simon\");\n }\n }", "String decryptString(String toDecrypt) throws NoUserSelectedException, IllegalValueException;", "@Override\n\tpublic double decrypt(String encryptedText) {\n\t\treturn cryptoProvider.decrypt(encryptedText);\n\t}", "public String Decryption(BigInteger text){\n \tStringBuilder str = new StringBuilder();\n BigInteger decryptor = text.multiply(r.modInverse(q)).mod(q);\n int ch = 0;\n int cursor2 = 1;\n /*\n * Traverse w list, if element is small or equal to decryptor, then subtract\n * decryptor with the element. If cursor2 arrive to 128, it means we already\n * traverse 8 bits, convert the 8 bits to char and append to str, finally\n * reverse the str\n */\n for(int i = w.length;i > 0;i--){\n \t\tif(w[i-1].compareTo(decryptor) < 1){\n \t\t\tdecryptor = decryptor.subtract(w[i-1]);\n \t\t\tch += cursor2;\n \t\t}\n \t\tif(cursor2 == 128){\n \t\t\tstr.append((char) ch);\n \t\t\tcursor2 = 1;\n \t\t\tch = 0;\n \t\t\tcontinue;\n \t\t}\n \t\tcursor2 <<= 1;\n \t}\n return str.reverse().toString();\n }", "public static byte[][] decryptTexts(byte[][] cipherTexts) {\n byte[][] decryptedTexts = new byte[cipherTexts.length][];\n\n for (int i = 0; i < cipherTexts.length; i++) {\n decryptedTexts[i] = AES.decrypt(cipherTexts[i], key);\n }\n\n MainFrame.printToConsole(\"Plain texts are decrypted\\n\");\n return decryptedTexts;\n }", "static String decrypt(byte[] cipherTextArray, PrivateKey privateKey) throws Exception {\n Cipher cipher = Cipher.getInstance(RSA__PADDING);\n\n //Initialize Cipher for DECRYPT_MODE\n cipher.init(Cipher.DECRYPT_MODE, privateKey);\n\n //Perform Decryption\n byte[] decryptedTextArray = cipher.doFinal(cipherTextArray);\n\n return new String(decryptedTextArray);\n }", "public static String decryptBellaso(String encryptedText, String bellasoStr) {\r\n String decryptedText = \"\";\r\n\t\t\r\n\t\tchar [] deText = new char[encryptedText.length()];\r\n\t\t\r\n\t mappingKeyToMessage(bellasoStr,encryptedText);\r\n\t \r\n\t char [] enText = encryptedText.toCharArray();\r\n\t\tchar [] blText = bellasoStr.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint diff = 0;\r\n\t\t\r\n\t\tdiff = diff + enText[i];\r\n\t\tdiff = diff + blText[1];\r\n\t\tdiff += RANGE;\r\n\t\tSystem.out.print(diff);\r\n\t\tdo {\r\n\t\t\tfor(char m: enText) {\r\n\t\t\t\r\n\t\t\t\tif (diff <32) {\r\n\t\t\t\t\tdiff += RANGE;\r\n\t\t\t\t\tm += diff;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tm +=diff;\r\n\t\t\t\t\tdeText[i] = m;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}while(i<encryptedText.length());\r\n\t\tdecryptedText = String.valueOf(deText);\r\n\t\t\r\n\t \r\n\t return decryptedText; \r\n\t}", "static String aes256CtrArgon2HMacDecrypt(\n Map<String, String> encryptedMsg, String password) throws Exception {\n byte[] argon2salt = Hex.decode(encryptedMsg.get(\"kdfSalt\"));\n byte[] argon2hash = Argon2Factory.createAdvanced(\n Argon2Factory.Argon2Types.ARGON2id).rawHash(16,\n 1 << 15, 2, password, argon2salt);\n\n // AES decryption: {cipherText + IV + secretKey} -> plainText\n byte[] aesIV = Hex.decode(encryptedMsg.get(\"cipherIV\"));\n IvParameterSpec ivSpec = new IvParameterSpec(aesIV);\n Cipher cipher = Cipher.getInstance(\"AES/CTR/NoPadding\");\n Key secretKey = new SecretKeySpec(argon2hash, \"AES\");\n cipher.init(Cipher.DECRYPT_MODE, secretKey, ivSpec);\n byte[] cipherTextBytes = Hex.decode(encryptedMsg.get(\"cipherText\"));\n byte[] plainTextBytes = cipher.doFinal(cipherTextBytes);\n String plainText = new String(plainTextBytes, \"utf8\");\n\n // Calculate and check the MAC code: HMAC(plaintext, argon2hash)\n Mac mac = Mac.getInstance(\"HmacSHA256\");\n Key macKey = new SecretKeySpec(argon2hash, \"HmacSHA256\");\n mac.init(macKey);\n byte[] hmac = mac.doFinal(plainText.getBytes(\"utf8\"));\n String decodedMac = Hex.toHexString(hmac);\n String cipherTextMac = encryptedMsg.get(\"mac\");\n if (! decodedMac.equals(cipherTextMac)) {\n throw new InvalidKeyException(\"MAC does not match: maybe wrong password\");\n }\n\n return plainText;\n }", "public String decryptString(String cipherText) {\n int len = (cipherText.length() >> 1) & ~7;\n if (Blowfish.BLOCKSIZE > len) {\n return null;\n }\n byte[] cbciv = new byte[Blowfish.BLOCKSIZE];\n int numOfBytes = BinConverter.hexStrToBytes(cipherText, cbciv, 0, 0, Blowfish.BLOCKSIZE);\n if (numOfBytes < Blowfish.BLOCKSIZE) {\n return null;\n }\n this.bfc.setCBCIV(cbciv, 0);\n len -= Blowfish.BLOCKSIZE;\n if (len == 0) {\n return \"\";\n }\n byte[] buf = new byte[len];\n numOfBytes = BinConverter.hexStrToBytes(cipherText, buf, Blowfish.BLOCKSIZE << 1, 0, len);\n if (numOfBytes < len) {\n return null;\n }\n this.bfc.decrypt(buf, 0, buf, 0, buf.length);\n int padbyte = buf[buf.length - 1] & 0x0ff;\n if (Blowfish.BLOCKSIZE < padbyte) {\n padbyte = 0;\n }\n numOfBytes -= padbyte;\n if (numOfBytes < 0) {\n return \"\";\n }\n return BinConverter.byteArrayToStr(buf, 0, numOfBytes);\n }", "public static String decrypt(String text, int key) {\n return encrypt(text, -key);\n }", "public static String decryptMsg(byte[] cipherText, SecretKey secret) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidParameterSpecException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, UnsupportedEncodingException {\r\n Cipher cipher = null;\r\n cipher = Cipher.getInstance(\"AES/ECB/PKCS5Padding\");\r\n cipher.init(Cipher.DECRYPT_MODE, secret);\r\n String decryptString = new String(cipher.doFinal(cipherText), \"UTF-8\");\r\n return decryptString;\r\n }", "public String decrypt(String cipherText) throws DataLengthException,\n\tIllegalStateException, InvalidCipherTextException {\n\t\tcipher.reset();\n\t\tcipher.init(false, new KeyParameter(key));\n\n\t\tbyte[] input = Hex.decode(Str.toBytes(cipherText.toCharArray()));\n\t\tbyte[] output = new byte[cipher.getOutputSize(input.length)];\n\n\t\tint length = cipher.processBytes(input, 0, input.length, output, 0);\n\t\tint remaining = cipher.doFinal(output, length);\n\t\treturn new String(Str.toChars(output), 0, length + remaining);\n\t}", "@Override\n public int finalDecrypt(byte[] text) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n decrypt(text);\n int n = 0;\n for(int i = text.length-1; text[i] == 0x00; --i){\n n += 1;\n }\n return text.length - n - 1;\n }", "@Override\n public String decryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] decMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n if (letter >= 'a' && letter <= 'z') {\n int temp = letter - 'a' - key;\n decMsg[ind] = (char) ('a' + (char) ((temp < 0) ? temp + 26 : temp));\n } else if (letter >= 'A' && letter <= 'Z') {\n int temp = letter - 'A' - key;\n decMsg[ind] = (char) ('A' + (char) ((temp < 0) ? temp + 26 : temp));\n } else {\n decMsg[ind] = letter;\n }\n }\n return new String(decMsg);\n }\n }", "public synchronized String getDecryptedText() {\n String text;\n try {\n text = ContentCrypto.decrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n text = \"Bad Decrypt\";\n }\n return text;\n }", "public char[] decryptBytesToString(byte[] encryptedBytes)\n\t{\n\t\t// The first BLOCKSIZE (8) bytes contain the CBCIV value\n\t\tint numEncBytes = encryptedBytes.length - EQBlowfishECB.BLOCKSIZE;\n\t\tif (numEncBytes <= 0)\n\t\t{\n\t\t\tLOG.error(\"numEncBytes length invalid - \" + Integer.valueOf(numEncBytes).toString());\n\t\t\treturn null;\n\t\t}\n\t\tlong inCBCIV = EQBinConverter.byteArrayToLong(encryptedBytes, 0);\n\n\t\t// set the CBCIV\n\t\tm_bfc.setCBCIV(inCBCIV);\n\n\t\t// decryption\n\t\tbyte[] decryptedBytes = new byte[numEncBytes];\n\t\tm_bfc.decrypt(encryptedBytes, EQBlowfishECB.BLOCKSIZE, decryptedBytes, 0, numEncBytes);\n\n\t\t// THE FOLLOWING COMMENTED CODE DOES NOT WORK. POSITIVE AND NEGATIVE NUMBERS RETURNED\n\t\t// get number of bytes that are just 'padding'\n\t\t// int numPad = decryptedBytes[decryptedBytes.length - 1];\n\t\tint numPad = 0;\n\n\t\t// Convert decrypted bytes to chars\n\t\tStringBuffer result = EQBinConverter.byteArrayToStringBuffer(decryptedBytes, 0, decryptedBytes.length - numPad);\n\n\t\treturn result.toString().toCharArray();\n\n\t}", "@Override\n public String decrypt(String encryptedText) {\n if (StringUtils.isBlank(encryptedText)) {\n return null;\n }\n\n try {\n byte[] decoded = Base64.getDecoder().decode(encryptedText);\n\n byte[] iv = Arrays.copyOfRange(decoded, 0, GCM_IV_LENGTH);\n\n Cipher cipher = Cipher.getInstance(ENCRYPT_ALGORITHM);\n GCMParameterSpec ivSpec = new GCMParameterSpec(GCM_TAG_LENGTH * Byte.SIZE, iv);\n cipher.init(Cipher.DECRYPT_MODE, getKeyFromPassword(), ivSpec);\n\n byte[] ciphertext = cipher.doFinal(decoded, GCM_IV_LENGTH, decoded.length - GCM_IV_LENGTH);\n\n return new String(ciphertext, StandardCharsets.UTF_8);\n } catch (NoSuchAlgorithmException\n | IllegalArgumentException\n | InvalidKeyException\n | InvalidAlgorithmParameterException\n | IllegalBlockSizeException\n | BadPaddingException\n | NoSuchPaddingException e) {\n LOG.debug(ERROR_DECRYPTING_DATA, e);\n throw new EncryptionException(e);\n }\n }", "@Test\n\tpublic void testDecrypt() throws GeneralSecurityException, IOException {\n\t\tString cipher = \"4VGdDR9qJlq36bQGI+Sx3A==\";\n\t\tString key = \"io.github.odys-z\";\n\t\tString iv = \"DITVJZA2mSDAw496hBz6BA==\";\n\t\tString plain = AESHelper.decrypt(cipher, key,\n\t\t\t\t\t\t\tAESHelper.decode64(iv));\n\t\tassertEquals(\"Plain Text\", plain.trim());\n\n\t\tplain = \"-----------admin\";\n\t\tkey = \"----------123456\";\n\t\tiv = \"ZqlZsmoC3SNd2YeTTCkbVw==\";\n\t\t// PCKS7 Padding results not suitable for here - AES-128/CBC/NoPadding\n\t\tassertNotEquals(\"3A0hfZiaozpwMeYs3nXdAb8mGtVc1KyGTyad7GZI8oM=\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t\t\n\t\tiv = \"CTpAnB/jSRQTvelFwmJnlA==\";\n\t\tassertEquals(\"WQiXlFCt5AGCabjSCkVh0Q==\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t}", "@Override\n public String decryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] decMsg = new char[msg.length()];\n int actKey = key % 65536;\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n decMsg[ind] = (char) ((letter - actKey < 0) ? letter - actKey + 65536 : letter - actKey);\n }\n return new String(decMsg);\n }\n }", "char decipher(int charToDeCipher);", "@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"Hello how are you?\";\r\n String result = instance.decrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "private String decodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n String decoding = decodageMot(text);\n SubstCipher decodingText = new SubstCipher(this.shiftAlea);\n decodingText.ensureNegativeShift();\n decodingText.buildShiftedTextFor(decoding);\n return decodingText.getLastShiftedText();\n }", "public String decrypt(String input)\n {\n CaesarCipherTwo cipher = new CaesarCipherTwo(26 - mainKey1, 26 - mainKey2);\n return cipher.encrypt(input);\n }", "public static String Decrypt(String cipherText,int key,String alphabet) throws IOException\n {\n cipherText=cipherText.toUpperCase();\n String decryptedText=\"\";\n\n for(int i=0;i< cipherText.length();i++)\n {int index=indexOfChar(cipherText.charAt(i),alphabet);\n\n if(index==-1)\n {\n decryptedText+=cipherText.charAt(i);\n continue;\n }\n if((index-key)>=0)\n {\n decryptedText+=charAtIndex(index-key,alphabet);\n }\n else\n {\n decryptedText+=charAtIndex((index-key)+alphabet.length(),alphabet);\n }\n }\n\n return decryptedText;\n }", "public CryptObject reencrypt(Ciphertext ciphertext);", "public String decode(String cipherText){\n String decodedMsg = cipherText;\n for(int i=0;i<n;i++)\n decodedMsg = reShuffle(decodedMsg);\n return decodedMsg;\n }", "@Override\n public String decryptText(String encryptedText, String encryptionKey) throws Exception {\n\n //Decode the text from Base64 string to bytes\n byte[] textBytes = Base64.getDecoder().decode(encryptedText);\n\n // Divide the text bytes into SALT + IV + ENCRYPTED_TEXT + AUTH_TAG\n byte[] salt = Arrays.copyOfRange(textBytes, 0, 64); // 64 bytes\n byte[] iv = Arrays.copyOfRange(textBytes, 64, 76); // 12 bytes\n int index = textBytes.length - 16;\n byte[] tag = Arrays.copyOfRange(textBytes, index, textBytes.length); // 16 bytes\n byte[] text = Arrays.copyOfRange(textBytes, 76, index); // remaining bytes\n\n\n //Construct the Encryption Key in required format\n SecretKey pbeKey = getSecretKey(encryptionKey, salt);\n GCMParameterSpec ivSpec = new GCMParameterSpec(TAG_BYTE_LENGTH * Byte.SIZE, iv);\n SecretKeySpec newKey = new SecretKeySpec(pbeKey.getEncoded(), \"AES\");\n\n //Get the AES/GCM/NoPadding instance and initialize\n Cipher cipher = Cipher.getInstance(\"AES/GCM/NoPadding\");\n cipher.init(Cipher.DECRYPT_MODE, newKey, ivSpec);\n\n cipher.update(text);\n byte[] decryptedBytes = cipher.doFinal(tag);\n\n return new String(decryptedBytes, StandardCharsets.UTF_8);\n }", "public static byte [] decrypt(byte [] cipherText, PrivateKey decryptionKey) {\r\n\t\tif(cipherText == null) return null;\r\n\t\ttry {\r\n\t\t\t// note that we make a copy to avoid overwriting the received cipher text\r\n\t\t\tbyte [] inputBuffer = Arrays.copyOf(cipherText,cipherText.length);\r\n\r\n\t\t\t// obtain the decryption key, and the cursor (current location in input buffer after the key)\r\n\t\t\tbyte [] wrappedEncryptionKey = unpackFromByteArray(inputBuffer, 0);\r\n\t\t\tint cursor = wrappedEncryptionKey.length+2;\r\n\t\t\t// unwrap the enclosed symmetric key using our public encryption key\r\n\t\t\tCipher unwrapper = Cipher.getInstance(encryptionAlgorithm);\r\n\t\t\tunwrapper.init(Cipher.UNWRAP_MODE, decryptionKey);\r\n\t\t\tKey k = unwrapper.unwrap(wrappedEncryptionKey,symmetricKeyAlgorithm,Cipher.SECRET_KEY);\r\n\r\n\t\t\t// decrypt the message.\r\n\t\t\tCipher decryptor = Cipher.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tdecryptor.init(Cipher.DECRYPT_MODE, k);\r\n\t\t\tdecryptor.doFinal(inputBuffer,cursor,inputBuffer.length-cursor,inputBuffer,cursor);\r\n\t\t\t\r\n\t\t\t// locate the plainText\r\n\t\t\tbyte [] plainText = unpackFromByteArray(inputBuffer, cursor);\r\n\t\t\t// return the plain text\r\n\t\t\treturn plainText;\r\n\t\t} catch(Exception e){\r\n\t\t\tlogger.log(Level.WARNING,\"Unable to decrypt cipherText \"+cipherText, e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static int[] teaDecrypt(int[] cipherText) {\n int mult = 255 / 32;\n int l = cipherText[0];\n int r = cipherText[1];\n int sum = DELTA << 5;\n \n for(int i = 0; i < 32; i++) {\n r -= ((l << 4) + KEY) ^ (l + sum) ^ ((l >> 5) + KEY);\n l -= ((r << 4) + KEY) ^ (r + sum) ^ ((r >> 5) + KEY);\n sum -= DELTA;\n }\n int[] plainText = {l, r};\n return plainText;\n }", "public static byte[] aesDecrypt(byte[] ciphertext, SecretKey decryptionKey) {\n\t\t\n\t\tbyte[] result = null;\n\t\tCipher cipher;\n\t\ttry {\n\t\t\t// Using our custom-constant salt and iteration count\n\t\t\tcipher = Cipher.getInstance(\"PBEWithSHA256And256BitAES-CBC-BC\");\n\t\t\tbyte[] salt = \"Extr3m3lyS3cr3tSalt!\".getBytes();\n\t\t\tint count = 20;\n\t\t\tPBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, decryptionKey, pbeParamSpec);\n\t\t\tresult = cipher.doFinal(ciphertext);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\treturn result;\n\t}", "@Override\r\n\tpublic String decrypt(String cipher) {\n\t\treturn null;\r\n\t}", "public byte[] decrypt(String key, String encryptedText) throws IOException, InvalidCipherTextException {\n\n if (encryptedText != null) {\n byte[] inputData = Base64.decode(encryptedText.getBytes());\n InputStream fis = new ByteArrayInputStream(inputData);\n\n ByteArrayOutputStream fos = new ByteArrayOutputStream();\n decrypt(key, fis, fos);\n byte[] byt = fos.toByteArray();\n return byt;\n }\n return null;\n }", "public String decrypt(String word){\n\tString result = \"\";\n\tString wordLower = word.toLowerCase(); \n\tfor(int i=0; i<wordLower.length(); i++){\n\t if(wordLower.charAt(i)<97 || wordLower.charAt(i)>122)\n\t\tthrow new IllegalArgumentException();\n\t int a = (wordLower.charAt(i)-97);\n\t int b = (int)Math.pow(a,privateD);\n\t int k = (b%26)+97;\n\t result += Character.toString((char)k);\n\t}\n\treturn result;\n }", "private String encStr(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tbyte[] newCBCIV;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (nNumBytes - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, nNumBytes);\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tString strEncrypt = EQBinConverter.bytesToHexStr(buf, 0, nNumBytes);\n\t\tnewCBCIV = new byte[EQBlowfishECB.BLOCKSIZE];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, newCBCIV, 0);\n\t\tString strCBCIV = EQBinConverter.bytesToHexStr(newCBCIV, 0, EQBlowfishECB.BLOCKSIZE);\n\t\t// System.out.println(\"encrypt = [\" + strEncrypt + \"]\");\n\t\t// System.out.println(\"strCBCIV = [\" + strCBCIV + \"]\");\n\t\treturn strCBCIV + strEncrypt;\n\t}", "public String decryptToString(String key, String encryptedText) throws IOException, InvalidCipherTextException {\n if (encryptedText != null) {\n byte[] inputData = Base64.decode(encryptedText.getBytes());\n InputStream fis = new ByteArrayInputStream(inputData);\n\n ByteArrayOutputStream fos = new ByteArrayOutputStream();\n decrypt(key, fis, fos);\n byte[] byt = fos.toByteArray();\n return new String(byt);\n }\n return null;\n }", "private static byte[] passwordDecrypt(char[] password, byte[] ciphertext) throws Exception {\n\n\t\t// Read in the salt.\n\t\tbyte[] salt = new byte[8];\n\t\tByteArrayInputStream bais = new ByteArrayInputStream(ciphertext);\n\t\tbais.read(salt, 0, 8);\n\n\t\t// The remaining bytes are the actual ciphertext.\n\t\tbyte[] remainingCiphertext = new byte[ciphertext.length - 8];\n\t\tbais.read(remainingCiphertext, 0, ciphertext.length - 8);\n\n\t\t// Create a PBE cipher to decrypt the byte array.\n\t\tPBEKeySpec keySpec = new PBEKeySpec(password);\n\t\tSecretKeyFactory keyFactory = SecretKeyFactory.getInstance(\"PBEWithSHAAndTwofish-CBC\");\n\t\tSecretKey key = keyFactory.generateSecret(keySpec);\n\t\tPBEParameterSpec paramSpec = new PBEParameterSpec(salt, ITERATIONS);\n\t\tCipher cipher = Cipher.getInstance(\"PBEWithSHAAndTwofish-CBC\");\n\n\t\t// Perform the actual decryption.\n\t\tcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);\n\t\treturn cipher.doFinal(remainingCiphertext);\n\t}", "public String entschlüsseln(SecretKey key, String nachricht) throws Exception{\n BASE64Decoder myDecoder2 = new BASE64Decoder();\n byte[] crypted2 = myDecoder2.decodeBuffer(nachricht);\n\n // Entschluesseln\n Cipher cipher2 = Cipher.getInstance(\"AES\");\n cipher2.init(Cipher.DECRYPT_MODE, key);\n byte[] cipherData2 = cipher2.doFinal(crypted2);\n String erg = new String(cipherData2);\n\n // Klartext\n return(erg);\n\n}", "public static String decryptString(String text, int key) {\r\n String decryptedText = \"\";\r\n String alpha = shiftAlphabet(0);\r\n String newAlpha = shiftAlphabet(key);\r\n text = ungroupify(text);\r\n for (int i = 0; i < text.length(); i++) {\r\n String currentLetter = String.valueOf(text.charAt(i));\r\n int indexOfLetter = newAlpha.indexOf(currentLetter);\r\n String letterReplacement = String.valueOf(alpha.charAt(indexOfLetter));\r\n decryptedText += letterReplacement;\r\n\r\n }\r\n return decryptedText;\r\n }", "void decryptCode() {\n StringBuilder temp = new StringBuilder(\"\");\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // append char to temp if char at i is not a multiple of z\n if (!(i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) || i == 0)\n temp.append(this.getText().charAt(i));\n }\n\n this.setText(temp);\n\n \n // Step 2:\n\n // split phrase up into words\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if y1x3x4 is at the end of the word, remove it from word\n \n if (words.get(i).substring(words.get(i).length() - 3, words.get(i).length())\n .equals(this.getSecretKey().substring(3, 6)))\n words.set(i, words.get(i).substring(0, words.get(i).length() - 3));\n\n // if x1x2 is at the end of the word\n else {\n // remove x1x2 from end\n words.set(i, words.get(i).substring(0, words.get(i).length() - 2));\n \n // move last char to beginning\n words.set(i, words.get(i).charAt(words.get(i).length() - 1) + words.get(i).substring(0, words.get(i).length() - 1));\n }\n }\n\n temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n }", "public String decryptText(String input) {\n\n String inputUC = input.toUpperCase();\n\n StringBuilder outputSB = new StringBuilder();\n\n for (int i = 0; i < input.length(); i++) {\n\n if (Character.toString(inputUC.charAt(i)).equalsIgnoreCase(\" \")) {\n\n outputSB.append(Character.toString(inputUC.charAt(i)));\n }\n else {\n for (int j = 0; j < this.charLibrary.length(); j++) {\n if (Character.toString(inputUC.charAt(i)).equalsIgnoreCase(Character.toString(this.key.charAt(j)))) {\n\n outputSB.append(this.charLibrary.charAt(j));\n }\n }\n }\n\n }\n return outputSB.toString();\n }", "public String decrypt(String msg) {\n if (map == null) {\n getMapping();\n }\n\n // Find cipher match\n String ch = \"\";\n for (int j = 0; j < map.length; j++) {\n if ((map[j][0] + \"\").equals(msg)) {\n ch = (char)j + \"\";\n }\n }\n\n return ch;\n }", "public static String decryptBellaso(String encryptedText, String bellasoStr) {\r\n\t\t\r\n\t\t// coping encryptedText and bellasoStr into char array.\r\n\t\t\t\t\tchar[] pTxtArray = encryptedText.toCharArray();\r\n\t\t\t\t\tchar[] bTxtArray = bellasoStr.toCharArray();\r\n\t\t\t\t\tchar[] refArray=new char[pTxtArray.length];\r\n\t\t\t\t\tchar[] ecrptArray=new char[pTxtArray.length];\r\n\t\t\t\t\tint counter=0;\r\n\t\t\t\t\tint offset=0;\r\n\t\t\t\t\tchar temp=0;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Copy complete array into reference array as many time as required\r\n\t\t\t\t\t\t//When plain String is greater than bellaso string.\r\n\t\t\t\t\t\twhile((pTxtArray.length-counter)>=bTxtArray.length)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor(int i=counter,j=0;j<bTxtArray.length;j++,i++) {\r\n\t\t\t\t\t\t\trefArray[i]=bTxtArray[j];\r\n\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t//gathering phase\t\t\r\n\t\t\t\t\t\tfor(int i=counter,j=0;i<pTxtArray.length;i++,j++) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\trefArray[i]=bTxtArray[j];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Offset calculation.\r\n\t\t\t\t\tfor(int i=0;i<refArray.length;i++) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\toffset=pTxtArray[i]+RANGE;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\ttemp=(char)(offset-refArray[i]);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(temp>UPPER_BOUND) {\r\n\t\t\t\t\t\t\ttemp=(char) (temp-RANGE);\r\n\t\t\t\t\t\t}else if (temp<LOWER_BOUND) {\r\n\t\t\t\t\t\t\ttemp=(char) (temp+RANGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tecrptArray[i]=temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\treturn new String(ecrptArray);\r\n\t\t\t\t}", "public static byte[] decrypt(byte[] encryptedIvTextBytes, String key) throws Exception {\n int ivSize = 16;\n int keySize = 16;\n\n // Generacion IV (Vector de inicializacion)\n byte[] iv = new byte[ivSize];\n System.arraycopy(encryptedIvTextBytes, 0, iv, 0, iv.length);\n IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\n // Elimina el IV del archivo encriptado \n int encryptedSize = encryptedIvTextBytes.length - ivSize;\n byte[] encryptedBytes = new byte[encryptedSize];\n System.arraycopy(encryptedIvTextBytes, ivSize, encryptedBytes, 0, encryptedSize);\n\n // Generacion de hash de la clave secreta.\n byte[] keyBytes = new byte[keySize];\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(key.getBytes());\n System.arraycopy(md.digest(), 0, keyBytes, 0, keyBytes.length);\n SecretKeySpec secretKeySpec = new SecretKeySpec(keyBytes, \"AES\");\n\n // Llamado a libreria de cifrado de java\n Cipher cipherDecrypt = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n cipherDecrypt.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);\n byte[] decrypted = cipherDecrypt.doFinal(encryptedBytes);\n\n return decrypted;\n }", "public byte[] Tdecryption() {\n int[] plaintext = new int[message.length];\n\n for (int j = 0, k = 1; j < message.length && k < message.length; j = j + 2, k = k + 2) {\n sum = delta << 5;\n l = message[j];\n r = message[k];\n for (int i = 0; i < 32; i++) {\n r = r - (((l << 4) + key[2]) ^ (l + sum) ^ ((l >> 5) + key[3]));\n l = l - (((r << 4) + key[0]) ^ (r + sum) ^ ((r >> 5) + key[1]));\n sum = sum - delta;\n }\n plaintext[j] = l;\n plaintext[k] = r;\n }\n return this.Inttobyte(plaintext);\n }", "public String tselDecrypt(String key, String message)\n\t{\n\n\t\tif (key == null || key.equals(\"\")) \n\t\t{\n\t\t\treturn message;\n\t\t}\n\n\t\tif (message == null || message.equals(\"\")) \n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\tCryptoUtils enc = new CryptoUtils(key, Cipher.DECRYPT_MODE);\n\t\tString messageEnc = enc.process(message);\n\n\t\treturn messageEnc;\n\t}", "public String encrypt(String plainText);", "@GetMapping(\"/decrypt\")\n public String decrypt(String uid, String data) {\n return \"\";\n }", "public static void main(String[] args)\n {\n\n CaesarCipherTwo cipher = new CaesarCipherTwo( 14, 24);\n //String encrypt = cipher.encrypt(message);\n //System.out.println(\"Encrypted message: \" + encrypt);\n System.out.println();\n String decrypt = cipher.decrypt(\"Hfs cpwewloj loks cd Hoto kyg Cyy.\");\n System.out.println(\"Decrypted message: \" + decrypt);\n\n }", "@Override\n public void decrypt() {\n algo.decrypt();\n String cypher = vigenereAlgo(false);\n this.setValue(cypher);\n }", "public String decrypt(String message) {\t\n\t\tchar [] letters = new char [message.length()];\n\t\tString newMessage = \"\";\n\n\t\t//create an array of characters from message\n\t\tfor(int i=0; i< message.length(); i++){\n\t\t\tletters[i]= message.charAt(i);\n\t\t}\n\n\t\tfor(int i=0; i<letters.length; i++){\n\t\t\tif(Character.isLetter(letters[i])){ //check to see if letter\n\t\t\t\tif(Character.isUpperCase(letters[i])){ //check to see if it is uppercase\n\t\t\t\t\tnewMessage += letters[i]; //add that character to new string\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//new message is the string that needs to be decrypted now \n\t\t//change the letters into numbers\n\t\tint [] decryptNums = new int[newMessage.length()];\n\t\tString alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t\tfor(int i=0; i < newMessage.length(); i++){\n\t\t\tchar c = newMessage.charAt(i);\n\t\t\tint x = alphabet.indexOf(c) + 1;\n\t\t\tdecryptNums[i] = x;\n\t\t}\n\n\n\t\t//generate key from those numbers\n\t\tint[] keyNum = new int [decryptNums.length];\n\t\tfor(int i=0; i<decryptNums.length; i++){\n\t\t\tint x = getKey();\n\t\t\tkeyNum[i] = x;\n\t\t}\n\n\t\t//subtract letter number from key number\n\t\tint[] finalNum = new int [keyNum.length];\n\t\tfor(int i=0; i<keyNum.length; i++){\n\t\t\tint x= decryptNums[i]-keyNum[i];\n\t\t\tif(keyNum[i] >=decryptNums[i] ){\n\t\t\t\tx = x+26;\n\t\t\t\tfinalNum[i]=x;\n\t\t\t}else{\n\t\t\t\tfinalNum[i]=x;\n\t\t\t}\n\t\t}\n\n\t\t//now re match the alphabet to it \n\t\tchar[] finalChar = new char [finalNum.length];\n\n\t\tfor(int i=0; i< finalNum.length; i++){\n\t\t\tint x = finalNum[i]-1;\n\t\t\tchar c = alphabet.charAt(x);\n\t\t\tfinalChar[i]=c;\n\t\t}\n\n\t\tString decrypt = \"\";\n\t\tfor(int i=0; i< finalChar.length; i++){\n\t\t\tdecrypt += finalChar[i];\n\t\t}\n\t\t\n\t\treturn decrypt;\n\t}", "public BigInteger decrypt(BigInteger cipherText)\n {\n if (cipherText.compareTo(n) == -1) {\n return Utils.bigModPow(cipherText, d, n);\n }\n int eBlockByteLen = (n.bitLength() - 1) / 8 + 1;\n List<BigInteger> resList = new ArrayList<>();\n byte[] bytesCipherText = cipherText.toByteArray();\n // Split and decrypt each encrypted block\n Utils.traverseByteByBlock(bytesCipherText, eBlockByteLen, (byte[] b) -> {\n BigInteger eBlock = BigInteger.valueOf(b[0] & 0xFF);\n for (int j = 1; j < b.length; j++) {\n eBlock = eBlock.shiftLeft(8).add(BigInteger.valueOf(b[j] & 0xFF));\n }\n resList.add(0, Utils.bigModPow(eBlock, d, n));\n });\n // Concatenate all\n int blockByteLen = eBlockByteLen - 1; // decrypted block has 1 byte less than encrypted block, see the encrypt function\n return Utils.concatBigInteger(resList, blockByteLen);\n }", "public String decrypt (String input) {\n return new CaesarCipherTwo(ALPHABET_LENGTH-mainKey1, ALPHABET_LENGTH-mainKey2).encrypt(input);\n }", "public String decryptMsg(String encryptedMsg) {\n encryptedMsg.toLowerCase(Locale.ROOT);\n\n //replace the things with the properties\n encryptedMsg = encryptedMsg.replace(\"1\", \"a\");\n encryptedMsg = encryptedMsg.replace(\"3\", \"e\");\n encryptedMsg = encryptedMsg.replace(\"5\", \"i\");\n encryptedMsg = encryptedMsg.replace(\"7\", \"o\");\n encryptedMsg = encryptedMsg.replace(\"9\", \"u\");\n\n //return the right value\n return encryptedMsg;\n }", "public static String decrypt(String seed, String encrypted)\r\nthrows Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] enc = Base64.decode(encrypted.getBytes(), Base64.DEFAULT);\r\nbyte[] result = decrypt(rawKey, enc);\r\nreturn new String(result);\r\n}", "public String decryptMessage(byte[] pbaPassword, byte[] pbaCiphertext,\n\t\t\tbyte[] pbaIv, byte[] pbaSalt)\n\t{\n\t\t/*\n\t\t * local variables\n\t\t */\n\t\tCipher cipherDec = null;\n\t\tString plaintext = null;\n\n\t\t/*\n\t\t * build secretKey from an byte array\n\t\t */\n\t\tSecretKey tmp = new SecretKeySpec(pbaPassword, 0, pbaPassword.length,\n\t\t\t\t\"AES\");\n\t\tSecretKey secret = new SecretKeySpec(tmp.getEncoded(), \"AES\");\n\n\t\t/*\n\t\t * from cipher text to plain text\n\t\t */\n\t\ttry\n\t\t{\n\t\t\tcipherDec = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\tcipherDec.init(Cipher.DECRYPT_MODE, secret, new IvParameterSpec(\n\t\t\t\t\tpbaIv));\n\t\t\tplaintext = new String(cipherDec.doFinal(pbaCiphertext), \"UTF-8\");\n\t\t}\n\t\tcatch (NoSuchAlgorithmException | NoSuchPaddingException\n\t\t\t\t| InvalidKeyException | InvalidAlgorithmParameterException\n\t\t\t\t| UnsupportedEncodingException | IllegalBlockSizeException e)\n\t\t{\n\t\t\tlogger.fatal(\"Security decrypt message failed: \" + e.getMessage());\n\t\t}\n\t\tcatch (BadPaddingException e)\n\t\t{\n\t\t\tlogger.debug(\"Security: password is false!\");\n\t\t\tplaintext = \"\";\n\t\t}\n\n\t\treturn plaintext;\n\t}", "public static byte[] encryptCtsTail(byte[] plainText, SecretKey key)\n {\n\n byte[] b1 = Arrays.copyOfRange(plainText, 0, 16);\n byte[] c1 = encryptBlocks(b1, key);\n\n byte[] b2 = new byte[16];\n System.arraycopy(plainText, 16, b2, 0, plainText.length - 16);\n System.arraycopy(c1, plainText.length - 16, b2, plainText.length - 16, 32 - plainText.length);\n byte[] c2 = encryptBlocks(b2, key);\n\n byte[] cipherText = new byte[plainText.length];\n System.arraycopy(c1, 0, cipherText, 0, plainText.length - 16);\n System.arraycopy(c2, 0, cipherText, plainText.length - 16, 16);\n\n return cipherText;\n }", "private byte[] encStrToBytes(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"text = [\");\n\t\t// for (int i = 0; i < sPlainText.length; i++ ) {\n\t\t// System.out.print( sPlainText[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Alocated \" + nNumBytes + \" byte buffer\");\n\t\t// System.out.println(\"Buffer length = \" + buf.length + \" bytes\");\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (buf.length - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// int bytesPrinted = 0;\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// bytesPrinted++;\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Buf length check \" + nNumBytes + \" = \" + buf.length);\n\t\t// System.out.println(\"Bytes printed = \" + bytesPrinted);\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, buf.length);\n\t\t// System.out.println(\"Encrypted buffer length = \" + buf.length + \" bytes\");\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tint totalNumBytes = EQBlowfishECB.BLOCKSIZE + buf.length;\n\t\tbyte[] result = new byte[totalNumBytes];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, result, 0);\n\t\tint count = 0;\n\t\tfor (int i = EQBlowfishECB.BLOCKSIZE; i < totalNumBytes; i++)\n\t\t{\n\t\t\tresult[i] = buf[count++];\n\t\t}\n\t\t// System.out.print(\" CBCIV bytes=[\");\n\t\t// for (int i = 0; i < EQBlowfishCBC.BLOCKSIZE; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Final Buffer length = \" + result.length + \" bytes\");\n\t\t// System.out.print(\" final bytes=[\");\n\t\t// for (int i = 0; i < totalNumBytes; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\treturn result;\n\t}", "private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO ==0)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO != ZERO)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tdecodedText = sb.toString();\n\t\t\tcipherText = decodedText;\n\t\t\tloopIntDecode++;\n\t\t}while(loopIntDecode < shiftAmount);\n\t}", "public String Decrypt(String Message, int PrimeNo, String EncoderKeyPath) throws IOException\r\n {\r\n Scanner sc = new Scanner(System.in);\r\n Key key1 = new Key();\r\n char[] msg=new char[Message.length()];\r\n int s, x;\r\n System.out.println(\"Enter Your Secret Key To Decode \");\r\n x=sc.nextInt();\r\n int key = key1.Skey(PrimeNo, x, EncoderKeyPath);\r\n char s1;\r\n int len=Message.length();\r\n int res=0;\r\n\tfor(int i=0;i<len;i++)\r\n\t{\r\n res=i%key;\r\n s=Message.charAt(i);\r\n s-=res;\r\n s1= (char) s;\r\n msg[i]=s1;\t\r\n\t}\r\n String msg1 = new String(msg);\r\n return msg1; \r\n }", "public static byte[] decryptByte (byte[] cipherText, SecretKey key,byte[] IV) throws Exception\n {\n //Create cipher for AES with PKCS Padding\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n //Get the spec of the genetated key, required for ciper\n SecretKeySpec keySpec = new SecretKeySpec(key.getEncoded(), \"AES\");\n //Get the spec of the generated iv, reuired for ciper\n IvParameterSpec ivSpec = new IvParameterSpec(IV);\n \n //use cipher to decrypt\n cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);\n byte[] decryptedText = cipher.doFinal(cipherText);\n return decryptedText;\n }", "public String decode(String cipher)\n {\n \treturn null;\n }", "public DecryptionCipherInterface decryptionCipher()\n {\n return this.decryptionCipher;\n }", "public void decryptFile(File cipherInputFile, File textOutputFile) throws FileNotFoundException{\n Scanner in = new Scanner(cipherInputFile);\n PrintStream out = new PrintStream(textOutputFile);\n\n while (in.hasNextLine()) {\n String line = in.nextLine();\n out.print(decrypt(line));\n }\n }" ]
[ "0.7653685", "0.6656813", "0.6628877", "0.66051537", "0.65934825", "0.6592738", "0.6573932", "0.65620893", "0.65338105", "0.65041584", "0.6492167", "0.64665705", "0.6393416", "0.6366623", "0.63644916", "0.635746", "0.6320572", "0.6304368", "0.63026756", "0.6287071", "0.6285697", "0.62814885", "0.6257157", "0.6239957", "0.6231217", "0.6224155", "0.62238455", "0.6205822", "0.6172045", "0.6124203", "0.608712", "0.6082889", "0.607345", "0.6063711", "0.60388964", "0.60358524", "0.60269386", "0.60137194", "0.5997999", "0.59958893", "0.5971939", "0.5957378", "0.5940675", "0.5937847", "0.5928023", "0.5926658", "0.5923067", "0.5920511", "0.5918309", "0.5904787", "0.5885695", "0.58805704", "0.5863027", "0.5856805", "0.5854645", "0.5844567", "0.5830536", "0.5828917", "0.58236825", "0.5805241", "0.578833", "0.5786221", "0.5778585", "0.5755142", "0.5752389", "0.5723015", "0.57168084", "0.57153213", "0.5706183", "0.56933093", "0.56850225", "0.56845075", "0.56827193", "0.5676035", "0.5675666", "0.56669706", "0.5651117", "0.56481916", "0.5631432", "0.56219614", "0.5619093", "0.5608575", "0.5603203", "0.55943066", "0.5593044", "0.55850124", "0.55841863", "0.5561513", "0.55594635", "0.5548066", "0.5546898", "0.554395", "0.5507671", "0.5498213", "0.5490635", "0.5480693", "0.5477063", "0.5474832", "0.54535866", "0.54352075" ]
0.6578806
6
Consume the item instance detected from an Activity or Fragment level by implementing the BarcodeUpdateListener interface method onBarcodeDetected.
interface BarcodeUpdateListener { @UiThread void onBarcodeDetected(Barcode barcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG,\"Barcode detected\");\n }", "public void onRead(BarcodeData barcodeData) {\n }", "private void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG, \"Detected barcode with value: \" + barcode.displayValue);\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(INTENT_EXTRA_BARCODE_VALUE, barcode.displayValue);\n setResult(RESULT_OK, returnIntent);\n finish();\n }", "public interface BarcodeListener {\n void onBarCodeScanned( Barcode scannedBarCode );\n}", "@Override\n public void onScanned(Barcode barcode) {\n super.onScanned(barcode);\n\n //on Scan completed close the scanner\n if (isScanning.get()) {\n getChildFragmentManager()\n .beginTransaction()\n .remove(getChildFragmentManager().findFragmentById(R.id.scannerFragment))\n .commit();\n }\n\n isScanning.set(false);\n\n /*\n * this works when if user scan the exist\n * code without scanning the enter code\n */\n boolean waitingForEnterCode = !getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(EXIT) && waitingForEnterCode) {\n String message = \"Its look like that you haven't scan the Enter Code \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n /*\n * this works when user scan the enter code again\n * without scanning the exit code\n */\n boolean waitingForExitCode = getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(ENTER) && waitingForExitCode) {\n String message = \"you have already scan the Enter code First scan a Exist \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n if (barcode.rawValue.equals(Constants.IQRCode.ENTER)) {\n viewmodel.updateScannedValueWhenEnter();\n updatePendingEntryEvent(true);\n } else if (barcode.rawValue.equals(EXIT)) {\n viewmodel.updateScannedValueWhenExist();\n updatePendingEntryEvent(false);\n } else {\n Toast.makeText(getActivity(), \"no action specified\", Toast.LENGTH_SHORT).show();\n }\n }", "public void handleBarcodeScanned(ScenarioController scenarioController, String barcode);", "@Override\n public void onNewDetection(int id, final Barcode barcode) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (!mBarcodeDetected) {\n mBarcodeDetected = true;\n mCameraSourcePreview.stop();\n AudioManager audioService = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n if (audioService.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) {\n ToneGenerator toneGenerator\n = new ToneGenerator(AudioManager.STREAM_MUSIC, TONE_VOLUME);\n toneGenerator.startTone(ToneGenerator.TONE_CDMA_PIP, TONE_DURATION);\n }\n onBarcodeDetected(barcode);\n }\n }\n });\n }", "@Override\n public final void onRead(BarcodeReader bsObj, final BarcodeData result) {\n if (BuildConfig.DEBUG) {\n printDebugLog(\n String.format(getString(R.string.read_barcode_logging_format),\n bsObj.getDeviceName(), result.getSymbology()));\n printDebugLog(\n String.format(getString(R.string.read_barcode_text_logging_format), result.getTextData()));\n }\n\n runOnUiThread(new Runnable() {\n public void run() {\n BarcodeReadableActivity.this.onRead(result);\n }\n });\n }", "public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {\n\t inactivityTimer.onActivity();\n\t lastResult = rawResult;\n//\t ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);\n//\n//\t boolean fromLiveScan = barcode != null;\n//\t if (fromLiveScan) {\n//\t historyManager.addHistoryItem(rawResult, resultHandler);\n//\t // Then not from history, so beep/vibrate and we have an image to draw on\n//\t beepManager.playBeepSoundAndVibrate();\n//\t drawResultPoints(barcode, scaleFactor, rawResult);\n//\t }\n//\n//\t displayBarcodeAnimation(currentEan);\n//\t displayBarcodeAnimation2(rawResult.getText(),barcode);\n//\t \tString message = \"Barcode result: \"\n//\t + \" (\" + rawResult.getText() + ')';\n//\t Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n//\t // Wait a moment or else it will scan the same barcode continuously about 3 times\n\t restartPreviewAfterDelay(BULK_MODE_SCAN_DELAY_MS);\n//\t \n\t \n\t \n\t try {\n\t\t\t\tif (barcode != null) {\n\t\t\t\t\tCaptureActivity.BARCODE = \"\";\n\t\t\t\t\tnow.setToNow();\n\t\t\t\t\tcurrentEan = rawResult.getText().trim();\n\t\t\t\t\t\n\t\t\t\t\tif (!lastEan.equals(currentEan)\n\t\t\t\t\t\t\t|| Math.abs(now.second - lastScanTime) >= SAME_PRODUCT_RESCAN_INTERVAL) {\n\t\t\t\t\t\tbeepManager.playBeepSoundAndVibrate();\n\n\t\t\t\t\t\tlastEan = currentEan;\n\t\t\t\t\t\tlastScanTime = now.second;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (currentEan!=null && !currentEan.isEmpty()) {\n\t\t\t\t\t\t\tdrawResultPoints(barcode, scaleFactor, rawResult);\n\t\t\t\t\t\t\tdisplayBarcodeAnimation2(rawResult.getText(),barcode);\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//\n\t\t\t\t\t\t\n//\t\t\t\t\t\trestartPreviewAfterDelay(BULK_MODE_SCAN_DELAY_MS);\n\t\t\t\t\t\tscanEanAddingStarted = true;\n\t\t\t\t\t\twhile (!scanEanRemovingStarted) {\n\t\t\t\t\t\t\tsacannedItemListForArticle.add(currentEan);\n\t\t\t\t\t\t\tscanEanAddingStarted = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscanImageAddingStarted = true;\n\t\t\t\t\t\twhile (!scanImageRemovingStarted) {\n\t\t\t\t\t\t\tsacannedItemListForImage.add(currentEan);\n\t\t\t\t\t\t\tscanImageAddingStarted = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n//\t\t\t\t\t\ttvScanningProgressCounter.setText(\"\"+sacannedItemListForArticle.size()+\" remaining\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tCommonTask.ShowMessage(this, e.getMessage());\n\t\t\t}\n\t }", "public void scanQrCode() {\r\n cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {\r\n @Override\r\n public void surfaceCreated(SurfaceHolder holder) {\r\n try {\r\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n cameraSource.start(cameraView.getHolder());\r\n } catch (IOException ie) {\r\n Log.e(\"CAMERA SOURCE\", ie.getMessage());\r\n }\r\n }\r\n\r\n @Override\r\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\r\n //cameraSource.release();\r\n }\r\n\r\n @Override\r\n public void surfaceDestroyed(SurfaceHolder holder) {\r\n cameraSource.stop();\r\n }\r\n });\r\n\r\n cameraView.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n cameraFocus(cameraSource, Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\r\n }\r\n });\r\n\r\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\r\n @Override\r\n public void release() {\r\n\r\n }\r\n\r\n @Override\r\n public void receiveDetections(Detector.Detections<Barcode> detections) {\r\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\r\n\r\n if (barcodes.size() != 0) {\r\n barcodeInfo.post(new Runnable() {\r\n public void run() {\r\n try {\r\n if (Config.getInstance().isInternetAvailable(BarcodeScanner.this)) {\r\n\r\n Config.getInstance().logger(BarcodeScanner.this,Config.getInstance().logger_ATTENDANCE_FILL_ATTENDANCE);\r\n String contents = barcodes.valueAt(0).displayValue;\r\n Toast.makeText(BarcodeScanner.this, contents, Toast.LENGTH_SHORT).show();\r\n tv_detectedValue.setText(contents);\r\n\r\n } else {\r\n Config.getInstance().GlobalInternetDialog(BarcodeScanner.this);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode,resultCode,data);\n if (intentResult.getContents() != null) {\n String scannedText = intentResult.getContents();\n\n // Get product data associated with the UPC barcode\n Uri uri = api.getURL(scannedText);\n api.getData(uri, this::productBarcodeHandler);\n }\n else {\n Toast.makeText(getApplicationContext(),\"Nothing was scanned\", Toast.LENGTH_SHORT).show();\n }\n }", "public interface BarcodeGeneratorListener {\n\n /**\n * BarcodeGenerator callback method\n * @param bitmap - barcode bitmap\n * @param imageId - used to differentiate barcode bitmaps\n */\n void onBarcodeGenerated(Bitmap bitmap, int imageId);\n }", "private void goodScan() {\n resultIcon.setImageDrawable(getDrawable(R.drawable.ic_check_solid));\n resultIcon.setVisibility(View.VISIBLE);\n\n this.quantity--;\n this.instructions.setText(String.format(\n getString(R.string.activity_scan_item__instructions),\n this.quantity, this.name\n ));\n\n if (this.quantity == 0) {\n // All done!\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n doneScanning();\n }\n }, 500);\n\n } else {\n // Add listener back after two (2) seconds\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(scannerListener);\n\n resultIcon.setVisibility(View.GONE);\n }\n }, 2000);\n }\n }", "public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {\n inactivityTimer.onActivity();\n\n boolean fromLiveScan = barcode != null;\n if (fromLiveScan) {\n // Then not from history, so beep/vibrate and we have an image to draw on\n beepManager.playBeepSoundAndVibrate();\n }\n\n //rawResult.getText() 结果\n if (rawResult == null || TextUtils.isEmpty(rawResult.getText())) {\n if (analyzeCallback != null) {\n analyzeCallback.onAnalyzeFailed();\n }\n } else {\n if (analyzeCallback != null) {\n analyzeCallback.onAnalyzeSuccess(barcode, rawResult.getText());\n }\n }\n\n }", "void onScanResult(final IScanResult result);", "public interface BarcodeCapturedListener {\n\n /**\n * Will receive the barcode as a string anytime one barcode is captured. TODO maybe it shouldn't ever return null and it can be specified in the contract\n *\n * @param barcodeString\n */\n void barcodeCaptured(String barcodeString);\n\n}", "public void handleDecode(Result rawResult, Bitmap barcode) {\n\t\tif (barcode == null) {\n\n\t\t} else {\n\t\t\thandleDecode(rawResult.getText());\n\t\t}\n\n\t}", "private void initScanner() {\n /*\n * since barcodeReaderFragment is the child fragment in the ScannerFragment therefore\n * it is get using getChildFragmentManager\n * setting up the custom bar code listener\n */\n\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\n\t // Make sure the request was successful\n\t if (resultCode == RESULT_OK) {\n\t Bundle resultBundle = data.getExtras();\n\t String decodedData = resultBundle.getString(\"DATA_RESULT\");\n\t String scanAction = resultBundle.getString(\"SCAN_ACTION\");\n\t\t \n\t\t if(scanAction != null && scanAction.equalsIgnoreCase(SCAN_TYPE)){\n\t\t\t // With the decoded data use session.get entity etc... then call server to get entity info\n\t\t\t try{\n\t\t\t\t processData(decodedData);\n\t\t\t }catch(Exception e){\n\t\t\t\t Toast.makeText(this, \"Unknown barcode format: please scan a valid barcode\", Toast.LENGTH_LONG).show();\n\t\t\t\t launchScanner(SCAN_TYPE);\n\t\t\t }\n\t\t\t \n\t\t }else{\n\t\t\t Toast.makeText(this, \"NO SCANNING ACTION\", Toast.LENGTH_LONG).show();\n\t\t\t launchScanner(SCAN_TYPE);\n\t\t }\n\t\t \n\t }else{\n\t\t finish();\t\t \n\t }\t \n\t}", "@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }", "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (!TrackerSharePreference.getConstant(context).isCardRegistered()) return;\n\n MyApplication.appendLog(MyApplication.getCurrentDate() + \" : BeaconReceiver OnReceive callback\\n\");\n mContext = context;\n\n Log.v(TAG, \"onReceive() \");\n\n if (intent.getAction() == null) {\n Log.e(TAG, \"ERROR: action is null\");\n } else {\n // Look whether we find our device\n if (ACTION_SCANNER_FOUND_DEVICE.equals(intent.getAction())) {\n Bundle extras = intent.getExtras();\n\n if (extras != null) {\n Object obj = extras.get(BluetoothLeScanner.EXTRA_LIST_SCAN_RESULT);\n if (obj instanceof ArrayList) {\n ArrayList<ScanResult> scanResults = (ArrayList<ScanResult>) obj;\n Log.v(TAG, \"There are \" + scanResults.size() + \" results\");\n\n for (ScanResult result : scanResults) {\n if (result.getScanRecord() == null) {\n Log.d(TAG, \"getScanRecord is null\");\n continue;\n }\n\n TrackerSharePreference trackerSharePreference = TrackerSharePreference.getConstant(context);\n trackerSharePreference.setAlreadyCreateWorkerThread(false);\n trackerSharePreference.setRanging(true);\n trackerSharePreference.setBeaconTimestamp(MyApplication.getCurrentDate());\n trackerSharePreference.setCurrentState(StateMachine.RING_NOTIFICATION_STATE.getValue());\n playSound(context.getApplicationContext());\n showRangNotification(context.getApplicationContext());\n\n Log.d(\"BleReceiver\", \"showNotification\");\n\n }\n\n } else {\n // Received something, but not a list of scan results...\n Log.d(TAG, \" no ArrayList but \" + obj);\n }\n } else {\n Log.d(TAG, \"no extras\");\n }\n }\n }\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final Activity activityContext, final CameraSourcePreview cameraSourcePreview, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(activityContext)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n CameraSource cameraSource = new CameraSource.Builder(activityContext, barcodeDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setRequestedPreviewSize(1600, 1024)\n .setAutoFocusEnabled(true)\n .build();\n\n if (cameraSource != null) {\n try {\n cameraSourcePreview.start(cameraSource);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n\n @Override\n public void release() {\n }\n\n @Override\n @RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\n\n if (barcodes.size() != 0 && !isScanned) {\n\n Log.d(TAG, \"Barcodes size : \" + barcodes.size());\n Barcode barcode = barcodes.valueAt(0);\n Log.d(TAG, \"QR Code Data : \" + barcode.rawValue);\n String scannedData = barcode.rawValue;\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n cameraSourcePreview.release();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type not supported\"));\n }\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport is not available\"));\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code not valid\"));\n }\n }\n }\n });\n }", "void barcodeCaptured(String barcodeString);", "private void scanOnceMore() {\n\n barcodeReaderFragment = new BarcodeReaderFragment();\n barcodeReaderFragment.setListener(ScannerFragment.this);\n FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();\n if (isScanning.get()) fragmentTransaction.remove(barcodeReaderFragment);\n else fragmentTransaction.replace(R.id.scannerFragment, barcodeReaderFragment);\n isScanning.set(!isScanning.get());\n fragmentTransaction.commit();\n }", "public void scanBarcode(View v) {\n Intent intent=new Intent(this, ScanBarcodeActivity.class);\n startActivityForResult(intent,0);\n }", "@Override\n public void onScanStarted() {\n Log.d(TAG, \"Scan Started\");\n }", "void onDeviceFound(TxRxScanResult scanResult);", "public void productBarcodeHandler(JSONObject response) {\n try {\n JSONObject productInfo = response.getJSONObject(\"product\");\n JSONArray keywords = productInfo.getJSONArray(\"_keywords\");\n\n String name = productInfo.getString(\"product_name\");\n int resID = R.drawable.food_misc;\n\n for (int i = 0; i < keywords.length(); i++) {\n String keyword = keywords.getString(i);\n\n if (keyword.contains(\" \")) {\n keyword = keyword.replace(\" \", \"_\");\n }\n\n int resource = this.getResources().getIdentifier(\"food_\" + keyword, \"drawable\", this.getPackageName());\n if (resource != 0) {\n resID = resource;\n break;\n }\n }\n\n Intent intent = new Intent(this, ItemEntry.class);\n intent.putExtra(\"FOOD_NAME\", name);\n intent.putExtra(\"FOOD_PIC\", resID);\n startActivity(intent);\n }\n catch (Exception e) {\n Toast.makeText(getApplicationContext(),\"ERROR finding product!\", Toast.LENGTH_LONG).show();\n Log.e(\"UPC Scan Error:\", e.getMessage());\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n //if qrcode reader\n if(code == 1){\n IntentResult qrcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (qrcode != null) {\n if (qrcode.getContents() != null) {\n String cut = qrcode.getContents();\n int corte = cut.indexOf(\"=\") + 1;\n final String code = cut.substring(corte, corte + 44);\n Intent readQRcode = new Intent(activity, VerNFe.class);\n readQRcode.putExtra(\"code\", code);\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n startActivity(readQRcode);\n } else {\n Toast.makeText(activity, R.string.toast_cancel_read_qrcode, Toast.LENGTH_SHORT).show();\n }\n drawerLayout.closeDrawers();\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }\n //if barcode reader\n else if (code == 2){\n IntentResult barcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (barcode != null) {\n if (barcode.getContents() != null) {\n String codigo_de_barras = barcode.getContents();\n Descontos d = new Descontos();\n d.pegaProdutoPorCodigoDeBarras(codigo_de_barras);\n } else {\n Toast.makeText(this, \"Leitura do código de barras cancelado\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, \"Erro ao ler código de barras do Produto\", Toast.LENGTH_LONG).show();\n }\n }\n\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n if (resultCode == RESULT_CANCELED) {\n Toast.makeText(this, \"Cancelled\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Map<String, Object> data = null;\n if (requestCode == QR_CODE_SCAN_REQUEST_CODE) {\n IntentResult scanResult = IntentIntegrator.parseActivityResult(\n requestCode, resultCode, intent);\n if (scanResult != null && scanResult.getContents() != null) {\n Yaml yaml = new Yaml();\n String scanned_data = scanResult.getContents().toString();\n data = (Map<String, Object>) yaml.load(scanned_data);\n }\n }\n else if (requestCode == NFC_TAG_SCAN_REQUEST_CODE && resultCode == RESULT_OK) {\n if (intent.hasExtra(\"tag_data\")) {\n data = (Map<String, Object>) intent.getExtras().getSerializable(\"tag_data\");\n }\n }\n else {\n Log.w(\"Remocon\", \"Unknown activity request code: \" + requestCode);\n return;\n }\n\n if (data == null) {\n Toast.makeText(this, \"Scan failed\", Toast.LENGTH_SHORT).show();\n }\n else {\n try {\n Log.d(\"Remocon\", \"master chooser OBJECT: \" + data.toString());\n addMaster(new MasterId(data), false);\n } catch (Exception e) {\n Toast.makeText(this, \"invalid rocon master description: \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }", "public static void onListenerAction(DecodeItemHelper decodeItem) {\n activityInterface.setDecodeItem(decodeItem);\n\n switch (decodeItem.getIdView()) {\n case R.id.item_btn_pagar_prestamo_individual:\n activityInterface.openExternalActivity(Constants.ACCION_PAGAR, MainRegisterActivity.class);\n break;\n case R.id.item_btn_entregar_prestamo_individual:\n activityInterface.openExternalActivity(Constants.ACCION_ENTREGAR, MainRegisterActivity.class);\n break;\n case R.id.item_btn_autorizar_prestamo_individual:\n activityInterface.openExternalActivity(Constants.ACCION_AUTORIZAR, MainRegisterActivity.class);\n break;\n case R.id.item_btn_ver_prestamo_individual:\n activityInterface.openExternalActivity(Constants.ACCION_VER, MainRegisterActivity.class);\n break;\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (barcodeReader != null) {\n // release the scanner claim so we don't get any scanner\n // notifications while paused.\n barcodeReader.release();\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n if (barcodeReader != null)\n configureBarcode();\n\n }", "@Override\n public void onClick(View v) {\n IntentIntegrator integ = IntentIntegrator.forSupportFragment(search_Fragement.this);\n integ.setCaptureActivity(CaptureAct.class);\n integ.setOrientationLocked(false);\n integ.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);\n integ.setPrompt(\"scanning code..\");\n integ.initiateScan();\n\n\n }", "public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }", "public interface IBleScanCallback {\n\n /**\n * Callback when a BLE advertisement has been found.\n *\n * @param result scan result\n */\n void onScanResult(final IScanResult result);\n}", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Location curLocation=LocationServiceFactory.getLocationService().getLocation();\r\n WifiScanResult wifiScanResult=new WifiScanResult(new Date().getTime(),curLocation,null);\r\n\r\n Beacon[] beacons = new Gson().fromJson(intent.getExtras().getString(\"beacons\"), Beacon[].class);\r\n for (Beacon beacon : beacons) {\r\n BssidResult bssid = new BssidResult(beacon, wifiScanResult);\r\n wifiScanResult.addTempBssid(bssid);\r\n }\r\n\r\n onScanFinished(wifiScanResult);\r\n\r\n scanningCount++;\r\n if(scanningCount >= BeaconSession.MAX_SCANNING_COUNT)\r\n {\r\n scanningCount = 0;\r\n stopWifiScan();\r\n }\r\n }", "private void registerBarcode(View view) {\n if (getResult() != null) {\n Intent codeScannerIntent = new Intent(this, CodeScannerActivity.class);\n startActivityForResult(codeScannerIntent, CodeScannerActivity.SCAN_CODE_REQUEST);\n } else {\n Toast.makeText(this, \"Trial result is invalid, cannot register bar code\", Toast.LENGTH_SHORT).show();\n }\n }", "public interface ProductItemAvailableListener {\n void onProductItemAvailable(List<ProductItem> products);\n}", "public boolean onKey(View v, int keyCode, KeyEvent event) {\n\r\n if (event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {\r\n\r\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\r\n imm.hideSoftInputFromWindow(((EditText) v).getWindowToken(), 0);\r\n\r\n if (((EditText) v).getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Scan item barcode\");\r\n } else {\r\n Cursor BarcodeItem = null;//dbBillScreen.getItem(((EditText) v).getText().toString());\r\n if (BarcodeItem.moveToFirst()) {\r\n btnClear.setEnabled(true);\r\n AddItemToOrderTable(BarcodeItem);\r\n // ((EditText)v).setText(\"\");\r\n return true;\r\n } else {\r\n MsgBox.Show(\"Warning\", \"Item not found for the above barcode\");\r\n }\r\n }\r\n }\r\n // ((EditText)v).setText(\"\");\r\n return false;\r\n }", "public interface ScanResultsAvailable {\n public void onReceiveScanResults();\n}", "@Override\n public void onScanResult(int callbackType, ScanResult result) {\n processResult(result);\n }", "public synchronized void magicalItemCaptureCallBack(int noOfMagicalItems) {\n\t\tif (currentActivity == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcurrentActivity.updateGameMagicalItemInfo(noOfMagicalItems);\n\t}", "private void initialiseDetectorsAndSources() {\n\n barcodeDetector = new BarcodeDetector.Builder(this)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n cameraSource = new CameraSource.Builder(this, barcodeDetector)\n .setRequestedPreviewSize(1920, 1080)\n .setAutoFocusEnabled(true) //you should add this feature\n .build();\n\n surfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder holder) {\n try {\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) {\n cameraSource.start(surfaceView.getHolder());\n Toast.makeText(getApplicationContext(), \"Camera started\", Toast.LENGTH_LONG).show();\n } else {\n ActivityCompat.requestPermissions(RideCycle.this, new\n String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n\n\n }\n\n @Override\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\n }\n\n @Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n cameraSource.stop();\n }\n });\n\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n @Override\n public void release() {\n Toast.makeText(getApplicationContext(), \"To prevent memory leaks barcode scanner has been stopped\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\n if (barcodes.size() != 0) {\n\n\n txtBarcodeValue.post(new Runnable() {\n\n @Override\n public void run() {\n\n if (barcodes.valueAt(0).email != null) {\n txtBarcodeValue.removeCallbacks(null);\n intentData = barcodes.valueAt(0).email.address;\n txtBarcodeValue.setText(intentData);\n isEmail = true;\n // btnAction.setText(\"ADD CONTENT TO THE MAIL\");\n } else {\n isEmail = false;\n// btnAction.setText(\"LAUNCH URL\");\n intentData = barcodes.valueAt(0).displayValue;\n txtBarcodeValue.setText(\"Cycle id: \" + intentData);\n\n }\n }\n });\n\n }\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Log.d(\"MainActivity\", \"Cancelled scan\");\n makeToast(this, \"Cancelado\");\n } else {\n Log.d(\"MainActivity\", \"Scanned\");\n makeToast(this, \"Contactando con Salesforce, ISBN: \" + result.getContents());\n scanResult = result.getContents();\n\n if (scanResult != null) {\n try {\n getProducto(scanResult);\n } catch (Exception e) {\n Log.e(\"RequestError\", e.toString());\n makeToast(this, \"Ha ocurrido un error, intente nuevamente...\");\n } finally {\n sfResult = null;\n }\n }\n }\n } else {\n Log.d(\"MainActivity\", \"Weird\");\n // This is important, otherwise the result will not be passed to the fragment\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "public void on_code_read(String result){\n Intent intent = new Intent(ScanActivity.this, TargetActivity.class);\n intent.putExtra(\"result\", result);\n startActivity(intent);\n }", "@Override\n public void onResume() {\n super.onResume();\n // Check if there is any any NDEF is discovered to process the TAG\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {\n processIntent(getIntent()); // If NDEF is discovered, It calls prcoessIntent method to get the NFC TAG Code\n }\n }", "private View.OnClickListener onScanBarcodeButtonClick() {\n return new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n try {\n final Intent intent = new Intent(OnYard.ZXING_SCAN_ACTION);\n intent.putExtra(\"SCAN_MODE\", \"ONE_D_MODE\");\n getParentFragment().startActivityForResult(intent, SCAN_BARCODE_REQUEST_CODE);\n }\n catch (final Exception e) {\n showScanErrorDialog();\n logError(e);\n }\n }\n };\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"WiFi SCAN\", \"RESULT RETURN:\"+new Date().getTime());\n synchronized (scanned) {\n scanned.notify();\n }\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void checkBarcode(Product matchingProduct, String barcode) {\n\t\tBundle productBundle = new Bundle();\r\n\t\tIntent productIntent;\r\n\r\n\t\t/*\r\n\t\t * If the database contains a matching product, package that products\r\n\t\t * info in a bundle and then send that info to the requested activity.\r\n\t\t * Else, let the owner create a product with the found id.\r\n\t\t */\r\n\t\tproductBundle.putString(\"productId\", barcode);\r\n\t\tif (matchingProduct != null) {\r\n\t\t\tString productName = matchingProduct.getName();\r\n\t\t\tint productPrice = matchingProduct.getPrice();\r\n\r\n\t\t\tproductBundle.putString(\"productName\", productName);\r\n\t\t\tproductBundle.putInt(\"productPrice\", productPrice);\r\n\r\n\t\t\tproductIntent = new Intent(this, ProductActivity.class);\r\n\t\t} else {\r\n\t\t\tproductIntent = new Intent(this, AddNewProductActivity.class);\r\n\t\t}\r\n\r\n\t\t// Add the bundle to the intent, and start the requested activity\r\n\t\tproductIntent.putExtras(productBundle);\r\n\t\tstartActivity(productIntent);\r\n\t}", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }", "@Override\n public void onScanFailed() {\n Log.d(TAG, \"Scan Failed\");\n BluetoothManipulator.startScan();\n }", "public void onClick(View v) {\n onScanBarcodeClick();\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n partNumber = result.getContents();\n new BackgroundTaskScanQrCode().execute();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onScannedBleDeviceAdded(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceAdded enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_ADD_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_ADD_FLAG, device);\n }", "private void onScanFragmentScanResult(Bitmap bitmap, ScanResult2[] results) {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(null);\n\n ScanResult2 result = results[0];\n\n if (result.getText().equals(this.upc)) {\n goodScan();\n } else {\n badScan();\n }\n }", "@ViewAnnotations.ViewOnClick(R.id.hunter_number_read_qr_button)\n protected void onReadQrCodeClicked(final View view) {\n final IntentIntegrator intentIntegrator = IntentIntegrator.forSupportFragment(this);\n intentIntegrator.setBarcodeImageEnabled(true);\n intentIntegrator.setOrientationLocked(false);\n intentIntegrator.initiateScan();\n }", "private void badScan() {\n resultIcon.setImageDrawable(getDrawable(R.drawable.ic_times_solid));\n resultIcon.setVisibility(View.VISIBLE);\n\n Beep.beep(this);\n\n // Add listener back after one (1) second\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(scannerListener);\n\n resultIcon.setVisibility(View.GONE);\n }\n }, 1000);\n }", "private void doneScanning() {\n CustomToast.showTopToast(this, \"Success!\");\n\n instructions.setVisibility(View.GONE);\n resultIcon.setVisibility(View.GONE);\n\n ScanItemSuccessFragment scanItemSuccessFragment = new ScanItemSuccessFragment();\n getFragmentManager().beginTransaction().replace(R.id.fragment_container, scanItemSuccessFragment).commit();\n }", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onScan(DataEvent event) {\n Log.d(TAG, \"onScan : event = [\" + event + \"]\");\n DecodedData data = event.getData();\n print(data.getString());\n }", "@Override\n public void receivedBroadcast() {\n Log.d(TAG, \"Received broadcast notification. Querying inventory.\");\n try {\n mHelper.queryInventoryAsync(mGotInventoryListener);\n } catch (IabHelper.IabAsyncInProgressException e) {\n complain(\"Error querying inventory. Another async operation in progress.\");\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n mNfcAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, null);\n checkPlayServices();\n // Check to see that the Activity started due to an Android Beam\n Log.i(TAG, \"resume\" + getIntent().getAction());\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {\n\n processIntent(getIntent());\n }\n }", "public interface BluetoothScanListener {\n void onScanResult(int callbackType, ScanResult result);\n void onBatchScanResults(List<ScanResult> results);\n void onScanFailed(int errorCode);\n}", "@Override\n public void onNewItem(int faceId, Face item)\n {\n Log.d(APP_LOG_TAG, \"face detected\");\n }", "@Override\n\t\tpublic void onClick( View v ) {\n\t\t\tIntent intent = new Intent( GetSellingItem.this, ZBarScannerActivity.class );\n\t\t\t\n\t\t\t// Specify ZBar to only scan for QR Codes (not barcodes or others).\n\t\t\tintent.putExtra( ZBarConstants.SCAN_MODES, new int[]{Symbol.QRCODE} );\n\t\t\t\n\t\t\t// Makes sure result of QR scan is sent to onActivityResult() later.\n\t\t\tstartActivityForResult( intent, ZBAR_REQUEST_ADD_ITEM ); \n\t\t}", "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "public interface ScanListener {\n public abstract void onScanned();\n}", "public EventHandler<KeyEvent> checkItemExistence() {\r\n\t\treturn new EventHandler<KeyEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(KeyEvent e) {\r\n\t\t\t\tif (e.getCode() == KeyCode.TAB) {\r\n\t\t\t\t\tLOGGER.info(\"Tab Event Handled : {}\", barcodeField.getText());\r\n\t\t\t\t\tif (itemService.findByBarcode(barcodeField.getText()) != null) {\r\n\t\t\t\t\t\tLOGGER.info(\"Item already exists for barcode : {}\", barcodeField.getText());\r\n\t\t\t\t\t\tMessageDialog.showAlert(AlertType.WARNING, \"Product Already Exists\", null,\r\n\t\t\t\t\t\t\t\t\"Product already exists for a given barcode : [\" + barcodeField.getText() + \"]\");\r\n\t\t\t\t\t\tbarcodeField.clear();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t}", "private void iniciarQrDetector() {\n\n System.out.println(\"Iniciar Qr\");\n\n final Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n int width = size.x;\n int height = size.y;\n\n barcodeDetector = new BarcodeDetector.Builder(LectorActivity.this)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n @Override\n public void release() {\n }\n\n @Override\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n if (seguir) {\n final SparseArray<Barcode> qrcodes = detections.getDetectedItems();\n\n try {\n value = qrcodes.valueAt(0).rawValue;\n\n\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"No se ha encontrado ningún código.\");\n }\n\n if (!value.equals(\"0\")) {\n seguir = false;\n System.out.println(\"Leido, \"+value);\n comprueba_maquina(value);\n }\n }\n }\n });\n cameraSource = new CameraSource\n .Builder(LectorActivity.this, barcodeDetector)\n .setRequestedPreviewSize(height, width)\n .setAutoFocusEnabled(true)\n .build();\n\n cameraPreview.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder surfaceHolder) {\n if (ActivityCompat.checkSelfPermission(LectorActivity.this, android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n //Request permission\n ActivityCompat.requestPermissions(LectorActivity.this,\n new String[]{Manifest.permission.CAMERA}, RequestCameraPermissionID);\n System.out.println(\"PERMISOS\");\n return;\n }\n try {\n System.out.println(\"INICIAR CAMARA\");\n cameraSource.start(cameraPreview.getHolder());\n } catch (IOException e) {\n System.out.println(\"FALLO AL INICIAR CAMARA\");\n e.printStackTrace();\n }\n }\n\n @Override\n public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {\n\n }\n\n @Override\n public void surfaceDestroyed(SurfaceHolder surfaceHolder) {\n cameraSource.stop();\n }\n });\n }", "void onDiscoverItemClicked(Movie item);", "@Override\n\tprotected void onActivityResult( int requestCode, int resultCode, Intent data ) {\n\t\t\n\t\tif ( requestCode == ZBAR_REQUEST_ADD_ITEM && resultCode == RESULT_OK ) {\n\t\t\t// Scan result is available by making a call to data.getStringExtra(ZBarConstants.SCAN_RESULT)\n\t\t\tnum = data.getStringExtra( ZBarConstants.SCAN_RESULT );\n\t\t\ttrackingNum.setText( num );\n\t\t}\n\t}", "@Override\r\n public boolean onKeyUp(int keyCode, KeyEvent event) {\r\n long dd = event.getEventTime()-event.getDownTime();\r\n /*long time1= System.currentTimeMillis();\r\n long time= SystemClock.uptimeMillis();*/\r\n //long dd = time - event.getEventTime();\r\n /*Log.d(\"TAG\",String.valueOf(dd));\r\n Log.d(\"TAG1\",String.valueOf(event.getEventTime()-event.getDownTime()));\r\n Log.d(\"TAG\",String.valueOf(event));*/\r\n // System.out.println(\"Richa : \"+event.getKeyCode()+\" SC \"+event.getScanCode());\r\n //Toast.makeText(myContext, \"Richa : \"+event.getKeyCode()+\" keycode = \"+keyCode, Toast.LENGTH_SHORT).show();\r\n if(event.getKeyCode() == KeyEvent.KEYCODE_ENTER)\r\n {\r\n //System.out.println(\"Richa : Enter encountered for barcode\");\r\n addBarCodeItemToOrderTable();\r\n }else if (event.getKeyCode() == KeyEvent.KEYCODE_J ||event.getKeyCode() == KeyEvent.KEYCODE_CTRL_LEFT )\r\n //}else if (event.getKeyCode() == KeyEvent.KEYCODE_J ||event.getKeyCode() == KeyEvent.KEYCODE_CTRL_LEFT ||event.getKeyCode() == KeyEvent.KEYCODE_SHIFT_LEFT )\r\n {\r\n linefeed +=String.valueOf(event.getKeyCode());\r\n if(linefeed.equalsIgnoreCase(\"38113\")|| linefeed.equalsIgnoreCase(\"11338\")) // line feed value\r\n addBarCodeItemToOrderTable();\r\n }else\r\n {\r\n linefeed = \"\";\r\n if (dd<15 && dd >0 && CUSTOMER_FOUND==0) {\r\n View v = getCurrentFocus();\r\n //System.out.println(v);\r\n //EditText etbar = (EditText)findViewById(R.id.etItemBarcode);\r\n //EditText ed = (WepEditText)findViewById(v.getId());\r\n\r\n if (v.getId() != R.id.aCTVSearchItemBarcode) {\r\n switch (v.getId()) {\r\n case R.id.aCTVSearchItem:\r\n aTViewSearchItem.setText(tx);\r\n break;\r\n case R.id.aCTVSearchMenuCode:\r\n aTViewSearchMenuCode.setText(tx);\r\n break;\r\n\r\n case R.id.etCustGSTIN:\r\n case R.id.edtCustName:\r\n case R.id.edtCustPhoneNo:\r\n case R.id.edtCustAddress:\r\n EditText ed = (EditText) findViewById(v.getId());\r\n //String ed_str = ed.getText().toString();\r\n ed.setText(tx);\r\n }\r\n String bar_str = autoCompleteTextViewSearchItemBarcode.getText().toString();\r\n bar_str += (char) event.getUnicodeChar();\r\n autoCompleteTextViewSearchItemBarcode.setText(bar_str.trim());\r\n autoCompleteTextViewSearchItemBarcode.showDropDown();\r\n\r\n } else if (v.getId() == R.id.aCTVSearchItemBarcode) {\r\n /*tx = autoCompleteTextViewSearchMenuCode.getText().toString();\r\n String bar_str = autoCompleteTextViewSearchItemBarcode.getText().toString().trim();*/\r\n tx += (char) event.getUnicodeChar();\r\n autoCompleteTextViewSearchItemBarcode.setText(tx.trim());\r\n autoCompleteTextViewSearchItemBarcode.showDropDown();\r\n /*Toast.makeText(this, \"\"+bar_str+\" : \"+bar_str.length(), Toast.LENGTH_SHORT).show();\r\n if(bar_str.length()>2)\r\n {\r\n String ss = bar_str.substring(1,bar_str.length())+bar_str.substring(0,1);\r\n autoCompleteTextViewSearchItemBarcode.setText(ss.trim());\r\n Toast.makeText(this, \"\"+ss, Toast.LENGTH_SHORT).show();\r\n autoCompleteTextViewSearchItemBarcode.showDropDown();\r\n }*/\r\n\r\n\r\n }\r\n }\r\n }\r\n\r\n\r\n /*Toast.makeText(myContext, \"keyUp:\"+keyCode+\" : \"+dd, Toast.LENGTH_SHORT).show();*/\r\n\r\n\r\n return true;\r\n }", "@Override\n public void onScanResult(int callbacktype, final ScanResult result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mLeDeviceListAdapter.addDevice(result.getDevice());\n mLeDeviceListAdapter.notifyDataSetChanged();\n }\n });\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final CodeScanner codeScanner, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n List<BarcodeFormat> formats = new ArrayList<>();\n formats.add(BarcodeFormat.QR_CODE);\n\n codeScanner.setDecodeCallback(new DecodeCallback() {\n @Override\n public void onDecoded(@NonNull final Result result) {\n\n String scannedData = result.getText();\n\n if (!TextUtils.isEmpty(scannedData) && !isScanned) {\n\n Log.d(TAG, \"QR Code Data : \" + scannedData);\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n codeScanner.releaseResources();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n Log.e(TAG, \"\" + transport + \" Transport type is not supported\");\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type is not supported\"));\n return;\n }\n } else {\n Log.e(TAG, \"Transport is not available in QR code data\");\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n return;\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n }\n });\n }", "public void putBarcodeItem(String barcode, JSONObject response) {\n BarcodeDataCache d = getBarcodeData();\n boolean enteredItem = false;\n if (d != null) {\n // check if response has data inside\n if (d.hasData(response)) {\n enteredItem = d.put(barcode, response);\n currentRequests.remove(barcode);\n currentRequestsData.postValue(currentRequests);\n } else {\n putError(barcode, \"No data for this item: \" + barcode);\n }\n }\n if (enteredItem) cacheData.postValue(d);\n }", "private void initiateBarcodeScan(Activity activity) {\n IntentIntegrator zxingIntegrator = new IntentIntegrator(activity);\n zxingIntegrator.initiateScan();\n }", "public interface CardListener {\n void callback(CardInfo cardInfo);\n}", "private void scanCard() {\n\n Intent intent = new ScanCardIntent.Builder(getActivity()).build();\n startActivityForResult(intent, Constant.REQUEST_CODE_SCAN_CARD);\n }", "public interface IOnDeviceDetected {\n void onDeviceDetected(ClientScanResult clientScanResult);\n}", "@Override\r\n\tpublic void onScanComplete() \r\n\t{\n\t\tif(_scanActionMode != null)\r\n\t\t\t_scanActionMode.finish();\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n //if qrcode has nothing in it\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n //if qr contains data\n try {\n //converting the data to json\n JSONObject obj = new JSONObject(result.getContents());\n //setting values to textviews\n textViewName.setText(obj.getString(\"name\"));\n textViewAddress.setText(obj.getString(\"address\"));\n } catch (JSONException e) {\n e.printStackTrace();\n //if control comes here\n //that means the encoded format not matches\n //in this case you can display whatever data is available on the qrcode\n //to a toast\n Toast.makeText(this, result.getContents(), Toast.LENGTH_LONG).show();\n }\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }", "public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }", "void putBarcodeItem(String barcode, Item item) {\n BarcodeDataCache d = getBarcodeData();\n if (d != null) {\n d.put(barcode, item);\n }\n cacheData.postValue(d);\n }", "public void setBarcode(java.lang.String barcode) {\n this.barcode = barcode;\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (barcodeReader != null) {\n // unregister barcode event listener\n barcodeReader.removeBarcodeListener(this);\n // unregister trigger state change listener\n barcodeReader.removeTriggerListener(this);\n // close BarcodeReader to clean up resources.\n // once closed, the object can no longer be used.\n barcodeReader.close();\n }\n }", "public void onConsumeFinished(Purchase purchase, IabResult result) {\n if (mHelper == null) return;\n\n // We know this is the \"gas\" sku because it's the only one we consume,\n // so we don't check which sku was consumed. If you have more than one\n // sku, you probably should check...\n if (result.isSuccess()) {\n // successfully consumed, so we apply the effects of the item in our\n // game world's logic, which in our case means filling the gas tank a bit\n\n String date = new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date());\n String transaction_id = purchase.getOrderId();\n transaction_id = transaction_id.replaceAll(\"[^\\\\d]\", \"\");\n String transaction_details = purchase.getSku()+\"##\"+Utility.user.getUserName()+\"##\"+purchase.getToken()+\"##\"+date+\"##\"+transaction_id;\n\n int add_play_num = 0;\n if(purchase.getSku().equals(\"plays20\"))\n add_play_num = 20;\n else if(purchase.getSku().equals(\"plays50\"))\n add_play_num = 50;\n else if(purchase.getSku().equals(\"plays200\"))\n add_play_num = 200;\n else if(purchase.getSku().equals(\"plays500\"))\n add_play_num = 500;\n else if(purchase.getSku().equals(\"plays1000\"))\n add_play_num = 1000;\n if(add_play_num!=0)\n update_plays(add_play_num, transaction_details);\n\n }\n else {\n complain(\"Error while consuming: \" + result);\n }\n\n }", "protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\tcheckNfcActivation();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void onRequestDataSuccess(String response) {\n\t\tisBarcodeMatch = response.substring(0,\n\t\t\t\tresponse.length() - 1);\n\t\t// Log.e(\"Jrv Activity jrv\", response);\n\t}", "public interface CurrentItemListener {\n void onNewCurrentItem(int currentItem, int totalItemsCount);\n}", "@Override\r\n public void onCompleted() {\n Log.i(TAG, \"subscribed to buyable items\");\r\n }", "protected void cabOnItemPress(int position) {}", "@Override\n protected void onPostExecute(Void v) {\n super.onPostExecute(v);\n\n\n callbackListener.onScanResults(serviceResults);\n }", "public interface ScanCallBack {\n void getDevices(final BluetoothDevice bluetoothDevice, final int rssi);\n}", "public void scanBarcode(View view) {\n IntentIntegrator integrator = new IntentIntegrator(this);\n integrator.setOrientationLocked(true);\n integrator.setCaptureActivity(CaptureActivityPortrait.class);\n integrator.initiateScan();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n /*\n * Handle Intents here.\n */\n Log.d(TAG, \"onReceive: Called\");\n Bundle extras = intent.getExtras();\n Bundle details = (Bundle)extras.get(Constants.EXTENDED_DATA_STATUS);\n for (String key : xData) {\n int value = details.getInt(key);\n try {\n int pos = getPos(key);\n yData[pos] = value;\n }\n catch (KeyException ke) {\n Log.e(TAG, \"onReceive: Bad Activity string received\", ke);\n }\n }\n addDataSet(); // updated yData - now process and show\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@MainThread\n void onChannelScanFinished();" ]
[ "0.7363191", "0.70475775", "0.6966462", "0.64909124", "0.64397806", "0.64022785", "0.63802904", "0.61799425", "0.616065", "0.61473733", "0.60673845", "0.5988994", "0.5940511", "0.59117514", "0.58970386", "0.5896539", "0.5846039", "0.5614347", "0.5557898", "0.5544687", "0.5542605", "0.5531863", "0.55260056", "0.5499394", "0.54947686", "0.5491822", "0.548529", "0.547864", "0.5474823", "0.5463885", "0.5420039", "0.53963286", "0.5395797", "0.5379899", "0.53646153", "0.5347565", "0.5328105", "0.5305134", "0.5301343", "0.52955383", "0.5294251", "0.529393", "0.529111", "0.5282181", "0.5279392", "0.52678573", "0.5262607", "0.52534443", "0.52531374", "0.525205", "0.52443373", "0.5243788", "0.52201605", "0.52120864", "0.52108306", "0.5206681", "0.51960427", "0.5193886", "0.5189267", "0.5164909", "0.5163996", "0.5147773", "0.5140857", "0.51274765", "0.5111121", "0.51073354", "0.51043653", "0.50908446", "0.5086294", "0.5086094", "0.50742483", "0.50499547", "0.504085", "0.5031407", "0.50199324", "0.5019772", "0.5014408", "0.5005324", "0.50043917", "0.49890748", "0.49863377", "0.49836543", "0.49826536", "0.49785173", "0.49614498", "0.49547684", "0.4943218", "0.49426574", "0.49137336", "0.49112698", "0.4909379", "0.4909228", "0.49051425", "0.4897715", "0.48874515", "0.48817796", "0.48638305", "0.48638305", "0.48638305", "0.4855377" ]
0.6924067
3
New default connection for a graph element.
@Test public void testCreateConnections() { Element element = mock(Element.class); View<?> content = mock(View.class); Bounds bounds = Bounds.create(0d, 0d, 10d, 20d); when(element.getContent()).thenReturn(content); when(content.getBounds()).thenReturn(bounds); MagnetConnection c1 = ConnectionAcceptorControlImpl.createConnection(element); assertEquals(5, c1.getLocation().getX(), 0); assertEquals(10, c1.getLocation().getY(), 0); assertEquals(MagnetConnection.MAGNET_CENTER, c1.getMagnetIndex().getAsInt()); assertFalse(c1.isAuto()); // New default connection for wires. WiresConnection wiresConnection = mock(WiresConnection.class); when(wiresConnection.isAutoConnection()).thenReturn(true); WiresMagnet wiresMagnet = mock(WiresMagnet.class); when(wiresMagnet.getX()).thenReturn(122d); when(wiresMagnet.getY()).thenReturn(543d); when(wiresMagnet.getIndex()).thenReturn(7); MagnetConnection c2 = (MagnetConnection) ConnectionAcceptorControlImpl.createConnection(wiresConnection, wiresMagnet); assertEquals(122, c2.getLocation().getX(), 0); assertEquals(543, c2.getLocation().getY(), 0); assertEquals(7, c2.getMagnetIndex().getAsInt()); assertTrue(c2.isAuto()); // Asset connections to concrete locations, when no concrete magnets assigned. when(wiresConnection.getPoint()).thenReturn(new Point2D(122d, 543d)); final Connection pointConnection = ConnectionAcceptorControlImpl.createConnection(wiresConnection, null); assertEquals(122d, pointConnection.getLocation().getX(), 0); assertEquals(543d, pointConnection.getLocation().getY(), 0); // Connections (view magnets) can be nullified. assertNull(ConnectionAcceptorControlImpl.createConnection(null)); assertNull(ConnectionAcceptorControlImpl.createConnection(null, null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "NodeConnection createNodeConnection();", "default void connect() { }", "protected Connection createConnectionFigure() {\n\t\treturn new NormConnectionFigure();\n\t}", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "protected Connection createConnectionFigure() {\r\n\t\treturn new ImplicitCallFigure();\r\n\t}", "private Graph<Node, DefaultEdge> initialiseSpaceGraph() {\n Graph<Node, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class);\n g = addNodes(g);\n g = addEdges(g);\n return g;\n }", "protected Connection createConnectionFigure() {\n\t\treturn new SyncFigure();\n\t}", "public Resource getDefaultGraphName() {\n \t\treturn createResource(this.baseGraphName);\n \t}", "protected Connection createConnectionFigure() {\n\t\treturn new ViewedTableFigure();\n\t}", "public DefaultDirectedWeightedFlowGraph(DefaultDirectedWeightedGraph<V, E> dWG) {\r\n this.graph = dWG;\r\n\r\n }", "Connection createConnection();", "public DefaultConnectionProvider() {\n loadProperties();\n }", "protected DefaultLink() {\n }", "public DefaultCniNetworkInner() {\n }", "public T caseDefaultConnection(DefaultConnection object) {\n\t\treturn null;\n\t}", "@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }", "private void createNullVertex(int x, int y, DefaultGraphCell dad){\n\t\t\tDefaultGraphCell v = new DefaultGraphCell(\"\");\n\t\t\tnullnodes.add(v);\n\t\t\tDefaultPort port = new DefaultPort();\n\t\t\tv.add(port);\n\t\t\tport.setParent(v);\n\t\t\tint width = DEFAULT_NULL_SIZE.width;\n\t\t\tint height = DEFAULT_NULL_SIZE.height;\n\t\t\tGraphConstants.setBounds(v.getAttributes(), new\n\t\t\t\t\t Rectangle2D.Double(x-width/2,y,width,height));\n\t\t\tGraphConstants.setGradientColor(v.getAttributes(), Color.black);\n\t\t\tGraphConstants.setOpaque(v.getAttributes(), true);\n\t\t\tinsertEdge(getDefaultPort(dad), getDefaultPort(v));\n\t\t}", "private GraphConnection CreateConnection(String source, String destination) {\n\t\tif (nodes.size() == 0) {\r\n\t\t\tthrow new IllegalStateException(\"Nodes needed\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tGraphNode src = null;\r\n\t\t\tGraphNode dest = null;\r\n\t\t\tfor (GraphNode node : nodes) {\r\n\t\t\t\tif (node.getText().equals(source)) {\r\n\t\t\t\t\tsrc = node;\r\n\t\t\t\t} else if (node.getText().equals(destination)) {\r\n\t\t\t\t\tdest = node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (src == null || dest == null) {\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"At least one of the nodes doesn't exist\");\r\n\t\t\t} else {\r\n\t\t\t\treturn new GraphConnection(graph, SWT.None, src, dest);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public JupiterConnector getDefault() {\n if (defaultConnection == null) {\n defaultConnection = new JupiterConnector(this,\n DEFAULT_NAME,\n redis.getPool(DEFAULT_NAME),\n fallbackPools.computeIfAbsent(DEFAULT_NAME, this::fetchFallbackPool));\n }\n\n return defaultConnection;\n }", "void createConnection();", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public OverlayGraph( int protocolID ) {\n\n\tthis.protocolID = protocolID;\n\twireDirected = true;\n}", "public DefaultRouterNode() {\n }", "public Graph<Node, DefaultEdge> getInstance() {\n if (graphInstance == null) {\n graphInstance = initialiseSpaceGraph();\n return graphInstance;\n }\n return graphInstance;\n }", "Endpoint getDefaultEndpoint();", "public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}", "public abstract DefaultCell getGraphCell();", "public void connect(Integer tagId, Integer linkId);", "default void disconnect() { }", "public ClientConnectionOperator createConnectionOperator(SchemeRegistry schreg) {\n return new DefaultClientConnectionOperator(schreg);\n }", "Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}", "@Override\n\tpublic Graph<String> emptyInstance() {\n\t\treturn new ConcreteEdgesGraph();\n\t}", "public void setConnection(Connection conn);", "public Graph() {\r\n\t\tinit();\r\n\t}", "protected Connection createConnectionFigure() {\n\t\treturn new ResponseFigure();\n\t}", "E createDefaultElement();", "public DefaultGraphDecorator() {\n\t\tthis(Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.DARK_GRAY, Color.DARK_GRAY, new Color(128, 128, 255));\n\t}", "public void connect() {}", "public GraphWrapper() {\n\t\tthis.graph = new Graph<T,E>();\n\t}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public JCoConnection getDefaultJCoConnection() throws BackendException;", "public Graph() {\r\n\t\tnodePos = new HashMap<Integer, Vec2D>();\r\n\t\tconnectionLists = new HashMap<Integer, List<Connection>>();\r\n\t\t//screenWidth = Config.SCREEN_WIDTH;\r\n\t}", "public UConnecte() {\n\t\tsuper();\n\t}", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic Graph() {\r\n \tthis.vertex = new HashMap<T, Vertex>();\r\n \tthis.edge = new HashMap<Integer, Edge>();\r\n }", "public void connect(Element elem){\n\n\t\tif (elem instanceof Source) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\toutput = elem;\n\t}", "@Override\n public abstract void connect();", "@Override\n\tprotected ConnectionType getConnectionType() {\n\t\treturn ConnectionType.Network;\n\t}", "public DefaultDirectedWeightedFlowGraph(EdgeFactory<V, E> ef) {\r\n this.graph = new DefaultDirectedWeightedGraph(ef);\r\n\r\n }", "@Override\n\tpublic GraphName getDefaultNodeName() {\n\t\treturn GraphName.of(\"rosjava/chatter\");\t}", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "public void setConnection(Connection value) {\r\n connection = value;\r\n }", "NetworkClientConnection getConnection(String uriToNode);", "public static GraphNode createGraphNodeForUseCaseConnector() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(-50, -50));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "io.netifi.proteus.admin.om.Connection getConnection(int index);", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public void setGraphElement(GraphElement element) {\n this.graphElement = element;\n }", "public Model openDefaultModel() throws JenaProviderException {\n\t\treturn openModel(getDefaultGraphName());\n\t}", "private DefaultSchema() {\n super(\"\", null);\n }", "public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }", "public:\n Graph(int V); // Constructor\n void addEdge(int v, int w);", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public void connect();", "public void connect();", "public void connect();", "public Builder() {\n this(Graphs.<N, E>createUndirected());\n }", "public Connection() {\n\t\t\n\t}", "public Graph() {\n }", "public void createConnection() {\n final Property targetProperty = getTargetProperty();\n if (targetProperty != null) {\n targetProperty.setSource(getSourceProperty());\n }\n }", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "private static void makeConnection(Graph g, int key, Vertex prev, Vertex current, String string) {\n\t\tg.addEdge(new Edge(key, prev, current, string));\n\t}", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }", "public GraphPool() {\n\t\tmMetadataPool = new PoolNodeMetadata();\n\t\tmIdentifierPool = new PoolNodeIdentifier(mMetadataPool);\n\t\tmLinkPool = new PoolExpandedLink(mIdentifierPool, mMetadataPool);\n\t}", "@Override\r\n\tpublic Connection getConnection() {\n\t\treturn null;\r\n\t}", "public LDAPSDKConnection createConnection() {\r\n return new NetscapeV3Connection(false);\r\n }", "public Graphs() {\n graph = new HashMap<>();\n }", "public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection) {\r\n\t\treturn new ChopboxAnchor(getFigure());\r\n\t}", "public WeightedGraph() {\n super();\n }", "Object getDefaultNodeFactory();", "public void setConn(Connection conn) {this.conn = conn;}", "public void setDefaultHost() {\r\n\t\tsetHost(DEFAULT_HOST);\r\n\t}", "public NoDefaultConnectionException(String message) {\n super(message);\n }", "public DefaultNode(Object userObject)\n\t{\n\t\tthis.userObject = userObject;\n\n\t\trect = new Rectangle();\n\n\t\tpos = new Point();\n\t}", "public NifiConnectionsGenerator(final ConnectionType connectionsType) {\n super(connectionsType);\n }", "public Node(String n) {\n\t\tname = n;\n\t\t//connections = new ArrayList<Node>();\n\t\t//connections = new HashSet<String>();\n\t\t\n\t\t//checkRep();\n\t}", "@Override\n public void connect(String name) throws Exception {\n }", "public LinkElement() { }", "protected DefaultSchemaComponent() {\n\t\tparameters = new SchemaParameterCollection();\n\t\tschemaports = new ArrayList<SchemaPort>();\n\t\tportrelations = new ArrayList<PortRelation>();\n\t}", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public void setConnection(Connection connection) {\n this.connection = connection;\n }", "NetworkGraph(int Vertex) {\n this.Vertex = Vertex;\n\n // Size == # of Vertices\n myNetwork = new LinkedList[Vertex];\n\n // Create a new list for each vertex\n // such that adjacent nodes can be stored\n for (int i = 0; i < Vertex; i++) {\n myNetwork[i] = new LinkedList<>();\n }\n }", "public DefaultDirectedWeightedFlowGraph(Class<? extends E> edgeClass) {\r\n this(new ClassBasedEdgeFactory<V, E>(edgeClass));\r\n }", "protected IFigure createNodeShape() {\r\n\t\treturn primaryShape = new ConnectorFigure();\r\n\t}", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "public void setRunnerDefaultFromConnection(IntegrityConnection conn)\n {\n _log.message(\"Setting command runner defaults \" + conn.toString());\n _cmdRunner.setDefaultHostname(conn.getHost());\n _cmdRunner.setDefaultPort(conn.getPort());\n _cmdRunner.setDefaultUsername(conn.getUser());\n }" ]
[ "0.6452767", "0.6289261", "0.6096304", "0.5780503", "0.57768947", "0.57170373", "0.56531817", "0.5594248", "0.5574669", "0.5515564", "0.5486105", "0.5481157", "0.5480315", "0.5454744", "0.54461575", "0.5419929", "0.5396534", "0.5346123", "0.5344734", "0.5332367", "0.53225595", "0.53225595", "0.52973604", "0.5292456", "0.5291196", "0.52896565", "0.52774864", "0.52726644", "0.52706057", "0.5256218", "0.5246996", "0.52263725", "0.52210754", "0.5208696", "0.51995236", "0.5196886", "0.5184329", "0.5179412", "0.5172555", "0.5165301", "0.5160366", "0.5155458", "0.514654", "0.51451135", "0.5127254", "0.5115025", "0.51079893", "0.51062983", "0.5103513", "0.50897294", "0.5088773", "0.508761", "0.5085621", "0.50728637", "0.5043044", "0.50426555", "0.50426555", "0.50426555", "0.50426555", "0.50416344", "0.50377256", "0.50337374", "0.5032723", "0.50273925", "0.5027183", "0.5027183", "0.5027082", "0.5027082", "0.5027082", "0.5024982", "0.50147015", "0.5007018", "0.5002162", "0.49964914", "0.4995494", "0.49917403", "0.49877512", "0.49872896", "0.49846593", "0.4976655", "0.49726522", "0.49703178", "0.4954211", "0.4945197", "0.49422207", "0.4940758", "0.49321896", "0.49258518", "0.49137408", "0.49097562", "0.49077782", "0.49059954", "0.4903846", "0.49000522", "0.48930958", "0.48886454", "0.48849046", "0.48817497", "0.488126", "0.48767292", "0.4875611" ]
0.0
-1
StringDemo sd = new StringApplication ();
public static void main(String[] args) { StringDemo sd = new StringDemo(); sd.stringExample("Hi i am java 123"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tstringhandler obj=new stringhandler();\r\n\t\tobj.input();\r\n\t\tobj.display();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tStringExample se = null;\r\n\t\tStringExample sq = new StringExample();\r\n\t\tSystem.out.println(se);\r\n\t\tSystem.out.println(sq);\r\n\t\t\r\n\r\n\t}", "public static void main ( String[] args ) {\n PhoneBook myApp = new PhoneBook(); \r\n }", "private SingletonClass()\n {\n s = \"Hello I am a string part of Singleton class\";\n }", "private AppText() {\n\n }", "public static void main(String[] args) {\n\t\tStrStr instance =new StrStr();\n\t\tSystem.out.println(instance.strStr(\"hello\", \"ll\"));\n\t}", "static String Initialize(String s){\n s=\"Hello World\";\n return s;\n }", "public static void main(String[] args) {\n stringhandler obj=new stringhandler();\r\n obj.transform(\"Greety\");\r\n }", "public static void main(String[] args) {\nSystem.out.println(\"string main\");\r\n\t}", "public static void main(String[] args)\r\n {\r\n \t String searchname=\"运载火箭\";\r\n // Start the demo application.\r\n Demo2 example = new Demo2(searchname);\r\n }", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"string dari class Main\";\n\t}", "public static void main (String [] args) {\r\n\t//Ask the user to type a word\r\n\tSystem.out.println(\"Please type a word: \");\r\n\tWord = sc.nextLine();\r\n\t\r\n\t//The above SWT example will create a TextBox and display it as “Hello World”.\r\n\t//This is the display screen for the SWT\r\n\tDisplay display = new Display (); \r\n\t//Stores the display into the shell variable\r\n\tShell shell = new Shell(display);\r\n\t//All application’s GUI are rendered in display.\r\n\tText Character = new Text(shell, SWT.NONE);\r\n\tCharacter.setText(Word); //Stores the word\r\n\tCharacter.pack();\r\n\t\r\n\tshell.pack();//Tells the SWT application to auto resize the widget (shell windows) to its preferred size, \r\n\t //It uses only as much space based on resolution and platform rendering\r\n\tshell.open ();\r\n\twhile (!shell.isDisposed ()) {\r\n\t\tif (!display.readAndDispatch ()) display.sleep (); //Display.readAndDispatch()keeps track of user events in applications \r\n\t\t //like when closing windows\r\n\t}\r\n\tdisplay.dispose ();\r\n}", "private Strings()\n\t{\n\t}", "private Strings()\n\t{\n\t}", "public void stringPresentation () {\n System.out.println ( \"****** String Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n bookArrayList = new Request().postRequestBook();\n for (Book book: bookArrayList) {\n System.out.println(book.toString());\n }\n ClientEntry.showMenu ( );\n\n }", "public Application()\n {\n newsFeed = new NewsFeed();\n test = new Test();\n \n makeDummies();\n display();\n displayShortSummary();\n runTest();\n }", "public static void main(String[] args) {\n\t\t\n\t\tSingleObject object = SingleObject.getInstance();\n \n\t\tobject.showMessage();\n\t\tString myname = \"ABC\".concat(\"str\").concat(\"str\");\n\t\tSystem.out.println(myname);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t \n\t StaticTestString s1 = new StaticTestString (111,\"Karan\"); \n\t s1.change();\n\t StaticTestString s2 = new StaticTestString (222,\"Aryan\"); \n\t StaticTestString s3 = new StaticTestString (333,\"Sonoo\"); \n\t \n\t s1.display(); \n\t s2.display(); \n\t s3.display(); \n\t }", "public Demo() {\n\t\t\n\t}", "public static void main(String[] args) {\n com.abc.Demo d=new demo();\n Demo d1= new Demo1();\n \n\t}", "public static void main (String str) {\n\t\tSystem.out.println(\"I am main methd with String arguments\");\n\t}", "public static void main(String [] args){\n SmartPhone sm = new SmartPhone();\n sm.run();\n // System.out.println(sm.run());\n }", "public static void main(String[] args) {\n // TODO write the code to thoroughly unit test SubStringPractice\n\n SubStringPractice subStringPractice = new SubStringPractice();\n\n //\n }", "HelloWorld(String owner)\n {\n this.owner = owner;\n }", "public Main() {\n // Required empty public constructor\n }", "public PilhaStringTest()\n {\n }", "public static void main(String[] args) {\n testString();\n }", "public Main() {\r\n }", "public Main() {\r\n }", "public Main() {\r\n\t}", "public Main() {\n \n \n }", "public Main() {}", "public Main() {\n }", "public static void main(String[] args) {\n\t\tStringExample examples = new StringExample();\n\t\texamples.firstCharacter();\n\n\t\texamples.startCharacter();\n\n\t\texamples.endCharacter();\n\n\t\texamples.subCharacter();\n\n\t\texamples.containsString();\n\n\t\texamples.indexString();\n\n\t\texamples.splitString();\n\n\t\texamples.upperString();\n\t}", "private Strings() {\n }", "public Main() {\n }", "public Main() {\n }", "public static void main(String[] args) {\nStudent s=new Student();\ns.display();\n\t}", "private SudokuSolverApplication() {\n\t}", "public static void main(String[] args) {\nsample1 obj=new sample1();\r\n\t}", "public MTApplication(){\r\n\t\tsuper();\r\n\t}", "public MainEntryPoint() {\r\n\r\n }", "public static void main(String[] args) {\n String s=\"\";\n //call the static method from the main method\n s=Singleton.Initialize(s);\n //create an object PrintVal to print the values from a non static method\n PrintVal a=new PrintVal(s);\n\n\n\n\n }", "@Test\n public void printAStringTest(){\n Strings strings = new Strings();\n assertEquals(\"Try making the string being printed, as below\",\"Hello World!\", strings.printAString());\n }", "public static void main(String[] args) {\n String str=new String(\"ab\");//创建几个对象?\n }", "String getInstance()\n {\n return instance;\n }", "public static void main(String[] args) {\n MainIntrence mainintrence = new MainIntrence();\r\n\r\n\r\n\r\n }", "String mainClass();", "private static void showJava(String string) { TODO Auto-generated method stub\n\t//\n\t\n}", "public StartUp(){\r\n \r\n }", "public static void main(String[] args) {\n\t\tLRString lrs = new LRString();\n\t\tString res = \"abcabcdddabcd\";\n\t\tlrs.getLRString( res);\n\t}", "public static void main(String[] args) {\n string();\n }", "public CH340Application() {\n sContext = this;\n }", "public static void main(String[] args) {\n\r\n\t\tSmartPhone kmk = new SmartPhone(5);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public abstract String construct();", "public interface IStrings {\n\n\t/**\n\t * The name of the application, as it appears on the title of the window\n\t * \n\t * @return the name of the application\n\t */\n\tpublic String getAppName();\n\n\t/**\n\t * If the application name should have a definite article when used in\n\t * sentences, this should be it, uncapitalised and with a trailing space if\n\t * one is appropriate.\n\t * \n\t * @return \"the \" or \"\".\n\t */\n\tpublic String getAppNameArticle();\n\n\t/**\n\t * The short form of the application name, for system tray stuff\n\t * \n\t * @return the short form of the application name\n\t */\n\tpublic String getShortAppName();\n\n\t/**\n\t * The name of the application in a form suitable for putting into paths\n\t * \n\t * @return the name of the application in a form for putting into paths\n\t */\n\tpublic String getAppPathname();\n\n\t/**\n\t * The explanation on how files to be saved should be named\n\t * \n\t * @return the explanation on how files to be saved should be named\n\t */\n\tpublic String getFileNamingDetails();\n\n\t/**\n\t * The list of names that appear in the open file dialogue describing the\n\t * file types to open\n\t * \n\t * @return an array containing the descriptions of the file types the user\n\t * can select\n\t */\n\tpublic String[] getOpenDialogueFilterNames();\n\n\t/**\n\t * The file extensions that the file dialogue will match. Must correspond to\n\t * the descriptions returned by {@link #getOpenDialogueFilterNames()}. e.g.\n\t * '*.emp'\n\t * \n\t * @return the file extensions that the file dialogue will match\n\t */\n\tpublic String[] getOpenDialogueFilterExtensions();\n\n\t/**\n\t * The description presented to the user regarding automatically opening\n\t * files.\n\t * \n\t * @return the description presented to the user regarding automatically\n\t * opening files\n\t */\n\tpublic String getPrefsAutoLoadDescription();\n\n\t/**\n\t * The text to be shown in the 'about' dialogue\n\t * \n\t * @return the text to be shown in the 'about' dialogue\n\t */\n\tpublic String getAboutBoxText();\n\n\t/**\n\t * The default naming pattern for saving files\n\t * \n\t * @return the default naming pattern for saving files\n\t */\n\tpublic String getDefaultFilePattern();\n\n\t/**\n\t * This provides the base name for the XML node that stores the download\n\t * state of the application.\n\t * \n\t * @return the XML node name for the download state\n\t */\n\tpublic String getXMLBaseNodeName();\n\n\t/**\n\t * The version of the application.\n\t * \n\t * @return the version of the application\n\t */\n\tpublic String getVersion();\n\n\t/**\n\t * This provides the base name (without extension) for cover art files\n\t * \n\t * @return the base name for cover art files\n\t */\n\tpublic String getCoverArtName();\n\n\t/**\n\t * \"Automatically check for updates to this program\"\n\t */\n\tpublic String prefsAutomaticallyCheck();\n\n\t/**\n\t * \"Files\"\n\t */\n\tpublic String prefsFilesGroupTitle();\n\n\t/**\n\t * \"Downloads\"\n\t */\n\tpublic String prefsDownloadsGroupTitle();\n\n\t/**\n\t * The string shown when the maximum number of failures has been reached.\n\t * This can include &lt;A&gt; elements, which when clicked will open the\n\t * browser to the customer support URL.\n\t */\n\tpublic String dlMaxFailures();\n\n\t/**\n\t * The message displayed when there is a network connection issue. Including\n\t * '\\uFFFC' in the text will cause the resume icon to be included at that\n\t * point.\n\t */\n\tpublic String networkFailureMessage();\n\n\t/**\n\t * \"Preferred number of downloads at once\"\n\t */\n\tpublic String prefsConcurrentDownloads();\n}", "public static void main(String[] args) {\n\t\tDoo doo = new Doo();\n\t\tdoo.show(\"小明\");\n\t\tdoo.show(100);\n\t}", "PTString() \n {\n _str = \"\";\n }", "public static void main(String[] args) {\n\n\t\tTest05 test = new Test05();\n\t\ttest.testString();\n\t\t\n\t}", "public MyGUIProgram() {\n Label MyLabel = new Label(\"Test string.\", Label.CENTER);\n this.add(MyLabel);\n\n }", "public static void main(String[] args) {\n TestApp testApp=new TestApp();\r\n testApp.startApp();\r\n }", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tStringUtilityFrame mf = new StringUtilityFrame();\n\t\t\t\tmf.setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "private StringUtilities() {\n // nothing to do\n }", "public void myapp() {\n\n\n }", "public StringData1() {\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public DefaultApplication() {\n\t}", "private Main ()\n {\n super ();\n }", "public StringData() {\n\n }", "CdapApplication createCdapApplication();", "private CommandWord(String commandString)\n {\n this.commandString = commandString;\n }", "private Main() {\n }", "public static void main(String[] args){\n SingleObject object = SingleObject.getInstance();\n\n //show the message\n object.showMessage();\n }", "public Application() {\r\n monster1 = new Monster();\r\n treasure1 = new Treasure();\r\n in = new Scanner(System.in);\r\n }", "public static void main(String[] args) {\n \r\n}", "private SpreedWord() {\n\n }", "public static void main(String[] args) {\n MyClass m;\n m= new MyClass();\nm.display();\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "public TextTester(){}", "@Override\n public Object construct(Object... args) {\n CharSequence stringData = (args.length > 0 ? ToString(realm(), args[0]) : \"\");\n ExoticString obj = new ExoticString(realm(), stringData);\n obj.setPrototype(realm().getIntrinsic(Intrinsics.StringPrototype));\n return obj;\n }", "private Main() {}", "public Main() {\n\t\tsuper();\n\t}", "public static final Phrase getInstance(String string) {\n \treturn getInstance(16, string, new Font());\n }", "public static void main(String[] args) {\n\t\tsp.addListener(new ChangeListener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tmojString=newValue;\n\t\t\t}\n\t\t});\n\t\tdr.bindBidirectional(sp);\n\t\tdr.set(\"Drugi moj string\");\n\n\t\tsp.set(\"Opet neki string\");\n\t\tisprintaj();\n\t}", "public static void main(String[] args) {\n\t\tTestST st2 = TestST.getInstance();\r\n\t}", "private void strin() {\n\n\t}", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }", "public static void main(String[] args) {\n\t String s = \"hellowww\";\r\n\t\tStringBuilder sb = new StringBuilder(s);\r\n\t\tSystem.out.println(\"sb:\"+sb);\r\n\t}", "public static void main(String[] args) {\nDesktop desk=new Desktop();\r\ndesk.hardWareResources();\r\ndesk.softwareWareResources();\r\ndesk.deskTopModel();\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(){\n\t}", "public void init() {\n // message = \"Hello World!\";\n }", "public void sendeHello();", "void mo3208a(String str, Bundle bundle);", "public String qa(){\n System.out.println(\"qa method\");\n String s=\"Selenium\";\n return s;\n }", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "public static void main() {\n \n }", "public StringConverter()\n {\n \n }", "public static void main (String ...a){\n\t\n\t\tSingleObject singleton = SingleObject.getInstance();\n\t\tsingleton.showMessage();\n\t}", "public static void main(String[] args) {\n\t\tMagicString s = new MagicString(\"hasan ali khattak\");\n\t\tSystem.out.println(\"String \" + s + \" has \" + s.getNumberOfVowels() + \" vowels\");\n\t}" ]
[ "0.6517604", "0.63150597", "0.6230147", "0.6201848", "0.61208266", "0.6054483", "0.597549", "0.59668785", "0.59433806", "0.5937765", "0.5876029", "0.5869245", "0.58595306", "0.5856648", "0.5856648", "0.58433306", "0.5802473", "0.5789591", "0.5787585", "0.5783114", "0.5780367", "0.5774898", "0.5774482", "0.57516336", "0.5728787", "0.5713719", "0.5712766", "0.56995124", "0.5694065", "0.5694065", "0.5692566", "0.5684104", "0.5680971", "0.56672937", "0.5667254", "0.56534505", "0.5646546", "0.5646546", "0.56458473", "0.5641094", "0.5637407", "0.5621432", "0.5620689", "0.5620373", "0.56195486", "0.5598834", "0.55972314", "0.55905133", "0.55878234", "0.5583551", "0.55716467", "0.555838", "0.55517393", "0.5551662", "0.5549599", "0.55332994", "0.5528291", "0.5517303", "0.5515815", "0.55100405", "0.55077296", "0.5503977", "0.5496573", "0.54882014", "0.5470876", "0.5464855", "0.54614216", "0.5460548", "0.54541904", "0.54513764", "0.54512155", "0.54393923", "0.54352474", "0.5432058", "0.5414181", "0.54087853", "0.5407999", "0.54071313", "0.5400644", "0.53953946", "0.53927374", "0.5391945", "0.5373181", "0.5372391", "0.53703547", "0.53614163", "0.5356297", "0.53539854", "0.5351313", "0.535065", "0.5337904", "0.53360194", "0.53314847", "0.5324533", "0.5324299", "0.5321099", "0.5320579", "0.5318757", "0.5310831", "0.53068566" ]
0.70500606
0
Equals and hashcode implementation
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; SendSmsRequest that = (SendSmsRequest) o; if (from != null ? !from.equals(that.from) : that.from != null) return false; if (!to.equals(that.to)) return false; if (schedule != null ? !schedule.equals(that.schedule) : that.schedule != null) return false; if (!msg.equals(that.msg)) return false; if (callbackOption != that.callbackOption) return false; if (id != null ? !id.equals(that.id) : that.id != null) return false; return aggregateId != null ? aggregateId.equals(that.aggregateId) : that.aggregateId == null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n int hashCode();", "@Override \n int hashCode();", "@Override\n public int hashCode();", "@Override\n\t public int hashCode();", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "private Equals() {}", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "public abstract int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashcode();", "int hashCode();", "int hashCode();", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Override\n public int hashCode() {\n return hashcode;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\n public int hashCode() { \n return this.toString().hashCode();\n }", "@Override\n public int hashCode()\n {\n return hashCode;\n }", "@Override\n public int hashCode() {\n return 1;\n }", "@Override\r\n public int hashCode() {\r\n return this.toString().hashCode();\r\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "@Override\r\n \tpublic int hashCode() {\r\n \t\t// Insert code to generate a hash code for the receiver here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: if two objects are equal (equals(Object) returns true) they must have the same hash code\r\n \t\treturn super.hashCode();\r\n \t}", "@Override\n public int hashCode() {\n return this.toString().hashCode();\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n public int hashCode() {\n return toString().hashCode();\n }", "@Override\n public int hashCode() {\n return toString().hashCode();\n }", "public /*override*/ int GetHashCode() \r\n {\r\n return super.GetHashCode(); \r\n }", "@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "@Override\n\tpublic int hashCode () {\n\t\treturn Objects.hash(name, active, valueType);\n\t}", "@Override\n public int hashCode()\n {\n return this.value.hashCode();\n }", "int\thashCode();", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "@Override\n public int hashCode() {\n return hashCode;\n }", "@Override\n public final int hashCode() {\n return super.hashCode();\n }", "public int hashCode()\n {\n return hash;\n }", "public int hashCode()\n {\n return toString().hashCode();\n }", "public int hashCode() {\r\n \treturn super.hashCode();\r\n }", "@Override \n boolean equals(Object obj);", "@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}", "public int hashCode() { return super.hashCode(); }", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}", "public void test_hashCode() {\n ParsePosition pp1 = new ParsePosition(0);\n ParsePosition pp2 = new ParsePosition(0);\n TestCase.assertTrue(\"hashCode returns non equal hash codes for equal objects.\", ((pp1.hashCode()) == (pp2.hashCode())));\n pp1.setIndex(Integer.MAX_VALUE);\n TestCase.assertTrue(\"hashCode returns equal hash codes for non equal objects.\", ((pp1.hashCode()) != (pp2.hashCode())));\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return System.identityHashCode(o);\n }", "@Override\n public int hashCode() {\n return 0;\n }", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn key.hashCode() * 31 + value.hashCode();\n\t\t}", "@Override\n\tpublic abstract boolean equals(Object other);", "@Override\n public int hashCode()\n {\n return Objects.hash(value);\n }", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@Override\n boolean equals(Object other);", "@Override\n public int hashCode() {\n return Objects.hash(name, type, id);\n }", "@Test\n\tpublic void test_hashCode1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.hashCode()==t2.hashCode());\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }", "public final int hashCode() {\n return super.hashCode();\n }", "public int hashCode() {\r\n\t return super.hashCode();\r\n\t}", "public int hashCode(){\n\t\treturn toString().hashCode();\n\t}", "public int hashCode()\n {\n return super.hashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n boolean equals(Object o);", "@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}", "@Override\n public int hashCode() {\n return Objects.hash(myInt, myLong, myString, myBool, myOtherInt);\n }", "@Test\n public void testHashcode() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role.hashCode(), null);\n assertNotEquals(role.hashCode(), new Object().hashCode());\n assertEquals(role.hashCode(), role.hashCode());\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role.hashCode(), roleEquals.hashCode());\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n\n assertNotEquals(role.hashCode(), roleNotEquals.hashCode());\n }", "@Override\n boolean equals(Object obj);", "@Override\n public int hashCode() {\n return this.getClass().hashCode();\n }", "@Override\n public abstract boolean equals(final Object o);", "@Override\n public abstract boolean equals(final Object o);" ]
[ "0.78582865", "0.78252786", "0.7770217", "0.7735456", "0.76422197", "0.7628756", "0.7607693", "0.7607693", "0.7607693", "0.74313074", "0.74235076", "0.74235076", "0.74235076", "0.74235076", "0.73644006", "0.73510325", "0.73510325", "0.7337122", "0.72356045", "0.71112585", "0.71112585", "0.71112585", "0.71063286", "0.70934933", "0.7092525", "0.708359", "0.7061907", "0.70557785", "0.7045795", "0.7044786", "0.70305675", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7020393", "0.7014995", "0.7014995", "0.700492", "0.6998668", "0.6997133", "0.6997133", "0.6997133", "0.6997133", "0.69818836", "0.69818836", "0.6971265", "0.6970184", "0.6955689", "0.69523174", "0.69436634", "0.6936467", "0.693359", "0.692725", "0.68947643", "0.68906397", "0.68803763", "0.68800795", "0.68666995", "0.6865273", "0.6864422", "0.6856546", "0.68519574", "0.6846625", "0.6845299", "0.68426174", "0.6815124", "0.6813308", "0.6813308", "0.6811745", "0.6807212", "0.68047446", "0.68037325", "0.68037325", "0.6797533", "0.6795163", "0.6792616", "0.67782885", "0.67705625", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.6768734", "0.67661893", "0.67647153", "0.67637473", "0.6763152", "0.6752102", "0.67502606", "0.67479736", "0.67479736" ]
0.0
-1
Constructor instantiates a new PickResults object.
public CollisionResults() { nodeList = new ArrayList<CollisionData>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Results(Blippy pBlippy)\n {\n super(pBlippy);\n }", "public Results() {\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}", "public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }", "public PersonsResult() {\n }", "public RatingPeriodResults() {}", "public Result() {\n }", "public Result() {\n }", "public AbstractElement(final Result result) {\n results = singleton(result, Result.class);\n }", "public ResultFactoryImpl() {\n\t\tsuper();\n\t}", "public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\n this.maximalMemory = new ArrayList<Long>();\n }", "public MapResult() {\n }", "public Result(){\n\t}", "public AllPoojaResult() {}", "private cufftResult()\r\n {\r\n }", "TaskResult() {\n super();\n this.results = new LinkedHashMap<>();\n this.taskDetails = new HashMap<>();\n }", "public CategoricalResults(){\n\n }", "public SearchResults() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public PlaceBasicResult() {\n }", "public Results(FilterSpecifier filter) {\r\n this.ctypes = new ArrayList<ColumnType>();\r\n if (filter.getColumnTypes() != null) {\r\n for (ColumnType ctype : filter.getColumnTypes()) {\r\n if (ctype.isPicked()) {\r\n ctypes.add(ctype);\r\n }\r\n }\r\n }\r\n this.listBy = filter.getListBy();\r\n this.geneList = filter.getGeneList();\r\n this.patientList = filter.getPatientList();\r\n this.disease = filter.getDisease();\r\n this.chromRegions = filter.getChromRegions();\r\n this.geneListOptions = filter.getGeneListOptions();\r\n this.patientListOptions = filter.getPatientListOptions();\r\n }", "public Results(UtilityConstants utilityConstants) {\n this.utilityConstants = utilityConstants;\n }", "public SearchSettings() { }", "public ListSearchResults()\n {\n logEnter(LOG_TAG, \"<init>\");\n\n entryMap = new HashMap<String,SearchResultEntry>(0);\n entries = new LinkedList<SearchResultEntry>();\n instance = null;\n }", "public PlasmaSelectionTester() {\r\n\t}", "@DataBoundConstructor\n\tpublic DiceQTResultStep(@CheckForNull String pathToResults) {\n\t\tthis.pathToResults = pathToResults;\n\t}", "public Candidate()\n\t{\n\t\t\n\t}", "public Results(ArrayList<String> nameList) {\r\n //Create an empty tree\r\n this.resultsTree = new TreeSet<>(lexicalSortByTeamName);\r\n \r\n //Create an arraylist containing the teams\r\n ArrayList<Team> teamList = new ArrayList<>();\r\n Iterator<String> itr = nameList.iterator();\r\n while (itr.hasNext()) {\r\n teamList.add(new Team(itr.next()));\r\n }\r\n \r\n //Create an arraylist containing all the possible matches\r\n //Then add it to the tree\r\n for (int i = 0; i < teamList.size(); i++) {\r\n for ( int j = i + 1; j < teamList.size(); j++) {\r\n this.resultsTree.add(new Match(teamList.get(i), teamList.get(j)));\r\n }\r\n }\r\n }", "public ExcelResultBuilder() {\n }", "public TestResult(TestResult other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n this.failure = other.failure;\n if (other.isSetResults()) {\n Map<String,List<Double>> __this__results = new HashMap<String,List<Double>>(other.results.size());\n for (Map.Entry<String, List<Double>> other_element : other.results.entrySet()) {\n\n String other_element_key = other_element.getKey();\n List<Double> other_element_value = other_element.getValue();\n\n String __this__results_copy_key = other_element_key;\n\n List<Double> __this__results_copy_value = new ArrayList<Double>(other_element_value);\n\n __this__results.put(__this__results_copy_key, __this__results_copy_value);\n }\n this.results = __this__results;\n }\n if (other.isSetRequests()) {\n List<String> __this__requests = new ArrayList<String>(other.requests);\n this.requests = __this__requests;\n }\n }", "public CityResult() {\n\n }", "public CallSet() {}", "public final PickResult getPickResult() {\n return pickResult;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "public Selector() {\n }", "public SearchResult(String location, int count, double score) {\n\t\t\tthis.location = location;\n\t\t\tthis.count = count;\n\t\t\tthis.score = score;\n\t\t}", "public Collect_result(Collect_result other) {\r\n }", "public Pagination(int numResults, int offset) {\r\n\t\tthis.numResults = numResults;\r\n\t\tthis.offset = offset;\r\n\t}", "public DeferredResult()\n/* */ {\n/* 76 */ this(null, RESULT_NONE);\n/* */ }", "public void initialize(Results source) {\r\n this.listBy = source.getListBy();\r\n this.geneList = source.getGeneList();\r\n this.patientList = source.getPatientList();\r\n this.disease = source.getDisease();\r\n this.chromRegions = source.getChromRegions();\r\n this.geneListOptions = source.getGeneListOptions();\r\n this.patientListOptions = source.getPatientListOptions();\r\n this.ctypes = source.getColumnTypes();\r\n }", "public AnnotationSearchResultItem() {\n }", "public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setResults(ArrayList<Integer> results){\n this.results = results;\n }", "private CandidateGenerator() {\n\t}", "public Bench(){\n this(new ArrayList<>());\n }", "public PhotoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public JobExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private LookupResult(Builder builder) {\n super(builder);\n }", "public void setResults(ArrayList results) {\n this.results = results;\n }", "public PaginatedResultSetXmlGenerator()\n {\n super();\n m_recsPerPage = DEFAULT_RPP;\n m_pagesPerBatch = DEFAULT_PPB;\n m_pageNumber = 0;\n m_taskVector = new Vector();\n m_profiles = new HashMap();\n }", "public PersonResult(Person person){\n super(\"\");\n this.person = person;\n }", "public ProductTestReport() {}", "public CommandResultTest() {\n super(CommandResult.EMPTY);\n }", "public Result() {\n getLatenciesSuccess = new ArrayList<Long>();\n getLatenciesFail = new ArrayList<Long>();\n postLatenciesSuccess = new ArrayList<Long>();\n postLatenciesFail = new ArrayList<Long>();\n getRequestFailNum = 0;\n postRequestFailNum = 0;\n getRequestSuccessNum = 0;\n postRequestSuccessNum = 0;\n// getTimestamps = new ArrayList<Long>();\n// postTimestamps = new ArrayList<Long>();\n }", "public Result() {\n success = false;\n messages = new ArrayList<>();\n errMessages = new ArrayList<>();\n }", "public ProjectOfferPOExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Genret() {\r\n }", "public ExportResults()\n\t{\n\t\tthis.evalNaiveBayesList = new ArrayList<Evaluation>();\n\t\tthis.evalSMOList = new ArrayList<Evaluation>();\n\t}", "private SuiteResults(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Recommendation() {\r\n }", "public ProPoolExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public LoadLevel_result(LoadLevel_result other) {\r\n }", "public SearchCache() {\n this(CAPACITY, new Ticker());\n }", "public SimilarResultList(int maxSize, SimilarResult... results) {\n this(maxSize, 0, results);\n }", "private TestsResultQueueEntry() {\n\t\t}", "public AbstractRetriever() {\n }", "public Results(Node source) {\n\t\tinorder(source);\n\t}", "public Pause_result(Pause_result other) {\r\n }", "public FlickrPhoto() {\r\n }", "public Trening() {\n }", "public abstract Intent constructResults();", "public TaskList() {\n }", "public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "XResultSet() {\n this.nodeRefs = new LinkedList<>();\n this.numberFound = 0;\n }", "public SimilarResultList(int maxSize, Collection<SimilarResult<T>> results) {\n this(maxSize, 0, results);\n }", "public ShippingResultABCAnalysis2Business()\n {\n super();\n }", "public PARiverDataGenerator() {\n }", "public ReportRunner() \n\t{\n\t\treports = new HashMap<String, Report>();\n\t\tresults =Collections.synchronizedMap(new HashMap<String, ArrayList<String[]>>());\n\t}", "public RandomPlaySelector() {\n super();\n }", "public MatcherScores()\n {\n // do nothing\n }", "public PokemonTrainer()\n {\n name = selector.selectName();\n faveType = selector.selectType();\n pokeball = selector.selectBall();\n caughtPokemon = selector.selectPokemon();\n setColor(null);\n }", "public ExperimentInfo() { }", "public SearchResultPanel()\n\t{\n\t\tcreateComponents();\n\t\tdesignComponents();\n\t\taddComponents();\n\t}", "public PointOfInterest() {\n }", "@Test\n public void testDefaultConstructor() {\n final ConfigSearchResult<?> result = new ConfigSearchResult<>();\n assertTrue(result.getDocuments().isEmpty());\n assertNull(result.getPaging());\n assertEquals(result.getVersionCorrection(), VersionCorrection.LATEST);\n }", "public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public CoinsuperPair() {}", "public QuickPicker(int games, String propFileName) {\n this.gameCount = games;\n this.PROP_FILE_NAME = propFileName;\n }", "public ResponseSummaries() {\n }", "public ExperimentStartOperationResultInner() {\n }", "public PSKeywordChoice()\n {\n }", "public init_result(init_result other) {\n }", "private Instantiation(){}", "public ResultJsonView() {\r\n }", "public albumDateModel(ResultSet rs) {\n this.resultSet = rs;\n setup();\n\n }", "public SearchResult(String location) {\n\t\t\tthis.location = location;\n\t\t\tthis.count = 0;\n\t\t\tthis.score = 0;\n\t\t}", "public Item(ResultSet rs, Supplier supp) {\r\n try {\r\n this.toolId = rs.getInt(1);\r\n this.toolName = rs.getString(2);\r\n this.toolQuantity = rs.getInt(3);\r\n this.toolPrice = rs.getDouble(4);\r\n this.toolSupplier = supp;\r\n } catch (SQLException e){\r\n System.out.println(\"Supplier creation error (ResultSet)\");\r\n e.printStackTrace();\r\n }\r\n }", "public SearchTrack() {\n\t\tsuper();\n\t}", "public Combinators()\n {\n }", "public Search() {\n this.timestamp = System.currentTimeMillis();\n }" ]
[ "0.6586605", "0.6509007", "0.6242095", "0.6188012", "0.61794287", "0.60740995", "0.60740995", "0.591635", "0.5862251", "0.58288205", "0.58164555", "0.57366335", "0.5691252", "0.56785464", "0.55926925", "0.5556687", "0.55494785", "0.54594207", "0.54556185", "0.540813", "0.52914506", "0.5269948", "0.52389497", "0.5234346", "0.52089924", "0.5182275", "0.5180842", "0.51794094", "0.5170779", "0.51557195", "0.5128405", "0.51251304", "0.5113181", "0.5100185", "0.50993323", "0.5095326", "0.5094358", "0.5073072", "0.5072311", "0.50712293", "0.50657046", "0.506211", "0.5046598", "0.50405324", "0.50212634", "0.50080055", "0.5003967", "0.4998225", "0.49907514", "0.498729", "0.49856645", "0.49835208", "0.4983121", "0.49767712", "0.4965011", "0.49595815", "0.49553627", "0.49466383", "0.49354574", "0.49187353", "0.4916746", "0.49090523", "0.49081063", "0.48886633", "0.48844486", "0.48834357", "0.48757038", "0.4874974", "0.48716867", "0.4870279", "0.48678693", "0.4862304", "0.4856949", "0.4854346", "0.48527992", "0.48509696", "0.4850961", "0.4850915", "0.48508847", "0.4846737", "0.48448533", "0.4836765", "0.48366424", "0.48242125", "0.48213464", "0.48192585", "0.48189288", "0.48153734", "0.48134714", "0.48121992", "0.48114753", "0.4803746", "0.48017323", "0.48007414", "0.48001578", "0.47991413", "0.4796241", "0.4794469", "0.47935998", "0.47920892" ]
0.47909495
100
addCollisionData places a new CollisionData object into the results list.
public void addCollisionData(CollisionData col) { nodeList.add(col); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCollision(){\n if (collisionCounter == 4){\n return;\n }\n this.collisionCounter++;\n }", "void addCollisionObject(CollisionObjectWrapper co) {\n\tpendingObjects.put(co.getId(), co);\n }", "public void addCollidable(Group g) {\r\n\t\t _collisionList.add(g);\r\n\t}", "public CollisionResults() {\n\t\tnodeList = new ArrayList<CollisionData>();\n\t}", "private void setCollision(){\n\t\tMapObjects mapObjects = map.getLayers().get(\"COLLISION\").getObjects();\n\t\tfor (int ii = 0; ii < mapObjects.getCount(); ++ii){\n\t\t\tRectangleMapObject rectangle_map_object = (RectangleMapObject) mapObjects.get(ii);\n\t\t\tareaCollision.add(new Rectangle(rectangle_map_object.getRectangle()));\n\t\t}\n\t}", "@Override\n public synchronized void add(VehicleData vehicleData){\n slotFor(vehicleData).add(vehicleData);\n }", "@Test\n public void add() throws Exception {\n CollisionList list = new CollisionList();\n assertEquals(null, list.add(\"key\", \"value\"));\n assertEquals(\"value\", list.add(\"key\", \"value2\"));\n }", "public void addToCollision(Entity en) {\n\t\tList<Rectangle> hitboxes = en.getHitboxes();\n\t\tfor (Rectangle hitbox: hitboxes) {\n\t\t\thitboxCollision.put(en, hitbox);\n\t\t\tareaCollision.add(hitbox);\n\t\t}\n\t}", "public void addCollidableList(List<Group> list) {\r\n\t\t for (int i = 0; i < list.size(); i++) {\r\n\t\t \tGroup g = list.get(i);\r\n\t\t \t_collisionList.add(g);\r\n\t\t }\r\n\t}", "void addData();", "public void addCollidable(CollidableObject collidable){\n\t\tSystem.out.println(collidables);\n\t\tList<CollidableObject> collidableList = collidables.get(collidable.getCollisionType());\n\n\t\t//if there is no entry for this type add one\n\t\tif(collidableList == null){\n\t\t\tcollidableList = new ArrayList<CollidableObject>();\n\t\t\tcollidables.put(collidable.getCollisionType(), collidableList);\n\t\n\t\t}\n \n\t\t// and an entry to the list\n\t\tcollidableList.add(collidable);\n\t\tSystem.out.println(collidables);\n\t\t\n\t\t\n\t\t\n\t}", "public void addData(@NonNull T data) {\n mData.add(data);\n notifyItemInserted(mData.size() + getHeaderLayoutCount());\n compatibilityDataSizeChanged(1);\n }", "private void addTypesToCollision(int type1, int type2){\n\t\tList<Integer> typeCollisions = collisionsTypes.get(type1);\n \n\t\t// if there is no entry create one\n\t\tif(typeCollisions == null){\n\t\t\ttypeCollisions = new ArrayList<Integer>();\n\t\t\tcollisionsTypes.put(type1, typeCollisions);\n\t\t}\n\t\t// add collision to list\n\t\ttypeCollisions.add(type2);\n\t}", "public void processCollisions(){\n\t\tSet<String> allCollisionKeys = new HashSet<String>();\n \n\t\t// prepare a list of collisions to handle\n\t\tList<CollisionData> collisions = new ArrayList<CollisionData>();\n \n\t\tSet<Integer> types = collisionsTypes.keySet();\n \n\t\t// obtain every type for collision\n\t\tfor(Integer type : types){\n\t\t\t// obtain for each type the type it collides with\n\t\t\tList<Integer> collidesWithTypes = collisionsTypes.get(type);\n \n\t\t\tfor(Integer collidingType : collidesWithTypes){\n\t\t\t\t// if the pair was already treated ignore it else treat it\n\t\t\t\tif( !allCollisionKeys.contains(getKey(type, collidingType)) ){\n\t\t\t\t\t// obtain all object of type\n\t\t\t\t\tList<CollidableObject> collidableForType = collidables.get(type);\n\t\t\t\t\t// obtain all object of collidingtype\n\t\t\t\t\tList<CollidableObject> collidableForCollidingType = collidables.get(collidingType);\n \n\t\t\t\t\tfor( CollidableObject collidable : collidableForType ){\n\t\t\t\t\t\tfor( CollidableObject collidesWith : collidableForCollidingType ){\n\t\t\t\t\t\t\tif(collidable.isCollidingWith(collidesWith)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCollisionData cd = new CollisionData();\n\t\t\t\t\t\t\t\tcd.handler = collisionHandlers.get(getKey(type, collidingType));\n\t\t\t\t\t\t\t\tcd.object1 = collidable;\n\t\t\t\t\t\t\t\tcd.object2 = collidesWith;\n \n\t\t\t\t\t\t\t\tcollisions.add(cd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tallCollisionKeys.add(getKey(type, collidingType));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n \n\t\tfor(CollisionData cd : collisions){\n\t\t\tcd.handler.performCollision(cd.object1, cd.object2);\n \n\t\t}\n\t\t\n//\t System.out.println(\"unsorted map\");\n//\t for (String key : collisionHandlers.keySet()) {\n//\t System.out.println(\"key/value: \" + key + \"/\"+collisionHandlers.get(key));\n//\t }\n\t}", "public Integer insert(String collectionName,ArrayList<HashMap<String,Object>> data) {\n return processUpdateQuery(collectionName,data,true);\n }", "public void addData(F dataObject) {\r\n this.data = dataObject;\r\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}", "public ArrayList<CategoryData> addData(){\n return databaseManager.retrieveInfo();\n }", "protected void add(ByteBuffer data) throws Exception {\n\tLog.d(TAG, \"add data: \"+data);\n\n\tint dataLength = data!=null ? data.capacity() : 0; ///Util.chunkLength(data); ///data.length;\n\tif (dataLength == 0) return;\n\tif (this.expectBuffer == null) {\n\t\tthis.overflow.add(data);\n\t\treturn;\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 2\");\n\t\n\tint toRead = Math.min(dataLength, this.expectBuffer.capacity() - this.expectOffset);\n\tBufferUtil.fastCopy(toRead, data, this.expectBuffer, this.expectOffset);\n\t\n\tLog.d(TAG, \"add data: ... 3\");\n\n\tthis.expectOffset += toRead;\n\tif (toRead < dataLength) {\n\t\tthis.overflow.add((ByteBuffer) Util.chunkSlice(data, toRead, data.capacity())/*data.slice(toRead)*/);\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 5\");\n\n\twhile (this.expectBuffer!=null && this.expectOffset == this.expectBuffer.capacity()) {\n\t\tByteBuffer bufferForHandler = this.expectBuffer;\n\t\tthis.expectBuffer = null;\n\t\tthis.expectOffset = 0;\n\t\t///this.expectHandler.call(this, bufferForHandler);\n\t\tthis.expectHandler.onPacket(bufferForHandler);\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 6\");\n\n}", "public abstract void addCollision(Geometry s, Geometry t);", "public void addCollidable(Collidable c) {\r\n this.collidObj.add(c);\r\n }", "public void updateCollisionGroup(){\n\t\tcollisionGroup = new CollisionGroup();\n\t\t\n\t\t//Adds tile from the Screen into the collisionGroup.\n\t\tfor(int x = 0; x<getScreen().getNumOfTilesX(); x++){\n\t\t\tfor(int y = 0; y<getScreen().getNumOfTilesY(); y++){\n\t\t\t\t\n\t\t\t\tTile sTile = getScreen().getTile(x, y);\n\t\t\t\tcollisionGroup.add(sTile);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Adds the Player to the collisionGroup.\n\t\tif(player != null){\n\t\t\tcollisionGroup.add(getPlayer());\n\t\t}\n\t}", "public void addCampaignPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n campaignPollAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n campaignPollAdapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void add(DataFile data) {\n dataFiles.add(data);\n super.fireTableDataChanged();\n }", "public void addNewData(List<PublicPollResponseModel.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n adapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n adapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void addCamapignCommetsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n commentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n commentsAdapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void addRuleData(RuleData rule) throws ResultException {\n \tRuleData existing = ruleData.get(rule.getObjectName());\n \t\n \tif (existing == null){\n \t\truleData.put(rule.getObjectName(), rule);\n \t}\n \telse{\n \t\tResultException ex = new ResultException();\n \t\tex.addError(\"The following rules have a name clash:\\n\\n\" + existing.toOIF() + \"\\n\" + rule.toOIF());\n \t\tthrow(ex);\n \t}\n }", "public ComponentData addComponentData(ComponentData data) {\n AgentAssetData assetData = new AgentAssetData((AgentComponentData)data);\n\n // String agent = data.getName();\n\n // FIXME: IF asset class is null or empty, perhaps abort? Or\n // fill in the agent name inside these?\n // Of course, doing it in the addComponentData is bad,\n // cause it modifies the Component\n\n // assetData.setType(((Integer)propAssetType.getValue()).intValue());\n assetData.setAssetClass((String)propAssetClass.getValue());\n assetData.setUniqueID((String)propUniqueID.getValue());\n assetData.setUnitName((String)propUnitName.getValue());\n assetData.setUIC((String)propUIC.getValue());\n\n // Add Relationships.\n Iterator iter = \n ((Collection)getDescendentsOfClass(ContainerBase.class)).iterator();\n while(iter.hasNext()) {\n ContainerBase container = (ContainerBase)iter.next();\n if(container.getShortName().equals(\"Relationships\")) {\n for(int i=0; i < container.getChildCount(); i++) {\n RelationshipBase rel = (RelationshipBase) container.getChild(i);\n RelationshipData rData = new RelationshipData();\n rData.setType((String)rel.getProperty(RelationshipBase.PROP_TYPE).getValue());\n rData.setRole((String)rel.getProperty(RelationshipBase.PROP_ROLE).getValue());\n rData.setItemId((String)rel.getProperty(RelationshipBase.PROP_ITEM).getValue());\n rData.setTypeId((String)rel.getProperty(RelationshipBase.PROP_TYPEID).getValue());\n rData.setSupported((String)rel.getProperty(RelationshipBase.PROP_SUPPORTED).getValue());\n\n DateFormat df = DateFormat.getInstance();\n try {\n Date start = df.parse((String)rel.getProperty(RelationshipBase.PROP_STARTTIME).getValue());\n Date end = df.parse((String)rel.getProperty(RelationshipBase.PROP_STOPTIME).getValue());\n rData.setStartTime(start.getTime());\n rData.setEndTime(end.getTime());\n } catch(ParseException pe) {\n if(log.isErrorEnabled()) {\n log.error(\"Caught Exception parsing Date, using default dates.\", pe);\n }\n rData.setStartTime(TimeSpan.MIN_VALUE);\n rData.setEndTime(TimeSpan.MAX_VALUE);\n }\n assetData.addRelationship(rData);\n }\n }\n }\n\n // FIXME: Perhaps check that ClusterPG (MessageAddress),\n // ItemIdentificationPG (ItemIdentifiation), TypeIdentificationPG (TypeIdentification)\n // are, at a minimum, among those filled in?\n // What would I do though if they're not?\n\n // Add Property Groups.\n iter = \n ((Collection)getDescendentsOfClass(ContainerBase.class)).iterator();\n while(iter.hasNext()) {\n ContainerBase container = (ContainerBase)iter.next();\n if(container.getShortName().equals(\"Property Groups\")) {\n for(int i=0; i < container.getChildCount(); i++) {\n PropGroupBase pg = (PropGroupBase)container.getChild(i);\n assetData.addPropertyGroup(pg.getPropGroupData());\n }\n }\n }\n\n data.addAgentAssetData(assetData);\n return data;\n }", "private void addDatacollectionGroup(SnmpCollection collection, String dataCollectionGroupName, List<String> excludeList) {\n DatacollectionGroup group = externalGroupsMap.get(dataCollectionGroupName);\n if (group == null) {\n throwException(\"Group \" + dataCollectionGroupName + \" does not exist.\", null);\n }\n log().debug(\"addDatacollectionGroup: adding all definitions from group \" + group.getName() + \" to snmp-collection \" + collection.getName());\n for (SystemDef systemDef : group.getSystemDefCollection()) {\n String sysDef = systemDef.getName();\n if (shouldAdd(sysDef, excludeList)) {\n addSystemDef(collection, sysDef);\n }\n }\n }", "private void addCollider(Collider c) {\n objects.add(c);\n }", "@Override\n\tpublic void doCollision(CollisionResult c) {\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}", "private void addToCachedConditionCdList(String conditionCd,String facilityId,SRTLabTestDT labTestDt)\n {\n ArrayList<Object> otArrayList=null;\n HashMap<Object,Object> ofMap = null;\n if(cachedConditionCdFacilityList != null)\n {\n ofMap = (HashMap<Object,Object>) cachedConditionCdFacilityList.get(conditionCd);\n if (ofMap == null) {\n ofMap = new HashMap<Object,Object>();\n otArrayList= new ArrayList<Object> ();\n otArrayList.add(labTestDt);\n ofMap.put(facilityId, otArrayList);\n cachedConditionCdFacilityList.put(conditionCd, ofMap);\n }\n else {\n if (ofMap.containsKey(facilityId)) {\n otArrayList= (ArrayList<Object> ) ofMap.get(facilityId);\n }\n else {\n otArrayList= new ArrayList<Object> ();\n ofMap.put(facilityId, otArrayList);\n }\n otArrayList.add(labTestDt);\n\n }\n }\n\n\n }", "private void merge(ComicDataWrapper comicDataWrapper) {\n mComicDataWrapper.getData().getResults().addAll(comicDataWrapper.getData().getResults());\n mComicDataWrapper.getData().setOffset(comicDataWrapper.getData().getOffset());\n mComicDataWrapper.getData().setCount(mComicDataWrapper.getData().getCount() + comicDataWrapper.getData().getCount());\n }", "public void add(int data) {\n \n SingleNode newNode = new SingleNode(data);\n current = null;\n\n // The list is empty, start a new list\n if (head == null) { \n newNode.setNext(null);\n head = newNode;\n tail = newNode;\n }\n // Add to the front of the list\n else if (newNode.getData() <= head.getData()) { \n newNode.setNext(head); \n head = newNode;\n }\n // Add to the end of the list\n else if (newNode.getData() >= tail.getData()) { \n newNode.setNext(null); \n tail.setNext(newNode);\n tail = newNode;\n }\n else {\n // Insert in the middle\n current = head; \n while (current != tail) {\n if (newNode.getData() <= current.getNext().getData()) {\n // link the new node to the node after current\n newNode.setNext(current.getNext());\n // link the current to the new node\n current.setNext(newNode);\n break; // done: early exit the loop\n }\n else {\n current = current.getNext(); // try the next one\n }\n }\n }\n }", "ReferenceData add(ReferenceData instance) throws DataException;", "public void AddData(int targetType, int targetId, int targetLife, int targetMaxLife, boolean isTargetDead, float blockTime, Vector2 position)\r\n {\n OneHitData newData = new OneHitData(targetType, targetId, targetLife, targetMaxLife, isTargetDead, blockTime, position.GetX(), position.GetY());\r\n hitsData.add(newData);\r\n }", "void add(S3TimeData timeData) {\n assert timeData != null;\n\n synchronized (mux) {\n map.put(timeData.getKey(), timeData);\n\n mux.notifyAll();\n }\n }", "private void add(T data, BSTNode<T> current) {\n int comparison = data.compareTo(current.getData());\n if (comparison > 0) {\n BSTNode<T> newNode = new BSTNode<>(data);\n if (current.getRight() == null) {\n current.setRight(newNode);\n size++;\n } else {\n add(data, current.getRight());\n }\n } else if (comparison < 0) {\n BSTNode<T> newNode = new BSTNode<>(data);\n if (current.getLeft() == null) {\n current.setLeft(newNode);\n size++;\n } else {\n add(data, current.getLeft());\n }\n }\n }", "@Override\n\tpublic void addDataItem(FinanceData newdata) {\n\t\tlist_fr.add(0, newdata);\n\t}", "@Override\n\tpublic boolean add(T data) {\n\t\tLinkedListNode<T> toAdd = new LinkedListNode<T>(tail, tail.getPrevious(), (T) data);\n\t\ttail.getPrevious().setNext(toAdd);\n\t\ttail.setPrevious(toAdd);\n\t\ttoAdd.setNext(tail);\n\t\t\n\t\tmodcount++;\n\t\tnodeCount++;\n\t\t\n\t\treturn true;\n\t}", "void setCollisionRule(CollisionRule collisionRule);", "public void addCollidable(Collidable c) {\r\n this.collidables.add(c);\r\n }", "public void collision(Collidable collider);", "private ArrayList<Node<T>> add(Node<T> current, T data, ArrayList<Node<T>> affectedNodes) {\n\t\taffectedNodes.add(current);\n\t\tif (data.compareTo(current.getData()) < 0) {\t\t\t\n\t\t\tif (current.getLeft() == null) {\n\t\t\t\tcurrent.setLeft(new Node<T>(data));\n\t\t\t\tcurrent.getLeft().setHeight(1);\n\t\t\t\taffectedNodes.add(current.getLeft());\n\t\t\t} else {\n\t\t\t\taffectedNodes = add(current.getLeft(), data, affectedNodes);\n\t\t\t}\n\t\t} else if (data.compareTo(current.getData()) > 0) {\n\t\t\tif (current.getRight() == null) {\n\t\t\t\tcurrent.setRight(new Node<T>(data));\n\t\t\t\tcurrent.getRight().setHeight(1);\n\t\t\t\taffectedNodes.add(current.getRight());\n\t\t\t} else {\n\t\t\t\taffectedNodes = add(current.getRight(), data, affectedNodes);\n\t\t\t}\n\t\t} else {\n\t\t\t// If data exists in tree (data == rootData), don't add\n\t\t\t// Also return nothing for the path\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn affectedNodes;\n\t}", "public void addBody(CollisionBody body) {\n collisionBodies.add(body);\n }", "public void addSearchPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n searchPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n searchPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }", "public void handleCollision(Collision c);", "public void addData(@IntRange(from = 0) int position, @NonNull T data) {\n mData.add(position, data);\n notifyItemInserted(position + getHeaderLayoutCount());\n compatibilityDataSizeChanged(1);\n }", "@Override\n\tpublic void addCollisionBoxesToList(World w, int x, int y, int z, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)\n {\n\t\tif(isNormalCube(w,x,y,z))\n\t\t\tsuper.addCollisionBoxesToList(w, x, y, z, par5AxisAlignedBB, par6List, par7Entity);\n }", "List<ECollisionType> getCollisions(Long id, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);", "@Override\n public void add(Object o) {\n gameCollection.addElement(o);\n }", "public static void push(Object data) {\n list.add(data);\n }", "public void\n\tadd( Vector3 other )\n\t{\n\t\tdata[0] += other.data[0];\n\t\tdata[1] += other.data[1];\n\t\tdata[2] += other.data[2];\n\t}", "public void add(E data) {\r\n\t\tNode<E> newNode = new Node<E>(data, null);\r\n\t\t/**\r\n\t\t * If the LinkList is empty, add the node next to the headNode, and it become the last element\r\n\t\t */\r\n\t\tif(headNode.link == null) {\r\n\t\t\theadNode.link = newNode;\r\n\t\t\ttailNode = newNode;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\ttailNode.link = newNode;\r\n\t\t\ttailNode= newNode;\r\n\t\t}\r\n\t\t\r\n\t\tsize++;\r\n\t}", "public void add(int data) { // Big O -> O(1)\n\n\t\tNode temp = new Node(data);\n\t\tif(tail != null) { // if there is a tail, it adds after the tail.\n\t\t\ttail.next = temp;\n\t\t\ttemp.prev = tail;\n\t\t\t}\n\t\ttail = temp; // the added node is the new tail, regardless of \n\t\t\t\t\t//whether the list was empty or not\n\t\tif(head == null) { // if there is no head, the new node is the new head as well\n\t\t\thead = temp;\n\t\t\t}\n\t\tsize++; \n\t}", "void add(Iterable<S3TimeData> newData) {\n assert newData != null;\n\n synchronized (mux) {\n for (S3TimeData data : newData)\n map.put(data.getKey(), data);\n\n mux.notifyAll();\n }\n }", "public void addData(@IntRange(from = 0) int position, @NonNull Collection<? extends T> newData) {\n mData.addAll(position, newData);\n notifyItemRangeInserted(position + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "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}", "public void add(T data) {\n Node<T> newNode = new Node<T>();\n newNode.data = data;\n\n if (head == null)\n head = newNode;\n else {\n\n Node<T> currentNode = head;\n\n while (currentNode.next != null) {\n\n currentNode = currentNode.next;\n\n }\n\n currentNode.next = newNode;\n size++;\n\n }\n }", "public void addRow(CoverFooterItemType input_data){\r\n if (input_data != null){\r\n data.add(input_data);\r\n int row_num = data.size();\r\n this.fireTableRowsInserted(row_num,row_num);\r\n }\r\n }", "public CollisionInfo(Collidable c, Point collisionPoint, int e) {\n this.collidableObject = c;\n this.collisionPoint = collisionPoint;\n this.error = e;\n }", "public void addCollidable(Collidable c) {\n collidables.add(c);\n }", "public void add(int data) {\n\t\t// Its a first element\n\t\tif (head == null && tail == null) {\n\t\t\tNode newNode = getNewNode(data);\n\t\t\thead = tail = newNode;\n\t\t\treturn;\n\t\t}\n\t\t// This will add to the end of list with time complexity -O(1)\n\t\tNode newNode = getNewNode(data);\n\t\ttail.next = newNode;\n\t\tnewNode.prev = tail;\n\t\ttail = newNode;\n\t}", "public void add(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Data cannot be null\");\n }\n if (root == null) {\n root = new BSTNode<T>(data);\n size++;\n } else {\n add(data, root);\n }\n\n }", "public void addData(double[][] data) {\n for (int i = 0; i < data.length; i++) {\n addData(data[i][0], data[i][1]);\n }\n }", "public void addmyPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //add data\n myPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }", "protected CollisionData(ArrayList<Point2D.Double> collisionPoints, PhysicalCollidable p)\n\t\t{\n\t\t\tthis.effectPointsAndDirections = new HashMap<Point2D.Double, Double>();\n\t\t\t\n\t\t\t// Calculates the stuff\n\t\t\tboolean pointsFormALine = false;\n\t\t\tdouble lineDirection = 0;\n\t\t\t\n\t\t\t// If there are multiple points, checks if they form a line\n\t\t\tif (collisionPoints.size() > 1)\n\t\t\t{\n\t\t\t\tpointsFormALine = true;\n\t\t\t\tlineDirection = HelpMath.pointDirection(\n\t\t\t\t\t\tcollisionPoints.get(0).getX(), \n\t\t\t\t\t\tcollisionPoints.get(0).getY(), \n\t\t\t\t\t\tcollisionPoints.get(1).getX(), \n\t\t\t\t\t\tcollisionPoints.get(1).getY());\n\t\t\t\t\n\t\t\t\tfor (int i = 2; i < collisionPoints.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tdouble line2Direction = HelpMath.pointDirection(\n\t\t\t\t\t\t\tcollisionPoints.get(0).getX(), \n\t\t\t\t\t\t\tcollisionPoints.get(0).getY(), \n\t\t\t\t\t\t\tcollisionPoints.get(i).getX(), \n\t\t\t\t\t\t\tcollisionPoints.get(i).getY());\n\t\t\t\t\tif (Math.abs(line2Direction - lineDirection) > 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tpointsFormALine = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If the collisionPoints form a line, calculates the force direction \n\t\t\t// a bit differently\n\t\t\tif (pointsFormALine)\n\t\t\t{\n\t\t\t\t// The direction is tangentual to a line defined by the two points\n\t\t\t\tdouble forceDirection = lineDirection + 90;\n\t\t\t\tdouble defaultDirection1 = p.getCollisionForceDirection(collisionPoints.get(0));\n\t\t\t\tdouble defaultDirection2 = p.getCollisionForceDirection(collisionPoints.get(1));\n\t\t\t\t// May flip the direction around since it can only be known with the object\n\t\t\t\tif (HelpMath.getAngleDifference180(forceDirection, defaultDirection1) > 90 \n\t\t\t\t\t\t|| HelpMath.getAngleDifference180(forceDirection, defaultDirection2) > 90)\n\t\t\t\t\tforceDirection -= 180;\n\t\t\t\t\n\t\t\t\t// If the force direction would \"almost\" be one of the default force directions, chooses that\n\t\t\t\t\n\t\t\t\tif (HelpMath.getAngleDifference180(forceDirection, defaultDirection1) < 10)\n\t\t\t\t\tforceDirection = defaultDirection1;\n\t\t\t\telse if (HelpMath.getAngleDifference180(forceDirection, defaultDirection2) < 10)\n\t\t\t\t\tforceDirection = defaultDirection2;\n\t\t\t\t\n\t\t\t\t// The effect's point is formed with an average value\n\t\t\t\tthis.effectPointsAndDirections.put(HelpMath.getAveragePoint(collisionPoints), forceDirection);\n\t\t\t}\n\t\t\t// Otherwise uses separate collision directions for all the points\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (Point2D.Double colPoint : collisionPoints)\n\t\t\t\t{\n\t\t\t\t\tthis.effectPointsAndDirections.put(colPoint, \n\t\t\t\t\t\t\tp.getCollisionForceDirection(colPoint));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void addData(@NonNull Collection<? extends T> newData) {\n mData.addAll(newData);\n notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "public void addPollCommetsData(List<CommentDisplayResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n pollCommentsAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n pollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }", "public void add(T aData) {\n\t\tNode newNode = new Node(aData);\n\t\tnewNode.next = firstNode;\n\t\tfirstNode = newNode;\n\t\tnumEntries++;\n\t}", "public void add(T data)\n\t{\n\t\t//set up a new node to reference the data which will be added to the linked list\n\t\tNode<T> newNode = new Node<T>(data);\n\t\t//now you add the node to the linked list\n\t\t//if the linked list is empty then add the node to the head\n\t\tif(head == null)\n\t\t{\n\t\t\thead = newNode;\n\t\t}\n\t\t//if the linked list already has nodes, then add the new node to the end of the linked list\n\t\t//in order to add to the end you have to iterate through the list to find the end of the linked list\n\t\telse\n\t\t{\n\t\t\tNode<T> currentNode = head;\n\t\t\tNode<T> previousNode = head;\n\t\t\twhile(currentNode != null)\n\t\t\t{\n\t\t\t\tpreviousNode = currentNode;\n\t\t\t\tcurrentNode = currentNode.getNext();\n\t\t\t}\n\t\t\t//you will get out of the loop when you found the end of the linked list\n\t\t\t//so now you can add the new node to the end\n\t\t\tpreviousNode.setNext(newNode);\n\t\t}\n\t}", "private AVLNode<T> add(AVLNode<T> node, T data) {\n if(node == null) {\n elements++;\n return new AVLNode<>(data);\n }\n\n if(data.compareTo(node.data) == 0) {\n // hacer nothing\n return node;\n } else if(data.compareTo(node.data) > 0) {\n node.right = add(node.right, data);\n } else {\n node.left = add(node.left, data);\n }\n\n node = balance(node);\n\n return node;\n }", "public void addPrivatePollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n privatePollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n privatePollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\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 add(T data){\n if(head==null){\n DoubleNode<T> doubleNode = new DoubleNode<>(null, data, null);\n head=doubleNode;\n rear=doubleNode;\n size++;\n\n }else{\n DoubleNode<T> newDoubleNode = new DoubleNode<>(rear, data, null);\n rear.next=newDoubleNode;\n rear=newDoubleNode;\n size++;\n }\n }", "public void insert( int key, Integer data ){\n if (data == null) data = key;\n\n int index = computeHash(key);\n Node head = list[index];\n while( head != null ){ // Collision : key already in hashtable, put it in the linked list\n \n if(compare(head.key, key) == 0){ // Update : In case key is already present in list : exit\n head.data = data;\n return;\n }\n head = head.next; // put it at the end of the list\n }\n\n // No collision, new key; list.get(index) = null because that node at that index is not present\n list[index] = new Node(key, data, list[index]);\n }", "private void add(Pair<MarketDataRequestAtom,Event> inData)\n {\n getQueue().add(inData);\n }", "public void addToList(E data){\n if(headNode==null){\n headNode=new Node<E>(data);\n currentNode=headNode;\n }\n else{\n currentNode.next=new Node<E>(data);\n currentNode=currentNode.next;\n }\n size++;\n }", "private void addContainerPanel(ContainerData data){\n ContainerObjPanel newContainer;\n // If null then this is a new container being added\n if(data == null){\n String containerName = ContainerAddDialogNameTextfield.getText(); \n if(containerName == null || containerName.trim().length() == 0){\n System.out.println(\"No container name provided.\");\n return;\n }\n String baseImage = (String)ContainerAddDialogBaseImageCombobox.getSelectedItem();\n ContainerData freshContainerData = new ContainerData(containerName);\n newContainer = new ContainerObjPanel(this, freshContainerData);\n \n // Update the data object to include the new container\n labDataCurrent.getContainers().add(freshContainerData);\n ResultsData.containerList.add(containerName);\n \n // Update the Results UI to include the new container\n if(resultsUI!= null)\n resultsUI.refresh();\n \n // Add the container into the user's file system\n addContainer(containerName, baseImage);\n }\n else {\n newContainer = new ContainerObjPanel(this, data);\n }\n\n // Resize the JPanel holding all the ContainerObjPanels to fit another ContainerObjPanel \n containerPanePanelLength+=50;\n ContainerPanePanel.setPreferredSize(new Dimension(0,containerPanePanelLength));\n ContainerPanePanel.add(newContainer);\n \n // Redraw GUI with the new Panel\n ContainerPanePanel.revalidate();\n ContainerPanePanel.repaint(); \n \n // Lower the Scroll Bar to show the newly added container. BUG[6/25/20]: still always off by a single panel\n containerScrollPaneBar.setValue(50+containerScrollPaneBar.getMaximum());\n \n // Make the Container Add Dialog Invisible\n ContainerAddDialog.setVisible(false);\n }", "public void appendChg(EPPSecDNSExtDsData dsData) {\n\t\tif (chgDsData == null) {\n\t\t\tchgDsData = new ArrayList();\n\t\t}\n\t\tchgDsData.add(dsData);\n }", "public void appendAdd(EPPSecDNSExtDsData dsData) {\n\t\tif (addDsData == null) {\n\t\t\taddDsData = new ArrayList();\n\t\t}\n\t\taddDsData.add(dsData);\n }", "@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}", "public abstract void collided(Collision c);", "public void addData(AggregateRecord record) {\n this.data.add(record);\n }", "@Override\n\tpublic void onCollision(Model collisionModel, ColBox collisionColbox) {\n\n\t}", "private CollisionLogic() {}", "public void addSearchPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n searchAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n searchAdapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void addCampaignLikesData(List<LikesResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n customCampaignLikesAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n customCampaignLikesAdapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void add(DataGrabber dataGrabber) {\n if ( dataGrabbers == null )\n dataGrabbers = new ArrayList<DataGrabber>();\n dataGrabbers.add(dataGrabber);\n }", "public void addMeteoData(MeteoDataInfo aDataInfo) {\n dataInfoList.add(aDataInfo);\n currentDataInfo = aDataInfo; \n }", "public void add(T data) {\n if (this.nrOfElements == 0) {\n this.addToEmptyList(data);\n }\n else {\n Node walker = this.first;\n while (walker.next != null) {\n walker = walker.next;\n }\n this.last = walker.next = new Node(data);\n this.nrOfElements++;\n }\n }", "public void addPrivatePollData(List<PrivatePollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n privatePolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n privatePolladapter.notifyDataSetChanged();\n isLoading = false;\n }", "public CollisionManager(){\n\t\tcollidables \t\t= new HashMap<Integer, List<CollidableObject>>() ;\n\t\tcollisionsTypes \t= new HashMap<Integer, List<Integer>>() ;\n\t\tcollisionHandlers \t= new HashMap<String, CollisionHandler>() ;\n\t}", "public void updateOptimalCollisionArea();", "public void addUserPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n pollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n pollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }", "public boolean add(T data){\r\n\t\tif (data == null){\r\n\t\t\tthrow new IllegalArgumentException(\"data cannot be null\");\r\n\t\t}\r\n\t\tnumAdded++;\r\n \tmodCount++;\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\t\r\n\t\t//Make first node and insert\r\n\t\tif (temp == endMarker){\r\n\t\t\tArrayNode<T> first = new ArrayNode<T>(\r\n\t\t\t\t\tbeginMarker,endMarker,capacityOfArrays);\r\n\t\t\tsize++;\r\n\t\t\tbeginMarker.next = first;\r\n\t\t\tendMarker.prev = first;\r\n\t\t\tfirst.insertSorted(data);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t//find node to place\r\n\t\twhile (temp != endMarker){\r\n\t\t\t//last node\r\n\t\t\tif ((temp.next==endMarker)){\r\n\t\t\t\tinsertWithPossibleSplit(temp, data);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//first element in the chainedarrays\r\n\t\t\tif ((temp==beginMarker.next)&&(temp.getFirst().compareTo(data)>0)){\r\n\t\t\t\tinsertWithPossibleSplit(temp, data);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//in between nodes\r\n\t\t\tif ((temp.getLast().compareTo(data)<0)&&\r\n\t\t\t\t\t(temp.next.getFirst().compareTo(data)>0)){\r\n\t\t\t\t//checks which is longer\r\n\t\t\t\tif ((temp.getArraySize()>=temp.next.getArraySize())&&\r\n\t\t\t\t\t\ttemp.getArraySize()==temp.getLength())\r\n\t\t\t\t\ttemp = temp.next;\r\n\t\t\t\t\r\n\t\t\t\tinsertWithPossibleSplit(temp, data);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//past this node\r\n\t\t\tif ((temp.getLast().compareTo(data) < 0)){\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\t//otherwise this one\r\n\t\t\telse{\r\n\t\t\t\tinsertWithPossibleSplit(temp, data);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void setUpCollisionBox()\n {\n \txLeftOffsetCollisionBox = width/COLLISION_WIDTH_DIV;\n \tcollisionBoxHeight = height - COLLISION_BOX_H_OFFSET;\n \n \tcollisionBox = new Rectangle(\n\t\t\t\t \t\txPos, \n\t\t\t\t \t\tyPos, \n\t\t\t\t \t\t(int)width / 2,\n\t\t\t\t \t\tcollisionBoxHeight);\n }", "public void insert(Vector _data) {\r\n //Error check\r\n if(!validTable()){\r\n System.out.println(\"Error:Table:insert: table invalid, nothing done\");\r\n return;\r\n }\r\n if(_data.size() == 0) {\r\n System.out.println(\"Error:Table:insert:data passed is empty, no data added\");\r\n return;\r\n }\r\n if(_data.size() != heading.size()) {\r\n System.out.println(\"Error:Table:insert:mismatch of data size no data added\");\r\n return;\r\n }\r\n\r\n //Inserts data into new row\r\n String key = \"\";\r\n Row newRow = new Row(_data);\r\n for(int i : primKeyIndexes)\r\n key = key + newRow.getDataAtIndex(i);\r\n rows.put(key, newRow);\r\n }", "public void collisionCalculation(ArrayList<GameObject> gameobject, int elementcheck ) {\n\r\n _solid_Object_Detected = false;\r\n _total_Objects_Collided = 0;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++)\r\n {\r\n\r\n if(i != elementcheck)\r\n {\r\n //Set the object equal to\r\n\r\n\r\n switch (gameobject.get(i).getObjectType())\r\n {\r\n case Static.PLAYER:\r\n case Static.FIREBALL:\r\n case Static.FLOATINGICEBLOCK:\r\n case Static.BLUEFIREBALL:\r\n case Static.ENERGYICESPHERE:\r\n case Static.BALLISTICMETALBOX:\r\n case Static.EXTRAHITBOX:\r\n //gameobject.get(i).eventFlags();\r\n //break;\r\n _omega_Array = gameobject.get(i).getCollisionDetailsArray();\r\n object_State_2D = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8]);\r\n\r\n\r\n\r\n //Nested Collisions for special object with controlled children\r\n switch(_alpha_Array[1])\r\n {\r\n //Players detect children objects\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n //Player can detect the children of all object listed below.\r\n case Static.BALLISTICMETALBOX:\r\n\r\n if(_total_Objects_Collided <= _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.set(_total_Objects_Collided, gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n else if(_total_Objects_Collided > _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.add(gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n\r\n\r\n //Retest the collision status with all the children\r\n for (int z = 0; z <_jagged_Super_Int_Array.size();z++)\r\n {\r\n int lenghtofarray = _jagged_Super_Int_Array.get(_total_Objects_Collided).length;\r\n for(int y = 0; y < lenghtofarray ; y++)\r\n {\r\n int _child_object_state;\r\n _child_Omega_Array = _jagged_Super_Int_Array.get(z)[y];\r\n\r\n\r\n _child_object_state = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _child_Omega_Array[5], _child_Omega_Array[6], _child_Omega_Array[7], _child_Omega_Array[8]);\r\n _jagged_Super_Int_Array.get(_total_Objects_Collided)[y][0] = _child_object_state;\r\n\r\n\r\n\r\n\r\n }\r\n\r\n }\r\n _children_Object_Detected = true;\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n //Solid object detector\r\n switch(_alpha_Array[1])\r\n {\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n case Static.FLOATINGICEBLOCK:\r\n if (_total_Objects_Collided <= _jagged_Boolean_Array.size() - 1) {\r\n _jagged_Boolean_Array.set(_total_Objects_Collided, _global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n else if (_total_Objects_Collided > _jagged_Boolean_Array.size() - 1)\r\n {\r\n _jagged_Boolean_Array.add(_global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n _solid_Object_Detected = true;\r\n break;\r\n case Static.FIREBALL:\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n switch (object_State_2D)\r\n {\r\n case Static.COLLISION_2D_PIERCE:\r\n case Static.COLLISION_2D_TOUCH:\r\n\r\n if(_total_Objects_Collided <= _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.set(_total_Objects_Collided, gameobject.get(i).getCollisionDetailsArray());\r\n\r\n }\r\n else if(_total_Objects_Collided > _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.add(gameobject.get(i).getCollisionDetailsArray());\r\n }\r\n _jagged_Array.get(_total_Objects_Collided)[0] = object_State_2D;\r\n\r\n _total_Objects_Collided++;\r\n\r\n break;\r\n case Static.MIDAIR:\r\n break;\r\n }\r\n break;\r\n\r\n }\r\n }\r\n }\r\n\r\n //if (_total_Objects_Collided == 0) {\r\n // _jagged_Array = null;\r\n //}\r\n }" ]
[ "0.6241267", "0.5846408", "0.55342007", "0.52645314", "0.5224253", "0.5162394", "0.5127957", "0.5107014", "0.50805324", "0.5076184", "0.5059431", "0.50271213", "0.5014329", "0.49493328", "0.49437538", "0.48987335", "0.48695952", "0.48690963", "0.4868791", "0.48577952", "0.48443377", "0.48087782", "0.47802407", "0.47606528", "0.4743704", "0.47424635", "0.47387537", "0.47213438", "0.47144374", "0.46995026", "0.46937725", "0.46731156", "0.46478575", "0.46478462", "0.46411788", "0.46367055", "0.4623384", "0.4600242", "0.45981222", "0.4594591", "0.45936993", "0.4575863", "0.4572935", "0.45723927", "0.4565701", "0.45588294", "0.45573545", "0.45556214", "0.45506877", "0.45461082", "0.45385027", "0.4537075", "0.45257357", "0.45248282", "0.45228323", "0.4516574", "0.45074666", "0.45045236", "0.4498952", "0.44911692", "0.44823325", "0.44685903", "0.4454193", "0.44490248", "0.44468814", "0.4442079", "0.4441743", "0.44347882", "0.44249326", "0.44237834", "0.44123632", "0.43896422", "0.43847087", "0.43820322", "0.43803442", "0.4375115", "0.43746263", "0.4371786", "0.43691194", "0.43653807", "0.43641567", "0.43627495", "0.4360674", "0.43595967", "0.43555325", "0.43492794", "0.43451232", "0.4343963", "0.4341104", "0.43375018", "0.43367887", "0.43357176", "0.43346187", "0.43323842", "0.4322925", "0.4319981", "0.43199393", "0.431951", "0.4316284", "0.4314661" ]
0.63646835
0
getNumber retrieves the number of collisions that have been placed in the results.
public int getNumber() { return nodeList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberFound() {\n return numberFound;\n }", "@Override\n\tpublic int numOfCollisions() {\n\n\t\treturn this.collision;\n\t}", "public int getTotalCollisions(){\r\n return totalCollisions;\r\n }", "Object getNumberMatched();", "public int GetNumber() {\n int num = 0;\n for (int i=0; i<m_colourMap.length; i++) {\n if (!(m_colourMap[i].equals(null))) {\n num++; \n }\n }\n return(num);\n }", "public long numHits() {\n return numHits.longValue();\n }", "int getBlockNumbersCount();", "public int getGameNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT count(id) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tresult = rs.getInt(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "final int numHits() {\n return numHits;\n }", "public int getNumHits() {\n\t\treturn numHits;\n\t}", "int getBlockNumsCount();", "int getBlockNumsCount();", "public int getNumBalls() {\n return numBalls;\n }", "BigInteger getNumberReturned();", "private int getNum() {\r\n int i = currentNum.incrementAndGet();\r\n if (i < 0)\r\n i = -i;\r\n return i % n;\r\n }", "long getHits();", "public int reportCollisions() {\r\n\t int collisions = 0;\r\n\t List collisionList = new ArrayList();\r\n\t for(int i = 0; i < bucket.length; i++) {\r\n\t\t if(bucket[i] == null) continue;\r\n\t\t if(bucket[i].size() > 1) {\r\n\t\t\t collisions = collisions + bucket[i].size();\r\n\t\t\t Iterator it = bucket[i].iterator();\r\n\t\t\t while(it.hasNext()) {\r\n\t\t\t\t collisionList.add(it.next());\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t //make map of hashcodes and indices of collisions\r\n\t Map m = new HashMap();\r\n\t Iterator it = collisionList.iterator();\r\n\t while(it.hasNext()) {\r\n\t\t MPair mpair = (MPair)it.next();\r\n\t\t m.put((mpair.getKey()).hashCode(), (mpair.getKey()).hashCode() % SZ);\r\n\t }\r\n\t System.out.println(\"\\nCollisions hashcodes and indices : \\n\" + m);\r\n\t System.out.println(\"\\nNumber of collisions : \\n\" + collisionList);\r\n\t // Number of collisions = number of probes\r\n\t System.out.println(\"\\nNumber of probes : \" + collisions);\r\n\t return collisions;\r\n }", "public int getNumPeople(){\r\n int num = 0;\r\n return num;\r\n }", "int getNumberOfResults();", "public int getNum() {\n\t\treturn num;\n\t}", "public int getNumber() {\n\t\t\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNum() {\n\treturn this.n;\n }", "public int numberOfBalls() {\r\n return 3;\r\n }", "public int getNum() {\r\n return num;\r\n }", "public final int getNumber() {\n return number;\n }", "public int getHitsLeft(){\n return hitsLeft;\n }", "public int getNumber() {\r\n\t\treturn number;\r\n\t}", "public void countCollisions() {\n int col2 = 0;\n int col3 = 0;\n int col4 = 0;\n int col5OrMore = 0;\n \n for (int x = 0; x < buckets.length; x++) {\n SList chain = (SList) buckets[x];\n if (chain.length() == 2) {\n col2++;\n }\n if (chain.length() == 3) {\n col3++;\n }\n if (chain.length() == 4) {\n col4++;\n }\n if (chain.length() >= 5) {\n col5OrMore++;\n }\n }\n System.out.println(\"=========HASHTABLE================\");\n System.out.println(\"# of entries: \" + size);\n System.out.println(\"Number of single collisions: \"+col2);\n System.out.println(\"Number of double collisions: \"+col3);\n System.out.println(\"Number of triple collisions: \"+col4);\n System.out.println(\"Number of 5 or more collisions: \"+col5OrMore);\n }", "long getNumberOfComparisons();", "public int getNum()\n {\n return num;\n }", "public int getNum()\n {\n return num;\n }", "public int numCollisions() {\r\n int collisions = 0;\r\n for (int i = 0; i < tableSize; i++) {\r\n if (table[i].length() > 1) {\r\n collisions += table[i].length() - 1;\r\n }\r\n }\r\n return collisions;\r\n }", "public long getnNum() {\n return nNum;\n }", "public int getNumNotHit()\n {\n return shipCoordinates.size() - hitCoordinates.size();\n }", "public int getNumber(){\n\t\treturn number;\n\t}", "int numberOfBalls();", "public int number() {\n return number;\n }", "public int numHits() {\r\n\t\treturn hits;\r\n\t}", "int getInCount();", "public int getNum() {\n return this.num;\n }", "int getScoresCount();", "public int getTotalHits() { return totalHits; }", "public int getMissCountNotFound() {\n return missCountNotFound;\n }", "public int getN() {\n return n_;\n }", "public void setNumberFound(int numberFound) {\n this.numberFound = numberFound;\n }", "public int getNum();", "public int getN() {\n return n_;\n }", "public java.lang.Integer getNum () {\r\n\t\treturn num;\r\n\t}", "int getBouncesNumber() throws SQLException;", "public int getnumR(game_service game) {\r\n\t\tint rn=0;\r\n\t\tString g=game.toString();\r\n\t\tJSONObject l;\r\n\t\ttry {\r\n\t\t\tl=new JSONObject(g);\r\n\t\t\tJSONObject t = l.getJSONObject(\"GameServer\");\r\n\t\t\trn=t.getInt(\"robots\");\r\n\t\t}\r\n\t\tcatch (JSONException e) {e.printStackTrace();}\r\n\t\treturn rn;\r\n\t}", "@Override\r\n public int hashCode() {\r\n return this.number;\r\n }", "public int getN() {\r\n\t\treturn n;\r\n\t}", "public int getN() {\n\t\treturn n;\n\t}", "public int getN() {\n return n;\n }", "public Long get_cachetotnon304hits() throws Exception {\n\t\treturn this.cachetotnon304hits;\n\t}", "public int getNumber() {\r\n return number;\r\n }", "public long getN() {\n return n;\n }", "public int getNumResults() {\r\n\t\treturn this.numResults;\r\n\t}", "public int getNumMissiles(){\n return this.nunMissiles;\n }", "public int getWrapperHits();", "public int getBallsCount() {\n return balls.size();\n }", "int getN();", "int getReservePokemonCount();", "public int get_count();", "int getResultsCount();", "int getResultsCount();", "public int getNumCacheHit() {\n return cacheHandler.getCountCacheHit();\n }", "public int getNumber() {\n return number;\n }", "int getUniqueNumbersCount();", "public int getN() {\n return this.n;\n }", "public final long getNearCacheHitCount() {\n\t\treturn m_nearCacheHits;\n\t}", "public int getNumber() {\n return this.number;\n }", "int getContactCount();", "int getEntryCount();", "public int getNumCacheMiss() {\n return cacheHandler.getCountCacheMiss();\n }", "protected long hit() {\n return numHits.incrementAndGet();\n }", "int getRanking();", "public int numberOfBalls() {\n this.numberOfBalls = 4;\n return 4;\n }", "public Long get_cachetot304hits() throws Exception {\n\t\treturn this.cachetot304hits;\n\t}", "public Integer getNumber() {\n\t\treturn number;\n\t}", "public int getBalls() {\n return totalBalls;\n }", "public int getNumber()\n {\n return this.number;\n }", "public int getNumber() {\n return this.number;\n }", "int getFaintedPokemonCount();", "public Integer getNum() {\n return num;\n }", "public Integer getNum() {\n return num;\n }", "public int getMatchesRowNumber() {\n\t\tint nMatches = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT COUNT(*) FROM \" + match_table;\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tnMatches = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn nMatches;\n\t}", "public Long get_cachetotflashcachehits() throws Exception {\n\t\treturn this.cachetotflashcachehits;\n\t}", "public Long get_cachetotparameterized304hits() throws Exception {\n\t\treturn this.cachetotparameterized304hits;\n\t}", "public int getNumberOfEntries();", "public Long get_cachetotparameterizednon304hits() throws Exception {\n\t\treturn this.cachetotparameterizednon304hits;\n\t}", "public int getNumOfMatchedBets();", "public long getTotalHits()\r\n\t{\r\n\t\treturn this.totalHits;\r\n\t}", "public Integer getNumCompetitions() {\r\n return numCompetitions;\r\n }", "public int getNum() { return Num;}", "public int getNumRobots() {\n return ((Integer)numRobotsSpinner.getValue()).intValue();\n }", "public int getN() {\n return writeResult.getN();\n }" ]
[ "0.6479772", "0.63942784", "0.62524706", "0.61291194", "0.6103067", "0.59342396", "0.59009814", "0.58218557", "0.579052", "0.5749102", "0.5747953", "0.5747953", "0.573467", "0.57101065", "0.5684848", "0.5657445", "0.5632428", "0.5615309", "0.55983806", "0.5557266", "0.5556851", "0.5531174", "0.5531174", "0.5531174", "0.5531174", "0.55297124", "0.55295247", "0.5524607", "0.5517339", "0.550666", "0.5505509", "0.5504865", "0.55018175", "0.54976827", "0.54976827", "0.54926646", "0.54791725", "0.54753685", "0.5466482", "0.54505956", "0.54505", "0.54484165", "0.5440164", "0.5438367", "0.5433646", "0.5426416", "0.54193294", "0.54193074", "0.54125786", "0.5385773", "0.5385176", "0.5381326", "0.5381245", "0.53693336", "0.5364598", "0.5349902", "0.5349631", "0.53477144", "0.5347647", "0.5343709", "0.5343261", "0.5339973", "0.5339529", "0.5331993", "0.53312516", "0.5328661", "0.5312565", "0.5308268", "0.53041714", "0.53041714", "0.5303099", "0.5302071", "0.530207", "0.52950245", "0.5279317", "0.527905", "0.52748394", "0.5271836", "0.5270674", "0.5265852", "0.5249402", "0.52487034", "0.5244829", "0.5243471", "0.5243144", "0.5239777", "0.5230941", "0.52300704", "0.5229559", "0.5229559", "0.522553", "0.52237034", "0.52232444", "0.5214925", "0.52143234", "0.5206575", "0.52063334", "0.5206111", "0.5202897", "0.5201301", "0.51991093" ]
0.0
-1
getCollisionData retrieves a CollisionData from a specific index.
public CollisionData getCollisionData(int i) { return nodeList.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "public int getData(int index) {\n return data_.get(index);\n }", "public int getData(int index) {\n return data_.get(index);\n }", "public Object get( int index )\n {\n\treturn _data[index];\n }", "public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }", "@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }", "E getData(int index);", "public static byte get(byte[] data, int index) {\n return data == null || data.length <= index ? -1 : data[index];\n }", "public static byte get(byte[] data, int index) {\n return data == null || data.length <= index ? -1 : data[index];\n }", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index);", "public Comparable get( int index ) {\n \treturn _data[index]; }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "public com.google.protobuf.ByteString getData(int index) {\n return data_.get(index);\n }", "@Override\n public T get(final int index) {\n this.checkIndex(index);\n return this.data[index];\n }", "@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }", "public Occ get( int index )\n {\n if ( index < 0 || index >= size ) throw new IndexOutOfBoundsException( \"\"+index+\" >= \"+size );\n return data[index];\n }", "public long [] getData(Long index);", "com.google.protobuf.ByteString getData(int index);", "com.google.protobuf.ByteString getData(int index);", "public int getDataFromGivenIndex(int index){\n //Index validation\n checkIndex(index);\n return getNodeFromGivenIndex(index).data;\n }", "public E get(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n return theData[index];\n }", "public ISlideData getFeature(int index);", "@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}", "public c getCompData(c blk, int i) {\n/* 399 */ if (i >= 3 || this.h == 0) {\n/* 400 */ return this.e.getCompData(blk, i);\n/* */ }\n/* */ \n/* 403 */ return getInternCompData(blk, i);\n/* */ }", "public int[] getData(int index) {\n // retrieve the length \n int l = theList.get(index);\n // now retrieve the characters for this data block\n int data[] = new int[l];\n for(int i=0; i<l; i++) {\n data[i] = theList.get(index+1+i);\n }\n return data;\n }", "public double[] getData(int index) {\n\t\treturn m_Data[index];\n\t}", "db.fennec.proto.FDataEntryProto getData(int index);", "public T get(int index) {\n if (index < 0 || index > size - 1) {\n throw new IndexOutOfBoundsException(\"Cannot access data outside \"\n + \"the size of the data structure(null)\");\n } else {\n if (index == 0) {\n return head.getData();\n } else if (index == size - 1) {\n return tail.getData();\n }\n Object[] myarray = this.toArray();\n return (T) myarray[index];\n }\n }", "public org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index) {\n return contact_.get(index);\n }", "public Node<E> get(int index){\r\n if (index < 0 || index >=theData.size() ) return null;\r\n return theData.get(index);\r\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupportedOperator(OperatorType.INDEXGET);\n }", "private GObject getCollidingObject() {\n \tdouble x1 = ball.getX();\n \tdouble y1 = ball.getY();\n \tdouble x2 = x1 + BALL_RADIUS * 2;\n \tdouble y2 = y1 + BALL_RADIUS * 2;\n \n \tif (getElementAt(x1, y1) != null) return getElementAt(x1, y1);\n \tif (getElementAt(x1, y2) != null) return getElementAt(x1, y2);\n \tif (getElementAt(x2, y1) != null) return getElementAt(x2, y1);\n \tif (getElementAt(x2, y2) != null) return getElementAt(x2, y2);\n \n \treturn null;\n }", "com.google.protobuf.ByteString getImgData(int index);", "public DataField getDataFieldAt(final int index) {\n\t\tif ((index < 0) || (index >= this.dataFields.size())) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds. Lower \"\n\t\t\t\t\t+ \"limit: 0; upper limit: \" + (this.dataFields.size() - 1)\n\t\t\t\t\t+ \"; index: \" + index);\n\t\t}\n\t\treturn this.dataFields.elementAt(index);\n\t}", "public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "db.fennec.proto.FDataEntryProtoOrBuilder getDataOrBuilder(\n int index);", "public E get(int index) {\n\t\tresetIterator();\n\t\tif (index < 0 || index >= size) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tnext();\n\t\t}\n\t\treturn iterator.data;\n\t}", "public com.rpg.framework.database.Protocol.MonsterState getData(int index) {\n return data_.get(index);\n }", "Object[] getDataRow(final int index);", "final CacheData<K, V> getCacheData(int pos) {\r\n return buckets[pos].get();\r\n }", "public DataFile getDataFileAtIndex(int index){\n return data.get(index).getDataFile();\n }", "public Rectangle2D.Double getCollisionBox() {\n\t\treturn this.collisionBox;\n\t}", "public Object get(int index) {\n isValidIndex(index);\n return getNode(index).data;\n }", "public T get(int index) {\n T result = null;\n if (index >= 0 && index < this.container.length) {\n result = (T) this.container[index];\n }\n return result;\n }", "double clientData(final int index, final int data);", "CollisionRule getCollisionRule();", "@NonNull JavaBoundingBox[] collision();", "public Card getCard(int index){\n return cards.get(index - 1);\n }", "public Course getCourse(int index) {\n return courseList.get(index); \n }", "public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}", "public Object get(int index) {\n int i;\n if (index < 0 || (i = index + start) >= size)\n throw new NoSuchKeyException(index, size - start);\n return array[i];\n }", "public Object get(int index)\n // returns the element at the specified position in this list.\n {\n if (index <= 0)\n return null;\n \n CrunchifyNode crunchifyCurrent = head.getNext();\n for (int i = 1; i < index; i++) {\n if (crunchifyCurrent.getNext() == null)\n return null;\n \n crunchifyCurrent = crunchifyCurrent.getNext();\n }\n return crunchifyCurrent.getData();\n }", "public Object get(int index);", "public Object get(int index);", "public com.rpg.framework.database.Protocol.MonsterState getData(int index) {\n if (dataBuilder_ == null) {\n return data_.get(index);\n } else {\n return dataBuilder_.getMessage(index);\n }\n }", "public int getDigit(int index) {\n\t\tif (index < 0 || index > data.length - 1) {\n\t\t\tSystem.out.println(\"cease this buffoonery.\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn data[index];\n\t}", "public int getColDamage() {\n return collision_damage;\n }", "public byte[] getData()\r\n/* 18: */ {\r\n/* 19:59 */ byte[] data = new byte[4];\r\n/* 20: */ \r\n/* 21:61 */ IntegerHelper.getTwoBytes(this.xfIndex, data, 0); int \r\n/* 22: */ \r\n/* 23: */ \r\n/* 24:64 */ tmp15_14 = 1; byte[] tmp15_13 = data;tmp15_13[tmp15_14] = ((byte)(tmp15_13[tmp15_14] | 0x80));\r\n/* 25: */ \r\n/* 26:66 */ data[2] = ((byte)this.styleNumber);\r\n/* 27: */ \r\n/* 28: */ \r\n/* 29:69 */ data[3] = -1;\r\n/* 30: */ \r\n/* 31:71 */ return data;\r\n/* 32: */ }", "public ByteBuffer get(final int index) {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"get(\" + index + \")\");\n\t\t}\n\t\ttry {\n\t\t\tif (useMmap) {\n\t\t\t\tfinal MappedByteBuffer mbb = getMmapForIndex(index);\n\t\t\t\tif (mbb != null) {\n\t\t\t\t\treturn mbb;\n\t\t\t\t}\n\t\t\t\t// Fallback to RAF\n\t\t\t}\n\t\t\tfinal ByteBuffer buf = bufstack.pop();\n\t\t\tfileChannel.position(index * blockSize).read(buf);\n\t\t\tbuf.rewind();\n\t\t\treturn buf;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception in get(\" + index + \")\", e);\n\t\t}\n\t\treturn null;\n\t}", "public Object get(int index) {\n if (index >= _size) {\n throw new ListIndexOutOfBoundsException(\"Error\");\n }\n ListNode current = start;\n for (int i = 0; i<index; i++ ) {\n current = current.next;\n }\n return current.data;\n }", "public int getCollisionType(int x, int y) {\t\r\n\t\tbyte map_no = l();\r\n\t\tint index = x*15+y;\r\n\t\tif (index >= left_map_width*15) {\r\n\t\t\tmap_no = r();\r\n\t\t\tindex -= left_map_width*15;\r\n\t\t}\r\n\t\t//If it's out of bounds, it is not traversable.\r\n\t\tif(x < 0 || x >= levelWidth() ||\r\n\t\t y < 0 || y >= levelHeight() ||\r\n\t\t index >= collision[map_no].length )\r\n\t\t\treturn 1;\r\n\t\treturn collision[map_no][index];\r\n\t}", "org.multibit.hd.core.protobuf.MBHDContactsProtos.ContactOrBuilder getContactOrBuilder(\n int index);", "public int get(int index) {\r\n\t\treturn(this.vclock.get(index));\r\n\t}", "public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}", "public E get(int index) {\n\t\tcheckBounds(index);\r\n\t\treturn getNode(index).getData();\r\n\t}", "public E get(int index) {\n\t\tif (index < 0 || index >= mSize)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\treturn getNode(index).data;\n\t}", "public int get(int index);", "Object get(int index);", "Object get(int index);", "public Ship get(int index) {\n\t\tif ((index < 0) || (index > ships.size() - 1)) {\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Index out of Bounds.\");\n\t\t}\n\t\treturn ships.get(index);\n\n\t}", "PACKET getIndex(int index);", "com.rpg.framework.database.Protocol.MonsterState getData(int index);", "public org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index) {\n if (contactBuilder_ == null) {\n return contact_.get(index);\n } else {\n return contactBuilder_.getMessage(index);\n }\n }", "public GeometricalObject getObject(int index);", "public static boolean getCollision()\r\n\t{\r\n\t\treturn collision;\r\n\t}", "public Block getBlock(int index){\n\t\treturn ds[index];\n\t}", "abstract int get(int index);", "Rectangle getCollisionBox();", "public GameObject getOther(){\n \n return currentCollidingObject;\n \n }", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "Object getDataValue(final int row, final int column);", "public synchronized E get(int index) {\n return this.array.get(index);\n }", "public int get(int index) {\n\t checkIndex(index);\n\t return elementData[index];\n\t }", "public float get(int index) {\r\n RangeCheck(index);\r\n return elementData[index];\r\n }", "public T get(int index) {\r\n return getNodeAtIndex(index).getData();\r\n }", "@Test\n public void get() throws Exception {\n CollisionList list = new CollisionList();\n list.add(\"key\", \"value\");\n assertEquals(\"value\", list.get(\"key\"));\n }", "public int getFromData(int data) {\n\t\t\tif (preserveData) return data;\n\t\t\treturn useData ? (enforceData ? getFromDataByIndex(data) : data) : 0;\n\t\t}", "public T getAt(int iterator) {\n return (T)data[iterator];\n }", "public com.rpg.framework.database.Protocol.ActionCommand getData(int index) {\n return data_.get(index);\n }", "public Integer get(int index) {\r\n return dice.get(index);\r\n }", "public int get(int index) {\n return array[index];\n }", "public Double getDataValue(int index) {\r\n if (index < 0 || index > this.getNumOfData()) {\r\n // Attempt to get an unknown data of a not known bar. \"0 will be returned!\"\r\n return 0.0;\r\n }\r\n \r\n return this.chartData.getDataValue(index);\r\n }", "public AnyType get( int index ) throws IndexOutOfBoundsException {\n \n return getNode( index ).getData();\n \n }", "public static ColumnData getData(ColumnRef columnRef) throws Exception {\n\t\t// Load data if necessary\n\t\tif (!colToData.containsKey(columnRef)) {\n\t\t\tloadColumn(columnRef);\n\t\t}\n\t\treturn colToData.get(columnRef);\n\t}", "public TDAPrioridad getDato(int pos) {\r\n return datos[pos];\r\n }", "public double get(int idx) {\n\t\tswitch (idx) {\n\t\tcase 0: \n\t\t\treturn x;\n\t\tcase 1: \n\t\t\treturn y;\n\t\tcase 2:\n\t\t\treturn z;\n\t\tcase 3: \n\t\t\treturn w;\n\t\tdefault:\t\n\t\t\tthrow new IndexOutOfBoundsException(\"index must be between 0 and 3, got \" + idx);\n\t\t}\n\t}", "public int[][] getCollisionMatrix(){\n\t\treturn collisionMatrix;\n\t}", "public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }" ]
[ "0.5893133", "0.5767775", "0.5718861", "0.5541503", "0.5429567", "0.54049927", "0.53795195", "0.53299314", "0.53299314", "0.5328826", "0.5321546", "0.5286283", "0.5286283", "0.5281802", "0.5281802", "0.523701", "0.5227172", "0.5194466", "0.51585805", "0.5158382", "0.5158382", "0.512242", "0.51197624", "0.5116823", "0.51042986", "0.5095408", "0.5078654", "0.5075936", "0.5067987", "0.50469005", "0.49562794", "0.49239606", "0.49080652", "0.48991865", "0.48656833", "0.48634773", "0.48590156", "0.48434755", "0.48379365", "0.48372206", "0.48335606", "0.48177207", "0.4805551", "0.48007435", "0.47814468", "0.47483876", "0.47425637", "0.47416377", "0.47399467", "0.47378352", "0.47183767", "0.46849346", "0.46751177", "0.4646568", "0.46383798", "0.46383798", "0.46276116", "0.46135306", "0.46126205", "0.46005264", "0.4598737", "0.459794", "0.45927298", "0.4579814", "0.45783472", "0.45779324", "0.45757", "0.45734552", "0.4573062", "0.4571699", "0.4571699", "0.45601517", "0.4557636", "0.455066", "0.45394892", "0.45341912", "0.4525399", "0.45250663", "0.45228097", "0.45224774", "0.45216697", "0.4520956", "0.45199183", "0.45187426", "0.4516886", "0.45151177", "0.45131066", "0.451157", "0.45085567", "0.45075962", "0.45072556", "0.4502217", "0.45001405", "0.44988903", "0.44936764", "0.44870323", "0.44868052", "0.44857192", "0.44853497", "0.44851932" ]
0.6269613
0
clear clears the list of all CollisionData.
public void clear() { nodeList.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "public void clearAllData() {\n atoms.clear();\n connections.clear();\n lines.clear();\n radical = null;\n }", "public void clearData()\r\n {\r\n \r\n }", "void clearData();", "public void clear() {\n this.layers.clear();\n list.clear();\n }", "public void clear() {\n this.data().clear();\n }", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "private void clearData() {}", "public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}", "public void clear() {collection.clear();}", "public void clear() {\n for (int i = collisionBodies.size() - 1; i >= 0; i--) {\n CollisionBody line = collisionBodies.get(i);\n root.getChildren().remove(line.getLine());\n collisionBodies.remove(line);\n }\n }", "public void clear() {\n \tthis.listShapes.clear();\n }", "public void clear()\n {\n keys.clear();\n comments.clear();\n data.clear();\n }", "void clear() {\n data = new Data(this);\n }", "public void clear(){\r\n\t\tthis.countRead \t\t\t= 0;\r\n\t\tthis.countReadData \t\t= 0;\r\n\t\tthis.countRemoved \t\t= 0;\r\n\t\tthis.countRemovedData \t= 0;\r\n\t\tthis.countWrite \t\t= 0;\r\n\t\tthis.countWriteData \t= 0;\r\n\t\tthis.dataList.clear();\r\n\t\tthis.dataMap.clear();\r\n\t}", "public void clear() {\r\n init();\r\n }", "public void clear() {\n\t\tcollection.clear();\n\t}", "@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\n \tlist = new ArrayList();\n\n }", "@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 this.atoms.clear();\n this.bonds.clear();\n this.finished = false;\n }", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "public void clear() {\n\t\tthis._cooccurenceMatrix = null;\n\t\tthis._modules.clear();\n\t\tthis._vertices.clear();\n\t}", "public void clear() {\r\n items.clear();\r\n keys.clear();\r\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "public void clear() {\n\t\t\r\n\t}", "public void clear()\n {\n Arrays.fill(data, clearColor);\n }", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "public void clearData(){\n\r\n\t}", "public void clear()\n {\n }", "public void clearAll();", "public void clearAll();", "public void clear() {\n\n\t}", "public void clear() {\n\n\t\tdata = null;\n\t\tnumRows = 0;\n\t\tnumCols = 0;\n\t\tsize = 0L;\n\n\t}", "private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\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();", "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();", "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();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clearData() {\r\n\t\tdata = null;\r\n\t}", "public void clear() {\n doClear();\n }", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public void ClearAll()\r\n {\r\n balls.clear();\r\n board.SetMissedBall(0);\r\n }", "private void clear() {\n }", "@Override\r\n public void clear() {\r\n this.roomMap.clear();\r\n this.buildingMap.clear();\r\n this.roomResponsibleOrgMap.clear();\r\n }", "public void clear() {\n }", "public void clear() {\n }", "@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}", "public void clear() {\n }", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "public void clear()\n\t{\n\t\tfor(DBColumn col : _RowData.values())\n\t\t\tcol.clear();\n\t\t\t\n\t\t_MetaData = null;\n\t\t_Parent = null;\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "public void clear() {\n this.collection.clear();\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 {\n dessertList.clear();\n }", "public void clear() {\n\t\tvector.clear();\n\t}", "public void clear()\n {\n getMap().clear();\n }", "public void clearConcertList(){\n concertList.clear();\n }", "public void clear() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tclearEntries();\r\n\t\t\r\n\t}", "public void clear() {\n this.entries = new Empty<>();\n }", "public void clear() {\n\t\tentries.clear();\n\t}", "void clearAll();", "void clearAll();", "public void clear(){\n\t\tclear(0);\n\t}", "public void clear() {\n for (int i = 0; i < size; i++) genericArrayList[i] = null;\n size = 0;\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 initialize();\n }", "@Override\n public void clearData() {\n }", "private void clear() {\n\t\tremoveAll();\n\t\taddCircle();\n\t}", "public void clear() {\n items.clear();\n update();\n }" ]
[ "0.6974827", "0.6925982", "0.6630541", "0.6628925", "0.6627674", "0.66249335", "0.66203016", "0.6615675", "0.65970355", "0.6592795", "0.657516", "0.65674686", "0.65511", "0.65378386", "0.6507204", "0.6476215", "0.6474219", "0.6461426", "0.6457637", "0.6444176", "0.64392364", "0.6438097", "0.6436826", "0.6431512", "0.64137423", "0.64137423", "0.64087164", "0.640795", "0.63991106", "0.6397096", "0.63953406", "0.63737017", "0.63737017", "0.637162", "0.6370912", "0.6350945", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6344392", "0.6342401", "0.63318014", "0.63133997", "0.6313385", "0.6307179", "0.6307136", "0.63062686", "0.63062686", "0.6305157", "0.62999254", "0.62971807", "0.6287899", "0.62846386", "0.6282974", "0.62815136", "0.6277381", "0.6275676", "0.62755245", "0.62729377", "0.62718064", "0.6270289", "0.6267132", "0.62624353", "0.62624353", "0.62601125", "0.62577325", "0.6256721", "0.625563", "0.62537926", "0.6247684", "0.62451285" ]
0.0
-1
addCollision is an abstract method whose intent is the subclass determines what to do when two Geometry object's bounding volumes are determined to intersect.
public abstract void addCollision(Geometry s, Geometry t);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean collisionWith(CollisionObject obj);", "@Override\n\tpublic void createCollisionShape() {\n\t\t\n\t}", "public abstract void collide(InteractiveObject obj);", "public abstract void collideWith(Entity entity);", "public abstract void collision(SpaceThing thing);", "@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}", "public abstract void onCollision();", "public void collision(Collidable collider);", "public void updateOptimalCollisionArea();", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "private void setCollision(){\n\t\tMapObjects mapObjects = map.getLayers().get(\"COLLISION\").getObjects();\n\t\tfor (int ii = 0; ii < mapObjects.getCount(); ++ii){\n\t\t\tRectangleMapObject rectangle_map_object = (RectangleMapObject) mapObjects.get(ii);\n\t\t\tareaCollision.add(new Rectangle(rectangle_map_object.getRectangle()));\n\t\t}\n\t}", "public abstract void processCollisions();", "public void handleCollision(Collision c);", "public abstract void collided(Collision c);", "public void checkCollision() {}", "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 }", "protected void onCollision(Actor other) {\r\n\r\n\t}", "Rectangle getCollisionBox();", "public EntityEntityCollision(EntityBoundary boundary1, EntityBoundary boundary2) {\n boundaries = new EntityBoundary[]{boundary1, boundary2};\n rectangles = new Rectangle[]{boundaries[0].asRectangle(), boundaries[1].asRectangle()};\n rectangles[0].width += 2;\n rectangles[1].width += 2;\n rectangles[0].height += 2;\n rectangles[1].height += 2;\n entities = new Entity[]{boundaries[0].parent, boundaries[1].parent};\n }", "@Override protected boolean drag_collide(float newX, float newY, Entity e){\n\n\n boolean collides=\n e.collideLine(x, y, newX, newY) ||\n e.collideLine(x + thirdWidth, y, newX+thirdWidth, newY) ||\n e.collideLine(x, y+height, newX, newY+height) ||\n e.collideLine(x + thirdWidth, y+height, newX+thirdWidth, newY+height) ||\n\n e.collideLine(2*thirdWidth + x, y, 2*thirdWidth + newX, newY) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y, 2*thirdWidth + newX+thirdWidth, newY) ||\n e.collideLine(2*thirdWidth + x, y+height, 2*thirdWidth + newX, newY+height) ||\n e.collideLine(2*thirdWidth + x + thirdWidth, y+height, 2*thirdWidth + newX+thirdWidth, newY+height)\n ;\n return collides;\n }", "public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }", "void setCollisionRule(CollisionRule collisionRule);", "public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}", "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}", "public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onCollision(Model collisionModel, ColBox collisionColbox) {\n\n\t}", "@NonNull JavaBoundingBox[] collision();", "@Override\r\n public void collideEffect(Spatial s) {\n }", "@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}", "abstract public void performCollision(Ball ball);", "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "@Override\r\n\tpublic void collisionEffect(AbstractCollidable other, Vector mtv) {\r\n\t\t\r\n\t\tClass<? extends AbstractCollidable> otherClass = other.getClass();\r\n\r\n\t\tif (\t\totherClass.equals(TerrainSection.class)\r\n\t\t\t\t|| otherClass.equals(Obstacle.class)\r\n\t\t\t\t|| (otherClass.equals(Player.class) && owner != other)\r\n\t\t\t\t|| (otherClass.equals(Enemy.class) && owner != other)) {\r\n\t\t\thasCollided = true;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2, Penetration penetration) {\r\n return true;\r\n }", "boolean intersects( Geometry gmo );", "public void applyEntityCollision(Entity entityIn) {\n }", "public void addCollision(){\n if (collisionCounter == 4){\n return;\n }\n this.collisionCounter++;\n }", "public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }", "public boolean collidesWith(ICollider other);", "@Override\n\tpublic void collision(SimpleObject s) {\n\t\t\n\t}", "Rectangle getCollisionRectangle();", "Rectangle getCollisionRectangle();", "private void managePolygonCollision(Polygon polygon1, Polygon polygon2) {\n switch ( mode ) {\n case 0: default:\n polygon1.setOverlap(ConvexPolygonCollisions.shapeOverlapSAT(polygon1, polygon2));\n break;\n case 1:\n polygon1.setOverlap(ConvexPolygonCollisions.shapeOverlapStaticSAT(polygon1, polygon2));\n break;\n }\n }", "private boolean collision1() {\n return game.racket1.getBounds1().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }", "@Override\r\n\tpublic void handleCollision(Contact contact) {\n\t}", "private void collide(String typeOfCollision, Entity first, Entity second) {\n switch (typeOfCollision) {\n\n case \"playerWithWall\":\n intersectPlayerWithWall(first);\n break;\n\n case \"playerWithHazard\":\n intersectPlayerWithWall(first);\n break;\n\n case \"bulletWithWall\":\n room.getEntityManager().removeEntity(first);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(first);\n break;\n\n case \"enemyWithWall\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithBullet\":\n intersectBulletWithEnemy(first, second);\n break;\n\n case \"enemyWithEnemy\":\n intersectEnemyWithWall(first, second);\n break;\n\n case \"enemyWithPlayer\":\n NinjaEntity ninja = (NinjaEntity) second;\n ninja.setIsHit(true);\n break;\n\n case \"itemWithPlayer\":\n itemIntersectsPlayer(first);\n break;\n\n case \"swordWithEnemy\":\n intersectSwordWithEnemy(first, second);\n break;\n }\n }", "@Override\n public Rectangle intersects( Rectangle boundingBox )\n {\n return null;\n }", "public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}", "void checkCollision(Entity other);", "public void addToCollision(Entity en) {\n\t\tList<Rectangle> hitboxes = en.getHitboxes();\n\t\tfor (Rectangle hitbox: hitboxes) {\n\t\t\thitboxCollision.put(en, hitbox);\n\t\t\tareaCollision.add(hitbox);\n\t\t}\n\t}", "@Override\n\tpublic boolean collidesWithRectangle(Rectangle rectangle) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void collide(Entity e) {\n\n\t}", "public abstract void collided(CircleCollider col);", "@Test\n\tpublic void test() {\n\t\tCollisionBox cb = new CollisionBox(0,0,1,1);\n\t\tCollisionBox cb2 = new CollisionBox(1,1,1,1);\n\t\tassertEquals(false,cb.checkCollision(cb2));\n\t\t\n\t\tcb2.setPos(0, 0);\n\t\tassertEquals(true,cb.checkCollision(cb2));\n\n\t}", "protected void collidesCallback(){\n\t\tphxService.collidingCallback(this);\n\t}", "private void handleObjectCollision() {\n \tGObject obstacle = getCollidingObject();\n \t\n \tif (obstacle == null) return;\n \tif (obstacle == message) return;\n \t\n\t\tvy = -vy;\n\t\t\n\t\tSystem.out.println(\"ball x: \" + ball.getX() + \" - \" + (ball.getX() + BALL_RADIUS * 2) );\n\t\tSystem.out.println(\"paddle x: \" + paddleXPosition + \" - \" + (paddleXPosition + PADDLE_WIDTH) );\n\t\tif (obstacle == paddle) {\n\t\t\tpaddleCollisionCount++;\n\t\t\t\n\t\t\t// if we're hitting the paddle's side, we need to also bounce horizontally\n\t\t\tif (ball.getX() >= (paddleXPosition + PADDLE_WIDTH) || \n\t\t\t\t(ball.getX() + BALL_RADIUS * 2) <= paddleXPosition ) {\n\t\t\t\tvx = -vx;\t\t\t\t\n\t\t\t}\n\t\t} else {\n \t\t// if the object isn't the paddle, it's a brick\n\t\t\tremove(obstacle);\n\t\t\tnBricksRemaining--;\n\t\t}\n\t\t\n\t\tif (paddleCollisionCount == 7) {\n\t\t\tvx *= 1.1;\n\t\t}\n }", "CollisionRule getCollisionRule();", "public void checkCollision(Actor a) {\r\n\t\tif (a.equals(this))\r\n\t\t\treturn;\r\n\r\n\t\tPolygon otherPoly = a.basePoly;\r\n\t\tint distance = 1;\r\n\r\n\t\tif (otherPoly != null && basePoly != null) {\r\n\t\t\t// Calculate distance using the formula x^2 + y^2 = z^2\r\n\t\t\tint x = otherPoly.getBounds().x - basePoly.getBounds().x;\r\n\t\t\tint y = otherPoly.getBounds().y - basePoly.getBounds().y;\r\n\t\t\tdistance = (int) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\r\n\t\t}\r\n\t\tif (distance > 150 || a instanceof Particle)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < basePoly.npoints; i++) {\r\n\t\t\tif (otherPoly.contains(new Point(basePoly.xpoints[i],\r\n\t\t\t\t\tbasePoly.ypoints[i]))) {\r\n\t\t\t\tonCollision(a);\r\n\t\t\t\ta.onCollision(a);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract boolean collide(int x, int y, int z, int dim, Entity entity);", "private boolean collision2() {\n return game.racket2.getBounds2().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }", "@Override\r\n public CollisionShape getColisionShape() {\n return new BoxCollisionShape(new Vector3f(11,0.3f,11));\r\n }", "@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2) {\r\n //Default, keep processing this event\r\n\r\n return true;\r\n }", "public void unitCollision() {\n\t}", "public void checkWorldCollisions(Bounds bounds) {\n final boolean atRightBorder = getShape().getLayoutX() >= (bounds.getMaxX() - RADIUS);\n final boolean atLeftBorder = getShape().getLayoutX() <= RADIUS;\n final boolean atBottomBorder = getShape().getLayoutY() >= (bounds.getMaxY() - RADIUS);\n final boolean atTopBorder = getShape().getLayoutY() <= RADIUS;\n final double padding = 1.00;\n\n if (atRightBorder) {\n getShape().setLayoutX(bounds.getMaxX() - (RADIUS * padding));\n velX *= frictionX;\n velX *= -1;\n }\n if (atLeftBorder) {\n getShape().setLayoutX(RADIUS * padding);\n velX *= frictionX;\n velX *= -1;\n }\n if (atBottomBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(bounds.getMaxY() - (RADIUS * padding));\n }\n if (atTopBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(RADIUS * padding);\n }\n }", "@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }", "public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}", "@Override\n\tpublic boolean collides(Vector3 v) {\n\t\treturn false;\n\t}", "public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }", "public void checkCollisions(ArrayList<Collidable> other);", "private CollisionLogic() {}", "private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }", "void collisionHappened(int position);", "public void checkCollision(Box box){\r\n if(collidingEntity2!=null && collidingEntity2!=box){\r\n return;\r\n }\r\n FloatRect x = box.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity2= box;\r\n collide=true;\r\n checkTopCollision (x);\r\n if(collidedTop==false) {\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n }\r\n } else {\r\n noCollision ();\r\n }\r\n }", "private void checkCollisionGroupInternal() {\n\t\tcheckInternalCollisions();\r\n\t\t\r\n\t\t// for every composite in this Group..\r\n\t\tint clen = _composites.size();\r\n\t\tfor (int j = 0; j < clen; j++) {\r\n\t\t\t\r\n\t\t\tComposite ca = _composites.get(j);\r\n\t\t\t\r\n\t\t\t// .. vs non composite particles and constraints in this group\r\n\t\t\tca.checkCollisionsVsCollection(this);\r\n\t\t\t\r\n\t\t\t// ...vs every other composite in this Group\r\n\t\t\tfor (int i = j + 1; i < clen; i++) {\r\n\t\t\t\tComposite cb = _composites.get(i);\r\n\t\t\t\tca.checkCollisionsVsCollection(cb);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }", "public abstract boolean intersect(BoundingBox bbox);", "protected void collideOne(Mob m1, Entity m2, int dir) {\r\n // Calibrate bounding box\r\n float[] a = new float[6];\r\n a[0] = m1.getPos().x + m1.getDX() - m1.getLenX()/2;\r\n a[1] = m1.getPos().y + m1.getDY() - m1.getLenY()/2;\r\n a[2] = m1.getPos().z + m1.getDZ() - m1.getLenZ()/2;\r\n a[3] = m1.getPos().x + m1.getDX() + m1.getLenX()/2;\r\n a[4] = m1.getPos().y + m1.getDY() + m1.getLenY()/2;\r\n a[5] = m1.getPos().z + m1.getDZ() + m1.getLenZ()/2;\r\n float[] b = new float[6];\r\n b[0] = m2.getPos().x - m2.getLenX()/2;\r\n b[1] = m2.getPos().y - m2.getLenY()/2;\r\n b[2] = m2.getPos().z - m2.getLenZ()/2;\r\n b[3] = m2.getPos().x + m2.getLenX()/2;\r\n b[4] = m2.getPos().y + m2.getLenY()/2;\r\n b[5] = m2.getPos().z + m2.getLenZ()/2;\r\n // Collision detection\r\n boolean collide =\r\n overlap(a, b) || overlap(b, a);\r\n ;\r\n // Post-Collision adjustments\r\n if(collide) {\r\n if(dir == 3) {\r\n m1.setDX(m1.getDX() + (b[3] - a[0]) + 0.01f);\r\n } else if(dir == 1) {\r\n m1.setDX(m1.getDX() - (a[3] - b[0]) - 0.01f);\r\n } else if(dir == 0) {\r\n m1.setDZ(m1.getDZ() + (b[5] - a[2]) + 0.01f);\r\n } else if(dir == 2) {\r\n m1.setDZ(m1.getDZ() - (a[5] - b[2]) - 0.01f);\r\n }\r\n }\r\n }", "public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}", "public void intersections(){\n\n \tif (ball.intersect(paddle.getX(), paddle.getY(), paddle.getWidth(), paddle.getHeight())){\n\t\t\tball.bouncePaddle(paddle.getX(),paddle.getY(),paddle.getWidth(),paddle.getHeight());\n\t\t}\n\n\t\t//WHEN POWERUP HITS PADDLE\n\n\t\tfor (int i = 0; i < powerups.size(); i++){\n\t\t\tif (paddle.intersect(powerups.get(i).getX(), powerups.get(i).getY(), powerups.get(i).getWidth(), powerups.get(i).getHeight())) {\n\t\t\t\tif (powerups.get(i).getType() != 4){\n\t\t\t\t\tpaddle.setType(powerups.get(i).getType());\n\t\t\t\t}else{\n\t\t\t\t\tball.setType(1);\n\t\t\t\t}\n\t\t\t\tpowerups.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t//WHEN LASER HITS BRICK\n\n\t\tfor (int i = 0; i < lasers.size() ; i++){\n\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\n\t\t\t\tif (lasers.size() != 0 && lasers.get(i).intersect(bricks.get(j).getX(), bricks.get(j).getY(), bricks.get(j).getWidth(), bricks.get(j).getHeight())){\n\t\t\t\t\tbricks.get(j).hit(0);\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tif (i > 0){\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\t//BRICKS\n\t\tfor (int i = 0; i < bricks.size(); i++){\n\t\t\t//WHEN BALL HITS BRICK\n\t\t\tif (ball.intersect(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight())){\n\t\t\t\t\n\t\t\t\tball.bounceBrick(ball.hitOnSide(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight()));\n\t\t\t\tball.move();\n\n\n\t\t\t\tbricks.get(i).hit(ball.getType());\n\t\t\t\tif (ball.getType() == 1){\n\t\t\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\t\t\t\t\t\tif (bricks.get(j).getX() > ball.getX()-50 && bricks.get(j).getX() < ball.getX()+50){\n\t\t\t\t\t\t\tif (bricks.get(j).getY() > ball.getY()-75 && bricks.get(j).getY() < ball.getY()+75){\n\t\t\t\t\t\t\t\tbricks.get(j).hit(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tball.setType(0);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t//WHEN BRICK DIES\n\t\tfor (int i = bricks.size()-1; i>=0; i--){\n\t\t\tif (bricks.get(i).isDead()){\n\t\t\t\tif (bricks.get(i).spawnPowerup()){\n\t\t\t\t\tpowerups.add(new Powerup(bricks.get(i).getX(), bricks.get(i).getY(), paddle));\n\t\t\t\t}\n\t\t\t\tbricks.remove(i);\n\t\t\t}\n\t\t}\n\n }", "@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}", "public boolean collision(Objet o) {\r\n\t\treturn false;\r\n\t}", "Rect getCollisionShape()\n {\n return new Rect(x+2,y+2,x +(width-2), y+(height-2));\n }", "public boolean collides(Ball ball) //collision detection\n {\n if( ( position.y+height ) > ball.getPosY()-8 )\n {\n if( position.y+10 < ( ball.getPosY()-8 ) )\n {\n if(\n !((\n (ball.getPosX()-12 < ( position.x)+width ) &&\n (ball.getPosX()+12 < (position.x+width) ) &&\n (ball.getPosX()-12 < position.x ) &&\n (ball.getPosX()+12 < position.x )\n )||\n (\n (ball.getPosX()-12 > ( position.x+width )) &&\n (ball.getPosX()+12 > (position.x+width) ) &&\n (ball.getPosX()-12 > ( position.x )) &&\n (ball.getPosX()+12 > position.x )\n ))\n ){return true;}\n }\n\n }\n\n return false;\n\n /*\n if(position.y > (ball.getPosY() - 77 ) ) //should be ball.getheight\n {\n\n return Intersector.overlaps(ball.getCircle(), rect);\n }\n */\n\n }", "private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}", "public abstract void recolocarHitbox();", "private void addCollider(Collider c) {\n objects.add(c);\n }", "@Override\n\tpublic boolean collidesWith(GameObject otherObject) {\n\t\tboolean result = false;\n\t\tdouble thisCenterX = this.getX();\n\t\tdouble thisCenterY = this.getY();\n\n\t\tdouble otherCenterX = (otherObject).getX();\n\t\tdouble otherCenterY = (otherObject).getY();\n\n\t\tdouble dx = thisCenterX - otherCenterX;\n\t\tdouble dy = thisCenterY - otherCenterY;\n\n\t\tdouble distBetweenCentersSqr = (dx * dx + dy * dy);\n\n\t\tint thisRadius= this.getSize() / 2;\n\t\t\n\t\tint otherRadius;\n\t\t\n\t\tif(otherObject instanceof Base) {\n\t\t\totherRadius= (otherObject).getSize();\n\t\t}else {\n\t\t\totherRadius= (otherObject).getSize() / 2;\n\t\t}\n\n\t\tint radiiSqr= (thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius);\n\n\t\tif (distBetweenCentersSqr <= radiiSqr) { result = true ; }\n\n\t\treturn result;\n\t}", "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}", "public interface CollisionListener {\n public void collEnter(ACollider col,GameObject owner);\n public void collExit(ACollider col,GameObject owner);\n public void collStay(ACollider col,GameObject owner);\n}", "@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\n }\n }", "public void addCollidable(Group g) {\r\n\t\t _collisionList.add(g);\r\n\t}", "private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}", "public void collideBoundary(){\n\t \tint bulletBouncer = 0;\n\t \tif ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1);\n\t \t}\n\t \tif ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1);\n\t \t} \t\n\t \tif (this instanceof Bullet){\n\t \tBullet bullet = (Bullet) this;\n\t \tfor (int i = 0; i < bulletBouncer; i++){\n\t \t\tif (!bullet.isTerminated())\n\t \t\tbullet.bouncesCounter();\n\t \t}\n\t \t}\n\t }", "private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public void checkCollisions(List<Entity> listOfCloseObjects){\n\n for(Entity first : listOfCloseObjects){\n for(Entity second : listOfCloseObjects){\n if(first!=second) {\n\n String typeOfCollision = \"\";\n\n //check for a collision between the bounding boxes\n if (first.getBoundingBox().intersects(second.getBoundingBox())) {\n if(first.getEntityType().equals(EntityType.WALL) && second.getEntityType().equals(EntityType.PLAYER)) {\n typeOfCollision = \"playerWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.FLOOR_HAZARD) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"playerWithHazard\";\n }\n else if(first.getEntityType().equals(EntityType.MELEE_WEAPON) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"swordWithEnemy\";\n }\n else if(first instanceof Bullet && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"bulletWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"enemyWithWall\";\n }\n else if((first.getEntityType().equals(EntityType.DEFAULT_BULLET) || first.getEntityType().equals(EntityType.SHOTGUN_BULLET) || first.getEntityType().equals(EntityType.FAST_BULLET)) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithBullet\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithEnemy\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"enemyWithPlayer\";\n }\n else if((first.getEntityType().equals(EntityType.SWORD) || first.getEntityType().equals(EntityType.SHOTGUN) || first.getEntityType().equals(EntityType.PISTOL) || first.getEntityType().equals(EntityType.ASSAULT_RIFLE) ||\n first.getEntityType().equals(EntityType.SHIELD) || first.getEntityType().equals(EntityType.SPEEDBOOST) || first.getEntityType().equals(EntityType.HEART))\n && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"itemWithPlayer\";\n }\n\n if(!typeOfCollision.isEmpty())\n collide(typeOfCollision, first, second);\n }\n }\n }\n }\n\n }", "public static void collidePoly(Manifold manif, \n \t\tPolygonShape polyA, XForm xfA,\n PolygonShape polyB, XForm xfB) {\n\n //testbed.PTest.debugCount++;\n manif.pointCount = 0; // Fixed a problem with contacts\n MaxSeparation sepA = findMaxSeparation(polyA, xfA, polyB, xfB);\n if (sepA.bestSeparation > 0.0f) {\n return;\n }\n\n MaxSeparation sepB = findMaxSeparation(polyB, xfB, polyA, xfA);\n if (sepB.bestSeparation > 0.0f) {\n return;\n }\n\n PolygonShape poly1; // reference poly\n PolygonShape poly2; // incident poly\n XForm xf1 = new XForm();\n XForm xf2 = new XForm();\n int edge1; // reference edge\n byte flip;\n float k_relativeTol = 0.98f;\n float k_absoluteTol = 0.001f;\n\n // TODO_ERIN use \"radius\" of poly for absolute tolerance.\n if (sepB.bestSeparation > k_relativeTol * sepA.bestSeparation\n + k_absoluteTol) {\n poly1 = polyB;\n poly2 = polyA;\n xf1.set(xfB);\n \t\txf2.set(xfA);\n edge1 = sepB.bestFaceIndex;\n flip = 1;\n }\n else {\n poly1 = polyA;\n poly2 = polyB;\n xf1.set(xfA);\n \t\txf2.set(xfB);\n edge1 = sepA.bestFaceIndex;\n flip = 0;\n }\n\n ClipVertex incidentEdge[] = new ClipVertex[2];\n findIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);\n\n int count1 = poly1.m_vertexCount;\n Vec2[] vert1s = poly1.m_vertices;\n\n Vec2 v11 = vert1s[edge1];\n Vec2 v12 = edge1 + 1 < count1 ? vert1s[edge1 + 1] : vert1s[0];\n\n Vec2 sideNormal = Mat22.mul(xf1.R, v12.sub(v11));\n sideNormal.normalize();\n Vec2 frontNormal = Vec2.cross(sideNormal, 1.0f);\n\n v11 = XForm.mul(xf1, v11);\n \tv12 = XForm.mul(xf1, v12);\n\n float frontOffset = Vec2.dot(frontNormal, v11);\n float sideOffset1 = -Vec2.dot(sideNormal, v11);\n float sideOffset2 = Vec2.dot(sideNormal, v12);\n\n // Clip incident edge against extruded edge1 side edges.\n ClipVertex clipPoints1[] = new ClipVertex[2];\n ClipVertex clipPoints2[] = new ClipVertex[2];\n int np;\n\n // Clip to box side 1\n np = clipSegmentToLine(clipPoints1, incidentEdge, sideNormal.negate(), sideOffset1);\n\n if (np < 2) {\n return;\n }\n\n // Clip to negative box side 1\n np = clipSegmentToLine(clipPoints2, clipPoints1, sideNormal,\n sideOffset2);\n\n if (np < 2) {\n return;\n }\n\n // Now clipPoints2 contains the clipped points.\n manif.normal = (flip != 0) ? frontNormal.negate() : frontNormal.clone();\n\n int pointCount = 0;\n for (int i = 0; i < Settings.maxManifoldPoints; ++i) {\n float separation = Vec2.dot(frontNormal, clipPoints2[i].v)\n - frontOffset;\n\n if (separation <= 0.0f) {\n ManifoldPoint cp = manif.points[pointCount];\n cp.separation = separation;\n cp.localPoint1 = XForm.mulT(xfA, clipPoints2[i].v);\n \t\t\tcp.localPoint2 = XForm.mulT(xfB, clipPoints2[i].v);\n cp.id = new ContactID(clipPoints2[i].id);\n cp.id.features.flip = flip;\n ++pointCount;\n }\n }\n\n manif.pointCount = pointCount;\n\n return;\n }", "public static boolean collision(Bug b1, Bug b2){\n float xDiff = b1.getCenter().x - b2.getCenter().x;\n float yDiff = b1.getCenter().y - b2.getCenter().y;\n float distSqr = xDiff*xDiff + yDiff*yDiff;\n return distSqr < (b1.getRadius() + b2.getRadius()) * (b1.getRadius() + b2.getRadius());\n }", "public void update(MessageBus bus) {\n \n bus.getMessages().stream().forEach((m) -> {\n if(m.getMessage().equalsIgnoreCase(\"collider\") && !objects.contains((Collider)m.getData()))\n addCollider((Collider) m.getData());\n if(m.getMessage().equalsIgnoreCase(\"init_scene\"))\n objects.clear();\n });\n\n for (int i = 0; i < objects.size(); i++) {\n for (int j = i + 1; j < objects.size(); j++) {\n Collider c1 = objects.get(i);\n Collider c2 = objects.get(j);\n if (c1.transform.getTranslation().x < c2.transform.getTranslation().x + c2.transform.getScale().x\n && c1.transform.getTranslation().x + c1.transform.getScale().x > c2.transform.getTranslation().x\n && c1.transform.getTranslation().y < c2.transform.getTranslation().y + c2.transform.getScale().y\n && c1.transform.getScale().y + c1.transform.getTranslation().y > c2.transform.getTranslation().y) {\n\n bus.addMessage(new Message(-1, \"CollisionWorld\").setMessage(c2.name, c1));\n bus.addMessage(new Message(-1, \"CollisionWorld\").setMessage(c1.name, c2));\n }\n }\n }\n }", "public interface Collidable {\r\n\t\r\n\t/** @return {@link Rectangle} representing the Collidables bounding box. */\r\n\tpublic Rectangle getBounds();\r\n\t\r\n\t/** Should be called if a collision has occured between this Collidable and another. Typically collision involves a comparison\r\n\t * between this object and others bounding boxes.\r\n\t * @param collider Reference to the other Collider this object has collided with. */\r\n\tpublic void collision(Collidable collider);\r\n\r\n}", "public void handleCollision(ISprite collisionSprite, Collision collisionType);" ]
[ "0.68902594", "0.6712861", "0.6616847", "0.6545353", "0.65371096", "0.6452549", "0.64411193", "0.6398027", "0.6369918", "0.6343351", "0.6330849", "0.63219625", "0.62886107", "0.62537843", "0.6233612", "0.62089455", "0.62084126", "0.6205147", "0.6192625", "0.6188565", "0.6184002", "0.6161945", "0.61548144", "0.61495453", "0.61239165", "0.61103517", "0.610307", "0.6088933", "0.60814345", "0.6070302", "0.60421216", "0.6041359", "0.6011874", "0.6010312", "0.59976417", "0.59909606", "0.5980755", "0.59768605", "0.59678906", "0.5961138", "0.5961138", "0.5956394", "0.59552395", "0.59494555", "0.5940385", "0.593181", "0.5931203", "0.5929045", "0.5900082", "0.5895504", "0.5881727", "0.5872459", "0.5866557", "0.5866264", "0.5859051", "0.58452886", "0.5845188", "0.58397096", "0.5837965", "0.5820393", "0.5819473", "0.5795266", "0.5748751", "0.5747517", "0.57414925", "0.57305866", "0.57304287", "0.57264084", "0.57224584", "0.5720775", "0.5716789", "0.57145774", "0.56956106", "0.56818587", "0.5678717", "0.5643952", "0.5641281", "0.56394714", "0.563751", "0.5623359", "0.5622325", "0.56126904", "0.56066513", "0.5602823", "0.5602164", "0.55998266", "0.55928487", "0.55911994", "0.5582183", "0.5578686", "0.55779976", "0.557516", "0.55691934", "0.55619204", "0.5558698", "0.55539936", "0.5550566", "0.55418587", "0.5540609", "0.5539915" ]
0.8251752
0
processCollisions is an abstract method whose intent is the subclass defines how to process the collision data that has been collected since the last clear.
public abstract void processCollisions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processCollisions(){\n\t\tSet<String> allCollisionKeys = new HashSet<String>();\n \n\t\t// prepare a list of collisions to handle\n\t\tList<CollisionData> collisions = new ArrayList<CollisionData>();\n \n\t\tSet<Integer> types = collisionsTypes.keySet();\n \n\t\t// obtain every type for collision\n\t\tfor(Integer type : types){\n\t\t\t// obtain for each type the type it collides with\n\t\t\tList<Integer> collidesWithTypes = collisionsTypes.get(type);\n \n\t\t\tfor(Integer collidingType : collidesWithTypes){\n\t\t\t\t// if the pair was already treated ignore it else treat it\n\t\t\t\tif( !allCollisionKeys.contains(getKey(type, collidingType)) ){\n\t\t\t\t\t// obtain all object of type\n\t\t\t\t\tList<CollidableObject> collidableForType = collidables.get(type);\n\t\t\t\t\t// obtain all object of collidingtype\n\t\t\t\t\tList<CollidableObject> collidableForCollidingType = collidables.get(collidingType);\n \n\t\t\t\t\tfor( CollidableObject collidable : collidableForType ){\n\t\t\t\t\t\tfor( CollidableObject collidesWith : collidableForCollidingType ){\n\t\t\t\t\t\t\tif(collidable.isCollidingWith(collidesWith)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCollisionData cd = new CollisionData();\n\t\t\t\t\t\t\t\tcd.handler = collisionHandlers.get(getKey(type, collidingType));\n\t\t\t\t\t\t\t\tcd.object1 = collidable;\n\t\t\t\t\t\t\t\tcd.object2 = collidesWith;\n \n\t\t\t\t\t\t\t\tcollisions.add(cd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tallCollisionKeys.add(getKey(type, collidingType));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n \n\t\tfor(CollisionData cd : collisions){\n\t\t\tcd.handler.performCollision(cd.object1, cd.object2);\n \n\t\t}\n\t\t\n//\t System.out.println(\"unsorted map\");\n//\t for (String key : collisionHandlers.keySet()) {\n//\t System.out.println(\"key/value: \" + key + \"/\"+collisionHandlers.get(key));\n//\t }\n\t}", "private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}", "public void preCalculateCollisions(){\n for(int i = 0; i < ALL_POSSIBLE_STATES.length; i++){\n collisions[i] = new StateMapEntry();\n collisions[i].incomingState = ALL_POSSIBLE_STATES[i];\n collisions[i].resultingState = calculateAllPossibleOutboundStates(ALL_POSSIBLE_STATES[i], ALL_POSSIBLE_STATES);\n //collisions[i].print();\n }\n }", "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}", "public abstract void collided(Collision c);", "private void checkCollisionGroupInternal() {\n\t\tcheckInternalCollisions();\r\n\t\t\r\n\t\t// for every composite in this Group..\r\n\t\tint clen = _composites.size();\r\n\t\tfor (int j = 0; j < clen; j++) {\r\n\t\t\t\r\n\t\t\tComposite ca = _composites.get(j);\r\n\t\t\t\r\n\t\t\t// .. vs non composite particles and constraints in this group\r\n\t\t\tca.checkCollisionsVsCollection(this);\r\n\t\t\t\r\n\t\t\t// ...vs every other composite in this Group\r\n\t\t\tfor (int i = j + 1; i < clen; i++) {\r\n\t\t\t\tComposite cb = _composites.get(i);\r\n\t\t\t\tca.checkCollisionsVsCollection(cb);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void handleCollision(Collision c);", "@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}", "public int checkCollisions() {\r\n\t\tArrayList<Comet> comets = Comet.getCometList();\r\n\r\n\t\tfor (int i = 0; i < comets.size(); i++) {\r\n\t\t\tComet tempComet = comets.get(i);\r\n\r\n\t\t\tif (getBounds().intersects(tempComet.getBounds())) {\r\n\t\t\t\tComet.removeComet(tempComet);\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}", "private void collisionsCheck() {\n\t\tif(this.fence.collisionTest(\n\t\t\t\tthis.spider.getMovementVector())) \n\t\t{\n\t\t\t// we actually hit something!\n\t\t\t// call collision handlers\n\t\t\tthis.spider.collisionHandler();\n\t\t\tthis.fence.collisionHandler();\n\t\t\t// vibrate!\n\t\t\tvibrator.vibrate(Customization.VIBRATION_PERIOD);\n\t\t\t// lose one life\n\t\t\tthis.data.lostLife();\n\t\t}\n\t}", "public void collision() {\n\t\tcapacity = 0;\n\t\tcolor = ColorUtil.YELLOW;\n\t}", "private void processLaserCollisions() {\n\t\tList<AsteroidsAsteroid> asteroidList = new ArrayList<AsteroidsAsteroid>(asteroids);\n\t\tfor (AsteroidsAsteroid a : asteroidList) {\n\t\t\tList<AsteroidsLaser> laserList = new ArrayList<AsteroidsLaser>(laserShots);\n\t\t\tfor (AsteroidsLaser l : laserList) {\n\t\t\t\t// If the laser is colliding with the asteroid.\n\t\t\t\tif (a.collides(l.getGlobalPositionVector())) {\n\t\t\t\t\t// We add to the score.\n\t\t\t\t\tscore += a.getRadius() * a.getRadius() * 100;\n\t\t\t\t\t// Update the score text.\n\t\t\t\t\tupdateScore();\n\t\t\t\t\t// Create an explosion at the asteroid.\n\t\t\t\t\tcreateAsteroidExplosion(a);\n\t\t\t\t\t// And delete the two objects.\n\t\t\t\t\tdeleteAsteroid(a);\n\t\t\t\t\tdeleteLaser(l);\n\t\t\t\t\t// We also stop checking this asteroid.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void updateCollisions() {\n\n\t\tfor(Sprite sprite : level.sprites()) {\n\t\t\tlevel.sprites().stream().forEach(sprite2 -> handleCollisions(sprite, sprite2));\n\t\t}\n\n\t}", "public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }", "public abstract void onCollision();", "public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onCollision(Entity collidedEntity)\n\t{\n\t\t\n\t}", "protected void collidesCallback(){\n\t\tphxService.collidingCallback(this);\n\t}", "private void managePolygonsCollisions() {\n for ( int m = 0; m < polygons.size(); m++ ) {\n for ( int n = m + 1; n < polygons.size(); n++ ) {\n managePolygonCollision(polygons.get(m), polygons.get(n));\n }\n }\n }", "public void checkCollision() {}", "public void updateOptimalCollisionArea();", "@Override\r\n\tpublic void handleCollision(Contact contact) {\n\t}", "private synchronized void checkCollisions() {\n // I'm note sure whether this function is needed. \n // This code could go in do Collisions()\n // It was sort of painfull to make this work and I ended up making a mess\n // so this architecture may have good changes of improvement.\n //\n goCheckCollisions = true;\n isThreadLoopDone = false;\n notifyAll();\n while (!isThreadLoopDone) {\n try {\n wait();\n } catch (InterruptedException ex) {}\n }\n }", "private void checkCastleCollisions() {\n\t\t\n\t}", "public abstract void collision(SpaceThing thing);", "@Model\n\tprotected List<List<List<Object>>> getCollisions() {\n\t\tif(getWorld() != null)\n\t\t\treturn getWorld().collisionDetect(this, 0, 0);\n\t\telse\n\t\t\treturn new ArrayList<List<List<Object>>>(\n\t\t\t\t\t\t\tCollections.nCopies(4, Collections.nCopies(2, new ArrayList<Object>())));\n\t}", "public void checkCollisions(ArrayList<Collidable> other);", "public void checkCollisions() {\n\t\t List<Missile> missiles = player.getMissiles();\n\t\t for(Missile n : missiles) {\n\t\t\t Rectangle r1 = n.getBounds();\n\t\t\t for(Mushroom mush : mushrooms) {\n\t\t\t\t Rectangle r2 = mush.getBounds();\n\t\t\t\t r2.x += 8;\n\t\t\t\t if(r1.intersects(r2)) {\n\t\t\t\t\t mush.hitCnt += 1;\n\t\t\t\t\t if(mush.hitCnt == 3) {\n\t\t\t\t\t\t score += 5;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t\t mush.setVisible(false);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t score += 1;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Missile hits Centipede\n\t\t //missiles = player.getMissiles();\n\t\t for(Missile m: missiles) {\n\t\t\t Rectangle rm = m.getBounds();\n\t\t\t for(int i = 0; i < centipede.size(); i++) {\n\t\t\t\t Segment s = centipede.get(i);\n\t\t\t\t Rectangle rs = s.getBounds();\n\t\t\t\t if(rs.intersects(rm)) {\n\t\t\t\t\ts.hit();\n\t\t\t\t\tscore = (s.hitCnt < 2 ? score +2 : score + 0);\n\t\t\t\t\tif(s.hitCnt == 2){\n\t\t\t\t\t\t//split centipede\n\t\t\t\t\t\tscore += 5;\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t\tcentipede.remove(i);\n\t\t\t\t\t\t//mushrooms.add(new Mushroom(s.getX(), s.getY()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if missile hits spider\n\t\t missiles = player.getMissiles();\n\t\t for(Missile m : missiles) {\n\t\t\t Rectangle mBound = m.getBounds();\n\t\t\t Rectangle spiderBound = spider.getBounds();\n\t\t\t if(mBound.intersects(spiderBound)) {\n\t\t\t\t spiderHitCnt += 1;\n\t\t\t\t if(spiderHitCnt == 2) {\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t\t spider.setVisible(false);\n\t\t\t\t\t score += 600;\n\t\t\t\t } else {\n\t\t\t\t\t score += 100;\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if centipede hits mushroom\n\t\t for(Segment c : centipede) {\n\t\t\t Rectangle cB = c.getBounds();\n\t\t\t for(Mushroom m: mushrooms) {\n\t\t\t\t Rectangle mB = new Rectangle(m.getX(), m.getY() + 5, m.getWidth(), m.getHeight() - 10);\n\t\t\t\t mB.y += 3;\n\t\t\t\t if(cB.intersects(mB)) {\n\t\t\t\t\t//makes each segment to go downs\n\t\t\t\t\tc.y += 16;\n\t\t\t\t\tc.dx = -c.dx;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Centipede hits Player\n\t\t Rectangle playerBounds = player.getBounds();\n\t\t for(Segment s : centipede) {\n\t\t\t Rectangle sB = s.getBounds();\n\t\t\t if(playerBounds.intersects(sB)) {\n\t\t\t\t playerLives -= 1;\n\t\t\t\t playerHitCnt += 1;\n\t\t\t\t if(playerHitCnt > MAX_HIT_COUNT) {\n\t\t\t\t\t// System.out.println(playerLives+\" \"+ x);\n\t\t\t\t\t player.setVisible(false);\n\t\t\t\t\t inGame = false;\n\t\t\t\t }else {\n\t\t\t\t\t\tplayer.x = 707;\n\t\t\t\t\t\tplayer.y = 708;\n\t\t\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\t\t\tplayer = new Player(300, 400);\n\t\t\t\t\t\tregenMushrooms();\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\n\t\t //check if Spider hits Player\n\t\t playerBounds = player.getBounds();\n\t\t Rectangle spiderBounds = spider.getBounds();\n\t\t if(spiderBounds.intersects(playerBounds)) {\n\t\t\tplayerLives -= 1;\n\t\t\tplayerHitCnt += 1;\n\t\t\tif(playerLives > MAX_HIT_COUNT) {\n\t\t\t\t//System.out.println(playerLives+\" \"+ y);\n\t\t\t\tplayer.setVisible(false);\n\t\t\t\tspider.setVisible(false);\n\t\t\t}else {\n\t\t\t\tregenMushrooms();\n\t\t\t\tcentipede.clear();\n\t\t\t\tcreateCentipede();\n\t\t\t\tplayer.x = 707;\n\t\t\t\tplayer.y = 708;\n\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\tplayer = new Player(300, 400);\n\t\t\t}\n\t\t}\n\t }", "private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "public void collisionVS() {\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).tick();\n\n if (enemyBullets.get(i).getImgY() >= 750 || enemyBullets.get(i).getImgY() <= 40) {\n\n enemyBullets.get(i).bulletImage.delete();\n enemyBullets.remove(enemyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(enemyBullets.get(i).getHitbox())) {\n\n spaceShips.get(j).hit();\n enemyBullets.get(i).hit();\n enemyBullets.remove(enemyBullets.get(i));\n\n if (spaceShips.get(j).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(j));\n }\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n\n // SPACESHIPS WITH ENEMIES AND ENEMY BULLETS\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).tick();\n\n // WITH ENEMIES\n for (int j = 0; j < enemies.size(); j++) {\n if (spaceShips.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n spaceShips.get(i).hit();\n enemies.get(j).hit(20);\n enemies.remove(enemies.get(j));\n\n if (spaceShips.get(i).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(i));\n }\n\n //if it collides with one leave the for loop\n j = enemies.size();\n }\n }\n }\n }", "void collisionHappened(int position);", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public void udpateManifolds(){\n\t\tIterator<Manifold> iter = sManifolds.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tManifold man = iter.next();\n\t\t\tif(!man.update())\n\t\t\t\titer.remove();\t // Remove finished collision\n\t\t\telse\n\t\t\t\tcalCollision(man); // Calculate the collision\t\n\t\t}\n\t}", "public void addCollision(){\n if (collisionCounter == 4){\n return;\n }\n this.collisionCounter++;\n }", "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "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 void checkCollision() {\n\t\tfor(SolidObject i : solidObjects) {\r\n\t\t\tif(getBounds().intersects(i.getBounds())) {\r\n\t\t\t\t//Increments the KillCount\r\n\t\t\t\tif(i.onAttack(damage, flipped)) {\r\n\t\t\t\t\tkillCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void handleCollision(ISprite collisionSprite, Collision collisionType);", "private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }", "private void handleCollisions(Sprite sprite1, Sprite sprite2){\n\t\tif(!sprite1.isActive() || !sprite2.isActive()) return;\n\n\t\tif(sprite1.equals(sprite2)){\n\t\t\treturn;\n\t\t}\n\n\t\tBounds boundsSprite1 = renderSprite(sprite1).getChildren().get(0).getBoundsInParent();\n\t\tBounds boundsSprite2 = (renderSprite(sprite2).getChildren().get(0).getBoundsInParent());\n\n\t\tif(boundsSprite1.intersects(boundsSprite2)) {\n\t\t\tcollisionHandler.handleCollide(sprite1, sprite2);\n\t\t}\n\n\t}", "public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "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}", "private void checkCollisions() {\n // First check collisions between bullets and other objects.\n this.game.getBullets().forEach(bullet -> {\n this.game.getAsteroids().forEach(asteroid -> { // Check collision with any of the asteroids.\n if (asteroid.collides(bullet)) {\n asteroid.destroy();\n bullet.destroy();\n }\n });\n for (Spaceship ship : game.getPlayers().values()) {\n\n if (ship.collides(bullet)) { // Check collision with ship.\n bullet.destroy();\n ship.destroy();\n }\n }\n });\n // Next check for collisions between asteroids and the spaceship.\n this.game.getAsteroids().forEach(asteroid -> {\n for (Spaceship ship : game.getPlayers().values()) {\n\n if (asteroid.collides(ship)) {\n ship.destroy();\n asteroid.destroy();\n }\n }\n if (KESSLER_SYNDROME) { // Only check for asteroid - asteroid collisions if we allow kessler syndrome.\n this.game.getAsteroids().forEach(secondAsteroid -> {\n if (!asteroid.equals(secondAsteroid) && asteroid.collides(secondAsteroid)) {\n asteroid.destroy();\n secondAsteroid.destroy();\n }\n });\n }\n });\n }", "public void collisionCalculation(ArrayList<GameObject> gameobject, int elementcheck ) {\n\r\n _solid_Object_Detected = false;\r\n _total_Objects_Collided = 0;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++)\r\n {\r\n\r\n if(i != elementcheck)\r\n {\r\n //Set the object equal to\r\n\r\n\r\n switch (gameobject.get(i).getObjectType())\r\n {\r\n case Static.PLAYER:\r\n case Static.FIREBALL:\r\n case Static.FLOATINGICEBLOCK:\r\n case Static.BLUEFIREBALL:\r\n case Static.ENERGYICESPHERE:\r\n case Static.BALLISTICMETALBOX:\r\n case Static.EXTRAHITBOX:\r\n //gameobject.get(i).eventFlags();\r\n //break;\r\n _omega_Array = gameobject.get(i).getCollisionDetailsArray();\r\n object_State_2D = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8]);\r\n\r\n\r\n\r\n //Nested Collisions for special object with controlled children\r\n switch(_alpha_Array[1])\r\n {\r\n //Players detect children objects\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n //Player can detect the children of all object listed below.\r\n case Static.BALLISTICMETALBOX:\r\n\r\n if(_total_Objects_Collided <= _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.set(_total_Objects_Collided, gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n else if(_total_Objects_Collided > _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.add(gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n\r\n\r\n //Retest the collision status with all the children\r\n for (int z = 0; z <_jagged_Super_Int_Array.size();z++)\r\n {\r\n int lenghtofarray = _jagged_Super_Int_Array.get(_total_Objects_Collided).length;\r\n for(int y = 0; y < lenghtofarray ; y++)\r\n {\r\n int _child_object_state;\r\n _child_Omega_Array = _jagged_Super_Int_Array.get(z)[y];\r\n\r\n\r\n _child_object_state = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _child_Omega_Array[5], _child_Omega_Array[6], _child_Omega_Array[7], _child_Omega_Array[8]);\r\n _jagged_Super_Int_Array.get(_total_Objects_Collided)[y][0] = _child_object_state;\r\n\r\n\r\n\r\n\r\n }\r\n\r\n }\r\n _children_Object_Detected = true;\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n //Solid object detector\r\n switch(_alpha_Array[1])\r\n {\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n case Static.FLOATINGICEBLOCK:\r\n if (_total_Objects_Collided <= _jagged_Boolean_Array.size() - 1) {\r\n _jagged_Boolean_Array.set(_total_Objects_Collided, _global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n else if (_total_Objects_Collided > _jagged_Boolean_Array.size() - 1)\r\n {\r\n _jagged_Boolean_Array.add(_global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n _solid_Object_Detected = true;\r\n break;\r\n case Static.FIREBALL:\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n switch (object_State_2D)\r\n {\r\n case Static.COLLISION_2D_PIERCE:\r\n case Static.COLLISION_2D_TOUCH:\r\n\r\n if(_total_Objects_Collided <= _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.set(_total_Objects_Collided, gameobject.get(i).getCollisionDetailsArray());\r\n\r\n }\r\n else if(_total_Objects_Collided > _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.add(gameobject.get(i).getCollisionDetailsArray());\r\n }\r\n _jagged_Array.get(_total_Objects_Collided)[0] = object_State_2D;\r\n\r\n _total_Objects_Collided++;\r\n\r\n break;\r\n case Static.MIDAIR:\r\n break;\r\n }\r\n break;\r\n\r\n }\r\n }\r\n }\r\n\r\n //if (_total_Objects_Collided == 0) {\r\n // _jagged_Array = null;\r\n //}\r\n }", "public void noCollision(){\r\n this.collidingEntity2=null;\r\n this.collidingEntity=null;\r\n collidedTop=false;\r\n collide=false;\r\n }", "public void tick() {\n if (!isActive || !entities[0].canCollide || !entities[1].canCollide) {\n return;\n }\n\n rectangles[0].x = boundaries[0].x - 1;\n rectangles[1].x = boundaries[1].x - 1;\n rectangles[0].y = boundaries[0].y - 1;\n rectangles[1].y = boundaries[1].y - 1;\n\n isCollided = rectangles[0].intersects(rectangles[1]);\n\n if (isCollided && !firedEvent) {\n lastEvent = new EntityEntityCollisionEvent(this);\n onCollide();\n start(lastEvent);\n firedEvent = true;\n }\n if (!isCollided && firedEvent) {\n onCollisionEnd();\n end(lastEvent);\n firedEvent = false;\n }\n if (previouslyCollided != isCollided) {\n setBoundaryColors();\n }\n\n previouslyCollided = isCollided;\n }", "@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\n }\n }", "private void checkCollisions(float deltaTime) {\n\t\tcheckRegTileCollisions(deltaTime);\n\t\tcheckSpikeCollisions();\n\t\tcheckMineralCollisions();\n\t\tcheckCheckpointCollisions();\n\t\tcheckEFlagCollisions();\n\t}", "private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }", "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "void setCollisionRule(CollisionRule collisionRule);", "public void tick()\n\t{\n\t\tgameTime++;\n\t\tif(gameTime == 1)\n\t\t\taddPlayerShip();\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif (current instanceof Imovable)\n\t\t\t\t((MovableObject)current).move(fps);\n\t\t\tif (current instanceof SpaceStation)\n\t\t\t\t((SpaceStation)current).checkBlink(gameTime);\n\t\t\tif(current instanceof Missile)\n\t\t\t\tif(((Missile) current).getFuel() <= 0)\n\t\t\t\t\titer.remove();\n\t\t}\n\t\t\n\t\t//Identify collision\n\t\titer = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tICollider curObj = (ICollider)iter.getNext();\n\t\t\t\n\t\t\tIIterator iter2 = gameObj.getIterator();\n\t\t\twhile(iter2.hasNext())\n\t\t\t{\n\t\t\t\tICollider otherObj = (ICollider)iter2.getNext();\n\t\t\t\tif(otherObj != curObj)\n\t\t\t\t\tif(curObj.collidesWith(otherObj))\n\t\t\t\t\t\tif (curObj instanceof PlayerShip)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcollisionVectorPS.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorPS.add(otherObj);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(curObj instanceof NonPlayerShip)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcollisionVectorNPS.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorNPS.add(otherObj);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(curObj instanceof Asteroid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(collisionVectorAsteroid.isEmpty())\n\t\t\t\t\t\t\t\tcollisionVectorAsteroid.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorAsteroid.add(otherObj);\t\t\t\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Handle Collisions for playership\n\t\tif(!collisionVectorPS.isEmpty())\n\t\t{\n\t\t\t//return iterator for collion vector\n\t\t\tIterator<ICollider> psIterator = collisionVectorPS.iterator();\n\t\t\tICollider ship = collisionVectorPS.elementAt(0);\n\t\t\twhile(psIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = psIterator.next();\n\t\t\t\tif(curObj != ship)\n\t\t\t\t\tship.handleCollision(curObj);\n\t\t\t\t\n\t\t\t\t//if an asteroid is detected\n\t\t\t\tif(curObj instanceof Asteroid)\n\t\t\t\t\tcrashAsteroidPS(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\t//if an enemy missile is detected\n\t\t\t\telse if(curObj instanceof Missile && ((Missile)curObj).isEnemy())\n\t\t\t\t\tPSShot(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\t//if a non player ship is detected\n\t\t\t\telse if(curObj instanceof NonPlayerShip)\n\t\t\t\t\tthis.crashNPS(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\telse if(curObj instanceof SpaceStation)\n\t\t\t\t\tthis.refillMissiles(psIterator,curObj,ship);\n\t\t\t}\n\t\t\t//clear the collision vector and spawn a new ship\n\t\t\tcollisionVectorPS.clear();\n\t\t\t\n\t\t}\n\t\tif(!collisionVectorNPS.isEmpty())\n\t\t{\n\t\t\t//return iterator for collion vector\n\t\t\tIterator<ICollider> npsIterator = collisionVectorNPS.iterator();\n\t\t\tICollider nps = collisionVectorNPS.elementAt(0);\n\t\t\twhile(npsIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = npsIterator.next();\n\t\t\t\tif(curObj != nps)\n\t\t\t\t\tnps.handleCollision(curObj);\n\t\t\t\tif(curObj instanceof Missile && !((Missile)curObj).isEnemy())\n\t\t\t\t\tthis.NPSShot(npsIterator,curObj,nps);\n\t\t\t\telse if(curObj instanceof Asteroid)\n\t\t\t\t\tthis.crashAsteroidNPS(npsIterator,curObj,nps);\n\t\t\t\telse if(curObj instanceof SpaceStation)\n\t\t\t\t\tthis.refillMissiles(npsIterator,curObj,nps);\n\t\t\t}\n\t\t\tcollisionVectorNPS.clear();\n\t\t}\n\t\tif(!collisionVectorAsteroid.isEmpty())\n\t\t{\n\t\t\tIterator<ICollider> astIterator = collisionVectorAsteroid.iterator();\n\t\t\tICollider ast = collisionVectorAsteroid.elementAt(0);\n\t\t\twhile(astIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = astIterator.next();\n\t\t\t\tif(curObj != ast)\n\t\t\t\t\tast.handleCollision(curObj);\n\t\t\t\tif(curObj instanceof Missile && !((Missile)curObj).isEnemy())\n\t\t\t\t\tthis.asteroidShot(astIterator,curObj,ast);\n\t\t\t\telse if(curObj instanceof Asteroid && curObj != ast)\n\t\t\t\t\tthis.asteroidCol(astIterator,curObj,ast);\n\t\t\t}\n\t\t\tcollisionVectorAsteroid.clear();\n\t\t}\n\t\t//delete collided objects\n\t\tIterator<ICollider> trashIterator = trash.iterator();\n\t\twhile (trashIterator.hasNext())\n\t\t{\n\t\t\tICollider curObj = trashIterator.next();\n\t\t\tremove(curObj);\n\t\t}\n\t\tnotifyObservers();\n\t}", "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}", "private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }", "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}", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "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 }", "public void tick() {\n \t\t// Iterate over objects in the world.\n \t\tIterator<PhysicalObject> itr = myObjects.iterator();\n \t\n \t\tList<PhysicalObject> children = new LinkedList<PhysicalObject>();\n \t\t\n \t\twhile (itr.hasNext()) {\n \t\t\tCollidableObject obj = itr.next();\n \n \t\t\t// Apply forces\n \t\t\tfor (Force force : myForces) {\n \t\t\t\tforce.applyForceTo((PhysicalObject) obj);\n \t\t\t}\n \t\t\t\n \t\t\t// Update the object's state.\n \t\t\tobj.updateState(1f / UPDATE_RATE);\n \t\t\t\n \t\t\t// Spawn new objects?\n \t\t\tList<PhysicalObject> newChildren =\n \t\t\t\t((PhysicalObject) obj).spawnChildren(1f / UPDATE_RATE);\n \t\t\t\n \t\t\tif (newChildren != null) {\n \t\t\t\tchildren.addAll(newChildren);\n \t\t\t}\n \t\t}\n \t\t\n \t\t/*\n \t\t In the \"tick\" method of your application, rather than call the old form of \n \t\t resolveCollisions to completely handle a collision, you can now:\n \t\t \n \t\t \t1.Directly call CollisionDetector.calculateCollisions to receive an\n \t\t\t ArrayList<CollisionInfo> object.\n \t\t\t2.If the list is empty, then there is no collision between the pair\n \t\t\t of objects and nothing further need be done.\n \t\t\t3.If the list is not empty, then a collision has occurred and you can\n \t\t\t check whether the objects involved necessitate a transmission or a standard\n \t\t\t collision resolution (a.k.a. bounce).\n \t\t\t4.If a standard collision resolution is called for, use the new form of\n \t\t\t resolveCollisions to pass in the ArrayList<CollisionInfo> object.\n \t\t\t \n \t\t The goal of this change is to prevent the computationally expensive \n \t\t collision detection algorithm from being executed twice when objects collide.\n \t\t */\n \n \t\tfor (int i = 0; i < myObjects.size() - 1; i++) {\n \t\t\tfor (int j = i + 1; j < myObjects.size(); j++) {\n \t\t\t\tArrayList<CollisionInfo> collisions = \n \t\t\t\t\tCollisionDetector.calculateCollisions(myObjects.get(i), myObjects.get(j));\n \t\t\t\t\n \t\t\t\tif (collisions.size() > 0) {\n \t\t\t\t\tHalfSpace hs = null;\n \t\t\t\t\tPhysicalObject o = null;\n \t\t\t\t\t\n \t\t\t\t\tif (myObjects.get(i) instanceof HalfSpace) {\n \t\t\t\t\t\t// If i is a halfspace, j must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(i);\n \t\t\t\t\t\to = myObjects.get(j);\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t} else if (myObjects.get(j) instanceof HalfSpace) {\n \t\t\t\t\t\t// If j is a halfspace, i must be an object\n \t\t\t\t\t\ths = (HalfSpace) myObjects.get(j);\n \t\t\t\t\t\to = myObjects.get(i);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Was there a halfspace involved? If so, was it a side?\n\t\t\t\t\tif (hs != null && hs.normal.y != 1 && hs.normal.y != -1 && myPeer.getPeerSize() > 0) {\n \t\t\t\t\t\t// Side collision, is there a peer?\n \t\t\t\t\t\tPeerInformation peer = myPeer.getPeerInDirection(o.getVelocity().x, -o.getVelocity().z);\n \t\t\t\t\t\t\n \t\t\t\t\t\tif (peer != null) {\n \t\t\t\t\t\t\to.switchX();\n \t\t\t\t\t\t\to.switchZ();\n \t\t\t\t\t\t\tmyPeer.sendPayloadToPeer(peer, o);\n \t\t\t\t\t\t\to.detach();\n \t\t\t\t\t\t\tmyObjects.remove(o);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Moving on\n \t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Collision as usual...\n \t\t\t\t\tmyObjects.get(i).resolveCollisions(myObjects.get(j), collisions);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// Add new children to the world.\n \t\tfor (PhysicalObject obj : children) {\n \t\t\tmyScene.addChild(obj.getGroup());\n \t\t}\n \t\t\n \t\tmyObjects.addAll(children);\n \t}", "public abstract boolean collisionWith(CollisionObject obj);", "private void processUnprocessed()\n {\n List<Geometry> unprocAdds;\n myUnprocessedGeometryLock.lock();\n try\n {\n // Processing the unprocessed geometries may result in them being\n // added back to one of the unprocessed maps, so create a clean set\n // of maps for them to be added to.\n if (myUnprocessedAdds.isEmpty())\n {\n unprocAdds = null;\n }\n else\n {\n unprocAdds = myUnprocessedAdds;\n myUnprocessedAdds = New.list();\n }\n }\n finally\n {\n myUnprocessedGeometryLock.unlock();\n }\n\n if (unprocAdds != null)\n {\n distributeGeometries(unprocAdds, Collections.<Geometry>emptyList());\n }\n }", "@Override\n\tpublic int numOfCollisions() {\n\n\t\treturn this.collision;\n\t}", "@NonNull JavaBoundingBox[] collision();", "public void collision(Collidable collider);", "List<ECollisionType> getCollisions(Long id, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);", "@Override\n\tpublic void handleCollision(GameObject otherObject) {\n\t\tif(otherObject instanceof Drone) {\n\t\t\tSystem.out.println(\"PlayerCyborg collided with a Drone cause 1 damage\\n\");\n\t\t\tthis.setDamageLevel(this.getDamageLevel()+1);\n\t\t}\n\t\telse if(otherObject instanceof NonPlayerCyborg) {\n\t\t\tSystem.out.println(\"PlayerCyborg collided with another cyborg cause 2 damage\\n\");\n\t\t\tthis.setDamageLevel(this.getDamageLevel()+2);\n\t\t}\n\t\telse if(otherObject instanceof Base) {\n\t\t\tint BaseID = ((Base) otherObject).getBaseID();\n\t\t\tif(this.getLastBaseReached()+1 == BaseID){\n\t\t\t\tint newBaseID = this.getLastBaseReached()+1;\n\t\t\t\tthis.setLastBaseReached(newBaseID);\n\t\t\t\tif(this.getLastBaseReached()+1 < 4){\n\t\t\t\t\tSystem.out.println(\"PlayerCyborg reach to base \" + newBaseID + \"\\n\");\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Please collide base in sequential!\\n\" + \n\t\t\t\t\t\t \"The next sequential is \" + (this.getLastBaseReached()+1) + \"\\n\");\n\t\t\t}\n\t\t}\n\t\telse if(otherObject instanceof EnergyStation) {\n\t\t\tif(((EnergyStation) otherObject).getCapacity()!=0) {\n\t\t\t\tint beforeRuel = this.getEnergyLevel();\n\t\t\t\tif(this.getEnergyLevel()+((EnergyStation) otherObject).getCapacity()<this.getMaxEnergyLevel()) {\n\t\t\t\t\tthis.setEnergyLevel(this.getEnergyLevel()+((EnergyStation) otherObject).getCapacity());\n\t\t\t\t}else {\n\t\t\t\t\tthis.setEnergyLevel(this.getMaxEnergyLevel()); //over fuel the Energy\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"PlayerCyborg collided with a EnergyStation refuel \" + Math.abs(this.getEnergyLevel()-beforeRuel) + \" Energy\\n\");\n\t\t\t}\n\t\t}\n\t}", "private CollisionLogic() {}", "private void setCollision(){\n\t\tMapObjects mapObjects = map.getLayers().get(\"COLLISION\").getObjects();\n\t\tfor (int ii = 0; ii < mapObjects.getCount(); ++ii){\n\t\t\tRectangleMapObject rectangle_map_object = (RectangleMapObject) mapObjects.get(ii);\n\t\t\tareaCollision.add(new Rectangle(rectangle_map_object.getRectangle()));\n\t\t}\n\t}", "public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }", "private void handleObjectCollision() {\n \tGObject obstacle = getCollidingObject();\n \t\n \tif (obstacle == null) return;\n \tif (obstacle == message) return;\n \t\n\t\tvy = -vy;\n\t\t\n\t\tSystem.out.println(\"ball x: \" + ball.getX() + \" - \" + (ball.getX() + BALL_RADIUS * 2) );\n\t\tSystem.out.println(\"paddle x: \" + paddleXPosition + \" - \" + (paddleXPosition + PADDLE_WIDTH) );\n\t\tif (obstacle == paddle) {\n\t\t\tpaddleCollisionCount++;\n\t\t\t\n\t\t\t// if we're hitting the paddle's side, we need to also bounce horizontally\n\t\t\tif (ball.getX() >= (paddleXPosition + PADDLE_WIDTH) || \n\t\t\t\t(ball.getX() + BALL_RADIUS * 2) <= paddleXPosition ) {\n\t\t\t\tvx = -vx;\t\t\t\t\n\t\t\t}\n\t\t} else {\n \t\t// if the object isn't the paddle, it's a brick\n\t\t\tremove(obstacle);\n\t\t\tnBricksRemaining--;\n\t\t}\n\t\t\n\t\tif (paddleCollisionCount == 7) {\n\t\t\tvx *= 1.1;\n\t\t}\n }", "@Override\n\tprotected void collideEnd(Node node) {\n\n\t}", "public void collideBoundary(){\n\t \tint bulletBouncer = 0;\n\t \tif ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1);\n\t \t}\n\t \tif ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1);\n\t \t} \t\n\t \tif (this instanceof Bullet){\n\t \tBullet bullet = (Bullet) this;\n\t \tfor (int i = 0; i < bulletBouncer; i++){\n\t \t\tif (!bullet.isTerminated())\n\t \t\tbullet.bouncesCounter();\n\t \t}\n\t \t}\n\t }", "protected void collisionHandleFeature(List<List<List<Object>>> collisions, double time) {\n\t\t\n\t\tboolean touched_air = false;\n\t\tboolean touched_water = false;\n\t\tboolean touched_magma = false;\n\t\t\n\t\tfor(int i = 0; i < collisions.size(); i++) {\n\t\t\tArrayList<Object> collision_features = (ArrayList<Object>) collisions.get(i).get(1);\n\t\t\n\t\t\tif ((collision_features.contains(Feature.air)) && !(touched_air)) {\n\t\t\t\tcollisionHandleAir(time);\n\t\t\t\tif (getWorld() == null) return;\n\t\t\t\ttouched_air = true;\n\t\t\t}\n\t\t\tif ((collision_features.contains(Feature.water)) && !(touched_water)) {\n\t\t\t\tcollisionHandleWater(time);\n\t\t\t\tif (getWorld() == null) return;\n\t\t\t\ttouched_water = true;\n\t\t\t}\n\t\t\tif ((collision_features.contains(Feature.magma)) && !(touched_magma)) {\n\t\t\t\tcollisionHandleMagma(time);\n\t\t\t\tif (getWorld() == null) return;\n\t\t\t\ttouched_magma = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!(touched_air)) setTimeInAir(0);\n\t\tif (!(touched_water)) setTimeInWater(0);\n\t\tif (!(touched_magma)) setTimeInMagma(0);\n\t\t\n\t}", "public List<Object> validateCollisions()\n {\n List<Object> collisions = new ArrayList<Object>();\n\n // collision with any other treatments\n List<DietTreatmentBO> treatments = _dietTreatment.getPatient()\n .getTreatments();\n for (DietTreatmentBO other : treatments)\n {\n if (other.equals(_dietTreatment)) continue;\n if (isCollision(_dietTreatment.getStart(), _dietTreatment.getEnd(),\n other.getStart(), other.getEnd()))\n {\n collisions.add(other);\n }\n }\n\n return collisions;\n }", "public void detectCollisions() {\r\n\r\n for (int pos = 0; pos < this.numberOfBees; pos++) {\r\n if (!beesArray[pos].isInCollisionRisk()) {\r\n int i = beesArray[pos].getI();\r\n int j = beesArray[pos].getJ();\r\n int k = beesArray[pos].getK();\r\n for (int x = (i - offset); x <= (i + offset); x++) {\r\n for (int y = (j - offset); y <= (j + offset); y++) {\r\n for (int z = (k - offset); z <= (k + offset); z++) {\r\n if (x == i && y == j && z == k || (Math.abs(i - j) == 0) || Math.abs(i - j) == 2 * offset) {\r\n continue;\r\n } else if (BeesCollision[x][y][z] != null) {\r\n beesArray[pos].setCollision(true);\r\n if (BeesCollision[x][y][z].size() == 1) {\r\n BeesCollision[x][y][z].getFirst().setCollision(true);\r\n break;\r\n }\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }", "@Override\n public void gameObjectCollisionOccurred(List<GameObject> collidedGameObjects)\n {\n for (GameObject go : collidedGameObjects)\n {\n if (this instanceof Speler && go instanceof AI)\n {\n if (this.getGrootte() > ((AI) go).getGrootte())\n {\n ((Speler) this).speelHapGeluid();\n g.deleteGameObject(go);\n ((Speler) this).maakGroter(((AI) go).getGrootte() / marge);\n } else if (this.getGrootte() < ((AI) go).getGrootte())\n {\n opgegeten = true;\n }\n oceaan.verhoogScore();\n }\n }\n }", "public void processPlayerCollision(ArrayList<Player> players) {\n for(Player p : players) {\n boolean collided = collision.generalCollision(this, p); //Test for general collision\n if(collided) //if general collision occurs\n {\n int collisionY = collision.testCollisionY(this, p); //change collision state for y axis\n int cornerCollision = collision.testCornerCollision(this, p);\n\n if(collisionY == Collision.COLLISION_TOP || cornerCollision == Collision.TOP_CORNERS) {\n if(p.getState() != DYING_STATE && getState() != DESTROYED_STATE) {\n setState(KOOPA_STUNNED);\n setVelocityX(0f);\n hitCounter++;\n shelled = true;\n if(pointsCollected == false) {\n game.scoreBoard.addScorePoints(100);\n pointsCollected = true;\n }\n }\n }\n else {\n if(getState() != DYING_STATE && getState() != DESTROYED_STATE && getState() != KOOPA_STUNNED && shelled == false && hitCounter == 0) //if enemy isn't dying or dead, kill player\n p.die();\n }\n }\n }\n }", "@Override\n\tpublic void onCollision(Model collisionModel, ColBox collisionColbox) {\n\n\t}", "private void verificarColisiones() {\n if(inmunidadRamiro){\n tiempoInmunidadRamiro += Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadRamiro>=6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidadRamiro=false;\n tiempoInmunidadRamiro=0f;\n ramiro.setEstadoItem(Ramiro.EstadoItem.NORMAL);\n musicaRayo.stop();\n if(music){\n musicaFondo.play();\n }\n\n }\n\n if (inmunidad){//Para evitar bugs, Ramiro puede tomar damage cada cierto tiempo...\n //Se activa cada vez que toma damage\n tiempoInmunidad+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidad>=0.6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidad=false;\n tiempoInmunidad=0f;\n }\n if (inmunidadItem){\n tiempoInmunidadItem+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadItem>=0.6f){\n inmunidadItem=false;\n tiempoInmunidadItem=0f;\n\n }\n //Verificar colisiones de Item Corazon.\n for (int i=arrCorazonesItem.size-1; i>=0; i--) {\n Corazon cora = arrCorazonesItem.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(cora.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrCorazonesItem.removeIndex(i);\n agregarCorazon();\n inmunidadItem=true;\n }\n\n }\n\n }\n //Verifica colisiones Rayo emprendedor\n for (int i=arrRayoEmprendedor.size-1; i>=0; i--) {\n RayoEmprendedor rayo= arrRayoEmprendedor.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(rayo.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrRayoEmprendedor.removeIndex(i);\n inmunidadRamiro();\n\n }\n\n }\n\n }\n //coalisiones de las tareas\n for (int i=arrTarea.size-1; i>=0; i--) {\n Tarea tarea = arrTarea.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(tarea.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n agregarPuntos();\n arrTarea.removeIndex(i);\n inmunidadItem=true;\n }\n\n }\n\n }\n\n\n //Verifica colisiones de camioneta\n if(estadoMapa==EstadoMapa.RURAL || estadoMapa==EstadoMapa.RURALURBANO){\n for (int i=arrEnemigosCamioneta.size-1; i>=0; i--) {\n Camioneta camioneta = arrEnemigosCamioneta.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(camioneta.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carro de Lujo\n if(estadoMapa==EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n for (int i=arrEnemigosAuto.size-1; i>=0; i--) {\n Auto cocheLujo = arrEnemigosAuto.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(cocheLujo.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carrito de golf\n if(estadoMapa==EstadoMapa.UNIVERSIDAD){\n for (int i=arrEnemigosCarritoGolf.size-1; i>=0; i--) {\n AutoGolf carritoGolf = arrEnemigosCarritoGolf.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(carritoGolf.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de las lamparas\n if(estadoMapa==EstadoMapa.SALONES){\n for (int i=arrEnemigoLampara.size-1; i>=0; i--) {\n Lampara lampara = arrEnemigoLampara.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(lampara.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n //Verifica colisiones de las sillas\n for (int i=arrEnemigoSilla.size-1; i>=0; i--) {\n Silla silla = arrEnemigoSilla.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(silla.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n\n\n\n }", "@Override\n public void reactTo(Collision c) {\n\tParticle[] particles = c.getParticles();\n\tfor(Particle p: particles) {\n\t Iterable<Collision> cs = model.predictCollisions(p, c.time());\n\t for(Collision newc: cs) {\n\t\tmpq.add(newc);\n\t }\n\t}\n\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 }", "protected void onCollision(Actor other) {\r\n\r\n\t}", "public void checkCollisions(List<Entity> listOfCloseObjects){\n\n for(Entity first : listOfCloseObjects){\n for(Entity second : listOfCloseObjects){\n if(first!=second) {\n\n String typeOfCollision = \"\";\n\n //check for a collision between the bounding boxes\n if (first.getBoundingBox().intersects(second.getBoundingBox())) {\n if(first.getEntityType().equals(EntityType.WALL) && second.getEntityType().equals(EntityType.PLAYER)) {\n typeOfCollision = \"playerWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.FLOOR_HAZARD) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"playerWithHazard\";\n }\n else if(first.getEntityType().equals(EntityType.MELEE_WEAPON) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"swordWithEnemy\";\n }\n else if(first instanceof Bullet && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"bulletWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"enemyWithWall\";\n }\n else if((first.getEntityType().equals(EntityType.DEFAULT_BULLET) || first.getEntityType().equals(EntityType.SHOTGUN_BULLET) || first.getEntityType().equals(EntityType.FAST_BULLET)) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithBullet\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithEnemy\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"enemyWithPlayer\";\n }\n else if((first.getEntityType().equals(EntityType.SWORD) || first.getEntityType().equals(EntityType.SHOTGUN) || first.getEntityType().equals(EntityType.PISTOL) || first.getEntityType().equals(EntityType.ASSAULT_RIFLE) ||\n first.getEntityType().equals(EntityType.SHIELD) || first.getEntityType().equals(EntityType.SPEEDBOOST) || first.getEntityType().equals(EntityType.HEART))\n && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"itemWithPlayer\";\n }\n\n if(!typeOfCollision.isEmpty())\n collide(typeOfCollision, first, second);\n }\n }\n }\n }\n\n }", "public int getTotalCollisions(){\r\n return totalCollisions;\r\n }", "private void laserCollisions() {\r\n\t\tGObject topLeft = getElementAt(laser.getX() - 1, laser.getY());\r\n\t\tGObject topRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY());\r\n\t\tGObject bottomLeft = getElementAt(laser.getX() - 1, laser.getY() + laser.getHeight());\r\n\t\tGObject bottomRight = getElementAt(laser.getX() + laser.getWidth() + 1, laser.getY() + laser.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(laser);\r\n\t\t\tlaser = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "@Override\r\n public boolean checkCollisions(Point p1, Point p2) {\r\n for(IShape child : children) {\r\n if(child.checkCollisions(p1,p2)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void updateBoundingBoxCollisions(BoundingBox box, Point3d collisionMotion, boolean ignoreIfGreater){\r\n\t\tAxisAlignedBB mcBox = box.convert();\r\n\t\tbox.collidingBlockPositions.clear();\r\n\t\tcollidingAABBs.clear();\r\n\t\tfor(int i = (int) Math.floor(mcBox.minX); i < Math.ceil(mcBox.maxX); ++i){\r\n \t\tfor(int j = (int) Math.floor(mcBox.minY); j < Math.ceil(mcBox.maxY); ++j){\r\n \t\t\tfor(int k = (int) Math.floor(mcBox.minZ); k < Math.ceil(mcBox.maxZ); ++k){\r\n \t\t\t\tBlockPos pos = new BlockPos(i, j, k);\r\n \t\t\t\tif(world.isBlockLoaded(pos)){\r\n\t \t\t\t\tIBlockState state = world.getBlockState(pos);\r\n\t \t\t\t\tif(state.getBlock().canCollideCheck(state, false) && state.getCollisionBoundingBox(world, pos) != null){\r\n\t \t\t\t\t\tint oldCollidingBlockCount = collidingAABBs.size();\r\n\t \t\t\t\t\tstate.addCollisionBoxToList(world, pos, mcBox, collidingAABBs, null, false);\r\n\t \t\t\t\t\tif(collidingAABBs.size() > oldCollidingBlockCount){\r\n\t \t\t\t\t\t\tbox.collidingBlockPositions.add(new Point3d(i, j, k));\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t\t\t\t\t\tif(box.collidesWithLiquids && state.getMaterial().isLiquid()){\r\n\t\t\t\t\t\t\tcollidingAABBs.add(state.getBoundingBox(world, pos).offset(pos));\r\n\t\t\t\t\t\t\tbox.collidingBlockPositions.add(new Point3d(i, j, k));\r\n\t\t\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\t\r\n\t\t//If we are in the depth bounds for this collision, set it as the collision depth.\r\n\t\tbox.currentCollisionDepth.set(0D, 0D, 0D);\r\n\t\tdouble boxCollisionDepth;\r\n\t\tfor(AxisAlignedBB colBox : collidingAABBs){\r\n\t\t\tif(collisionMotion.x > 0){\r\n\t\t\t\tboxCollisionDepth = mcBox.maxX - colBox.minX;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.x - boxCollisionDepth > 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.x = Math.max(box.currentCollisionDepth.x, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}else if(collisionMotion.x < 0){\r\n\t\t\t\tboxCollisionDepth = colBox.maxX - mcBox.minX;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.x + boxCollisionDepth < 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.x = Math.max(box.currentCollisionDepth.x, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(collisionMotion.y > 0){\r\n\t\t\t\tboxCollisionDepth = mcBox.maxY - colBox.minY;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.y - boxCollisionDepth > 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.y = Math.max(box.currentCollisionDepth.y, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}else if(collisionMotion.y < 0){\r\n\t\t\t\tboxCollisionDepth = colBox.maxY - mcBox.minY;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.y + boxCollisionDepth < 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.y = Math.max(box.currentCollisionDepth.y, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(collisionMotion.z > 0){\r\n\t\t\t\tboxCollisionDepth = mcBox.maxZ - colBox.minZ;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.z - boxCollisionDepth > 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.z = Math.max(box.currentCollisionDepth.z, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}else if(collisionMotion.z < 0){\r\n\t\t\t\tboxCollisionDepth = colBox.maxZ - mcBox.minZ;\r\n\t\t\t\tif(!ignoreIfGreater || collisionMotion.z + boxCollisionDepth < 0){\r\n\t\t\t\t\tbox.currentCollisionDepth.z = Math.max(box.currentCollisionDepth.z, boxCollisionDepth);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void Collision(Entity e)\r\n\t{\r\n\t\tthis.isAlive = false;\r\n\t}", "public abstract void collide(InteractiveObject obj);", "private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "@Override\n public void collide(CollisionEvent e) {\n \n if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof Health) {\n prime.incrementHealthCount();\n healthSound.play();\n e.getReportingBody().destroy();\n \n \n }\n \n else if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof Emerald) {\n prime.incrementEmeraldCount();\n emeraldSound.play();\n e.getReportingBody().destroy();\n }\n \n else if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof DeadZone) {\n e.getReportingBody().destroy();\n System.exit(0);\n } \n \n else if (e.getReportingBody() instanceof Boss && e.getOtherBody() instanceof FireBall){\n e.getOtherBody().destroy();\n System.out.println(\"boss hit\");\n }\n \n else if (e.getReportingBody() instanceof StaticBody && e.getOtherBody() instanceof FireBall){\n e.getOtherBody().destroy();\n System.out.println(\"boss hit\");\n } \n \n }", "public CollisionManager(){\n\t\tcollidables \t\t= new HashMap<Integer, List<CollidableObject>>() ;\n\t\tcollisionsTypes \t= new HashMap<Integer, List<Integer>>() ;\n\t\tcollisionHandlers \t= new HashMap<String, CollisionHandler>() ;\n\t}", "void collisions(){\n float tmp;\n \n if (dist(redX, redY, yelX, yelY) < 30 ){ // Red and Yellow\n tmp = yelDX; yelDX = redDX; redDX = tmp;\n tmp= yelDY; yelDY = redDY; redDY = tmp;\n }\n \n if (dist(redX, redY, bluX, bluY) < 30){ // Red and Blue\n tmp = bluDX; bluDX = redDX; redDX = tmp;\n tmp = bluDY; bluDY = redDY; redDY = tmp;\n }\n \n if (dist(bluX, bluY, yelX, yelY) < 30){ // Blue and Yellow\n tmp = yelDX; yelDX = bluDX; bluDX = tmp;\n tmp = yelDY; yelDY = bluDY; bluDY = tmp;\n }\n if (dist(cueX, cueY, redX, redY) < 30){ // Cue and Red\n tmp = redDX; redDX = cueDX; cueDX = tmp;\n tmp = redDY; redDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, bluX, bluY) < 30){ // Cue and Blue\n tmp = bluDX; bluDX = cueDX; cueDX = tmp;\n tmp = bluDY; bluDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, yelX, yelY) < 30){ // Cue and Yellow\n tmp = yelDX; yelDX = cueDX; cueDX = tmp;\n tmp = yelDY; yelDY = cueDY; cueDY = tmp;\n }\n}", "CollisionRule getCollisionRule();", "private boolean checkCollisions()\n {\n for (int i = 1; i < numFigs; i++)\n if (figures[0].collidedWith(figures[i]))\n return true;\n return false;\n }", "public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}", "@Override\n\tpublic void collision(SimpleObject s) {\n\t\t\n\t}", "public void collisionOrScore(){\n\t\t//Creates bound of all walls\n\t\tfor(int i = 0; i < walls.length; i++) {\n\t\t\tif (bird.detectCollision(walls[i]) || bird.getY() > 450 || bird.getY() <= 0) {\n\t\t\t\tbird.setX(-500);\n\t\t\t\tif (!gameOver) dieSound.playAudioFeedback();\n\t\t\t\tgameOver = true;\n\t\t\t\tbreak;\n\t\t\t} else if (bird.getX() == walls[i].getX()) {\n\t\t\t\t//if bird passes one wall then counts a point\n\t\t\t\tthis.points = incrementScore(this.points, 0.5);\n\t\t\t\tpointSound.playAudioFeedback();\n\t\t\t}\n\t\t}\n\t}", "private void checkCollisionVsGroup(Group g) {\n\t\tcheckCollisionsVsCollection(g);\r\n\t\t\r\n\t\tint clen = _composites.size();\r\n\t\tint gclen = g.getComposites().size();\r\n\t\t\r\n\t\t// for every composite in this group..\r\n\t\tfor (int i = 0; i < clen; i++) {\r\n\t\t\r\n\t\t\t// check vs the particles and constraints of g\r\n\t\t\tComposite c = _composites.get(i);\r\n\t\t\tc.checkCollisionsVsCollection(g);\r\n\t\t\t\r\n\t\t\t// check vs composites of g\r\n\t\t\tfor (int j = 0; j < gclen; j++) {\r\n\t\t\t\tComposite gc = g.getComposites().get(j);\r\n\t\t\t\tc.checkCollisionsVsCollection(gc);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check particles and constraints of this group vs the composites of g\r\n\t\tfor (int j = 0; j < gclen; j++) {\r\n\t\t\tComposite gc = g.getComposites().get(j);\t\r\n\t\t\tcheckCollisionsVsCollection(gc);\r\n\t\t}\r\n\t}" ]
[ "0.75837183", "0.6347615", "0.6338171", "0.62350297", "0.619321", "0.6077365", "0.6010625", "0.5975551", "0.5905861", "0.58910555", "0.58682936", "0.5851678", "0.5836081", "0.58206034", "0.5793507", "0.5748259", "0.5717456", "0.57110935", "0.5655968", "0.5653861", "0.56406087", "0.564042", "0.563436", "0.563156", "0.55918074", "0.5583283", "0.5562831", "0.55558574", "0.5550986", "0.5545366", "0.55390507", "0.5531893", "0.5519343", "0.5501388", "0.5488992", "0.54884446", "0.54827577", "0.5467262", "0.5466747", "0.5448911", "0.54460114", "0.54444903", "0.54377", "0.54291624", "0.5394739", "0.53937626", "0.5391066", "0.5389223", "0.53715456", "0.53565854", "0.53540874", "0.5336904", "0.5327266", "0.5324003", "0.53178", "0.53160316", "0.5313114", "0.5277975", "0.52764744", "0.52688557", "0.52628005", "0.52623564", "0.52622926", "0.5258561", "0.52565074", "0.52559334", "0.5253352", "0.52494514", "0.5248034", "0.52463615", "0.52263534", "0.5191314", "0.5190778", "0.51892585", "0.5161539", "0.5146818", "0.51406926", "0.5124403", "0.5105241", "0.5104404", "0.50938433", "0.50910074", "0.50890136", "0.5086093", "0.507228", "0.50533694", "0.50483644", "0.50442505", "0.5037058", "0.5029485", "0.5023287", "0.5012168", "0.50066894", "0.5001869", "0.49864966", "0.49829978", "0.49754104", "0.49750444", "0.49699605", "0.49588114" ]
0.81501067
0
using the compare to method, we will compare each element in the list to the next one
@Test (priority = 1) public void sortAlphabetical(){ for (int i = 0; i < allDepartments.getOptions().size()-1; i++) { String current = allDepartments.getOptions().get(i).getText(); String next = allDepartments.getOptions().get(i+1).getText(); System.out.println("comparing: " + current + " with "+ next); Assert.assertTrue(current.compareTo(next)<=0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static List compareList(List<Integer> test, List<Integer> results) {\r\n\r\n if (test.size() > results.size()) {\r\n results = test;\r\n }\r\n\r\n return results;\r\n }", "List<Object> lessThanOrEqualsTo(Object value);", "public void bubbleSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Bubble Sort\");\n System.out.println();\n\n steps = 0;\n for (int outer = 0; outer < list.size() - 1; outer++){\n for (int inner = 0; inner < list.size()-outer-1; inner++){\n steps += 3;//count one compare and 2 gets\n if (list.get(inner)>(list.get(inner + 1))){\n steps += 4;//count 2 gets and 2 sets\n int temp = list.get(inner);\n list.set(inner,list.get(inner + 1));\n list.set(inner + 1,temp);\n }\n }\n }\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "private boolean compareList(ArrayList<Point> solutions2, ArrayList<Point> current) {\r\n\t\treturn solutions2.toString().contentEquals(current.toString());\r\n\t}", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "private static boolean isSame(List<PokerLabel> list, int size) {\n PokerLabel firstPokerLabel = list.get(0);\n int num = firstPokerLabel.getNum();\n for (PokerLabel p: list) {\n if (num != p.getNum()) {\n return false;\n }\n }\n return true;\n }", "public boolean compareTo(int index, int value){\n return list.get(index)==value;\n }", "private static void listIteratorMovesInBothDirections(){\n\t ArrayList<String> list = new ArrayList<String>();\n\t \n\t list.add(\"ONE\");\n\t \n\t list.add(\"TWO\");\n\t \n\t list.add(\"THREE\");\n\t \n\t list.add(\"FOUR\");\n\t \n\t //RSN NOTE ListIterator\n\t ListIterator iterator = list.listIterator();\n\t \n\t System.out.println(\"Elements in forward direction\");\n\t \n\t while (iterator.hasNext())\n\t {\n\t System.out.println(iterator.next());\n\t }\n\t \n\t System.out.println(\"Elements in backward direction\");\n\t \n\t while (iterator.hasPrevious())\n\t {\n\t System.out.println(iterator.previous());\n\t }\n\t}", "@Test\n public void codonCompare2(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.codonCompare(second));\n\n }", "public abstract void compare();", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\n\n List<Integer> result = new ArrayList<Integer>();\n HashMap<String, Integer> temp = new HashMap<String, Integer>();\n temp.put(\"a\", 0);\n temp.put(\"b\", 0);\n\n for(int i = 0; i < a.size(); i++){\n if(a.get(i) < b.get(i)){\n temp.put(\"b\", temp.get(\"b\") + 1);\n }else if(a.get(i) == b.get(i)){\n continue;\n }else temp.put(\"a\", temp.get(\"a\") + 1);\n }\n\n result.add(temp.get(\"a\"));\n result.add(temp.get(\"b\"));\n return result;\n }", "private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }", "private static <T> int compareLists(List<? extends Comparable<T>> list1, List<T> list2) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < list1.size(); i++) {\n\t\t\tresult = list1.get(i).compareTo(list2.get(i));\n\t\t\tif (result != 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private void moveMatchingNodeToNextElement(Node tmp) {\n for (int i = 0; i < ALL_LINKED_LISTS.size();i++) {\n Node next = ALL_LINKED_LISTS.get(i);\n if (tmp.equals(next)) {\n next = next.next;\n ALL_LINKED_LISTS.put(i, next);\n break;\n }\n }\n }", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\n\n List<Integer> result = new ArrayList<Integer>(2);\n result.add(0, 0);\n result.add(1, 0);\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i) > b.get(i)) {\n result.set(0, result.get(0) + 1);\n } else if (a.get(i) < b.get(i)) {\n result.set(1, result.get(1) + 1);\n } else if (a.get(i) == b.get(i)) {\n result.set(0, result.get(0) + 1);\n result.set(1, result.get(1) + 1);\n }\n }\n return result;\n }", "private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }", "List<Object> greaterThanOrEqualsTo(Object value);", "@Override\r\n public void run() {\r\n \r\n while (listsOfSorted.size() > 1) {\r\n \r\n int[] list1 = listsOfSorted.poll();\r\n int[] list2 = listsOfSorted.poll();\r\n int[] newSortedList = new int[list1.length + list2.length];\r\n\r\n int current1 = 0;\r\n int current2 = 0;\r\n int current3 = 0;\r\n\r\n while (current1 < list1.length && current2 < list2.length) {\r\n if (list1[current1] < list2[current2]) {\r\n newSortedList[current3++] = list1[current1++];\r\n } else {\r\n newSortedList[current3++] = list2[current2++];\r\n }\r\n }\r\n\r\n while (current1 < list1.length) {\r\n newSortedList[current3++] = list1[current1++];\r\n }\r\n\r\n while (current2 < list2.length) {\r\n newSortedList[current3++] = list2[current2++];\r\n \r\n }\r\n \r\n listsOfSorted.offer(newSortedList);\r\n \r\n }\r\n System.out.println(Arrays.toString(listsOfSorted.peek()));\r\n \r\n }", "private static <T extends Comparable <? super T>> boolean isSorted (List <T> list){\r\n\t\tT prev = list.get(0); // 1\r\n\t\tfor (T item : list){ //n\r\n\t\t\tif (item.compareTo(prev) < 0) return false;\r\n\t\t\tprev = item;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void codonCompare1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(a);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(b);\n int expected = 0;\n assertEquals(expected, first.codonCompare(second));\n }", "private static List<Integer> reorganize(List<Integer> result){\n List<Integer> outcome=new ArrayList<>();\n result.sort(Comparator.comparingInt(o -> o));\n if(!result.isEmpty()){\n outcome.add(result.get(0));\n for(int i=1;i<result.size();i++){\n if(!result.get(i).equals(result.get(i-1)))\n outcome.add(result.get(i));\n }\n }\n return outcome;\n }", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void whenAddElementToTreeThenIteratorReturnsSorted() {\n final List<Integer> resultList = Arrays.asList(4, 3, 6);\n final List<Integer> testList = new LinkedList<>();\n this.tree.add(4);\n this.tree.add(6);\n this.tree.add(3);\n\n Iterator<Integer> iterator = this.tree.iterator();\n testList.add(iterator.next());\n testList.add(iterator.next());\n testList.add(iterator.next());\n\n assertThat(testList, is(resultList));\n }", "@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}", "private static boolean canEasyAdd( List<ProductPrice> currentList, ProductPrice iter) {\n\t\treturn currentList.get(0).start.after(iter.end) || currentList.get(currentList.size()-1).end.before(iter.start) ; \r\n\t}", "public void bubbleSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2; //init, check condition\r\n\t\tfor (int i = list.size() - 1; i >= 0; i --){\r\n\t\t\tsteps += 2; //init, check condition\r\n\t\t\tfor (int j = 0; j < i ; j ++){\r\n\t\t\t\tsteps += 5;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(j + 1)) < 0){\r\n\t\t\t\t\tsteps += 2;\r\n\t\t\t\t\tswap(list, j, j + 1);\r\n\t\t\t\t\tsteps += 5;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Bubble Sort\");\r\n\t\tSystem.out.println();\r\n\t}", "public boolean elementsAreAlphaUpSortedMorningCoffee(List<WebElement> elements){\n By multipleFirstResult = By.xpath(\"//div//h2//..//div[1]\");\n By test = By.xpath(\"//div[contains(@class,'footer-content')]\");\n\n\n boolean sortedWell = true;\n for (int i=0; i<elements.size()-1; i++){\n\n String frontElement = elements.get(i+1).getText();\n String backElement = elements.get(i).getText();\n\n if(frontElement.contains(\"Multiple\")){\n findElement(test);\n (elements.get(i+1)).click();\n waitForElementToAppear(multipleFirstResult);\n frontElement = findElement(multipleFirstResult).getText();\n\n // Sometimes multipleFirstResult returns nothing so we run a loop to try again 10 times until text is returned.\n for (int k = 0; k < 9; k++)\n {\n if (frontElement.equalsIgnoreCase(\"\")){\n (elements.get(i+1)).click();\n waitForElementToAppear(multipleFirstResult);\n frontElement = findElement(multipleFirstResult).getText();\n }\n else\n {\n break;\n }\n }\n clickCoordinate(searchBar,10,10);\n pause(500);\n }\n\n if(backElement.contains(\"Multiple\")){\n findElement(test);\n (elements.get(i)).click();\n waitForElementToAppear(multipleFirstResult);\n backElement = findElement(multipleFirstResult).getText();\n\n // Sometimes multipleFirstResult returns nothing so we run a loop to try again 10 times until text is returned.\n for (int k = 0; k < 9; k++)\n {\n if (backElement.equalsIgnoreCase(\"\")){\n (elements.get(i)).click();\n waitForElementToAppear(multipleFirstResult);\n backElement = findElement(multipleFirstResult).getText();\n }\n else\n {\n break;\n }\n }\n\n clickCoordinate(searchBar,10,10);\n pause(500);\n }\n\n if (frontElement.compareTo(backElement) < 0){\n System.out.println(\"MIS-SORT: Ascending: '\"+frontElement+\"' should not be after '\"+backElement+\"'\");\n sortedWell = false;\n }\n }\n return sortedWell;\n }", "public boolean equals(LinkedList list){\n if (this.size() == list.size()){\n for (int i = 0; i < this.size(); i++){\n if(this.get(i) != list.get(i)){\n return false;\n }\n }\n return true;\n }else{ \n return false;\n } \n }", "@Test\n public void aminoCompareTest2() {\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(c);\n int expected = 0;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "private static boolean straight(ArrayList<CardRank> ranks){\n for (int i = 1; i < ranks.size(); i++){\n int rank1 = ranks.get(i - 1).ordinal();\n int rank2 = ranks.get(i).ordinal();\n\n if (rank2 != rank1 + 1){\n return false;\n }\n }\n return true;\n }", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "@Test\n void givenElementWhenSearchingShouldPassLinkedListResult() {\n MyNode<Integer> myFirstNode = new MyNode<>(56);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(70);\n MyLinkedList myLinkedList = new MyLinkedList();\n myLinkedList.append(myFirstNode);\n myLinkedList.append(mySecondNode);\n myLinkedList.append(myThirdNode);\n myLinkedList.printMyNodes();\n myLinkedList.searchMyNode();\n boolean result = myLinkedList.head.equals(myFirstNode) &&\n myLinkedList.head.getNext().equals(mySecondNode) &&\n myLinkedList.tail.equals(myThirdNode);\n System.out.println(result);\n Assertions.assertTrue(result);\n }", "public static void main(String[] args) {\n int list[] = {8,7,6,5,1};\n \t//System.out.println(\"the list number is \" + list[0]);\n int temp;\n for(int j = list.length; j>= 0; j --){\n \tfor (int i = 0; i < j - 1; i ++){\n \t\tif( list[i] > list[i + 1]){\n \t\t\ttemp = list[i + 1];\n \t\t\tlist[i + 1] = list [i];\n \t\t\tlist [i] = temp;\n\n \t}\n\n\n \t//\n }\n\n \t}\t\n \t \t\tfor(int x = 0; x < list.length; x ++){\n\t\t\tSystem.out.println(list[x]);\n\t\t}\n }", "public int compare(ArrayList<Object> obj1, ArrayList<Object> obj2) {\n if (obj1.get(0).equals(obj2.get(0))) {\n return (int) Math.ceil((Double) obj1.get(1) - (Double) obj2.get(1));\n }\n // higher BV first\n return (int) Math.ceil((Double) obj2.get(0) - (Double) obj1.get(0));\n }", "private static void sortByVerified( ArrayList<Volunteer> list)\n {\n // Find the string reference that should go in each cell of\n // the array, from cell 0 to the end\n for ( int j = 0; j < list.size();j++ )\n {\n // Find min: the index of the string reference that should go into cell j.\n // Look through the unsorted strings (those at j or higher) for the one that is first in lexicographic order\n int min = j;\n for ( int k=j+1; k < list.size(); k++ ) {\n if (list.get(k).compareTo(list.get(min)) > 0) {\n min = k;\n }\n\n }\n\n // Swap the reference at j with the reference at min\n Collections.swap(list, j, min);\n }\n }", "public static boolean compareListElements(ArrayList<Double> a,ArrayList<Double> b){\n\t\t\n\t\tif(a==null && b==null)\n\t\t\treturn true;\n\t\t\n\t\tif(a.size()!=b.size())\n\t\t\treturn false;\n\t\t\n\t\tint i=0,j,k;\n\t\t\n\t\twhile(i<a.size())\n\t\t{\n\t\t\tj=(int) (100*a.get(i));\n\t\t\tk=(int) (100*b.get(i));\n\t\t\t\n\t\t\tif(j!=k)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public int compare(ListNode o1, ListNode o2) {\n return o1.val-o2.val;\n }", "public ArrayList<Integer> localTops(List<Integer> list, int num){\n\n ArrayList<IndexHelperHelper> helperHelperList = new ArrayList();\n\n float[][] comps = this.reader.getSummary().getSentenceComparisons();\n List<IndexHelper> helperList = new ArrayList();\n for(Integer i : list){\n for(int j = 0; j < comps.length; j++){\n Float d = comps[i][j];\n if(i!=j && !list.contains(j) && d < .95)\n helperList.add(new IndexHelper(d,j));\n\n }\n helperHelperList.add(new IndexHelperHelper((ArrayList<IndexHelper>) helperList));\n\n }\n Collections.sort(helperHelperList);\n\n ArrayList<Integer> returnList = new ArrayList();\n \n try{\n while(returnList.size()<num){\n\n IndexHelperHelper h = (IndexHelperHelper) helperHelperList.get(0);\n\n Integer inte = h.getHelpers().get(0).getIndex();\n if(!returnList.contains(inte))\n returnList.add(inte);\n\n\n boolean b = h.remove(0); //remove first element in helper\n helperHelperList.remove(0);\n if(!b)\n helperHelperList.add(helperHelperList.size()-1, h);//replace first element with the new helper\n else\n helperHelperList.add(0,h);\n\n Collections.sort(helperHelperList);\n }\n }\n \n catch(IndexOutOfBoundsException e){\n System.err.println(\"IndexError, summary length: \" + list.size());\n }\n\n return returnList;\n\n }", "public static <T extends Comparable<? super T>>\n void intersection(SLL<T> list1, SLL<T> list2, SLL<T> result) {\n\n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n\n T itemlist1=null, itemlist2=null;\n\n // get first item in each list\n if ( iterlist1 != null && iterlist2 != null ) {\n itemlist1 = iterlist1.info;\n itemlist2 = iterlist2.info;\n }\n\n while ( itemlist1 != null && itemlist2 != null ) {\n int compareResult = itemlist1.compareTo(itemlist2);\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //append to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n }\n }", "public void decendingLikes(ArrayList<tutorDetails> list){\n\n int n = list.size();\n tutorDetails temp ;\n\n for(int i=0; i < n; i++){\n for(int j=1; j < (n-i); j++){\n\n if(list.get(j-1).getViews()< list.get(j).getViews()){\n //swap the elements!\n temp = list.get(j-1);\n list.set(j-1, list.get(j)); //Do not use add(),it does not replace the value it simply pushes the values to higher\n list.set(j,temp); // indexes,use set() to replace\n }\n\n }\n }\n\n\n }", "public boolean happyList(ArrayList<String> original) {\n for(int i = 1; i < original.size(); i++){\n ArrayList<Character> lastChars = characterArrayListMaker(original.get(i-1));\n ArrayList<Character> currentChars = characterArrayListMaker(original.get(i));\n boolean compareFlag = false;\n for(Character last : lastChars){\n for(Character current : currentChars){\n if (last.equals(current)){\n compareFlag = true;\n }\n }\n }\n if(!compareFlag){\n return false;\n }\n }\n return true;\n }", "public ListUtilities bubbleSort(){\n\t\tboolean swaps = true;\t\t\n\t\t\n\t\twhile(swaps == true){\n\t\t\t//no swaps to begin with\n\t\t\tswaps = false;\n\n\t\t\t//if not end of list\n\t\t\tif (this.nextNum != null){\n\t\t\t\tListUtilities temp = new ListUtilities();\n\t\t\t\t//make temp point to 2\n\t\t\t\ttemp = this.nextNum;\n\t\t\t\t//if 1 is greater than 2\n\t\t\t\tif(this.num > this.nextNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\tswapF(temp);\n\t\t\t\t}\n\n\t\t\t//keep going until you hit end of list\n\t\t\ttemp.bubbleSort();\n\t\t\t} \n\n\t\t\t//if at end of list and swaps were made, return to beginning and try again\n\t\t\tif (this.nextNum == null && swaps == true){\n\n\t\t\t\tthis.returnToStart().bubbleSort();\n\t\t\t}\n\t\t}\n\t//return beginning of list\n\treturn this.returnToStart();\n\t}", "static List<Integer> longestBouncyList(List<Integer> arr) {\n List<Integer> results = new ArrayList<>();\r\n results.add(arr.get(0));\r\n \r\n // If the 1 element is the lowest 2, add the first 2 elements \r\n List<Integer> test = new ArrayList<>();\r\n if (arr.get(0) < arr.get(1)) {\r\n test.add(arr.get(0));\r\n test.add(arr.get(1));\r\n }\r\n\r\n // Traverse the arr\r\n for (int i = 1; i < arr.size() - 1; i++) {\r\n\r\n if (((arr.get(i) > arr.get(i - 1)) && (arr.get(i) > arr.get(i + 1)))\r\n || ((arr.get(i) < arr.get(i - 1)) && (arr.get(i) < arr.get(i + 1)))) {\r\n\r\n if (test.isEmpty()) {\r\n test.add(arr.get(i - 1));\r\n test.add(arr.get(i));\r\n }\r\n\r\n test.add(arr.get(i + 1));\r\n\r\n if (i == arr.size() - 2) {\r\n results = compareList(test, results);\r\n }\r\n\r\n } else {\r\n\r\n results = compareList(test, results);\r\n \r\n test = new ArrayList<>();\r\n }\r\n\r\n }\r\n return results;\r\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static MySimpleLinkedList orderList(MySimpleLinkedList list1,\n\t\t\tMySimpleLinkedList list2) {\n\t\t\n\t\tMySimpleLinkedList aux = new MySimpleLinkedList();\n\t\t\n\t\tIteratorMySimpleLinkedList it1 = list1.iterator();\n\t\tIteratorMySimpleLinkedList it2 = list2.iterator();\n\t\t\n\t\tint val1, val2;\n\t\t\n\t\twhile(it1.hasNext() && it2.hasNext()) {\n\t\t\t\n\t\t\tval1 = (int) it1.get();\n\t\t\tval2 = (int) it2.get();\n\t\t\t\n\t\t\tif(val1 == val2) {\n\t\t\t\taux.insertLast(val1);\n\t\t\t\tit1.next();\n\t\t\t\tit2.next();\n\t\t\t}else if(val1 < val2) {\n\t\t\t\tit1.next();\n\t\t\t}else {\n\t\t\t\tit2.next();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn aux;\n\t}", "public static List<Integer> climbingLeaderboard(List<Integer> ranked, List<Integer> player) {\n // Write your code here\n List<Integer> temp = new ArrayList<>();\n List<Integer> result = new ArrayList<>();\n //boolean isNext =false;\n\n temp=ranked.stream()\n .distinct()\n .collect(toList());\n int i = temp.size()-1; //rank 리스트의 마지막 인덱스 값\n\n /**\n * 확실하게 짚고 넘어가기 위한 부연 설명\n *\n * 1 . List player를 순회시키는데, List rank를 뒤에서부터 순회 한다.\n * (List rank를 오름차순 정렬하고 하려해봤는데 랭킹뽑으려고 하는 순간 머리가 꼬이기 시작했었음)\n * 2. 플레이어의 점수가 랭크된 점수보다 작아졌을 때 비로소 플레이어 점수가 랭크되는 순간이다.\n * 따라서 이 때(2번)의 i값이 랭크점수 순회중 만난 최초의 플레이어 점수보다 높아지는 위치가 된다.\n * 그러므로 이 위치의 다음자리가 비교하는 플레이어의 점수가 랭크되는 위치가 되겠다. i+1\n * 하지만 인덱스는 0부터 시작하기때문에 저장할땐 +1을 더 해주어 i+2로 해준다.\n * 3. while문을 통과했을 때 i가 0보다 작아 통과한 경우는 1등을 한 경우가 된다. 인덱스0보다 큰거니까\n * 따라서 i가 0보다 작은 지 for문 끝나기 전 체크 필요\n * 그 후 다음 score 가 while문에 들어갈땐 이전에 비교했던 인덱스값 다음을 비교하게 된다.\n */\n for(int score : player){\n while(i>=0){\n if(score>=temp.get(i)){\n i--;\n }else{\n result.add(i+2); //인덱스는 0부터시작하니까 +1 , 스코어가 랭크된점수보다 낮으므로 한 등수 밀려서 +1 따라서 총 +2\n break;\n }\n }\n if(i<0) result.add(1); //1위\n }\n\n\n\n //-----------------------기존 O(n^2) 풀이.. ---------------------------------------\n\n //2. 배열 순회 하며 범위 찾은인덱스 +1 (내림차순이므로)\n // 2-1. 양 끝 값보다 크거나 작을 경우 케이스 따로 분리\n // 이중루프로 계산 시 TIME OUT\n// for(int score : player){\n// for(int i=0; i<temp.size(); i++){\n// if(!isNext) {\n// if (score >= temp.get(i)) {\n// if(i==0){\n// result.add(1);\n// }else {\n// result.add((i+1)); //인덱스는 0부터 시작하므로\n// }\n// isNext = true;\n// }else if(score<=temp.get(temp.size()-1)){ //가장 작은 케이스\n// if(score==temp.get(temp.size()-1)){ //가장 작은 값과 같은 경우\n// result.add(temp.size());\n// }else{\n// result.add(temp.size()+1);\n// }\n// isNext=true;\n// }\n// }\n// }\n// isNext=false;\n// }\n result.forEach(System.out::println);\n return result;\n }", "boolean arrangeAlternatively(SinglyLinkedList list){\r\n\t\t//Empty List Nothing to return.\r\n\t\tif(list.head == null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tNode slowRunner = list.head;\r\n\t\tNode fastRunner = list.head;\r\n\t\t\r\n\t\t\r\n\t\t//Loop to advance slow runner to middle of list.\r\n\t\twhile(slowRunner.next!=null){\r\n\t\t\tslowRunner = slowRunner.next;\r\n\t\t\tif(fastRunner.next.next!=null){\r\n\t\t\t\tfastRunner = fastRunner.next.next;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tfastRunner = fastRunner.next;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Reset the fast runner position to head of list.\r\n\t\tfastRunner = list.head;\r\n\t\t\r\n\t\t//Now start moving fastRunner and slowRunner with same pace while rearranging the nodes.\r\n\t\twhile(slowRunner.next!=null){\r\n\t\t\t\r\n\t\t\tNode nextFR = fastRunner.next; // Keep track of next node of list.\r\n\t\t\t\r\n\t\t\tNode nextSR = slowRunner.next; // Keep track of next of slow runners next node.\r\n\t\r\n\t\t\tfastRunner.next = slowRunner; // Shift the slow Runner to second position in linked list. \r\n\t\t\t\r\n\t\t\tslowRunner.next = nextFR; // Make the second node of list next node of slow runner.\r\n\t\t\t\t\t\t\r\n\t\t\tfastRunner = nextFR; // Advance the fast Runner to next position.\r\n\r\n\t\t\tslowRunner = nextSR; // Advance the slow Runner to next position.\r\n\t\t\t\r\n\t\t\tif(slowRunner.next==null)\r\n\t\t\t\tfastRunner.next = slowRunner;\r\n\t\t}\r\n\t\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] list = new int[n];\n for (int i = 0; i < n; i++) {\n list[i] = scanner.nextInt();\n }\n int m1 = scanner.nextInt();\n int m2 = scanner.nextInt();\n boolean next = false;\n\n for (int i = 0; i < n - 1; i++) {\n if (list[i] == m1 && list[i + 1] == m2) {\n next = true;\n } else if (list[i] == m2 && list[i + 1] == m1) {\n next = true;\n }\n }\n System.out.println(!next);\n }", "@Test\n void first() {\n int[] answers = {1,2,3,4,5,1,2,3,4,5};\n int[] first = {1,2,3,4,5};\n int collect = 0;\n for (int i=0; i < answers.length ; i++) {\n if (answers[i] == first[i % 5]) {\n //0 0\n //1 1\n //2 2\n //3 3\n //4 4\n //5 0\n //6 1\n //7 2\n collect++;\n }\n }\n assertThat(collect).isEqualTo(10);\n }", "private static <Item extends Comparable> void partitionBear(\n List<Item> unsorted, Bed pivot,\n List<Item> less, List<Item> equal, List<Item> greater) {\n for (Item s : unsorted) {\n if (s.compareTo(pivot) < 0) {\n less.add(s);\n } else if (s.compareTo(pivot) == 0) {\n equal.add(s);\n } else {\n greater.add(s);\n }\n }\n }", "public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }", "public int compare(List<Integer> a, List<Integer> b) {\n return Integer.compare(b.get(1), a.get(1));\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a[]= {4 ,3 ,7 ,8 ,6 ,2 ,1};\r\n\t\t\r\n\t\tArrayList al=new ArrayList();\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tif(i+1<a.length)\r\n\t\t\t{\r\n\t\t\tif(a[i]<a[i+1])\r\n\t\t\t{\r\n\t\t\t\tal.add(a[i+1]);\r\n\t\t\t\tal.add(a[i]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tal.add(a[i+1]);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(al);\r\n\t}", "public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }", "protected abstract void compareItem(Item expected, Item actual);", "static void cumplen(elefante comparador,Queue<elefante>lista,\n Queue<elefante>aprobados){\n if (lista.isEmpty()) {\n \n }else{\n elefante a=lista.poll();\n if (comparador.comparedint(a.getInteligencia())==true) {\n aprobados.add(a);\n cumplen(comparador,lista,aprobados);\n }\n if (comparador.comparedint(a.getInteligencia())==false) {\n cumplen(comparador,lista,aprobados); \n }\n }\n }", "private static <E extends Comparable<? super E>> List<E > bubbleSort(List<E > comparable) {\n\t boolean changed = false;\n\t do {\n\t changed = false;\n\t for (int a = 0; a < comparable.size() - 1; a++) {\n\t if (comparable.get(a).compareTo(comparable.get(a + 1)) > 0) {\n\t E tmp = comparable.get(a);\n\t comparable.set(a, comparable.get(a + 1));\n\t comparable.set(a + 1, tmp);\n\t changed = true;\n\t }\n\t }\n\t } while (changed);\n\t \n\t\treturn comparable;\n\t}", "public static void main(String[] args) {\n\n\t\tint number = 32841;\n\t\tint temp = 32841;\n\t\t/*\n\t\t * int number = 32814; int temp = 32814;\n\t\t */\n\t\t// 14823\n\t\t// 12843\n\t\tArrayList<Integer> listOfNumbers = new ArrayList<Integer>();\n\t\tArrayList<Integer> newList = new ArrayList<Integer>();\n\n\t\twhile (temp > 0) {\n\t\t\tint digit = temp % 10;\n\t\t\ttemp = temp / 10;\n\t\t\tlistOfNumbers.add(digit);\n\t\t}\n\n\t\tint i = 0;\n\t\tint j = i + 1;\n\t\t// Checking the asecending order\n\t\tfor (i = 0; i < listOfNumbers.size() - 1; i++) {\n\n\t\t\tif (listOfNumbers.get(j) < listOfNumbers.get(i)) {\n\t\t\t\tSystem.out.println(listOfNumbers.get(i + 1));\n\t\t\t\tSystem.out.println(i + 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(j);\n\t\t\tj++;\n\t\t}\n\n\t\t// j = 0;\n\n\t\t// replacing the 2 and 4\n\t\tfor (int m = 0; m < listOfNumbers.size() - 1; m++) {\n\n\t\t\tif ((Integer) listOfNumbers.get(m) > (Integer) listOfNumbers.get(i + 1)) {\n\t\t\t\tSystem.out.println(\" i = \" + i);\n\t\t\t\tSystem.out.println(\"value at m is \" + listOfNumbers.get(m));\n\t\t\t\tSystem.out.println(\"value at i is \" + listOfNumbers.get(i + 1));\n\t\t\t\tint swap = listOfNumbers.get(m);\n\t\t\t\tlistOfNumbers.set(m, listOfNumbers.get(i + 1));\n\t\t\t\tlistOfNumbers.set(i + 1, swap);\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\t// getting the sub list and sorting them\n\t\tList<Integer> subList = listOfNumbers.subList(0, i + 1);\n\t\tCollections.sort(subList);\n\t\tCollections.reverse(subList);\n\n\t\t// creating a new list wit the next higher number\n\t\tfor (int k = listOfNumbers.size(); k > i + 1; k--) {\n\t\t\tnewList.add(listOfNumbers.get(k - 1));\n\t\t}\n\n\t\tfor (int k = 0; k < subList.size(); k++) {\n\t\t\tnewList.add(subList.get(k));\n\t\t}\n\n\t\tfor (int k = 0; k < newList.size(); k++) {\n\t\t\tSystem.out.print(newList.get(k));\n\t\t}\n\t}", "static int BinarySerach_lowerEqualValue(ArrayList<Integer> list , int value){\r\n\t\t\t\r\n\t\t\tint mid,l,r;\r\n\t\t\t\r\n\t\t\tl = 0;\r\n\t\t\tr = list.size()-1;\r\n\t\t\t\r\n\t\t\tif(value>=list.get(r))\r\n\t\t\t\treturn r;\r\n\t\t\tif(value<=list.get(l))\r\n\t\t\t\treturn l;\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\twhile(l<r){\r\n\t\t\t\t\r\n\t\t\t\tmid = (l+r)/2;\r\n\t\t\t\t\r\n\t\t\t\tif(list.get(mid)==value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t\tif(mid+1<list.size() && list.get(mid)<=value && list.get(mid+1)>value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\tif(mid-1>0 && list.get(mid-1)<=value && list.get(mid)>value)\r\n\t\t\t\t\treturn mid-1;\r\n\t\t\t\tif(list.get(mid)<value)\r\n\t\t\t\t\tl = mid+1;\r\n\t\t\t\telse\r\n\t\t\t\t\tr = mid-1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "public static void sort(ArrayList<Integer> list) {\n\t\tint temp;\n\t\tfor (int i=0; i < list.size() ; i++) {\n\t\t\tfor (int j=i+1;j<list.size()-1;j++){\n\t\t\t\tif(list.get(i)>list.get(j)){\n\t\t\t\t\ttemp = list.get(i);\n\t\t\t\t\tlist.set(i,list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void updateElementListFromSegmet(int changeValue, List<Integer> elementList) {\n\n int changeIndex = 0;\n int change = 0;\n\n for (int i = 0; i < elementList.size(); i++) {\n if (changeValue == elementList.get(i)) {\n changeIndex = i;\n change++;\n }\n }\n\n if (change == 0) {\n for (int i = 0; i < elementList.size(); i++) {\n if (changeValue > elementList.get(i)) {\n continue;\n }\n int value = elementList.get(i) - 1;\n elementList.set(i, value);\n }\n return;\n }\n\n for (int i = elementList.size() - 1; i >= 0; i--) {\n if (elementList.get(i) == changeValue) {\n break;\n } else {\n int value = elementList.get(i) - 1;\n elementList.set(i, value);\n }\n\n }\n\n elementList.remove(changeIndex);\n\n }", "static void compare()\n {\n \tif(a < c)\n\t\t {\n\t\t\t comp_one = 1; //store this value , else zero default \n\t\t }\n\t\t if(c < b)\n\t\t {\n\t\t\t comp_two = 2; //store this value , else zero default\n\t\t }\n\t\t if(b < a)\n\t\t {\n\t\t\t comp_thr = 5; //store this value , else zero default\n\t\t }\n\t\t \n\t\t comp_val = comp_one + comp_two + comp_thr; //create a unique value by addition\n }", "List<V> rangeSearch(K key, String comparator) {\r\n\r\n // linked list for return\r\n List<V> val = new LinkedList<>();\r\n LeafNode node_next = this;\r\n LeafNode node_prev = this.previous;\r\n\r\n // to check the current node's next nodes first\r\n while (node_next != null) {\r\n if (comparator.equals(\"<=\")) {\r\n if (node_next.getFirstLeafKey().compareTo(key) > 0) {\r\n node_next = node_next.next;\r\n continue;\r\n }else{\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n } else if (comparator.equals(\">=\")){\r\n if (node_next.getFirstLeafKey().compareTo(key) < 0) {\r\n node_next = node_next.next;\r\n continue;\r\n }\r\n else{\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n } else if ( comparator.equals(\"==\")){\r\n if (node_next.getFirstLeafKey().compareTo(key) > 0){\r\n node_next = node_next.next;\r\n continue;\r\n } else {\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n }\r\n }\r\n\r\n // to check the previous nodes\r\n while (node_prev != null) {\r\n if (comparator.equals(\"<=\")) {\r\n if (node_prev.getFirstLeafKey().compareTo(key) > 0) {\r\n node_prev = node_prev.previous;\r\n continue;\r\n }else{\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n } else if (comparator.equals(\">=\")){\r\n if (node_prev.getFirstLeafKey().compareTo(key) < 0) {\r\n node_prev = node_prev.previous;\r\n continue;\r\n }\r\n else{\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n } else if ( comparator.equals(\"==\")){\r\n if (node_prev.getFirstLeafKey().compareTo(key) > 0){\r\n node_prev = node_prev.previous;\r\n continue;\r\n } else {\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n return val;\r\n }", "private static boolean areAdjoining(List<Integer> list) {\r\n if (list.isEmpty()) {\r\n return false;\r\n }\r\n int check = list.get(0);\r\n for (int value : list) { // (use iterator for efficiency)\r\n if (value != check) {\r\n return false;\r\n }\r\n check += 1;\r\n }\r\n return true;\r\n }", "private boolean isEqualList(List<Node> a, List<Node> b, boolean value){\n\t\tList<Node> tmp1 = new ArrayList<Node>(a);\n\t\tList<Node> tmp2 = new ArrayList<Node>(b);\n\t\tfor(Node n1 : tmp1){\n\t\t\tfor(Node n2 : tmp2){\n\t\t\t\tif((value && n1.isEqualNode(n2)) || (!value && n1.isSameNode(n2)))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void given3NumbersWhenInsertingSecondInBetweenShouldPassLinkedListResult() {\n MyNode<Integer> myFirstNode = new MyNode<>(56);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(70);\n MyLinkedList myLinkedList = new MyLinkedList();\n myLinkedList.append(myFirstNode);\n myLinkedList.append(myThirdNode);\n myLinkedList.insert(myFirstNode,mySecondNode);\n myLinkedList.printMyNodes();\n boolean result = myLinkedList.head.equals(myFirstNode) &&\n myLinkedList.head.getNext().equals(mySecondNode) &&\n myLinkedList.tail.equals(myThirdNode);\n Assertions.assertTrue(result);\n }", "private void checkToList(ItemData itemMain) {\n int index = 0;\n for (ItemData i : itemDataList){\n int loc = Integer.parseInt(i.getscore().toString());\n int var = Integer.parseInt(itemMain.getscore().toString());\n if(var < 10 && loc == 0){\n itemMain.setimagePosition(i.getimagePosition());\n itemDataList.add(index,itemMain);\n /*\n Collections.sort(itemDataList, new Comparator<ItemData>() {\n @Override\n public int compare(ItemData t0, ItemData t1) {\n int loc = Integer.parseInt(t0.getscore().toString());\n int var = Integer.parseInt(t1.getscore().toString());\n return var - loc;\n }\n });\n */\n break;\n }\n index++;\n }\n\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 }", "@Override\r\n\tpublic List<T> sort(List<T> list) {\n\t\tassert list != null : \"list cannot be null\";\r\n\t\tfor(int i = 0; i < list.size() - 1; i ++){\r\n\t\t\tint min = i;\r\n\t\t\tfor(int j = i + 1; j < list.size(); j ++){\r\n\t\t\t\tint current = j;\r\n\t\t\t\tif(this.comparator.compare(list.get(min), list.get(current)) > 0){\r\n\t\t\t\t\tmin = current;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswap(list, i, min);\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "private boolean tagFollowsTag(List<Tag> list, Tag previous, Tag current) {\n\t\tif (previous == null)\n\t\t\treturn true;\n\n\t\tint prevMatchIndex = list.indexOf(previous);\n\t\tint tagIndex = list.indexOf(current);\n\t\tint difference = tagIndex - prevMatchIndex;\n return difference > 0 && difference <= maxTagSeparation;\n\t}", "@Override\n\tpublic boolean isNextMessage(User from, Vector comparison){\n\n\t\tfor (Object o1 : comparison.getClock().entrySet()) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) o1;\n\n\t\t\tif(this.clock.containsKey(pair.getKey())){\n\n\t\t\t\tLong reVal = (Long)pair.getValue();\n\t\t\t\tLong myVal = this.clock.get(pair.getKey());\n\t\t\t\tUser userKey = (User)pair.getKey();\n\n\t\t\t\tif(!(userKey.equals(from) && reVal.equals(myVal+1L)) ) {\n\t\t\t\t\tif(! (!userKey.equals(from) && 0 <= myVal.compareTo(reVal) ) ){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tif(!pair.getValue().equals(1L)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Object o1 : this.clock.entrySet()) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) o1;\n\n\t\t\tif(comparison.getClock().containsKey(pair.getKey())){\n\n\t\t\t\tLong myVal = (Long)pair.getValue();\n\t\t\t\tLong reVal = comparison.getClock().get(pair.getKey());\n\t\t\t\tUser userKey = (User)pair.getKey();\n\n\t\t\t\tif(!(userKey.equals(from) && reVal.equals(myVal + 1L)) ) {\n\t\t\t\t\tif(! (!userKey.equals(from) && 0 <= myVal.compareTo(reVal) ) ){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static void checkPerticularElementExitInLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tString result = \"\";\n\t\tfor(Integer i:list) {\n\t\t\tresult = (list.contains(60))?\"true\":\"false\";\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "int compare(T t1, T t2);", "public ListUtilities cocktailSort(){\n\t\tboolean swaps = true;\n\t\tListUtilities temp = new ListUtilities();\n\t\t\n\t\twhile(swaps == true){\n\t\t\t//no swaps to begin with\n\t\t\tswaps = false;\n\n\t\t\t//if not end of list\n\t\t\tif (this.nextNum != null){\n\t\t\t\t\n\t\t\t\t//make temp point to next\n\t\t\t\ttemp = this.nextNum;\n\n\t\t\t\t//if b is greater than c\n\t\t\t\tif(this.num > this.nextNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\t\n\t\t\t\t\tswapF(temp);\n\t\t\t\t}\n\t\t\t//keep going until you hit end of list\n\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t\t//if not beginning of list\n\t\t\tif (this.prevNum != null){\n\t\t\t\t//if c is smaller than b\n\t\t\t\tif(this.num < this.prevNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\tswapB(temp);\n\t\t\t\t}\n\t\t\t\t//keep going until hit beginning of list\n\t\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t}\n\t//return beginning of list\n\treturn this.returnToStart();\n\t}", "@Override\n public int compare(Item i1,Item i2){\n return i2.mark.compareTo(i1.mark);\n\n // return i1.mark.compareTo(i2,mark);\n //This is the ascending version of the same.\n }", "private static <File> void merge(ArrayList<File> firstList, ArrayList<File> secondList,\r\n ArrayList<File> wholeList, Comparator<File> usedComparison) {\r\n int i = 0;\r\n int j = 0;\r\n int k = 0;\r\n while (i < firstList.size() && j < secondList.size()) {\r\n if (usedComparison.compare(firstList.get(i), secondList.get(j)) < 0) {\r\n wholeList.set(k++, firstList.get(i++));\r\n } else {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }\r\n while (i < firstList.size()) {\r\n wholeList.set(k++, firstList.get(i++));\r\n }\r\n while (j < secondList.size()) {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }", "static Integer foo(final List<Integer> list,\n final Integer initial,\n final Function2<Integer, Integer, Integer> operator) {\n Integer accumulator = initial;\n for (final Integer element : list) {\n accumulator = operator.apply(accumulator, element);\n }\n\n return accumulator;\n }", "@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n while (j > 0) {\n\n // if the current element, is less than the previous, then....\n if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) < 0) {\n\n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n else if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) == 0) {\n \n if (compareTimes(finalsList.get(j).getBeginTime(), finalsList.get(j - 1).getBeginTime()) < 0) {\n \n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n }\n\n // decrement j\n j--;\n }\n }\n }", "public static void operator(ArrayList<tok> pHolder, ArrayList<tok> xmlList){\n\t\t\r\n\t\tif(pHolder.get(index).getType() == Token_Type.TOK_EQUAL\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_NEQUAL\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_GTHAN\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_LTHAN\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_GTEQUAL\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_LTEQUAL\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_BETWEEN\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_LIKE\r\n\t\t\t\t|| pHolder.get(index).getType() == Token_Type.TOK_IN){\r\n\t\t\tindex++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse{noError = false;}\r\n\t}", "static boolean isStraight(ArrayList<Card> c)\n {\n if(c.size() < 5)\n {\n return false;\n }\n for(int x = 0 ; x < c.size()-1 ; x++)\n {\n int rank1 = c.get(x).getRank();\n int rank2 = c.get(x+1).getRank();\n \n if(rank1 != rank2 - 1)\n {\n return false;\n }\n }\n \n return true;\n }", "@Override\n\tpublic Tuple next(){\n\t\t//Delete the lines below and add your code here\n\t\tTuple temp;\n\t\tTuple t = child.next();\n\t\tint s = -1;\n\t\tString s1;\n\t\tString s2;\n\t\tif(sorted==false){\n\t\t\tif(t!=null){\n\t\t\t\tfor(s=0; s<t.attributeList.size(); s++){\n\t\t\t\t\tif(t.attributeList.get(s).attributeName.equals(orderPredicate)){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(t!=null){\n\t\t\t\ttuplesResult.add(t);\n\t\t\t\tt = child.next();\n\t\t\t}\n\t\t\tfor(int i=0; i<tuplesResult.size(); i++){\n\t\t\t\ts1 = tuplesResult.get(i).attributeList.get(s).attributeValue.toString();\n\t\t\t\tfor(int j=i+1; j<tuplesResult.size(); j++){\n\t\t\t\t\ts2 = tuplesResult.get(j).attributeList.get(s).attributeValue.toString();\n\t\t\t\t\tif(s1.compareTo(s2) > 0){\n\t\t\t\t\t\ttemp=tuplesResult.get(i);\n\t\t\t\t\t\ttuplesResult.set(i, tuplesResult.get(j));\n\t\t\t\t\t\ttuplesResult.set(j, temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsorted=true;\n\t\t}\n\t\tif(tuplesResult.size()>0){\n\t\t\treturn tuplesResult.remove(0);\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public boolean elementsAreAlphaUpSorted(List<WebElement> elements){\n //adding so to ignore the Multiple\n //Must account for - contacts too\n By footer = By.xpath(\"//div[@id='app-footer']\");\n By multipleFirstResult = By.xpath(\"//div[contains(@class, 'modal')]//div[@class='contact'][1]//*[text()]\");\n\n waitForElement(footer);\n scrollToElement(footer);\n\n String previous = null;\n for (WebElement element : elements) {\n String current = element.getText();\n\n if (current.contains(\"Multiple\")) {\n element.click();\n current = waitForElementToAppear(multipleFirstResult).getText();\n clickCoordinate(searchBar,10,10);\n }\n\n if (previous != null) {\n if (current.compareTo(previous) < 0) {\n System.out.println(\"MIS-SORT: Ascending: '\"+current+\"' should not be after '\"+previous+\"'\");\n return false;\n }\n }\n\n previous = current;\n }\n\n return true;\n }", "static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\r\n\t\tList<Integer> val = new ArrayList<>();\r\n\t\tint aScore = 0;\r\n\t\tint bScore = 0;\r\n\t\tfor (int i=0; i<3;i++) {\r\n\t\t\tfor (int j=0;j<3;j++) {\r\n\t\t\t\tif (i==j) {\r\n\t\t\t\t\tint tempA = a.get(i);\r\n\t\t\t\t\tint tempB = b.get(j);\r\n\t\t\t\t\tif (!(1<=tempA && tempA<=100 && 1<=tempB && 1<=tempB)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tempA<tempB) {\r\n\t\t\t\t\t\tbScore += 1;\r\n\t\t\t\t\t} else if (tempA>tempB) {\r\n\t\t\t\t\t\taScore += 1;\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\tval.add(aScore);\r\n\t\tval.add(bScore);\r\n\t\treturn val;\r\n\t}", "IList<T> getNext();", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (i + 1 < hand.size()) {\n\t\t\t\t\tif (hand.get(i + 1).getCardValue().getValue()\n\t\t\t\t\t\t\t- hand.get(i).getCardValue().getValue() > 1)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "static public boolean sequenceEquals(List source, List arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it1 = source.iterator();\n\t\tIterator it2 = arg.iterator();\n\t\twhile ( it1.hasNext() ) {\n\t\t\tObject elem1 = it1.next();\n\t\t\tObject elem2 = it2.next();\n\t\t\tif ( elem1 instanceof Integer ) {\n\t\t\t\tif ( ((Integer)elem1).intValue() != ((Integer)elem2).intValue() ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( elem1 instanceof Float ) {\n\t\t\t\t\tif ( ((Float)elem1).floatValue() != ((Float)elem2).floatValue() ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( elem1 instanceof Boolean ) {\n\t\t\t\t\t\tif ( ((Boolean)elem1).booleanValue() != ((Boolean)elem2).booleanValue() ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !elem1.equals(elem2) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testIterator_Backward() {\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 instance.next();\n }\n\n i = baseList.size() - 1;\n while (instance.hasPrevious()) {\n assertEquals(baseList.get(i--), instance.previous());\n }\n\n }", "public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\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\r\n\t\t}", "public void solution2(LinkedListNode head){\n if(head==null)\n return;\n LinkedListNode current=head;\n while(current!=null){\n LinkedListNode runner=current;\n while(runner.next!=null){\n if(runner.next.data==current.data)\n runner.next=runner.next.next;\n else\n runner=runner.next;\n }\n current=current.next;\n }\n }", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void compareClassesHelper(List<Integer> arr1, List<Integer> arr2, User f) {\n Collections.sort(arr1);\n Collections.sort(arr2);\n for (int a : arr1) {\n for (int b : arr2) {\n if (a == b) {\n f.incrementCount(\"class\");\n }\n }\n }\n }", "public static void stepOne(ArrayList<Integer> list) {\n\t\t\n\t\t//keep track of number of times list is passed through\n\t\tint passNumber = 0;\n\t\t\n\t\t//iterate through arraylist from right to left\n\t\tfor(int i = list.size()-1; i >= 0; i--) {\n\n\t\t\tint newNum = list.get(i);\n\t\t\tpassNumber++;\n\t\t\t\n\t\t\t//for every other number beginning with second from the right\n\t\t\t//double number -- if two digit number results, add digits together\n\t\t\tif (passNumber % 2 == 0) {\n\t\t\t\n\t\t\t\tnewNum *= 2;\n\t\t\t\t\n\t\t\t\t//add digits together if two digit number \n\t\t\t\tif (newNum > 9) {\n\t\t\t\t\tint sum = 0;\n\t\t\t\t\t\n\t\t\t\t\twhile(newNum > 0) {\n\t\t\t\t\t\tsum = sum + newNum % 10;\n\t\t\t\t\t\tnewNum = newNum / 10;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnewNum = sum;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//replace number in list with new number\n\t\t\t\tlist.set(i, newNum);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Test\n void twoEntryAreSame(){\n ToDo t1 = new ToDo(\"1\");\n t1.setInhalt(\"Inhalt\");\n ToDo t2 = new ToDo(\"1\");\n t2.setInhalt(\"Inhalt\");\n ToDoList list = new ToDoList();\n list.add(t1);\n list.add(t2);\n\n assertEquals(0, list.get(0).compareTo(list.get(1)));\n }", "@Override\n public int compareTo(FixedSizeFIFOWorkList<E> other) {\n int smallerSize = Math.min(this.size(), other.size());\n for (int i = 0; i < smallerSize; i++) {\n if (this.peek(i).compareTo(other.peek(i)) > 0) {\n return 1;\n }\n else if (this.peek(i).compareTo(other.peek(i)) < 0) {\n return -1;\n }\n }\n \n if (this.size() > other.size()) {\n return 1;\n }\n else if (this.size() < other.size()){\n return -1;\n }\n return 0;\n \n }", "@Test\n public void testListIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "@Test\n public void testAdd_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.add(9);\n int expResult = 2;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public static void main(String[] args) {\n\n Random generator = new Random ();\n int[] List = new int[10];\n int swap ;\n\n //fill up Array\n for (int i = 0 ; i < 10 ; i++) {\n List[i]= generator.nextInt(1000) ;\n System.out.print(List[i] + \" \");\n }\n System.out.println();\n\n //Compare each number with remaining numbers\n int pointer = 0 ;\n while(pointer < 9) {\n for (pointer = 0 ; pointer < 9 ; pointer ++) {\n if ((List[pointer]) > (List[(pointer+1)])) {\n swap = List[pointer];\n List[pointer] = List[pointer + 1];\n List[pointer + 1] = swap;\n for (int i = 0 ; i < 10 ; i++) {\n System.out.print(List[i] + \" \");\n }\n System.out.println();\n break;\n }\n }\n }\n }" ]
[ "0.627645", "0.59938127", "0.59804326", "0.5823001", "0.58017385", "0.5646271", "0.55950785", "0.5584607", "0.5580421", "0.5557082", "0.55530834", "0.5548361", "0.55432034", "0.55099404", "0.5501137", "0.55005753", "0.5484074", "0.5470712", "0.5460866", "0.5435134", "0.5410586", "0.54007703", "0.539962", "0.5391787", "0.53908855", "0.5382023", "0.53686684", "0.5362787", "0.5360345", "0.53453594", "0.53401244", "0.5312161", "0.53063494", "0.5302653", "0.5300134", "0.52922446", "0.5289491", "0.52702445", "0.5265857", "0.525495", "0.5244666", "0.5242987", "0.52421963", "0.5239181", "0.52349275", "0.5229697", "0.5221291", "0.52205276", "0.5216079", "0.5197509", "0.51814634", "0.5180377", "0.5175154", "0.51743513", "0.5172303", "0.51618457", "0.5159609", "0.51540744", "0.5124226", "0.51149684", "0.5110843", "0.5108989", "0.5101615", "0.5092842", "0.5088117", "0.5086204", "0.50858945", "0.5085386", "0.50838554", "0.50832444", "0.5079883", "0.5058592", "0.5052591", "0.5042963", "0.50423515", "0.5042052", "0.50380945", "0.5035568", "0.5033113", "0.50304204", "0.5028388", "0.5024849", "0.50202525", "0.5001769", "0.50011927", "0.5001142", "0.4999364", "0.49949166", "0.498716", "0.49835297", "0.49761087", "0.49748638", "0.4972097", "0.4968851", "0.49684688", "0.4967408", "0.49657914", "0.49655625", "0.49651366", "0.49582228" ]
0.5178461
52
remember you want URL to be passed through command prompt
public static void main(String[] args) throws ClientProtocolException, IOException { String url = "http://localhost:4444/index.html"; String url2 = "http://posttestserver.com/post.php"; // creates new client G52APRClient client = new G52APRClient(); // GET System.out.println(client.httpGet(url)); // HEAD //System.out.println(client.httpHead(url)); // POST String dataBody = "Testing POST method, it worked. "; //System.out.println(client.httpPost(url, dataBody)); // POSTARRAY // creating ArrayList ArrayList<NameValuePair> dataArray = new ArrayList<NameValuePair>(); dataArray.add(new BasicNameValuePair("Name", "Natalia")); dataArray.add(new BasicNameValuePair("Course", "Computer Science")); dataArray.add(new BasicNameValuePair("Age", "19")); //System.out.println(client.httpPost(url, dataArray)); // getConditional******************************************* // date which should return the body (last read before it was last // modified) String date1 = "Sun Nov 16 21:31:815 GMT 2013"; // date which should return the 304 status line (last read after it was // last modified) String date2 = "Sun Nov 16 21:31:815 GMT 2015"; //System.out.println(client.httpGetConditional(url, date1)); //System.out.println(client.httpGetConditional(url, date2)); // RUN TESTS FROM THIS MAIN TO ClientTests (testing for part 2 of // coursework) //ClientTests ct = new ClientTests(new G52APRClient()); //ct.runTests("http://cs.nott.ac.uk/~syn/webfiles/index.html"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tString myUrl = \"http://github.com/abhi20aug\";\n\t\ttry {\n\t\t\tURL newUrl = new URL(myUrl);\n\t\t\tSystem.out.println(\"simple url\"+newUrl.toString());\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tFistURLTest test = new FistURLTest();\n\t\tString url = \"http://bbs.hupu.com/3712591.html\";\n\t\turl = test.changeUrl(url);\n\t\tSystem.out.println(url);\n\t}", "public static void main(String[] args) {\n boolean httpUrl = StringUtil.isHttpUrl(\"https://www.bequgexs.com\");\r\n System.out.println(httpUrl);\r\n\t}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "@Step(\"<url> sayfasına git\")\n public void geturl(String url) {\n Driver.webDriver.get(url + \"/\");\n }", "private static void addSeedURL()\r\n\t{\r\n\t\tSystem.out.println(\"Enter a website to search for keywords.\");\r\n\t\tString userInput = input.nextLine();\r\n\t\t\r\n\t\tif(userInput.length() >= 7 && !(userInput.substring(0, 6).equals(\"https://\")))\r\n\t\t{\r\n\t\t\tuserInput = \"http://\" + userInput;\r\n\t\t\t\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tSharedLink.addLink(userInput);\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void displayURL(String url) {\n\t\tboolean windows = isWindowsPlatform();\n\t\tString cmd = null;\n\t\ttry {\n\t\t\tif (windows) {\n\t\t\t\t// cmd = 'rundll32 url.dll,FileProtocolHandler http://...'\n\t\t\t\tcmd = WIN_PATH + \" \" + WIN_FLAG + \" \" + url;\n\t\t\t\tRuntime.getRuntime().exec(cmd);\n\t\t\t} else {\n\t\t\t\t// Under Unix, Netscape has to be running for the \"-remote\"\n\t\t\t\t// command to work. So, we try sending the command and\n\t\t\t\t// check for an exit value. If the exit command is 0,\n\t\t\t\t// it worked, otherwise we need to start the browser.\n\t\t\t\t// cmd = 'netscape -remote openURL(http://www.javaworld.com)'\n\t\t\t/*\tcmd = UNIX_PATH + \" \" + UNIX_FLAG + \"(\" + url + \")\";\n\t\t\t\tProcess p = Runtime.getRuntime().exec(cmd);\n\t\t\t\ttry {\n\t\t\t\t\t// wait for exit code -- if it's 0, command worked,\n\t\t\t\t\t// otherwise we need to start the browser up.\n\t\t\t\t\tint exitCode = p.waitFor();\n\t\t\t\t\tif (exitCode != 0) {\n\t\t\t\t\t\t// Command failed, start up the browser\n\t\t\t\t\t\t// cmd = 'netscape http://www.javaworld.com'\n\t\t\t\t\t\tcmd = UNIX_PATH + \" \" + url;\n\t\t\t\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException x) {\n\t\t\t\t\tSystem.err.println(\n\t\t\t\t\t\t\"Error bringing up browser, cmd='\" + cmd + \"'\");\n\t\t\t\t\tSystem.err.println(\"Caught: \" + x);\n\t\t\t\t} */\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t// couldn't exec browser\n\t\t\tlogObj.debug(\"Could not invoke browser, command=\" + cmd, ex);\n\t\t}\n\t}", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "public static void main(String args[]) throws Exception\n {\n URL myurl = new URL(args[0]);\n // get inputstream of the URL\n InputStream is = myurl.openStream();\n\n int ch;\n\n while ((ch = is.read()) != -1)\n System.out.print( (char)ch);\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tStart st = new Start();\n\t\t\n\t\tWebDriver drv = st.driverInit();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tString url = st.prop.getProperty(\"url\") ;\n\t\t\n\t\tdrv.get(url);\n\t\tSystem.out.println(dr.getTitle());\n\t\t\n\t\t\n\t\t\n \n\n\t}", "public static void main(String[] args) {\n\t\tinvokeFirefoxBrowser();\n\t\t\n\t\t//Enter the URL\n\t\tenterURL(\"https://demoqa.com/buttons\");\n\t\t\n\t}", "@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }", "String wget(String url);", "public static void openURL() {\n\t\tURL newURL;\n\t\ttry {\n\t\t\tnewURL = new URL(newLink);\n\t\t\tinput = new Scanner(new InputStreamReader(newURL.openStream()));\n\t\t}\n\t\tcatch (MalformedURLException ex) {\n\t\t\tSystem.out.println(\"Invalid URL\");\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(\"I/O Errors: no such file\");\t\t\t\n\t\t}\n\t}", "public void urlCommand(String com, String url) throws IOException, IllegalArgumentException {\n if (url == null || url.length() == 0) {\n throw new IllegalArgumentException(\"Zero length url\");\n }\n checkCommand(com);\n connect();\n writeHeader();\n _dos.writeBytes(com);\n _dos.writeInt(url.length() + 1);\n _dos.writeBytes(url + \"\\0\");\n _baos.writeTo(_out);\n }", "CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}", "public void changeUrl() {\n url();\n }", "@Given(\"url {string}\")\r\n\tpublic void url(String string) {\n\t\tString chromepath=\"C:\\\\Users\\\\a07208trng_b4a.04.26\\\\Desktop\\\\selenium\\\\jar\\\\chromedriver_win32\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromepath);\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.get(string);\r\n\t\tdriver.manage().window().maximize();\r\n\t}", "public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }", "public static void main (String[] args) throws IOException\n\t{\n\t\tString urlString;\n\t\t\n\t\tif(args.length == 1)\n\t\t{\n\t\t\turlString = args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\turlString = \"http://www.oracle.com/\";\n\t\t\tSystem.out.println(\"Using \" + urlString);\n\t\t}\n\t\t\n\t\t//open connection\n\t\tURL u = new URL (urlString);\n\t\tURLConnection connection = u.openConnection();\n\t\t\n\t\t//check if response code is HTTP_OK (200)\n\t\tHttpURLConnection httpConnection = (HttpURLConnection) connection;\n\t\tint code = httpConnection.getResponseCode();\n\t\tString message = httpConnection.getResponseMessage();\n\t\tSystem.out.println(code + \" \" + message);\n\t\t\n\t\tif (code != HttpURLConnection.HTTP_OK)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//read server response\n\t\tInputStream instream = connection.getInputStream();\n\t\tScanner in = new Scanner(instream);\n\t\t\n\t\twhile (in.hasNextLine())\n\t\t{\n\t\t\tString input = in.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t}\n\t}", "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "private String help(final String hUrl) {\n \tif (hUrl.startsWith(\"http://\")) {\n\t \tDisplay.getDefault().asyncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tBioclipsePlatformManager bioclipse = new BioclipsePlatformManager();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbioclipse.openURL(new URL(hUrl));\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(e);\n\t\t\t\t\t} catch (BioclipseException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t \t});\n\t\t\treturn \"\";\n \t} else {\n \t\treturn hUrl;\n \t}\n }", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }", "public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}", "private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tSystem.out.println(getUrlByKey(\"登录页面\"));\n\t\t\n\t}", "public static void main(String[] args) {\n String url = ConfigurationReader.getProperty(\"url\");\n\n Driver.get().get(url);\n\n BrowserUtils.wait(2);\n Driver.close();\n\n }", "public static void main(String[] args) {\n\n BrowserService browser = null;\n switch (args[0].toLowerCase()) {\n case \"chrome\":\n browser = new Chrome();\n break;\n case \"safari\":\n browser = new Safari();\n break;\n default:\n System.err.println(\"Unsupported browser\");\n System.exit(1);\n }\n\n System.out.println(\"Opened \" + args[0]);\n //polymorphism is an ability to take different shapes\n //in Java interface data types can be initialized with Objects that implement the interface.\n //and this a runtime process. Dynamic binding.\n browser.navigate(args[1]);\n System.out.println(args[0] + \" navigated to \" + args[1]);\n getUrl(browser);\n }", "void openLinkInSystemBrowser(String url, int errorMsg);", "public static void main(String[] args) {\n\t\ttry {\n\t\t\t// get URL string from command line or use default\n\t\t\tString urlString;\n\t\t\tif(args.length>0) urlString=args[0];\n\t\t\telse urlString=\"https://www.oracle.com/technetwork/java/index.html\";\n\t\t\t// open reader for URL\n\t\t\tInputStreamReader in=new InputStreamReader(new URL(urlString).openStream());\n\t\t\t// read contents into string builder\n\t\t\tStringBuilder input=new StringBuilder();\n\t\t\tint ch;\n\t\t\twhile((ch=in.read())!=-1) {\n\t\t\t\tinput.append((char)ch);\n\t\t\t}\n\t\t\t// search for all occurrences of pattern\n\t\t\tString patternString=\"<a\\\\s+href\\\\s*=\\\\s*(\\\"[^\\\"]*\\\"|[^\\\\s>]*)\\\\s*>\";\n\t\t\tPattern pattern=Pattern.compile(patternString,Pattern.CASE_INSENSITIVE);\n\t\t\tMatcher matcher=pattern.matcher(input);\n\t\t\twhile(matcher.find()) {\n\t\t\t\tint start=matcher.start();\n\t\t\t\tint end=matcher.end();\n\t\t\t\tString match=input.substring(start-end);\n\t\t\t\tSystem.out.println(match);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}catch (PatternSyntaxException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }", "@FXML\n private void copyUrl() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(HELP_URL);\n clipboard.setContent(url);\n }", "public static void main(String[] args) {\n\t\tURLContent uc = new URLContent();\n\t\tuc.fetchTitleString(\"http://www.nytimes.com/2003/08/07/us/first-test-for-freshmen-picking-roommates.html\");\n\t}", "public static void main(String args[] ) {\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the url to consult.\");\r\n\t\tScanner ent = new Scanner(System.in);\r\n\r\n\t\tLinkedList<String> listcookies = getFromFile();\r\n\t\tSystem.out.println(\"Table of previous urls: \" + listcookies);\r\n\t\tString cookies = \"\";\r\n\t\tString cookiev = null;\r\n\t\tString reply = \"GET /\"+ent.nextLine()+\" HTTP1.1\\r\\n\";\r\n\t\tent.close();\r\n\t\t\r\n\t\tSocket myClient;\r\n\t\tDataInputStream entry;\r\n\t\tDataOutputStream exit;\r\n\t\tint i = 0;\r\n\t\tif (listcookies != null) for (String s : listcookies) {cookies+=i+\"=\"+s+\"; \"; i++;}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyClient = new Socket(\"localhost\", 9999);\r\n\t\t\tentry = new DataInputStream(myClient.getInputStream());\r\n\t\t\texit = new DataOutputStream(myClient.getOutputStream());\r\n\t\t\t\r\n\t\t\tif (!cookies.equals(\"\")) reply += \"Cookie: \"+cookies+\"\\r\\n\";\r\n\t\t\treply += \"\\r\\n\";\r\n\t\t\tSystem.out.println(\"Current query: \"+reply);\r\n\t\t\texit.writeBytes(reply);\r\n\t\t\t\r\n\t\t\tString inf = entry.readLine();\r\n\t\t\twhile (inf != null) {\r\n\t\t\t\tSystem.out.println(inf);\r\n\t\t\t\tString[] parts = inf.split(\" \");\r\n\t\t\t\tif (parts[0].equals(\"Set-Cookie:\")) cookiev = parts[1];\r\n\t\t\t\tinf = entry.readLine();\r\n\t\t\t}\r\n\t\t\tif (cookiev != null) putInFile(cookiev);\r\n\t\t\tentry.close();\r\n\t\t\texit.close();\r\n\t\t} catch (IOException e) {System.out.println(e);}\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\selenium driver\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t WebDriver driver= new ChromeDriver();\n\t driver.manage().window().maximize();\n\t driver.get(\"http://demoaut.com\");\n\t List<WebElement> linkNames = driver.findElements(By.tagName(\"a\"));\n\t System.out.println(\"Total No of links\"+linkNames.size());\n\t for(int i=0;i<linkNames.size();i++)\n\t {\n\t \t System.out.println(linkNames.get(i).getText());\n\t \t System.out.println(linkNames.get(i).getText());\n\t }\n\t \n\t driver.findElement(By.linkText(\"Hotels\")).click();\n\t String currentUrl=driver.getCurrentUrl();\n\t System.out.println(\"Current URL\"+currentUrl);\n\t \n\n\t}", "public static void main(String[] args) {\n System.setProperty(\"webdriver.chrome.driver\", \"/Users/bulut/Selenium/chromedriver\");\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://testpages.herokuapp.com/styled/index.html\");\n\n driver.findElement(By.id(\"alerttest\")).click();\n\n String URL = driver.getCurrentUrl();\n System.out.println(URL);\n\n\n }", "public void setCmdFileURL(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localCmdFileURL=param;\n \n\n }", "public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\tChromeOptions chromeoptions=new ChromeOptions();\r\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://192.168.225.206:6878/wd/hub\"),chromeoptions);\r\n\t\t\r\n\t\tdriver.get(\"http://opensource.demo.orangehrmlive.com\");\r\n\t\tSystem.out.println(\"URL opened\");\r\n\r\n\t}", "@Given(\"^we have valid url \\\"([^\\\"]*)\\\"$\")\n\tpublic void we_have_valid_url(String arg1) {\n\t\t\n\t apiClient.setBasePath(arg1);\n\t}", "void openUrl (String url);", "public static void main(String[] args) {\n\n Request getReq = new Request();\n\n try {\n// getReq.sendReq(\"127.0.0.1\", \"/\", 80);\n getReq.sendReq(\"127.0.0.1\", \"/\", 40289);\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n\n\n }", "public void openUrlInBrowser(String URL) {}", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n String URL = \"\";\n URL = bufferedReader.readLine();\n\n if (URL.isEmpty() || URL.indexOf(\"?\") == -1 || URL.indexOf(\"?\") == URL.length()-1)\n return;\n\n ArrayList<String> params = getParams(URL);\n\n if (params == null)\n return;\n\n printParams(params);\n processObj(params);\n// for (String s : params)\n// if (s.contains(\"obj=\")) {\n// callAlert(params);\n// break;\n// }\n }", "public static void main(String[] args) {\n\t\tString url = \"http://hell.com/?pw=8936,id='fsfds'\";\n\t\t\n\t\tint location = url.indexOf(\"pw=\");\n\t\tString str2 = url.substring(location+7);\n\t\tString str1 = url.substring(0,location+3);\n\t\tSystem.out.println(str1+\"****\"+str2);\n\t\t\n\t}", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}", "private void promptAddSeed()\n {\n String seedURL = JOptionPane.showInputDialog(null, \"Enter a valid URL\", \"Add URL\", JOptionPane.INFORMATION_MESSAGE);\n \n if(seedURL == null) return;\n \n if(!Spider.validateURL(seedURL))\n JOptionPane.showMessageDialog(null, \"Invalid URL\");\n else\n {\n spider.addSeedURL(seedURL);\n urlModel.addElement(seedURL);\n }\n }", "public static void main(String[] args) {\n Scanner userInput = new Scanner(System.in);\n\n System.out.println(\"Learning Java from?\");\n // Using nextLine method to get the input and move the cursor to the new line\n String website = userInput.nextLine();\n // Close the scanner object using close() method to prevent memory leak\n userInput.close();\n System.out.println(\"I am learning Java from \" + website);\n }", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tHttpurlRequest request=new HttpurlRequest();\r\n\t\trequest.getmethodexample();\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tin = new Scanner(System.in);\r\n\t\tString email = null;\r\n\t\tString password = null;\r\n\t\tSystem.out.println(\"Please enter your email: \");\r\n\t\temail = in.next();\r\n\t\t\r\n\t\tSystem.out.println(\"Please enter your password: \");\r\n\t\tpassword = in.next();\r\n\t\t\r\n\t\tString urlLink = \"http://localhost/java/java.php?email=\"+email+\"&password=\"+password;\r\n\t\tURL url = new URL(urlLink);\r\n\t\tHttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\r\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tString line;\r\n\t\t\r\n\t\twhile ((line = in.readLine()) != null){\r\n\t\t\tsb.append(line);\r\n\t\t}\r\n\t\tin.close();\r\n\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws URISyntaxException, IOException {\n Desktop desktop = Desktop.getDesktop();\n URI uri = new URI(\"http://www.baidu.com\");\n// for (int i = 0; i < 10; i++) {\n// desktop.browse(uri);\n// }\n File file = new File(\"D:/BugReport.txt\");\n desktop.edit(file);\n\n }", "@Given(\"^User Clicks on url \\\"([^\\\"]*)\\\"$\")\n\tpublic void user_Clicks_on_url(String arg1) throws Throwable {\n\t\tthis.driver.navigate().to(\"https://wallethub.com/profile/test-insurance-company-13732055i\");\n\t}", "public AnnotateClueRunWithURLs() {\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\tWebDriver d=new ChromeDriver();\n\t\td.get(\"file:///C:/Users/SYED%20HASSAN/Desktop/selinium%202%20se/p1.html\");\n\t\tString title = d.getTitle();\n\t\tSystem.out.println(\"title = \"+title);\n\t\tString window = d.getWindowHandle();\n System.out.println(\"windowhandle\"+window);\n String c = d.getCurrentUrl();\n System.out.println(\"currenturl\"+c);\n d.close();\n System.out.println();\n\t}", "public static void main(String[] args) throws IOException, URISyntaxException\n {\n// ConfigFactory.getCommonConfig().setProperty(\"org.astrogrid.registry.query.endpoint\", \"http://hydra.star.le.ac.uk:8080/astrogrid-registry/services/RegistryQuery\");\n \n if (args.length<=1) {\n// printHelp();\n URL id = new URL(\"homespace:[email protected]#MartinsTestTree.txt\");\n System.out.println(\"Testing out...\");\n Slinger.sling(new StringSource(\"Some text\"), new UrlSourceTarget(id));\n System.out.println(\"...Reading back...\");\n StringWriter sw = new StringWriter();\n Slinger.sling(new UrlSourceTarget(id), new WriterTarget(sw));\n System.out.println(\"...Done: \"+sw.toString());\n }\n else if (args[0].trim().toLowerCase().equals(\"get\")) {\n SourceIdentifier source = new UrlSourceTarget(new URL(args[1]));\n TargetIdentifier target = new StreamTarget(System.out);\n sling(source, target);\n }\n else {\n if (args.length<=2) {\n printHelp();\n }\n else if (args[0].trim().toLowerCase().equals(\"copy\")) {\n SourceIdentifier source = new UrlSourceTarget(new URL(args[1]));\n TargetIdentifier target = new UrlSourceTarget(new URL(args[2]));\n sling(source, target);\n }\n else if (args[0].trim().toLowerCase().equals(\"send\")) {\n SourceIdentifier source = new StringSource(args[1]);\n TargetIdentifier target = new UrlSourceTarget(new URL(args[2]));\n sling(source, target);\n }\n else {\n printHelp();\n }\n }\n /**/\n }", "public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}", "public void setURL(String url);", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out\n\t\t\t\t.println(\"Enter URL link in following format: http://stranica.com/homepage\");\n\t\tString url = input.next();\n\t\tString name = \"\", subpage = \"\";\n\n\t\tint urlLength = url.length();\n\n\t\t// Iterating through the url address finding site name\n\t\tfor (int i = 0; i < urlLength; i++) {\n\t\t\tif (url.charAt(i) == '/' && url.charAt(i + 1) == '/') {\n\t\t\t\ti += 2;\n\t\t\t\tdo {\n\t\t\t\t\tname += url.charAt(i);\n\t\t\t\t\ti++;\n\t\t\t\t} while (url.charAt(i) != '/');\n\t\t\t} \t\t\t\n\t\t}\n\t\t\n\t\t// Iterating through the url address finding site subpage\n\t\tfor (int i = 0; i < urlLength; i++) {\n\t\t\tif (url.charAt(i) == '/' && url.charAt(i - 1) != '/' && url.charAt(i - 1) != ':') {\n\t\t\t\ti ++;\n\t\t\t\tdo {\n\t\t\t\t\tsubpage += url.charAt(i);\n\t\t\t\t\ti++;\n\t\t\t\t} while (i < urlLength);\n\t\t\t} \t\t\t\n\t\t}\n\n\t\tSystem.out.println(\"Name: \" + name);\n\t\tSystem.out.println(\"Subpage is: \" + subpage);\n\n\t\tinput.close();\n\n\t}", "private JButton getCmdUrl() {\r\n\t\tif (cmdUrl == null) {\r\n\t\t\tcmdUrl = new JButton();\r\n\t\t\tcmdUrl.setText(\"\");\r\n\t\t\tcmdUrl.setToolTipText(\"Import proxy list from remote file. List should be in ip:port or ip port format.\");\r\n\t\t\tcmdUrl.setIcon(new ImageIcon(getClass().getResource(\"/remote.png\")));\r\n\t\t\tcmdUrl.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tString url = JOptionPane.showInputDialog(null,\r\n\t\t\t\t\t\t\t\"Import from remote file\",\r\n\t\t\t\t\t\t\t\"Enter the remote url of your proxy list\",\r\n\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\tif (url!=null)\r\n\t\t\t\t\t\taddRows(p.getProxyFromUrl(url));\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdUrl;\r\n\t}", "public void setURL(String _url) { url = _url; }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public void setURL(@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n String inURL);", "public static void main(String[] args) {\n\t\tClass cls = AbsolutePath.class; // These api are coming from java framework\n\t\tClassLoader loader = cls.getClassLoader();\n\t\tURL url = loader.getResource(\"./chromedriver.exe\"); // \". \" represents current working directory \n System.out.println(url.toString()); //chromeedriver gets automatically copied from source to target\n\t}", "public static void main(String[] args) throws IOException {\n\t\tSystem.out.println(WebUtil.get(\"http://www.cnhnb.com\",\"\"));\r\n \t\r\n \t\r\n\t}", "public void addUrlArg(String key, String value);", "public static void main(String[] args) {\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner scan=new Scanner(System.in);\r\n\t\t\tSystem.out.print(\"페이지 입력:\");\r\n\t\t\tint page=scan.nextInt();\r\n\t\t\tRecipeSite rs=new RecipeSite(); // recipeAllData()가 저장된다 \r\n\t\t\tRecipe[] recipe=rs.recipeAllData(page);\r\n\t\t\tSystem.out.println(\"====================== 레시피 목록 =======================\");\r\n\t\t\tfor(Recipe r:recipe)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"번호:\"+r.getNo());// 메모리 값을 읽어 올때 getXxx() => 메소드를 이용해서 통신 \r\n\t\t\t\tSystem.out.println(\"제목:\"+r.getTitle());\r\n\t\t\t\tSystem.out.println(\"쉐프:\"+r.getChef());\r\n\t\t\t\tSystem.out.println(r.getHit());\r\n\t\t\t\tSystem.out.println(r.getLink());\r\n\t\t\t\tSystem.out.println(\"========================================================\");\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"쉐프 작품 보기 번호:\");\r\n\t\t\tint num=scan.nextInt();\r\n\t\t\tRuntime.getRuntime().exec(\"C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe \"+\"https://www.10000recipe.com/\"+recipe[num-1].getLink());\r\n\t\t}catch(Exception e) {}\r\n\t}", "void setRemoteUrl(String name, String url, String GIT_DIR) throws GitException, InterruptedException;", "private static void parseCommandLine(String[] args) {\r\n\t\tif (args.length != 3)\r\n\t\t\terror(\"usage: Tester server port url-file\");\r\n\t\t\t\r\n\t\tserverName = args[0];\r\n\t\tserverPort = Integer.parseInt(args[1]);\r\n\t\turlFileName = args[2];\r\n\t}", "public static void main(String[] args) throws MalformedURLException {\n\t \n\t\tthirdshot run = new thirdshot(\"Go\");\n\t\t//start();\n\t\t }", "@Given(\"^the url of the application under test$\")\r\n\tpublic void getUrl() throws Exception {\n\t\tdriver.get(url);\r\n\t}", "public static void main(String[] args) {\nlinktext oo=new linktext();\noo.launch();\n\t}", "public void setURL(java.lang.CharSequence value) {\n this.URL = value;\n }", "public void enterURL() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"enter signup url to create child company\");\n\t\t// driver.get(\"http://www.simplebilling.co.in:8080/signup\");\n\t\tp.getPropertyFile(\"test\", \"configuration.properties\");\n\t\tString url = p.getVal(\"url\");\n\t\tdriver.get(url);\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\tSystem.out.println(MyHttpClient\r\n\t\t\t\t.doGet(DrawQutoesUtils.url+defaultCode));\r\n\t}", "public static void main(String args[]) throws Exception\r\n\t{\n\t\tURL obj = new URL(\"http://facebook.com/login.html\");\t\r\n\t\t\r\n\t\tSystem.out.println(\"Protocol used : \"+obj.getProtocol());\r\n\t\tSystem.out.println(\"Host name : \"+obj.getHost()); \r\n\t\tSystem.out.println(\"File name : \"+obj.getFile());\r\n\t\tSystem.out.println(\"Port number :\"+obj.getPort());\r\n\t\tSystem.out.println(\"Path : \"+obj.getPath());\r\n\t}", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void triggerURL(String url) {\r\n\t\tif (driver != null) {\r\n\t\t\ttry {\r\n\t\t\t\tdriver.get(url);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Override\n public void execute () {\n if (Desktop.isDesktopSupported()) {\n try {\n Desktop.getDesktop().browse(new URI(HELP_URL));\n }\n catch (Exception e) {\n\n }\n }\n }", "public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\tString filePath=\"configs\\\\Task.properties\";\n\t\t\n\t\tFileInputStream fis=new FileInputStream(filePath);\t\n\t\t\n\t\t\n\t\tProperties prop=new Properties();\n\t\tprop.load(fis);\n\t\t\n\t\tString browser=prop.getProperty(\"browser\");\n\t\tString url=prop.getProperty(\"url\");\n\t\t\n\t\tSystem.out.println(browser+\"-->\"+url);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;", "public String getURL();", "public static void main(String[] args) {\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //this 3 things need to be done to open a browser\n driver.get(\"https://practice.cybertekschool.com\");\n\n String title = driver.getTitle();\n\n //soutv--> you don need to write \"title\"\n System.out.println(\"title = \" + title);\n\n String currntUrl= driver.getCurrentUrl();\n System.out.println(\"currntUrl = \" + currntUrl);\n\n //get the source of the page\n String pageSource = driver.getPageSource();\n System.out.println(\"pageSource = \" + pageSource);\n\n\n }", "public static void openURL(String url) {\n try { //attempt to use Desktop library from JDK 1.6+\n Class<?> d = Class.forName(\"java.awt.Desktop\");\n d.getDeclaredMethod(\"browse\", new Class[] {java.net.URI.class}).invoke(\n d.getDeclaredMethod(\"getDesktop\").invoke(null),\n new Object[] {java.net.URI.create(url)});\n //above code mimicks: java.awt.Desktop.getDesktop().browse()\n }\n catch (Exception ignore) { //library not available or failed\n String osName = System.getProperty(\"os.name\");\n try {\n if (osName.startsWith(\"Mac OS\")) {\n Class.forName(\"com.apple.eio.FileManager\").getDeclaredMethod(\n \"openURL\", new Class[] {String.class}).invoke(null,\n new Object[] {url});\n }\n else if (osName.startsWith(\"Windows\"))\n Runtime.getRuntime().exec(\n \"rundll32 url.dll,FileProtocolHandler \" + url);\n else { //assume Unix or Linux\n String browser = null;\n for (String b : browsers)\n if (browser == null && Runtime.getRuntime().exec(new String[]\n {\"which\", b}).getInputStream().read() != -1)\n Runtime.getRuntime().exec(new String[] {browser = b, url});\n if (browser == null)\n throw new Exception(Arrays.toString(browsers));\n }\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, errMsg + \"\\n\" + e.toString());\n }\n }\n }", "public static void main(String[] args) {\n try {\n String url = \"file:///C:/enwiktionary-latest-pages-articles.xml.bz2.xml.bz2.xml\";\n// String url = \"file:///D:/enWikt_Samp.xml\n File file = new File(new URI(url));\n System.out.println(file.toURI());\n\n\n// fileLoader(file);\n staxReader(file);\n// vtdReader(file); vtd is where kittens go to die.\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String h[]) throws IOException\n {\n try {\n String link_url = \"https://www.facebook.com\";\n URL obj1 = new URL(link_url); //URL Connection Created...\n HttpURLConnection con1 = (HttpURLConnection) obj1.openConnection(); //Http URL Connection Created...\n System.out.println(\"https://www.facebook.com\");\n System.out.println(\"Connection Response Message : \");\n con1.disconnect();\n }\n catch (Exception e) {\n System.out.println( e);\n }\n }", "public static void main(String[] args) {\n UrlValidator uv = new UrlValidator();\n for (String arg : args) {\n try {\n URI uri = new URI(arg);\n uri = uri.normalize();\n System.out.println(uri);\n System.out.printf(\"URI scheme: %s%n\", uri.getScheme());\n System.out.printf(\"URI scheme specific part: %s%n\", uri.getSchemeSpecificPart());\n System.out.printf(\"URI raw scheme specific part: %s%n\", uri.getRawSchemeSpecificPart());\n System.out.printf(\"URI auth: %s%n\", uri.getAuthority());\n System.out.printf(\"URI raw auth: %s%n\", uri.getRawAuthority());\n System.out.printf(\"URI userInfo: %s%n\", uri.getUserInfo());\n System.out.printf(\"URI raw userInfo: %s%n\", uri.getRawUserInfo());\n System.out.printf(\"URI host: %s%n\", uri.getHost());\n System.out.printf(\"URI port: %s%n\", uri.getPort());\n System.out.printf(\"URI path: %s%n\", uri.getPath());\n System.out.printf(\"URI raw path: %s%n\", uri.getRawPath());\n System.out.printf(\"URI query: %s%n\", uri.getQuery());\n System.out.printf(\"URI raw query: %s%n\", uri.getRawQuery());\n System.out.printf(\"URI fragment: %s%n\", uri.getFragment());\n System.out.printf(\"URI raw fragment: %s%n\", uri.getRawFragment());\n } catch (URISyntaxException e) {\n System.out.println(e.getMessage());\n }\n System.out.printf(\"isValid: %s%n\", uv.isValid(arg));\n }\n }", "public void setUrl(String url);", "public void setUrl(String url);", "private void printWebInterfaceURL\n\t\t(PrintWriter out)\n\t\t{\n\t\tout.print (\"http://\");\n\t\tout.print (myWebHost);\n\t\tout.print (\":\");\n\t\tout.print (myWebPort);\n\t\tout.print (\"/\");\n\t\t}", "String getRequestURL();", "public static void main(String[] args) {\n\n String urlString = \"https://www.google.de\";\n //String urlString = \"https://plan.fritz.box:9092/ux/#\";\n //String urlString = \"http://plan.fritz.box:9091/ux/#\";\n //String urlString = \"http://127.0.0.1:30000/eventListener/v3\";\n\n try {\n test(new URL(urlString), true);\n } catch (Exception e) {\n System.out.println(\"(..something..) failed\");\n e.printStackTrace();\n }\n /*\n System.out.println(\"Test HTTPS\");\n\n final HttpsClient httpTestClient;\n httpTestClient = new HttpsClient();\n\n httpTestClient.testIt(\n //\"https://plan.fritz.box:9092/ux/#\",\n \"https://www.google.de\",\n \"/home/herbert/odl/distribution-karaf-0.5.1-Boron-SR1/etc/clientkeystore\",\n \"daylight2016\"\n );/**/\n\n }", "private void openUri()\r\n {\r\n JOptionPane optionPane = new JOptionPane(new JLabel(\"URI:\"), \r\n JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);\r\n optionPane.setWantsInput(true);\r\n JDialog dialog = optionPane.createDialog(frame, \"Enter URI\");\r\n dialog.setResizable(true);\r\n dialog.setVisible(true);\r\n Object value = optionPane.getValue();\r\n if (value == null)\r\n {\r\n return;\r\n }\r\n if (!value.equals(JOptionPane.OK_OPTION))\r\n {\r\n return;\r\n }\r\n String uriString = (String)optionPane.getInputValue();\r\n if (uriString == null || uriString.trim().isEmpty())\r\n {\r\n return;\r\n }\r\n URI uri = null;\r\n try\r\n {\r\n uri = new URI(uriString);\r\n } \r\n catch (URISyntaxException e)\r\n {\r\n JOptionPane.showMessageDialog(\r\n frame, \"Invalid URI: \"+e.getMessage(), \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n openUriInBackground(uri);\r\n }", "private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}", "public static void main(String[] args) throws Exception \r\n\t{\n\t\tURL url = new URL(\"http://volume1.coreservlets.com\");\r\n BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));\r\n\r\n String inputLine;\r\n while ((inputLine = in.readLine()) != null)\r\n\t\t{\r\n System.out.println(inputLine);\r\n }\r\n\t\tin.close();\r\n }", "@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent browseIntent = new Intent( Intent.ACTION_VIEW , Uri.parse(urlStr) );\r\n startActivity(Intent.createChooser(browseIntent, \"Connecting...\"));\r\n \t\t\t}", "public static void main(String[] args) {\n String url = crawlYanolja();\n }", "@Override\n\tpublic boolean openURL(final String url) {\n\t\ttry {\n\t\t\tURI uri = new URI(url);\n\t\t\tif(Desktop.isDesktopSupported()) {\n\t\t\t\tfinal Desktop desktop = Desktop.getDesktop();\n\t\t\t\tdesktop.browse(uri);\n\t\t\t}\n\t\t\telse { //fallback if desktop API not supported\n\t\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\t\tString cmd = browser + \" \" + url;\n\t\t\t\t\tfinal Process p = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\tif(p.waitFor() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showInputDialog(null, \"There was an error while attempting to open the system browser. \"\n\t\t\t\t\t+ \"\\nPlease copy and paste the following URL into your browser:\", url);\n\t\t\tlogger.info(\"Error opening system browser; displaying copyable link instead\");\n\t\t} catch (URISyntaxException e) {\n\t\t\tlogger.warn(\"This URI is invalid: \" + url, e);\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.warn(\"Browser process thread interrupted\");\n\t\t}\n\t\treturn true;\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tString path=\"browser_drivers\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\r\n\t\tWebDriver driver=new ChromeDriver(); //Launch browser\r\n\t\tdriver.get(\"http://seleniumhq.org\"); //Load webpage\r\n\t\tdriver.manage().window().maximize(); //maximize browser window\r\n\t\t\r\n\t\t\r\n\t\tString Exp_url=\"https://www.seleniumhq.org/\";\r\n\t\t\r\n\t\t//Capture runtime url\r\n\t\tString Runtime_url=driver.getCurrentUrl();\r\n\t\t\t\t\r\n\t\tif(Runtime_url.equals(Exp_url))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected url presented for selenium homepage\");\r\n\t\t\t\r\n\t\t\tWebElement Download_tab=driver.findElement(By.xpath(\"//a[@title='Get Selenium']\"));\r\n\t\t\tDownload_tab.click();\r\n\t\t\t\r\n\t\t\tif(driver.getCurrentUrl().contains(\"download/\"))\r\n\t\t\t\tSystem.out.println(\"expected url presented, Downlaod page verified\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"expected url not presented, download page not verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wrong url presnted for selenium hompage\");\r\n\t\t}\r\n\t\r\n\t}", "void onURLChosen(String url);" ]
[ "0.6853879", "0.6477443", "0.6324346", "0.63084227", "0.6284216", "0.6275229", "0.6247324", "0.62345815", "0.6229644", "0.60723674", "0.60476863", "0.60311216", "0.5997141", "0.59959334", "0.5993163", "0.5978467", "0.590974", "0.5861968", "0.5849108", "0.5846091", "0.58314526", "0.58106405", "0.5798211", "0.5778968", "0.57710654", "0.575488", "0.57367635", "0.57307905", "0.5721887", "0.57161003", "0.5710489", "0.57064945", "0.57029825", "0.56953436", "0.5680136", "0.5670132", "0.56690097", "0.56443346", "0.5641473", "0.56389844", "0.56296647", "0.56140536", "0.5606295", "0.55972445", "0.5594342", "0.55549437", "0.55185366", "0.5516374", "0.5516215", "0.5515465", "0.5495703", "0.5492956", "0.54902", "0.54835147", "0.5483131", "0.5479178", "0.5475091", "0.5473454", "0.54586154", "0.5452368", "0.54513043", "0.544237", "0.54378355", "0.5434803", "0.54314506", "0.5429334", "0.54251176", "0.54235643", "0.5413328", "0.54129755", "0.54089963", "0.54019094", "0.5393272", "0.53905094", "0.5387004", "0.53790736", "0.5372711", "0.53590727", "0.53559756", "0.53554296", "0.53551877", "0.5347177", "0.5346995", "0.5336529", "0.53330666", "0.5328369", "0.53244245", "0.5321358", "0.5317384", "0.5317384", "0.52998364", "0.52974075", "0.5295834", "0.52910143", "0.5280046", "0.52799904", "0.5278285", "0.5270274", "0.526883", "0.52624553", "0.525801" ]
0.0
-1
TODO Autogenerated method stub
public String add() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); request.setCharacterEncoding("utf-8"); String careTheme = request.getParameter("careTheme"); String careTimeString = request.getParameter("careTime"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date careTime = sdf.parse(careTimeString); String careNexttimeString = request.getParameter("careNexttime"); Date careNexttime = sdf.parse(careNexttimeString); int customerId = Integer.parseInt(request.getParameter("customerId")); String carePeople = request.getParameter("carePeople"); String careWay = request.getParameter("careWay"); String careRemark = request.getParameter("careRemark"); String customerName = request.getParameter("customerName"); String isUsed = request.getParameter("isUsed"); CustomerCareInfo cci = new CustomerCareInfo(); cci.setCareTheme(careTheme); cci.setCareTime(careTime); cci.setCareNexttime(careNexttime); cci.setCarePeople(carePeople); cci.setCareRemark(careRemark); cci.setCareWay(careWay); cci.setCustomerId(customerId); cci.setCustomerName(customerName); cci.setIsUsed(isUsed); CustomerCareService dao = new CustomerCareServiceImpl(); mark = dao.add(cci); if(mark) { /*System.out.println(carePeople); System.out.println(careTime);*/ return SUCCESS; } else { return ERROR; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Parse stop data from the file and add all stops to stop manager.
public void parse() throws IOException, StopDataMissingException, JSONException{ DataProvider dataProvider = new FileDataProvider(filename); parseStops(dataProvider.dataSourceToString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseStopID(Set<String> stopID){\n \tSystem.out.println(\"start stop parsing\");\n String[] column = new String[]{\n \"stop_id\",\"stop_code\"\n };\n\n List<StopsTransit> beans;\n\n\n ColumnPositionMappingStrategy<StopsTransit> strategy =\n new ColumnPositionMappingStrategy<StopsTransit>();\n strategy.setType(StopsTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopsTransit> csvToBean = new CsvToBean<>();\n\n try {\n\t\t\tCSVReader csvReader = new CSVReader(new FileReader(\n\t\t\t\t\t\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stops.csv\"));\n\t\t\t beans = csvToBean.parse(strategy, csvReader);\n\n\t Iterator<StopsTransit> itr = beans.iterator();\n\t while(itr.hasNext()) {\n\t StopsTransit i = itr.next();\n\t String id = i.getStop_id();\n\t if (!stopID.contains(id)) {\n\t itr.remove();\n\t }\n\t }\n\n\t for(StopsTransit data: beans){\n\t stops.add(Integer.parseInt(data.getStop_code()));\n\t }\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(\"end stop parsing\");\n \n }", "private void parseStopTimes(Set<String> tripID){\n \tSystem.out.println(\"start stop_times parsing\");\n String[] column = new String[]{\"trip_id\",\"stop_id\"};\n Set<String> stopID = new HashSet<String>();\n\n List<StopTimesTransit> beans;\n\n ColumnPositionMappingStrategy<StopTimesTransit> strategy =\n new ColumnPositionMappingStrategy<StopTimesTransit>();\n strategy.setType(StopTimesTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopTimesTransit> csvToBean = new CsvToBean<>();\n\n CSVReader csvReader;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stop_times.csv\"));\n\t beans = csvToBean.parse(strategy, csvReader);\n\n Iterator<StopTimesTransit> itr = beans.iterator();\n while(itr.hasNext()) {\n StopTimesTransit i = itr.next();\n String id = i.getTrip_id();\n if (!tripID.contains(id)) {\n itr.remove();\n }\n }\n\n for(StopTimesTransit data: beans){\n stopID.add(data.getStop_id());\n }\n\n parseStopID(stopID);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"end stop_times parsing\");\n\n }", "public static void readStopList() throws FileNotFoundException {\n String tempBuffer = \"\";\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/Stopword-List.txt\"));\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n stopWords.add(tempBuffer);\n }\n sc_obj.close();\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "public static void loadStopWords(String file) { \n\t\t\n\t\ttry{\n\t\t\t FileInputStream fstream = new FileInputStream(file);\n\t\t\t DataInputStream in = new DataInputStream(fstream);\n\t\t\t BufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\t\t String strLine;\n\t\t\t \n\t\t\t while ((strLine = br.readLine()) != null) {\t\t\t\t \n\t\t\t\t stop_words.add(strLine.trim());\n\t\t\t }\n\t\t\t \n\t\t\t in.close();\n\t\t\t \n\t\t\t}\n\t\t\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\t}\n\t}", "public HashMap<String, BusStops> readLtaBusStops(String file, String file2) throws IOException {\n\t\t//Reads Lta Bus Stop Codes and add it into a hashmap\n\t\tHashMap<String, BusStops> busStopMap = new HashMap<>();\n\t\tFile ltaBusStopCodes = new File(file); //Instantiates the file to read\n\t\tFile otherFile = new File(file2);\n\t\t//Tries to read the file using buffered reader\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(ltaBusStopCodes))) {\n\t\t\tbr.readLine();//To skip first line\n\t\t\tStringTokenizer st; //String tokenizer to read the csv token by token\n\t\t\tString line;\n\t\t\t//loops through the csv file and read it\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\"); //using StringTokenizer's delimiter for \",\". Each word as a single token.\n\t\t\t\t//2nd while loop to loop each and every word after delimiter \",\"\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString busStopCode = st.nextToken();\n\t\t\t\t\tString roadDesc = st.nextToken();\n\t\t\t\t\tString busStopDesc = st.nextToken();\n\t\t\t\t\t//Creates a LtaBusStopCodes object with the data read from csv and insert into the hashmap\n\t\t\t\t\tBusStops ltaBsStopCode = new BusStops(busStopCode, roadDesc, busStopDesc);\n\t\t\t\t\tbusStopMap.put(ltaBsStopCode.getBusStopCode(), ltaBsStopCode);\n\t\t\t\t}//End while loop for each token\n\t\t\t}//End while loop\n\t\t}\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(otherFile))) {\n\t\t\tbr.readLine();\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tdouble latitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tdouble longitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tint zid = Integer.parseInt(st.nextToken());\n\t\t\t\t\tBusStops bs = busStopMap.get(st.nextToken());\n\t\t\t\t\tif (bs != null) {\n\t\t\t\t\t\tbs.setX(latitude);\n\t\t\t\t\t\tbs.setY(longitude);\n\t\t\t\t\t\tbs.setZid(zid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn busStopMap;\n\t}", "private void loadStopWords() throws FileNotFoundException, IOException{\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/stopwords/English.txt\"));\n String sWord;\n while ((sWord = reader.readLine()) != null) \n {\n stopWordList.add(sWord);\n }\n reader.close();\n }", "public void addToStopList(String stopID, String stopName, String weekTimes, String satTimes\n , String sunTimes, float latitude, float longitude) {\n Stop s = new Stop(stopID, stopName, weekTimes, satTimes,sunTimes, latitude, longitude);\n this.stopList.add(s);\n }", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "public void addToStopList(Stop s){ this.stopList.add(s); }", "private List<String> readStopFile(File stopFile) throws FileNotFoundException {\n\n Scanner scanner = new Scanner(stopFile);\n List<String> words;\n words = new ArrayList<>();\n String temp;\n\n while (scanner.hasNextLine()) {\n temp = scanner.nextLine();\n words.add(temp.toLowerCase());\n }\n\n return words;\n }", "public static HashSet<String> loadStoplist(File f) {\r\n\t\tHashSet<String> stoplist = new HashSet<String>();\r\n\t\t\r\n\t\t// Assume it's comming from a csv file.\r\n\t\tCSV csv = new CSV(f);\r\n\t\tString[] line;\r\n\r\n\t\t// Read all lines in.\r\n\t\twhile((line = csv.getLine()) != null) {\r\n\t\t\tstoplist.add(line[0].trim());\r\n\t\t}\r\n\r\n\t\treturn stoplist;\r\n\t}", "public void parseStops(String jsonResponse)\n throws JSONException, StopDataMissingException {\n JSONArray Stop = new JSONArray(jsonResponse);\n\n for (int index = 0; index < Stop.length(); index++) {\n JSONObject stop = Stop.getJSONObject(index);\n parseStop(stop);\n }\n }", "List<Stop> getStopsPerLine(String line);", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveStopsInLine(Stopsinlinedb stopsInLine);", "public StopWordRemover( ) {\n\t\t// Load and store the stop words from the fileinputstream with appropriate data structure.\n\t\t// NT: address of stopword.txt is Path.StopwordDir\n\t}", "public ArrayList<Task> loadData() throws FileNotFoundException {\n ArrayList<Task> dukeList = new ArrayList<>();\n Scanner sc = new Scanner(file);\n Task t;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n String[] splitBySpace = line.split(\" \");\n String[] splitBySlash;\n String command = splitBySpace[0];\n\n if (command.equals(\"D\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of deadline task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Deadline(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else if (command.equals(\"E\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of event task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Event(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else {\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace.length; i++) {\n getDesc = getDesc + splitBySpace[i] + \" \";\n }\n\n t = new ToDo(getDesc.trim());\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n }\n }\n\n return dukeList;\n }", "protected void parseZones(File file) {\r\n\t\tScanner scanner = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyZoneLines(line);\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif (scanner != null) scanner.close();\r\n\t\t}\r\n\t}", "public void setFlightList(String filePath) throws FileNotFoundException, NoSuchCityException, ParseException {\n Scanner scan = new Scanner(new File(filePath));\n while (scan.hasNextLine()) { // while there's another line in the file\n String line = scan.nextLine();\n if (line == \"\") { // if the line is empty, break from the loop\n break;\n }\n int i = 0; // to keep track of the iterator's placement in a line\n int n = 0; // to keep track of information in store\n String[] flightInformation = new String[8];\n while (i < line.length()) {\n String store = \"\";\n while (i < line.length() && line.charAt(i) != ',') {\n store += line.charAt(i);\n i++;\n }\n i++;\n n++;\n switch (n) { // checks which piece of flight information\n case 1:\n flightInformation[0] = store;\n break;\n case 2:\n flightInformation[1] = store;\n break;\n case 3:\n flightInformation[2] = store;\n break;\n case 4:\n flightInformation[3] = store;\n break;\n case 5:\n flightInformation[4] = store;\n break;\n case 6:\n flightInformation[5] = store;\n break;\n case 7:\n flightInformation[6] = store;\n break;\n case 8:\n flightInformation[7] = store;\n break;\n }\n }\n // convert String to Double\n double costDouble = Double.parseDouble(flightInformation[6]);\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n Calendar departureDateTime = Calendar.getInstance();\n departureDateTime.setTime(df.parse(flightInformation[1]));\n Calendar arrivalDateTime = Calendar.getInstance();\n arrivalDateTime.setTime(df.parse(flightInformation[2]));\n boolean b = false;\n for (Flight f: this.flightList) {\n if (f.getFlightNumber().equals(flightInformation[0])) {\n b = true;\n f.setDepartureDateTime(departureDateTime);\n f.setArrivalDateTime(arrivalDateTime);\n f.setAirline(flightInformation[3]);\n // need to update cityGraph\n f.setOrigin(flightInformation[4]);\n f.setDestination(flightInformation[5]);\n f.setCost(costDouble);\n f.setNumSeats(Integer.parseInt(flightInformation[7]));\n\n }\n }\n if (!b) {\n this.flightList.add(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n flightSystem.getCityGraph().addFlight(new Flight(flightInformation[0], departureDateTime, arrivalDateTime,\n flightInformation[3], flightInformation[4], flightInformation[5], costDouble, Integer.parseInt(flightInformation[7])));\n }\n\n }\n scan.close();\n setChanged();\n notifyObservers(flightList);\n\n }", "@Override\n public void AddStop(Stop stop, int delta) {\n // is the street neighboring any existing streets?\n if(!AddTraversalStreet(stop.getStreet()))\n return;\n if(!stop.getStreet().AddStopToStreet(stop))\n return;\n stops.add(new AbstractMap.SimpleImmutableEntry<>(stop,delta));\n }", "public void readDataFromFile(){\n try {\n weatherNow.clear();\n // Open File\n Scanner scan = new Scanner(context.openFileInput(fileSaveLoc));\n\n // Find all To Do items\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n\n // if line is not empty it is data, add item.\n if (!line.isEmpty()) {\n // first is the item name and then the item status.\n String[] readList = line.split(\",\");\n String city = readList[0];\n String countryCode = readList[1];\n double temp = Double.parseDouble(readList[2]);\n String id = readList[3];\n String description = readList[4];\n\n weatherNow.add(new WeatherNow(city,countryCode, temp, id, description));\n }\n }\n\n // done\n scan.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "List<Stopsinlinedb> fetchStopsInLines();", "private void readAddServices(BufferedReader in) {\n\t\tString line, name = \"\", opis = \"\";\n\t\tDouble price = -1.0;\n\t\tStringTokenizer st;\n\t\ttry {\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (line.equals(\"\") || line.indexOf('#') == 0)\n\t\t\t\t\tcontinue;\n\t\t\t\tst = new StringTokenizer(line, \";\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tname = st.nextToken().trim();\n\t\t\t\t\topis = st.nextToken().trim();\n\t\t\t\t\tprice = Double.parseDouble(st.nextToken().trim());\n\t\t\t\t}\n\t\t\t\taddServices.put(name, new AdditionalService(name, opis, price));\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "public static ArrayList<BoardPair> readFile(String inFileName, String format) {\n ArrayList<BoardPair> boardPairs = new ArrayList<BoardPair>();\n try { \n File inFile = new File(inFileName); \n BufferedReader reader = new BufferedReader(new FileReader(inFile));\n String line = null;\n while ((line=reader.readLine()) != null) { // loop as long as there are input lines \n if(line.contains(\"id,delta\")) \n continue; // skip header\n String str = line.trim(); \n // line fields are: id, delta, start1..400, stop1..400\n String[] tokens = str.split(\",\"); \n int row_id = Integer.parseInt( tokens[0] );\n int delta = Integer.parseInt( tokens[1] );\n int[][] startBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n int[][] stopBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n for(int col=0; col<Consts.BOARD_SIDE; col++) { \n for(int row=0; row<Consts.BOARD_SIDE; row++) {\n if(format==\"train\") { \n // train format: id, delta, start.1-start.400, stop.1-stop.400\n // note column major order!\n int startIndex = col*Consts.BOARD_SIDE + row + 2; \n int stopIndex = startIndex + Consts.BOARD_SIDE*Consts.BOARD_SIDE;\n startBoard[row][col]= Integer.parseInt( tokens[startIndex] );\n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n } \n if(format==\"test\") {\n // test format is: id, delta, stop.1-stop.400\n // note column major order!\n int stopIndex = col*Consts.BOARD_SIDE + row + 2; \n startBoard = null; \n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n }\n }\n }\n boardPairs.add( new BoardPair(row_id, delta, startBoard, stopBoard) );\n } \n reader.close(); \n } catch (IOException e) {\n System.out.println(\"ERROR reading: \" + inFileName);\n }\n return boardPairs;\n }", "public static void parseBuses(Stop stop, String jsonResponse) throws JSONException {\n JSONArray buses = new JSONArray(jsonResponse);\n for (int i = 0; i < buses.length(); i++) {\n JSONObject bus = buses.getJSONObject(i);\n Bus parsedBus = parseBus(bus);\n try {\n if (parsedBus != null) {\n stop.addBus(parsedBus);\n }\n } catch (RouteException e) {\n //silence return\n }\n }\n }", "List<Stop> getStops();", "public List<String> getStopWords(String path)\n\t {\n\t\t try \n\t\t {\n\t\t\t\tFileReader inputFile = new FileReader(path);\n\t\t\t\t@SuppressWarnings(\"resource\")\n\t\t\t\tBufferedReader br = new BufferedReader(inputFile);\n\n\t\t\t\tString line;\n\n\t\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t\t{\n\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\t\t\t\t\twhile (tokenizer.hasMoreTokens())\n\t\t\t\t\t{\n\t\t\t\t\t\tstopWords.add(tokenizer.nextToken().trim());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t catch (Exception e)\n\t\t {\n\t\t\t\tSystem.out.println(\"Error while reading file by line:\"\n\t\t\t\t\t\t+ e.getMessage());\n\t\t } \n\t\t \n\t\t return stopWords; \n }", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "public void parseFlights(String[] lines) throws StorageException {\r\n // Iterate through the lines in the file and create a Flight with the info\r\n // from each line\r\n for (int i = 0; i < lines.length; i++) {\r\n String[] info = lines[i].split(\";\");\r\n try {\r\n addOrUpdateFlight(new Flight(info[0], info[3], Double.parseDouble(info[6]), info[1],\r\n info[2], info[4], info[5], Integer.parseInt(info[7])));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot parse flight\");\r\n }\r\n }\r\n }", "public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void parse() throws ParseException {\n\n /* parse file */\n try {\n\n Scanner scanner = new Scanner(file, CHARSET_UTF_8);\n\n MowerConfig mowerConfig = null;\n\n int lineNumber = 1;\n\n do {\n\n boolean even = lineNumber % 2 == 0;\n String line = scanner.nextLine();\n\n /* if nothing in the file */\n if ((line == null || line.isEmpty()) && lineNumber == 1) {\n\n throw new ParseException(\"Nothing found in the file: \" + file);\n\n /* first line: lawn top right position */\n } else if(lineNumber == 1) {\n\n Position lawnTopRight = Position.parsePosition(line);\n config.setLawnTopRightCorner(lawnTopRight);\n\n /* even line: mower init */\n } else if (even) {\n\n int lastWhitespace = line.lastIndexOf(' ');\n Position p = Position.parsePosition(line.substring(0, lastWhitespace));\n Orientation o = Orientation.parseOrientation(line.substring(lastWhitespace).trim());\n\n mowerConfig = new MowerConfig();\n mowerConfig.setInitialPosition(p);\n mowerConfig.setInitialOrientation(o);\n\n /* odd line: mower commands */\n } else {\n\n mowerConfig.setCommands(MowerCommand.parseCommands(line));\n config.addMowerConfig(mowerConfig);\n }\n\n lineNumber++;\n\n } while(scanner.hasNextLine());\n\n\n } catch (Exception e) {\n throw new ParseException(\"Exception: \" + e.getMessage());\n }\n\n }", "private Vector <BusStopInfo> findStopInfo(BusStopInterface busStop)\r\n {\r\n Vector <BusStopInfo> result = new Vector<BusStopInfo>();\r\n Awtobus checking = null;\r\n for(int i=0; i < lines.size(); i++)\r\n {\r\n checking = lines.get(i);\r\n int length = checking.busLine.getNumberOfBusStops();\r\n for(int j=0; j<length; j++)\r\n {\r\n if(busStop == checking.busLine.getBusStop(j))\r\n {\r\n result.add(new BusStopInfo(checking, j));\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public synchronized Set<String> getStopWords() throws Exception {\r\n\t\t\r\n\t\tif(stopWords == null){\r\n\t\t\tMTDArquivoEnum enumerado = MTDArquivoEnum.STOP_WORDS;\r\n\t\t\tstopWords = new HashSet<String>();\r\n\t\t\tMTDIterator<String> it = enumerado.lineIterator();\r\n\t\t\twhile (it.hasNext()) {\r\n\t\t\t\tstopWords.add(it.next());\r\n\t\t\t}\r\n\t\t\tit.close();\r\n\t\t}\r\n \r\n return stopWords;\r\n }", "@Override\n protected void dataParser() {\n for (String dataLine : dataFile) {\n if (totalErrors > 200) {\n totalErrors = 0;\n throw new RuntimeException(\n \"File rejected: more than 200 lines contain errors.\\n\" + getErrorMessage(false));\n }\n parseLine(dataLine);\n }\n }", "public void addAssociatedStops(Stop stop) {\n\t\tString id = stop.getID();\n\t\tif(!associatedStops.containsKey(id)) {\n\t\t\tassociatedStops.put(id, stop);\n\t\t}\n\t}", "public List<AbstractMap.SimpleImmutableEntry<Stop, Integer>> getStops() { return stops;}", "public static ArrayList<Task> parse(String toParse) {\n ArrayList<Task> result = new ArrayList<>();\n Scanner ps = new Scanner(toParse); // passes whole file into the scanner\n while (ps.hasNextLine()) {\n String nLine = ps.nextLine(); // parse one line at a time\n int ref = 3; // reference point\n char taskType = nLine.charAt(ref);\n switch (taskType) {\n case 'T':\n parseTodo(ref, nLine, result);\n break;\n case 'D':\n parseDeadline(ref, nLine, result);\n break;\n case 'E':\n parseEvent(ref, nLine, result);\n break;\n default:\n System.out.println(\"Unknown input\");\n break;\n }\n }\n return result;\n }", "void addStopNotification(List<String> stopIDs, String lineID, String note);", "public static List<Stop> getAllStops() {\n return allStops;\n }", "public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public ArrayList<Task> loadData() throws IOException {\n DateTimeFormatter validFormat = DateTimeFormatter.ofPattern(\"MMM dd yyyy HH:mm\");\n ArrayList<Task> orderList = new ArrayList<>();\n\n try {\n File dataStorage = new File(filePath);\n Scanner s = new Scanner(dataStorage);\n while (s.hasNext()) {\n String curr = s.nextLine();\n String[] currTask = curr.split(\" \\\\| \");\n assert currTask.length >= 3;\n Boolean isDone = currTask[1].equals(\"1\");\n switch (currTask[0]) {\n case \"T\":\n orderList.add(new Todo(currTask[2], isDone));\n break;\n case \"D\":\n orderList.add(new Deadline(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n case \"E\":\n orderList.add(new Event(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n }\n }\n } catch (FileNotFoundException e) {\n if (new File(\"data\").mkdir()) {\n System.out.println(\"folder data does not exist yet.\");\n } else if (new File(filePath).createNewFile()) {\n System.out.println(\"File duke.txt does not exist yet.\");\n }\n }\n return orderList;\n\n }", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public ListReader(String stop) {\n this.stop = stop;\n ListItemReader r = new ListItemReader();\n r.setListReader(this);\n r.setStop(stop);\n this.reader = r;\n this.seperator = new TextReader(\",\");\n }", "public ArrayList<Task> load() throws FileNotFoundException {\n Scanner sc = new Scanner(file);\n String currLine;\n ArrayList<Task> tasks = new ArrayList<>();\n while (sc.hasNextLine()) {\n currLine = sc.nextLine();\n String taskDescription = currLine.substring(5);\n boolean isDone = currLine.charAt(2) == '1';\n String[] arr = taskDescription.split(Pattern.quote(\"|\"));\n String description = arr[0];\n if (currLine.charAt(0) == 'T') {\n Todo todo = new Todo(description);\n todo.setState(isDone);\n tasks.add(todo);\n } else if (currLine.charAt(0) == 'E') {\n Event event = new Event(description, (arr.length == 1 ? \" \" : arr[1]));\n event.setState(isDone);\n tasks.add(event);\n } else {\n Deadline deadline = new Deadline(description, (arr.length == 1 ? \" \" : arr[1]));\n deadline.setState(isDone);\n tasks.add(deadline);\n }\n }\n return tasks;\n }", "private List<StockData> parseMultipleStockData(String data) {\n String[] arr = data.split(\";\\n\");\n List<StockData> list = new ArrayList<>();\n for (String sd : arr) {\n list.add(parseStockData(sd));\n }\n return list;\n }", "private String[] readStopwords(String filepath) {\n // Get filepath\n Path path = Paths.get(filepath);\n\n // Array to hold each stopword\n ArrayList<String> words = new ArrayList<>();\n\n // Read file at that path\n try {\n Files.readAllLines(path).forEach(word -> {\n // Add each stopword\n words.add(word);\n });\n } catch (IOException e) {\n System.out.println(\"No stopwords list found.\");\n System.exit(1);\n }\n\n // Cast to String array and return\n String[] wordsArray = new String[words.size()];\n wordsArray = words.toArray(wordsArray);\n return wordsArray;\n }", "private void parseData() throws IOException {\n // The data section ends with a dashed line...\n //\n while (true) {\n String line = reader.readLine();\n\n if (line == null || isDashedLine(line))\n return;\n else\n parseLine(line);\n }\n }", "public PorterStopWords()\r\n\t{\r\n\t\tstopWordsSet.addAll( porterStopWordsSet );\r\n\t}", "@Override\n public Stop[] getStops(String name) throws Exception {\n String query = \"{\\n\"\n + \"stops(name: \\\"\" + name + \"\\\") {\\n\"\n + \"name\\n\"\n + \"desc\\n\"\n + \"url\\n\"\n + \"code\\n\"\n + \"gtfsId\\n\"\n + \"}\\n\"\n + \"}\";\n \n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop[] deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop[].class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop[].class);\n \n return deserialized;\n }", "public static void processDataFile() {\n final String INPUT_FILENAME = \"input/assn6input1.txt\";\n File inputFile = null;\n Scanner inputScanner = null;\n System.out.println(\"Reading data from file: \" + INPUT_FILENAME);\n System.out.println();\n try {\n inputFile = new File(INPUT_FILENAME);\n inputScanner = new Scanner(inputFile);\n } catch(FileNotFoundException e) {\n System.err.println(\"Error opening file \" + INPUT_FILENAME);\n }\n while(inputScanner.hasNext()) {\n String[] dataLine = inputScanner.nextLine().split(\",\");\n // Is the first token \"REALTOR\"?\n if(dataLine[0].toUpperCase().equals(\"REALTOR\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addRealtor(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteRealtor(dataLine[2]);\n }\n else {\n \n }\n }\n // Is the first token \"PROPERTY\"?\n else if(dataLine[0].toUpperCase().equals(\"PROPERTY\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addProperty(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteProperty(Integer.parseInt(dataLine[2]));\n }\n else {\n \n }\n } else {\n // not realtor or property in the first token\n System.out.println(\"\\tNeither realtor, nor property in first\"\n + \" token\");\n }\n }\n inputScanner.close();\n }", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public ArrayList<Employee> parseData(ArrayList<String> data) {\n ArrayList<Employee> employees = new ArrayList<>();\n String[] buf;\n\n for (String line : data) {\n buf = line.split(delimiter);\n employees.add(new Employee(buf[1], buf[0], Integer.parseInt(buf[2])));\n }\n\n return employees;\n }", "private void parseFile(String fileName) {\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line;\n\t\t\tint counter = 0;\n\t\t\tString lastMethod = null;\n\t\t\t\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t// Logic for method consolidation\n\t\t\t\tif (line.contains(\"Method Call\")) {\n\t\t\t\t\tlastMethod = line.substring(line.indexOf(\"target=\")+7);\n\t\t\t\t\tlastMethod = lastMethod.substring(lastMethod.indexOf('#')+1).replace(\"\\\"\",\"\").trim();\n\t\t\t\t\tlastMethod = lastMethod + \":\" + counter++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (line.contains(\"Field Write\")) {\n\t\t\t\t\tString[] tokens = line.split(\",\");\n\t\t\t\t\t\n\t\t\t\t\tString object = tokens[4].substring(tokens[4].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString field = tokens[5].substring(0, tokens[5].indexOf(\"=\")).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString value = tokens[5].substring(tokens[5].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString fld = object.replace(\"/\", \".\") + \".\" + field;\n\t\t\t\t\tevents.add(new Event(fld, value, lastMethod));\n\t\t\t\t\t\n\t\t\t\t\tallFields.add(fld);\n\t\t\t\t}\n//\t\t\t\tif (line.contains(\"Method Returned\")) {\n//\t\t\t\t\t//operations for this method ended\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void parseTrips(Set<String> routeID){\n \tSystem.out.println(\"start trips parsing\");\n String[] column = new String[]{\"route_id\",\"trip_id\"};\n Set<String> tripID = new HashSet<String>();\n\n List<TripsTransit> beans;\n\n ColumnPositionMappingStrategy<TripsTransit> strategy =\n new ColumnPositionMappingStrategy<TripsTransit>();\n strategy.setType(TripsTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<TripsTransit> csvToBean = new CsvToBean<>();\n\n CSVReader csvReader;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\trips.csv\"));\n\t\t\t beans = csvToBean.parse(strategy, csvReader);\n\n\t Iterator<TripsTransit> itr = beans.iterator();\n\t while(itr.hasNext()) {\n\t TripsTransit i = itr.next();\n\t String id = i.getRoute_id();\n\t if (!routeID.contains(id)) {\n\t itr.remove();\n\t }\n\t }\n\n\t for(TripsTransit data: beans){\n\t tripID.add(data.getTrip_id());\n\t }\n\t parseStopTimes(tripID);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"end trips parsing\");\n }", "public void LoadStopwords(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t// Stemming and Normalization\n\t\t\t\tline = SnowballStemmingDemo(NormalizationDemo(line));\n\t\t\t\tif (!line.isEmpty())\n\t\t\t\t\tm_stopwords.add(line);\n\t\t\t}\n\t\t\treader.close();\n\t\t\tSystem.out.format(\"Loading %d stopwords from %s\\n\",\n\t\t\t\t\tm_stopwords.size(), filename);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!!\", filename);\n\t\t}\n\t}", "public void LoadStopwords(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t// it is very important that you perform the same processing\n\t\t\t\t// operation to the loaded stopwords\n\t\t\t\t// otherwise it won't be matched in the text content\n\t\t\t\tline = SnowballStemmingDemo(NormalizationDemo(line));\n\t\t\t\tif (!line.isEmpty())\n\t\t\t\t\tm_stopwords.add(line);\n\t\t\t}\n\t\t\treader.close();\n\t\t\tSystem.out.format(\"Loading %d stopwords from %s\\n\",\n\t\t\t\t\tm_stopwords.size(), filename);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!!\", filename);\n\t\t}\n\t}", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "public Stop(int id, String name, double latitude, double longitude, boolean addToList) {\n this.id = id;\n this.name = name;\n this.latitude = latitude;\n this.longitude = longitude;\n if (addToList) {\n addStop(this);\n }\n\n }", "public ArrayList<Double> readFile(String m){\n ArrayList<Double> a = new ArrayList<Double>();\n Scanner r = null;\n try {\n File f = new File(m);\n r = new Scanner(f);\n String scan;\n while(r.hasNextLine()) {\n scan = r.nextLine();\n //System.out.println(scan);\n // look for comma because our price starts after comma\n int commaPosition = scan.indexOf(',');\n //go to next index of the string in one line\n int nextIndex = commaPosition + 1;\n // make a string named price to keep the price from one line\n //substring method takes two parameters- start point and end point(which is integers)\n //price = smaller string = \"2.50\", scan = bigger string = \"bananas,2.50\"\n String price = scan.substring(nextIndex,scan.length());\n double doublePrice = Double.parseDouble(price);\n //System.out.println(doublePrice);\n a.add(doublePrice);\n }\n } catch (FileNotFoundException ex) {\n\n } catch (IOException ex) {\n\n } finally {\n if(r!=null) r.close();\n }\n return a;\n\n }", "private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}", "public void parseFile(String fileName) {\n LineIterator it = null;\n try {\n it = FileUtils.lineIterator(new File(fileName), \"UTF-8\");\n while (it.hasNext()) {\n String line = it.nextLine();\n Runnable task = () -> sendEventsToSaveInDb(line);\n executor.submit(task);\n }\n } catch (IOException e) {\n logger.error(\"error while reading file : \", e);\n System.exit(1);\n } finally {\n LineIterator.closeQuietly(it);\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n saveEventsInBatch(true);\n } catch (InterruptedException e) {\n logger.error(\" exception while waiting for termination \", e);\n }\n System.exit(0);\n }\n }", "private void processWaveFile(String waveFile) {\n // A list of strings from the text file\n List<String> allEventsInString = new ArrayList<>();\n // Add each line in the wave file to allEventsInString\n try (Scanner scanner = new Scanner(new FileReader(waveFile))) {\n while (scanner.hasNextLine()) {\n allEventsInString.add(scanner.nextLine());\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n int previousWaveNumber = 0;\n int waveNumber;\n Event event;\n // Loop through each line and create an event from that line\n for (String stringEvent : allEventsInString) {\n List<String> eventDetails = Arrays.asList(stringEvent.split(\",\"));\n // This type of event is a spawn event, convert the strings to make it a SpawnEvent\n if (eventDetails.get(1).equals(\"spawn\")) {\n int spawnNumber = Integer.parseInt(eventDetails.get(2));\n double spawnRate = Double.parseDouble(eventDetails.get(4));\n String slicerType = eventDetails.get(3);\n event = new SpawnEvent(spawnNumber, slicerType, spawnRate);\n }\n // This type of event is a delay event, convert the strings to make it a DelayEvent\n else {\n double delayRate = Double.parseDouble(eventDetails.get(2));\n event = new DelayEvent(delayRate);\n }\n // waveNumber is the number that is given first in each line\n waveNumber = Integer.parseInt(eventDetails.get(0));\n // If we find a new number, create a new wave, and update the previous wave number\n if (waveNumber != previousWaveNumber) {\n waves.add(new Wave(waveNumber));\n previousWaveNumber = waveNumber;\n }\n // Add our event to the corresponding wave\n waves.get(waveNumber - 1).addEvent(event);\n }\n }", "public boolean addStop(Stop stop)\r\n {\r\n stops_map.add(stop);\r\n addStreet(stop.getStreet());\r\n\r\n if (streets_map.size() > 1)\r\n {\r\n if (streets_map.get(0).follows(streets_map.get(1)) == false || streets_map.get(0).follows(streets_map.get(1)) == false)\r\n {\r\n stops_map.remove(stop);\r\n streets_map.remove(stop.getStreet());\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private void initMaps(Context cxt, ObaResponse response) {\n if (response.getCode() == ObaApi.OBA_OK) {\n final ObaData data = response.getData();\n final ObaArray<ObaStop> stops = data.getStops();\n final Map<String,ObaStop> stopMap = getStopMap(stops);\n final ObaArray<ObaStopGrouping> groupings = data.getStopGroupings();\n final int groupingsLen = groupings.length();\n \n for (int groupingIndex = 0; groupingIndex < groupingsLen; ++groupingIndex) {\n final ObaStopGrouping grouping = groupings.get(groupingIndex);\n final ObaArray<ObaStopGroup> groups = grouping.getStopGroups();\n final int groupsLen = groups.length();\n \n for (int i=0; i < groupsLen; ++i) {\n final HashMap<String,String> groupMap = new HashMap<String,String>(1);\n final ObaStopGroup group = groups.get(i);\n // We can initialize the stop grouping values.\n groupMap.put(\"name\", group.getName());\n // Add this to the groupings map\n \n // Create the sub list (the list of stops in the group)\n final List<String> stopIds = group.getStopIds();\n final int stopIdLen = stopIds.size();\n \n final ArrayList<HashMap<String,String>> childList =\n new ArrayList<HashMap<String,String>>(stopIdLen);\n \n for (int j=0; j < stopIdLen; ++j) {\n final String stopId = stopIds.get(j);\n final ObaStop stop = stopMap.get(stopId);\n HashMap<String,String> groupStopMap = \n new HashMap<String,String>(2);\n if (stop != null) {\n groupStopMap.put(\"name\", stop.getName());\n String dir = cxt.getString(\n UIHelp.getStopDirectionText(\n stop.getDirection()));\n groupStopMap.put(\"direction\", dir);\n groupStopMap.put(\"id\", stopId);\n mStopMap.put(stopId, stop);\n }\n else {\n groupStopMap.put(\"name\", \"\");\n groupStopMap.put(\"direction\", \"\"); \n groupStopMap.put(\"id\", stopId);\n }\n childList.add(groupStopMap);\n } \n \n mStopGroups.add(groupMap);\n mStops.add(childList);\n }\n }\n }\n }", "public static void loadData(String fileData) throws IOException\r\n\r\n\t{\r\n\t\tScanner infile1 = new Scanner(new File(fileData));\r\n\r\n\t\twhile(infile1.hasNext())\r\n\t\t{\r\n\t\t\tString name = infile1.nextLine();\r\n\r\n\t\t\tString [ ] tokens = name.split(\" \");\r\n\r\n\t\t\tfor (String s : tokens )\r\n\t\t\t{\r\n\t\t\t\tString newWord = Utility.removeSpecialCharacters(s, wordList);\r\n\r\n\t\t\t\tif(newWord.length() > 0 && !newWord.equalsIgnoreCase(\"-1\")) {\r\n\t\t\t\t\tWord words = new Word(newWord,1);\r\n\t\t\t\t\twordList.add(words);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static Services parse(File file) throws DeploymentException {\n try {\n StackableHandler<Services> stack = \n new StackableHandler<Services>(new ServicesHandler());\n return stack.parse(file);\n }\n catch (Exception e) {\n throw error(I18n.loc(\"UTIL-6002: Failed to parse service unit descriptor: {0}\",\n e.getMessage()), \n e);\n }\n }", "public void readSpeedFile(File file) {\n\t/** predefine the periods **/\n\tperiods = Period.universalDefine();\n\t\n\tspeedTables = new ArrayList<SpeedTable>();\n\t\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tSpeedTable speedTable = new SpeedTable();\n\t\t\tfor (int i = 0; i < lineElements.length; i++) {\n\t\t\t\tdouble fromTime = periods.get(i).fromTime();\n\t\t\t\tdouble toTime = periods.get(i).toTime();\n\t\t\t\tdouble speed = Double.parseDouble(lineElements[i]);\n\t\t\t\tPeriodSpeed periodSpeed = new PeriodSpeed(fromTime, toTime, speed);\n\t\t\t\tspeedTable.add(periodSpeed);\n\t\t\t}\n\t\t\t\n\t\t\tspeedTables.add(speedTable);\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t// create the all one speed table\n\tallOneSpeedTable = new SpeedTable();\n\tfor (int i = 0; i < periods.size(); i++) {\n\t\tdouble fromTime = periods.get(i).fromTime();\n\t\tdouble toTime = periods.get(i).toTime();\n\t\tallOneSpeedTable.add(new PeriodSpeed(fromTime, toTime, 1));\n\t}\n\t/*\n\tfor (int i = 0; i < speedTables.size(); i++) {\n\t\tSystem.out.println(\"For category \" + i);\n\t\tspeedTables.get(i).printMe();\n\t}*/\n}", "@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "public static String getStopWords() throws IOException{\n\t\tString filepath1 = \"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/stoplist.txt\";\n\t\tPath path1 = Paths.get(filepath1);\n\t\tScanner scanner1 = new Scanner(path1);\n\t\tStringBuffer stopWords = new StringBuffer();\n\t\t\n\t\twhile (scanner1.hasNextLine()){\n\t\t\tString line = scanner1.nextLine();\n\t\t\tstopWords.append(line);\n\t\t\tstopWords.append(\"|\");\n\t } \n\t\t\n\t\tstopWords.append(\"document|discuss|identify|report|describe|predict|cite\");\n\t\tString allStopwords = stopWords.toString();\n\t\t//System.out.println(\"\"+allStopwords);\n\t\treturn allStopwords;\n\t}", "private void addSTOPedRequestsToClientManager() {\n\n List<TOMMessage> messagesFromSTOP = lcManager.getRequestsFromSTOP();\n if (messagesFromSTOP != null) {\n\n logger.debug(\"Adding to client manager the requests contained in STOP messages\");\n\n for (TOMMessage m : messagesFromSTOP) {\n tom.requestReceived(m, false);\n\n }\n }\n\n }", "public void processForDays(){\r\n\t\tboolean inDaySection = false;\r\n\t\tint dataSize;\r\n\t\tfor(int i=0; i<Constant.dataList.size(); i++){\r\n\t\t\tString line = Constant.dataList.get(i);\r\n\t\t\tString[] linesplit = line.split(\",\");\r\n\t\t\tdataSize = linesplit.length;\r\n\t\t\t\r\n\t\t\tif (i==0) {\r\n//\t\t\t\tConstant.dataList.set(i, \"Days,Dummy,\" + line);\r\n\t\t\t\tConstant.dayDataList.add(\"Days,Dummy,\"+linesplit[0]+\",\"+linesplit[1]+\",\"+\"Day00\");\r\n\t\t\t}\r\n\t\t\telse if(linesplit[1].equals(\"PM10\")){\r\n\t\t\t\tString m,a,e,n;\r\n//\t\t\t\tm = \"M,1000,\"+linesplit[0]+\"m,\"+linesplit[1];\r\n//\t\t\t\ta = \"A,1000,\"+linesplit[0]+\"a,\"+linesplit[1];\r\n//\t\t\t\te = \"E,1000,\"+linesplit[0]+\"e,\"+linesplit[1];\r\n//\t\t\t\tn = \"N,1000,\"+linesplit[0]+\"n,\"+linesplit[1];\r\n\t\t\t\t//morning,afternoon,evening\r\n\t\t\t\tfor(int j=0; j<4; j++){\r\n\t\t\t\t\tfor(int k=0; k<2; k++){\r\n\t\t\t\t\t\tif(j==0){\r\n\t\t\t\t\t\t\tif(k+7<dataSize){\r\n//\t\t\t\t\t\t\t\tm = m + \",\" + linesplit[k+7];\r\n\t\t\t\t\t\t\t\tm = \"Morning,1000,\"+linesplit[0]+\"m-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+7];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\tm = m + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==1){\r\n\t\t\t\t\t\t\tif(k+13<dataSize){\r\n//\t\t\t\t\t\t\t\ta = a + \",\" + linesplit[k+13];\r\n\t\t\t\t\t\t\t\ta = \"Afternoon,1000,\"+linesplit[0]+\"a-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+13];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\ta = a + \",\";\r\n//\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==2){\r\n\t\t\t\t\t\t\tif(k+19<dataSize){\r\n//\t\t\t\t\t\t\t\te = e + \",\" + linesplit[k+19];\r\n\t\t\t\t\t\t\t\te = \"Evening,1000,\"+linesplit[0]+\"e-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+19];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\te = e + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(k<1){\r\n\t\t\t\t\t\t\t\tif(k+25<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\tif(k+1<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif(j==0){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==1){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==2){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse{\r\n//\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "public Set<String> getStopWords() throws Exception{\n\tFile file = new File(\"stopWords/stopwords.txt\");\n\tHashSet<String> stopwords = new HashSet<>();\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n\tString line;\n\twhile((line=br.readLine())!=null){\n\t\tString[] tokens = line.split(\" \");\n\t\tfor(String token : tokens){\n\t\t\tif(!stopwords.contains(token)){\n\t\t\t\tstopwords.add(token);\n\t\t\t}\n\t\t}\n\t}\n\tbr.close();\n\treturn stopwords;\n\t}", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "private void parseData() {\n\t\t\r\n\t}", "public static void checkStopList(Token stopWord)\r\n\t{\r\n\t\tIterator<String> sl = WordLists.stoplist().iterator();\r\n\r\n\t\twhile(sl.hasNext()) {\r\n\t\t\tString stop = sl.next();\r\n\r\n\t\t\tif (stopWord.getName().equalsIgnoreCase(stop)) {\r\n\t\t\t\tstopWord.getFeatures().setHasStopList(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "List<LoggingEvent> parse(InputStream is) throws ParseException;", "public void read(){\n assert(inputStream.hasNext());\n\n while(inputStream.hasNextLine()){\n String line = inputStream.nextLine();\n String[] fields = line.split(\";\");\n\n //If Line is address line\n if(fields.length >= 4){\n Address adr = new Address(fields[0], fields[1], fields[2], fields[3]);\n if(fields.length == 5){\n parseGroups(fields[4], adr);\n }\n inputAddressList.add(adr);\n }\n\n //If Line is Group Line\n else if(fields.length <=3){\n Group group = new Group(fields[0], Integer.parseInt(fields[1]));\n if(fields.length == 3){\n parseGroups(fields[2], group);\n }\n inputGroupList.add(group);\n }\n }\n compose();\n assert(invariant());\n }", "public void readFromServiceFile()\r\n {\r\n try(ObjectInputStream fromServiceFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/servicelist.dta\")))\r\n {\r\n serviceList = (ServiceList) fromServiceFile.readObject();\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av service\"\r\n + \" objektene.\\nOppretter nytt \"\r\n + \"serviceregister.\\n\" + cnfe.getMessage(), \r\n \"Feilmelding\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter nytt serviceregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter nytt serviceregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public List<Stop> getStopsMap()\r\n {\r\n return stops_map;\r\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "private void processOutOfContextSTOPs(int regency) {\n\n logger.debug(\"Checking if there are out of context STOPs for regency \" + regency);\n\n Set<LCMessage> stops = getOutOfContextLC(TOMUtil.STOP, regency);\n\n if (stops.size() > 0) {\n logger.info(\"Processing \" + stops.size() + \" out of context STOPs for regency \" + regency);\n } else {\n logger.debug(\"No out of context STOPs for regency \" + regency);\n }\n\n for (LCMessage m : stops) {\n TOMMessage[] requests = deserializeTOMMessages(m.getPayload());\n\n // store requests that came with the STOP message\n lcManager.addRequestsFromSTOP(requests);\n\n // store information about the STOP message\n lcManager.addStop(regency, m.getSender());\n }\n }", "private void parseWSCServiceFile(String fileName) {\n\t\tSet<String> inputs = new HashSet<String>();\n\t\tSet<String> outputs = new HashSet<String>();\n\t\tdouble[] qos = new double[4];\n\n\t\ttry {\n\t\t\tFile fXmlFile = new File(fileName);\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\n\t\t\tNodeList nList = doc.getElementsByTagName(\"service\");\n\n\t\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\t\torg.w3c.dom.Node nNode = nList.item(i);\n\t\t\t\tElement eElement = (Element) nNode;\n\n\t\t\t\tString name = eElement.getAttribute(\"name\");\n\t\t\t\tif (!runningOwls) {\n\t\t\t\t\tqos[TIME] = Double.valueOf(eElement.getAttribute(\"Res\"));\n\t\t\t\t\tqos[COST] = Double.valueOf(eElement.getAttribute(\"Pri\"));\n\t\t\t\t\tqos[AVAILABILITY] = Double.valueOf(eElement.getAttribute(\"Ava\"));\n\t\t\t\t\tqos[RELIABILITY] = Double.valueOf(eElement.getAttribute(\"Rel\"));\n\t\t\t\t}\n\n\t\t\t\t// Get inputs\n\t\t\t\torg.w3c.dom.Node inputNode = eElement.getElementsByTagName(\"inputs\").item(0);\n\t\t\t\tNodeList inputNodes = ((Element)inputNode).getElementsByTagName(\"instance\");\n\t\t\t\tfor (int j = 0; j < inputNodes.getLength(); j++) {\n\t\t\t\t\torg.w3c.dom.Node in = inputNodes.item(j);\n\t\t\t\t\tElement e = (Element) in;\n\t\t\t\t\tinputs.add(e.getAttribute(\"name\"));\n\t\t\t\t}\n\n\t\t\t\t// Get outputs\n\t\t\t\torg.w3c.dom.Node outputNode = eElement.getElementsByTagName(\"outputs\").item(0);\n\t\t\t\tNodeList outputNodes = ((Element)outputNode).getElementsByTagName(\"instance\");\n\t\t\t\tfor (int j = 0; j < outputNodes.getLength(); j++) {\n\t\t\t\t\torg.w3c.dom.Node out = outputNodes.item(j);\n\t\t\t\t\tElement e = (Element) out;\n\t\t\t\t\toutputs.add(e.getAttribute(\"name\"));\n\t\t\t\t}\n\n\t\t\t\tNode ws = new Node(name, qos, inputs, outputs);\n\t\t\t\tserviceMap.put(name, ws);\n\t\t\t\tinputs = new HashSet<String>();\n\t\t\t\toutputs = new HashSet<String>();\n\t\t\t\tqos = new double[4];\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.out.println(\"Service file parsing failed...\");\n\t\t}\n\t\tcatch (ParserConfigurationException e) {\n\t\t\tSystem.out.println(\"Service file parsing failed...\");\n\t\t}\n\t\tcatch (SAXException e) {\n\t\t\tSystem.out.println(\"Service file parsing failed...\");\n\t\t}\n\t}", "public RouteParser(ArrayList<String> dataFile, List<Route> existingRoutes) {\n super(dataFile, 12);\n for (Route route : existingRoutes) {\n addRoute(route);\n }\n dataParser();\n if (!getValidFile()) {\n if (totalErrors == 1) {\n throw new RuntimeException(\n \"Entry contains errors and was not uploaded.\\n\" + getErrorMessage(false));\n } else {\n throw new RuntimeException(\n \"File rejected: all lines contain errors.\\n\" + getErrorMessage(false));\n }\n }\n }", "protected void parseValues(File file){\r\n\t\ttry {\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyValues(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static List<Stop> findStop(String name) {\n List<Stop> matchingStops = new ArrayList<>();\n String pattern = \"(?i)(.*)\" + name + \"(.*)\";\n for (Stop s : getAllStops()) {\n if (s.getName().matches(pattern)) {\n matchingStops.add(s);\n }\n }\n return matchingStops;\n }", "public void parseServerFile() throws IOException {\r\n /* Creates new Scanner object of the filePath */\r\n Scanner scan = new Scanner(filePath).useDelimiter(\"version=\");\r\n /* Creates new Scanner object for the server version */\r\n Scanner scanVersion = new Scanner(scan.next()).useDelimiter(\"name=\");\r\n /* Sets the server version number */\r\n this.setVersion(scanVersion.next());\r\n /* Creates new Scanner object for the server name */\r\n Scanner scanName = \r\n new Scanner(scanVersion.next()).useDelimiter(\"host=\");\r\n /* Sets the server name */\r\n this.setName(scanName.next());\r\n /* Creates new Scanner object for the server ip address */\r\n Scanner scanAddress = new Scanner(scanName.next());\r\n /* Sets the server ip address */\r\n this.setIPAddress(scanAddress.next()); \r\n }", "Stop getStopPerID(String id);", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "void setListOfStops(ArrayList<TTC> listOfStops) {\n this.listOfStops = listOfStops;\n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public List<Object> readFile(File file) {\n Scanner scanner = createScanner(file);\n if (Objects.isNull(scanner)) {\n return Collections.emptyList();\n }\n List<Object> readingDTOList = new ArrayList<>();\n scanner.nextLine();\n List<List<String>> allLines = new ArrayList<>();\n while (scanner.hasNext()) {\n List<String> line = parseLine((scanner.nextLine()));\n if (!line.isEmpty()) {\n allLines.add(line);\n }\n }\n if (!allLines.isEmpty()) {\n for (List<String> line : allLines) {\n String sensorId = line.get(0);\n String dateTime = line.get(1);\n String value = line.get(2);\n String unit = line.get(3);\n LocalDateTime readingDateTime;\n if (sensorId.contains(\"RF\")) {\n LocalDate readingDate = LocalDate.parse(dateTime, DateTimeFormatter.ofPattern(\"dd/MM/uuuu\"));\n readingDateTime = readingDate.atStartOfDay();\n } else {\n ZonedDateTime zonedDateTime = ZonedDateTime.parse(dateTime);\n readingDateTime = zonedDateTime.toLocalDateTime();\n }\n double readingValue = Double.parseDouble(value);\n ReadingDTO readingDTO = ReadingMapper.mapToDTOwithIDandUnits(sensorId, readingDateTime, readingValue, unit);\n readingDTOList.add(readingDTO);\n }\n }\n return readingDTOList;\n }" ]
[ "0.67589176", "0.63753337", "0.6271775", "0.6056147", "0.5747414", "0.56986636", "0.5594785", "0.55917376", "0.55834574", "0.5559136", "0.5520293", "0.549702", "0.54708904", "0.5395419", "0.5299453", "0.52857596", "0.52611375", "0.5256953", "0.52341104", "0.5147417", "0.51390713", "0.51347286", "0.51319337", "0.5115873", "0.5099849", "0.50900495", "0.50862706", "0.50152177", "0.4995954", "0.49752808", "0.49677074", "0.49662337", "0.49563757", "0.49420407", "0.49350202", "0.4933495", "0.4916804", "0.49083865", "0.4905637", "0.48917484", "0.48762256", "0.48699892", "0.48667175", "0.48606142", "0.48594522", "0.4850963", "0.48300728", "0.48295757", "0.482084", "0.48207766", "0.48174778", "0.4809387", "0.48007438", "0.47974855", "0.4790681", "0.47815403", "0.47811323", "0.47791696", "0.47750425", "0.47735244", "0.47712436", "0.47634804", "0.47601616", "0.47489408", "0.47486967", "0.47231272", "0.47207415", "0.47142857", "0.47114357", "0.47074285", "0.47037572", "0.4699297", "0.46907952", "0.4690178", "0.46810448", "0.46631908", "0.4655153", "0.46539122", "0.46414053", "0.46310997", "0.4625958", "0.4624005", "0.46229935", "0.46190783", "0.4611491", "0.46093336", "0.4598842", "0.4588575", "0.45854947", "0.4574027", "0.45672536", "0.45605895", "0.45600215", "0.45585406", "0.45561475", "0.45452982", "0.45446923", "0.45440242", "0.45416307", "0.45348132" ]
0.70453984
0
Parse stop information from JSON response produced by Translink. Stores all stops and routes found in the StopManager and RouteManager.
public void parseStops(String jsonResponse) throws JSONException, StopDataMissingException { JSONArray Stop = new JSONArray(jsonResponse); for (int index = 0; index < Stop.length(); index++) { JSONObject stop = Stop.getJSONObject(index); parseStop(stop); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseStopSchedule(JSONObject object) throws JSONException\n {\n String info = \"\";\n\n // Get Stop Information\n JSONObject stopObject = object.getJSONObject(\"stop\");\n info += \"Stop: \" + stopObject.getString(\"key\") + \" - \"\n + stopObject.getString(\"name\") + \"\\n\\n\";\n\n // Get route schedules\n JSONArray routeSchedulesArray = object.getJSONArray(\"route-schedules\");\n\n for (int i = 0; i < routeSchedulesArray.length(); i++)\n {\n JSONObject routeScheduleObj = routeSchedulesArray.getJSONObject(i);\n\n // Get route description\n JSONObject routeObj = routeScheduleObj.getJSONObject(\"route\");\n info += \"Route \" + routeObj.getString(\"number\") + \":\\n\";\n\n // Get schedule and estimated times\n JSONArray scheduledArray = routeScheduleObj.getJSONArray(\"scheduled-stops\");\n for (int j = 0; j < scheduledArray.length(); j++)\n {\n JSONObject scheduledObj = scheduledArray.getJSONObject(j);\n\n JSONObject variantObj = scheduledObj.getJSONObject(\"variant\");\n info += \" \" + variantObj.getString(\"name\") + \"\\n\";\n\n JSONObject arrivalObj = scheduledObj.getJSONObject(\"times\").getJSONObject(\"arrival\");\n info += \" Scheduled: \" + extractHourMinute(arrivalObj.getString(\"scheduled\")) + \"\\n\";\n info += \" Estimated: \" + extractHourMinute(arrivalObj.getString(\"estimated\")) + \"\\n\\n\";\n }\n }\n\n TextView tvSchedule = (TextView) findViewById(R.id.tvSchedule);\n tvSchedule.setText(info);\n }", "public static void parseBuses(Stop stop, String jsonResponse) throws JSONException {\n JSONArray buses = new JSONArray(jsonResponse);\n for (int i = 0; i < buses.length(); i++) {\n JSONObject bus = buses.getJSONObject(i);\n Bus parsedBus = parseBus(bus);\n try {\n if (parsedBus != null) {\n stop.addBus(parsedBus);\n }\n } catch (RouteException e) {\n //silence return\n }\n }\n }", "@Override\n public Stop[] getStops(String name) throws Exception {\n String query = \"{\\n\"\n + \"stops(name: \\\"\" + name + \"\\\") {\\n\"\n + \"name\\n\"\n + \"desc\\n\"\n + \"url\\n\"\n + \"code\\n\"\n + \"gtfsId\\n\"\n + \"}\\n\"\n + \"}\";\n \n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop[] deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop[].class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop[].class);\n \n return deserialized;\n }", "private void parseStopID(Set<String> stopID){\n \tSystem.out.println(\"start stop parsing\");\n String[] column = new String[]{\n \"stop_id\",\"stop_code\"\n };\n\n List<StopsTransit> beans;\n\n\n ColumnPositionMappingStrategy<StopsTransit> strategy =\n new ColumnPositionMappingStrategy<StopsTransit>();\n strategy.setType(StopsTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopsTransit> csvToBean = new CsvToBean<>();\n\n try {\n\t\t\tCSVReader csvReader = new CSVReader(new FileReader(\n\t\t\t\t\t\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stops.csv\"));\n\t\t\t beans = csvToBean.parse(strategy, csvReader);\n\n\t Iterator<StopsTransit> itr = beans.iterator();\n\t while(itr.hasNext()) {\n\t StopsTransit i = itr.next();\n\t String id = i.getStop_id();\n\t if (!stopID.contains(id)) {\n\t itr.remove();\n\t }\n\t }\n\n\t for(StopsTransit data: beans){\n\t stops.add(Integer.parseInt(data.getStop_code()));\n\t }\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(\"end stop parsing\");\n \n }", "List<Stop> getStops();", "public Route parseRoutes(JSONObject jObject) {\n //Route route = new Route();\n List<Route> routeList = new ArrayList<>();\n //List<String> polylines = new ArrayList<>();\n List<List<HashMap<String, String>>> routes = new ArrayList<>();\n JSONArray jRoutes;\n JSONArray jLegs;\n JSONArray jSteps;\n\n try {\n\n jRoutes = jObject.getJSONArray(\"routes\");\n /** Traversing all routes */\n for (int i = 0; i < jRoutes.length(); i++) {\n Route route = new Route();\n routeList.add(route);\n\n JSONObject boundsObj = ((JSONObject) jRoutes.get(i)).getJSONObject(\"bounds\");\n JSONObject norteastObj = boundsObj.getJSONObject(\"northeast\");\n JSONObject southwestObj = boundsObj.getJSONObject(\"southwest\");\n LatLng norteast = new LatLng(norteastObj.getDouble(\"lat\"), norteastObj.getDouble(\"lng\"));\n LatLng southwest = new LatLng(southwestObj.getDouble(\"lat\"), southwestObj.getDouble(\"lng\"));\n List<LatLng> bounds = new ArrayList<>();\n bounds.add(norteast);\n bounds.add(southwest);\n route.setBounds(bounds);\n\n jLegs = ((JSONObject) jRoutes.get(i)).getJSONArray(\"legs\");\n\n List path = new ArrayList<>();\n List<Leg> legs = new ArrayList<>();\n route.setLegs(legs);\n\n /** Traversing all legs */\n for (int j = 0; j < jLegs.length(); j++) {\n JSONObject jLeg = (JSONObject) jLegs.get(j);\n JSONObject distanceObj = jLeg.getJSONObject(\"distance\");\n JSONObject durationObj = jLeg.getJSONObject(\"distance\");\n JSONObject startLocObj = jLeg.getJSONObject(\"start_location\");\n JSONObject endLocObj = jLeg.getJSONObject(\"end_location\");\n\n TextValue distance = new TextValue(distanceObj.getString(\"text\"), distanceObj.getString(\"value\"));\n TextValue duration = new TextValue(durationObj.getString(\"text\"), durationObj.getString(\"value\"));\n LatLng startLocation = new LatLng(startLocObj.getDouble(\"lat\"), startLocObj.getDouble(\"lng\"));\n LatLng endLocation = new LatLng(endLocObj.getDouble(\"lat\"), endLocObj.getDouble(\"lng\"));\n\n route.setDistance(distance);\n route.setDuration(duration);\n Leg leg = new Leg();\n legs.add(leg);\n leg.setDistance(distance);\n leg.setDuration(duration);\n leg.setStart_location(startLocation);\n leg.setEnd_location(endLocation);\n\n jSteps = jLeg.getJSONArray(\"steps\");\n List<Step> steps = new ArrayList<>();\n leg.setSteps(steps);\n\n /** Traversing all steps */\n for (int k = 0; k < jSteps.length(); k++) {\n Step step = new Step();\n steps.add(step);\n\n JSONObject jStep = (JSONObject) jSteps.get(k);\n JSONObject distanceObjS = jStep.getJSONObject(\"distance\");\n JSONObject durationObjS = jStep.getJSONObject(\"distance\");\n JSONObject startLocObjS = jStep.getJSONObject(\"start_location\");\n JSONObject endLocObjS = jStep.getJSONObject(\"end_location\");\n\n TextValue distanceS = new TextValue(distanceObjS.getString(\"text\"), distanceObjS.getString(\"value\"));\n TextValue durationS = new TextValue(durationObjS.getString(\"text\"), durationObjS.getString(\"value\"));\n LatLng startLocationS = new LatLng(startLocObjS.getDouble(\"lat\"), startLocObjS.getDouble(\"lng\"));\n LatLng endLocationS = new LatLng(endLocObjS.getDouble(\"lat\"), endLocObjS.getDouble(\"lng\"));\n\n step.setDistance(distanceS);\n step.setDuration(durationS);\n step.setStart_location(startLocationS);\n step.setEnd_location(endLocationS);\n\n String polyline = \"\";\n polyline = (String) ((JSONObject) ((JSONObject) jSteps.get(k)).get(\"polyline\")).get(\"points\");\n step.setPolyline(polyline);\n path.addAll(step.getPath());\n /*List<LatLng> list = decodePoly(polyline);\n\n /** Traversing all points /\n for(int l=0;l<list.size();l++){\n HashMap<String, String> hm = new HashMap<>();\n hm.put(\"lat\", Double.toString((list.get(l)).latitude) );\n hm.put(\"lng\", Double.toString((list.get(l)).longitude) );\n path.add(hm);\n }*/\n }\n routes.add(path);\n }\n route.setRoutes(routes);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return getBestRoute(routeList);\n }", "public void parse() throws IOException, StopDataMissingException, JSONException{\n DataProvider dataProvider = new FileDataProvider(filename);\n\n parseStops(dataProvider.dataSourceToString());\n }", "private void parseStopTimes(Set<String> tripID){\n \tSystem.out.println(\"start stop_times parsing\");\n String[] column = new String[]{\"trip_id\",\"stop_id\"};\n Set<String> stopID = new HashSet<String>();\n\n List<StopTimesTransit> beans;\n\n ColumnPositionMappingStrategy<StopTimesTransit> strategy =\n new ColumnPositionMappingStrategy<StopTimesTransit>();\n strategy.setType(StopTimesTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopTimesTransit> csvToBean = new CsvToBean<>();\n\n CSVReader csvReader;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stop_times.csv\"));\n\t beans = csvToBean.parse(strategy, csvReader);\n\n Iterator<StopTimesTransit> itr = beans.iterator();\n while(itr.hasNext()) {\n StopTimesTransit i = itr.next();\n String id = i.getTrip_id();\n if (!tripID.contains(id)) {\n itr.remove();\n }\n }\n\n for(StopTimesTransit data: beans){\n stopID.add(data.getStop_id());\n }\n\n parseStopID(stopID);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"end stop_times parsing\");\n\n }", "public static List<Stop> getAllStops() {\n return allStops;\n }", "private void initMaps(Context cxt, ObaResponse response) {\n if (response.getCode() == ObaApi.OBA_OK) {\n final ObaData data = response.getData();\n final ObaArray<ObaStop> stops = data.getStops();\n final Map<String,ObaStop> stopMap = getStopMap(stops);\n final ObaArray<ObaStopGrouping> groupings = data.getStopGroupings();\n final int groupingsLen = groupings.length();\n \n for (int groupingIndex = 0; groupingIndex < groupingsLen; ++groupingIndex) {\n final ObaStopGrouping grouping = groupings.get(groupingIndex);\n final ObaArray<ObaStopGroup> groups = grouping.getStopGroups();\n final int groupsLen = groups.length();\n \n for (int i=0; i < groupsLen; ++i) {\n final HashMap<String,String> groupMap = new HashMap<String,String>(1);\n final ObaStopGroup group = groups.get(i);\n // We can initialize the stop grouping values.\n groupMap.put(\"name\", group.getName());\n // Add this to the groupings map\n \n // Create the sub list (the list of stops in the group)\n final List<String> stopIds = group.getStopIds();\n final int stopIdLen = stopIds.size();\n \n final ArrayList<HashMap<String,String>> childList =\n new ArrayList<HashMap<String,String>>(stopIdLen);\n \n for (int j=0; j < stopIdLen; ++j) {\n final String stopId = stopIds.get(j);\n final ObaStop stop = stopMap.get(stopId);\n HashMap<String,String> groupStopMap = \n new HashMap<String,String>(2);\n if (stop != null) {\n groupStopMap.put(\"name\", stop.getName());\n String dir = cxt.getString(\n UIHelp.getStopDirectionText(\n stop.getDirection()));\n groupStopMap.put(\"direction\", dir);\n groupStopMap.put(\"id\", stopId);\n mStopMap.put(stopId, stop);\n }\n else {\n groupStopMap.put(\"name\", \"\");\n groupStopMap.put(\"direction\", \"\"); \n groupStopMap.put(\"id\", stopId);\n }\n childList.add(groupStopMap);\n } \n \n mStopGroups.add(groupMap);\n mStops.add(childList);\n }\n }\n }\n }", "public void GetStops(String s){\n try {\n TravelBySearch trav = new TravelBySearch();\n //we execute the async task\n trav.execute(auth, s);\n //we parse the json data with the data we get from vässtrafik and the string that was searched for\n BusStopSearcherPresenter.setListview(initList(js.parseSearch(trav.get(), s)));\n } catch (Exception v) {\n v.printStackTrace();\n }\n }", "public String[] obtainStops() {\n\n String[] stopsNone = { \"No stops found\" };\n String[] stopsArbutus = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Hilltop Cir. & Hilltop Rd.\", \"Hilltop Cir. & Walker Ave.\", \"Hilltop Cir. & Center Rd.\", \"Poplar Ave. & Stadium Lot\", \"TRC @ Linden Ave\", \"Westland Blvd. & Circle Dr.\", \"Westland Blvd. & Courtney Rd.\", \"Maiden Choice La. & Westland Blvd\", \"Maiden Choice La. & Warren Tree\", \"Maiden Choice La. & Wilkens Ave\", \"Maiden Choice La. & Grouse Ct\", \"Maiden Choice La. & Symmington Aven.\"};\n String[] stopsArundel = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"BWI Marc Station\", \"Arundel Mills Mall Visitor Entrace #5\", \"BWI Marc Station\", \"Administration Dr. Bus Shelter\", \"Hilltop Circle & Hilltop Rd.\" };\n String[] stopsCatonsville = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Rolling Rd @YMCA\", \"Rolling Rd @Valley Rd (CCBC)\", \"Catonsville High @Bloomsbury Ave\", \"Mellor Ave & Bloomsbury Ave\" };\n String[] stopsDowntownA = { \"Commons Dr. & Park Rd\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Greyhound Station @ Haines\",\"MLK Blvd & Pratt St (UMB)\", \"Green St & Fayette St\", \"Green St & Lombard St (UMB)\" };\n\n if ( this.longName.toLowerCase().contains(\"Arbutus\".toLowerCase()) ) {\n return stopsArbutus;\n }\n if ( this.longName.contains(\"Arundel\") ) {\n return stopsArundel;\n }\n if ( this.longName.contains(\"Catonsville\") ) {\n return stopsCatonsville;\n }\n if ( this.longName.contains(\"Downtown\") ) {\n return stopsDowntownA;\n }\n\n return stopsNone;\n\n }", "public ArrayList getStops(String route, int direction){\r\n // Will hold all the stops returned from query\r\n ArrayList stopDataList = new ArrayList();\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n int route_id = getData.getInt(0);\r\n final String query = \"select distinct Stops.Stop_Name \" +\r\n \"from Trips join \" +\r\n \"Calendar on Trips.Service_Id=Calendar._Id join \" +\r\n \"Routes on Trips.Route_Id=Routes._Id join \" +\r\n \"Stop_Times on Trips._Id=Stop_Times.Trip_Id JOIN \" +\r\n \"Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id= \" + route_id + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"AND direction_id = \" + direction;\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n // the data count is 0 when a route is not in service on a particular day\r\n if(getData.getCount() == 0){\r\n stopDataList.add(\"No Stops Available Today For This Route\");\r\n return stopDataList;\r\n }else{\r\n while (getData.moveToNext()){\r\n stopDataList.add(getData.getString(0));\r\n }\r\n }\r\n\r\n getData.close();\r\n\r\n return stopDataList;\r\n }", "public List<Stop> getStopsMap()\r\n {\r\n return stops_map;\r\n }", "public List<AbstractMap.SimpleImmutableEntry<Stop, Integer>> getStops() { return stops;}", "public JSONObject update() throws Exception{\n String urlString;\r\n if(this.targetDirection == -1){\r\n urlString = \"https://ptx.transportdata.tw/MOTC/v2/Bus/EstimatedTimeOfArrival/City/\" + route.getCityName() + \"?$filter=\" + URLEncoder.encode(\"StopUID eq '\" + targetStopUID + \"' \", \"UTF-8\") + \"&$format=JSON\";\r\n }else{\r\n urlString = \"https://ptx.transportdata.tw/MOTC/v2/Bus/EstimatedTimeOfArrival/City/\" + route.getCityName() + \"?$filter=\" + URLEncoder.encode(\"StopUID eq '\" + targetStopUID + \"' and Direction eq '\"+ targetDirection +\"' \", \"UTF-8\") + \"&$format=JSON\";\r\n }\r\n urlString = urlString.replaceAll(\"\\\\+\", \"%20\");\r\n PTXPlatform ptxp = new PTXPlatform(urlString);\r\n \r\n try{\r\n this.stopData = new JSONArray(ptxp.getData()).getJSONObject(0);\r\n }catch(Exception e){\r\n System.out.println(\"Maybe Direction are not using in this route, please set direction to -1.\");\r\n }\r\n return stopFilter(stopData);\r\n }", "@Override\n public Stoptime[] getStoptimes(String stopGtfsId) throws Exception {\n String query = getStopTimesQuery(stopGtfsId);\n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop.class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop.class);\n \n return deserialized.getStoptimes();\n }", "private Vector <BusStopInfo> findStopInfo(BusStopInterface busStop)\r\n {\r\n Vector <BusStopInfo> result = new Vector<BusStopInfo>();\r\n Awtobus checking = null;\r\n for(int i=0; i < lines.size(); i++)\r\n {\r\n checking = lines.get(i);\r\n int length = checking.busLine.getNumberOfBusStops();\r\n for(int j=0; j<length; j++)\r\n {\r\n if(busStop == checking.busLine.getBusStop(j))\r\n {\r\n result.add(new BusStopInfo(checking, j));\r\n }\r\n }\r\n }\r\n return result;\r\n }", "Stop getStopPerID(String id);", "public ArrayList<String> parseDistance(JSONObject jsonObject) {\n JSONArray jsonArray = null;\n try {\n jsonArray = jsonObject.getJSONArray(\"routes\").getJSONObject(0).getJSONArray(\"legs\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return getDuration(jsonArray);\n }", "private void fetchStopPoints() {\n\t\tif (mode == Mode.ADD_MODE && routeComboBox.getValue() != null) {\n\t\t\tstopPoints = SQLExecutor.fetchStopPointsByRoute(routeComboBox.getValue());\n\t\t} else if (mode == Mode.UPDATE_MODE && tripComboBox.getValue() != null){\n\t\t\tstopPoints = SQLExecutor.fetchStopPointsByTrip(tripComboBox.getValue());\n\t\t}\n\t}", "List<Map.Entry<Long, String>> getStopTimeTable(String stopId) throws Exception;", "private List<RouteInfo> createList() {\r\n\r\n List<RouteInfo> results = new ArrayList<>();\r\n\r\n for (String temp [] : stops) {\r\n\r\n RouteInfo info = new RouteInfo();\r\n info.setTitle(temp[0]);\r\n info.setRouteName(\"Stop ID: \" + temp[1]);\r\n info.setRouteDescription(\"Next bus at: \");\r\n results.add(info);\r\n }\r\n\r\n return results;\r\n }", "private void findStop(Airport departAPT, double distanceNeed, double maxRange){\n\t\t\tint stopIndex=-1;\r\n\t\t\tdouble stopDist=0;\r\n\t\t\tdouble stopToDestnDistance=999999999; //distance from depart to destination\r\n\t\t\tdouble startToStopDistance; //depart to stop distance\r\n\t\t\tdouble testDistance;\r\n\t\t\tString id;\r\n\r\n\t\t\tfor(int i=0; i<apt.size();++i){ //test every airport\r\n\t\t\t\t//cannot be destination or departing airport or dead end airport;\r\n\t\t\t\tid=apt.get(i).getID();\r\n\t\t\t\tif(id!=departAPT.getID() && id!=destnAPT.getID() && !deadEnd.contains(id)){\r\n\t\t\t\t\t//test avaliable fuel for this airplane type\r\n\t\t\t\t\tif(apt.get(i).getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\t\tstartToStopDistance=findDistance(departAPT.getLat(),departAPT.getLon(),apt.get(i).getLat(),apt.get(i).getLon());\r\n\t\t\t\t\t\t//test if distance between depart and stop is in airplane's max travel range and if not same range as previous stop\r\n\t\t\t\t\t\tif(startToStopDistance<=maxRange && !stopAPTDist.contains(startToStopDistance)){\r\n\t\t\t\t\t\t\ttestDistance=findDistance(apt.get(i).getLat(),apt.get(i).getLon(),destnAPT.getLat(),destnAPT.getLon());\r\n\t\t\t\t\t\t\tif(testDistance<stopToDestnDistance){\r\n\t\t\t\t\t\t\t\tstopDist=startToStopDistance;\r\n\t\t\t\t\t\t\t\tstopIndex=i;\r\n\t\t\t\t\t\t\t\tstopToDestnDistance=testDistance;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(stopIndex!=-1){ //when stop is avaliable add this stop to info list\r\n\t\t\t\tstopAPT.add(apt.get(stopIndex));\r\n\t\t\t\tstopAPTDist.add(stopDist);\r\n\t\t\t\tif(stopToDestnDistance<=usePlane.getMaxRange()){ //if stop can reach destination, add final round and return to plan method\r\n\t\t\t\t\tstopAPT.add(destnAPT);\r\n\t\t\t\t\tstopAPTDist.add(findDistance(apt.get(stopIndex).getLat(),apt.get(stopIndex).getLon(),destnAPT.getLat(),destnAPT.getLon()));\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse findStop(apt.get(stopIndex),stopToDestnDistance, usePlane.getMaxRange());\r\n\t\t\t}\r\n\t\t\telse { //when no stop is find, break the plan and clear everything\r\n\t\t\t\tif(stopAPT.isEmpty() || deadEnd.size()>5){\r\n\t\t\t\t\tstopAPT.clear();\r\n\t\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse{ //when stops routine cannot reach destination, clear all and start another path\r\n\t\t\t\tdeadEnd.add(departAPT.getID());\r\n\t\t\t\tstopAPT.clear();\r\n\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\tif(startAPT.getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\tfindStop(startAPT,dist,usePlane.getMaxRange());\r\n\t\t\t\t}else findStop(startAPT,dist,((fuelTank/usePlane.getFuelTank())*usePlane.getMaxRange()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t}", "public RouteStopManager getRouteStopManager() {\n\t\tif (routeStopManager == null) {\n\t\t\tIRouteStopDAO routeStopDAO = new RouteStopDAOSqlite(dbHelper);\n\t\t\trouteStopManager = new RouteStopManager(routeStopDAO);\n\t\t\trouteStopManager.setManagerHolder(this);\n\t\t}\n\t\treturn routeStopManager;\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n DirectionParser parser = new DirectionParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n\t\tprotected List<List<HashMap<String, String>>> doInBackground(\n\t\t\t\tString... jsonData) {\n\t\t\tJSONObject jObject;\n\t\t\tList<List<HashMap<String, String>>> routes = null;\n\n\t\t\ttry {\n\t\t\t\tjObject = new JSONObject(jsonData[0]);\n\t\t\t\tDirectionsJSONParser parser = new DirectionsJSONParser();\n\n\t\t\t\t// Starts parsing data\n\t\t\t\troutes = parser.parse(jObject);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn routes;\n\t\t}", "public void run(){\n String searchResultString = getUrlContents(directionsRequestUrl);\n try {\n //Turns the response to a JSON object\n JSONObject directionsResultJSON = new JSONObject(searchResultString);\n\n //Parses the JSON object\n JSONArray routesArray = directionsResultJSON.getJSONArray(\"routes\");\n JSONObject route = routesArray.getJSONObject(0);\n\n //Extract the encodedPolylineString\n JSONObject overviewPolylines = route.getJSONObject(\"overview_polyline\");\n polylineEncodedString = overviewPolylines.getString(\"points\");\n\n //Extract the optimized order of the waypoints\n if(route.has(\"waypoint_order\")) {\n //uses this new order to build the orderedDestinations ArrayList\n JSONArray waypoint_order = route.getJSONArray(\"waypoint_order\");\n int[] order = new int[waypoint_order.length()];\n for(int i = 0; i < waypoint_order.length(); i++){\n order[i] = (Integer)waypoint_order.get(i);\n }\n orderedDestinations = calculateOrderedDestinations(order);\n } else {\n orderedDestinations = destinations;\n }\n\n //Inform the message handler that the request was a success\n Message msg = Message.obtain();\n msg.what = 0;\n handler.sendMessage(msg);\n } catch (JSONException e) {\n //error, probably network related\n e.printStackTrace();\n //inform the message handler that the request was a failure\n Message msg = Message.obtain();\n msg.what = 1;\n handler.sendMessage(msg);\n }\n }", "private String parseResponse(String jsonString) throws JSONException,\n IllegalArgumentException, CalculationException {\n\n JSONObject json = new JSONObject(jsonString);\n int errorCode = json.getInt(\"error\");\n String errorString = json.getString(\"error_str\");\n if (errorCode != 200) {\n // These are Google Maps API error codes. Assuming that root cause is invalid parameters.\n if (errorCode > 600) {\n log.warn(\"parseResponse() - Error status returned by Train Route API: \" + errorString);\n throw new IllegalArgumentException();\n } else {\n throw new CalculationException(errorString, errorCode);\n }\n }\n\n JSONObject route = json.getJSONArray(\"Routes\").getJSONObject(0);\n // Removed setting of setLegDetail - as a performance tuning we are.\n // not returning leg details from train route api for the moment - SM (10/2009)\n // setLegDetail(route.getJSONArray(\"Steps\").toString());\n return route.getJSONObject(\"Distance\").getString(\"meters\");\n }", "@Override\n\t\tprotected List<Direction> doInBackground(String... jsonData)\n\t\t{\n\t\t\tJSONObject jObject;\n\t\t\t//List<Direction> route = null;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tjObject = new JSONObject(jsonData[0]);\n\t\t\t\tDirectionsJSONParser parser = new DirectionsJSONParser();\n\n\t\t\t\t// Starts parsing data\n\t\t\t\t//routes = parser.parse(jObject);\n\t\t\t\troute = parser.parseDirections(jObject, dbHandler);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn route;\n\t\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DirectionsParser parser = new DirectionsParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\r\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\r\n\r\n JSONObject jObject;\r\n List<List<HashMap<String, String>>> routes = null;\r\n\r\n try {\r\n jObject = new JSONObject(jsonData[0]);\r\n DirectionsJSONParser parser = new DirectionsJSONParser();\r\n\r\n // Starts parsing data\r\n routes = parser.parse(jObject);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return routes;\r\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "private void processOutOfContextSTOPs(int regency) {\n\n logger.debug(\"Checking if there are out of context STOPs for regency \" + regency);\n\n Set<LCMessage> stops = getOutOfContextLC(TOMUtil.STOP, regency);\n\n if (stops.size() > 0) {\n logger.info(\"Processing \" + stops.size() + \" out of context STOPs for regency \" + regency);\n } else {\n logger.debug(\"No out of context STOPs for regency \" + regency);\n }\n\n for (LCMessage m : stops) {\n TOMMessage[] requests = deserializeTOMMessages(m.getPayload());\n\n // store requests that came with the STOP message\n lcManager.addRequestsFromSTOP(requests);\n\n // store information about the STOP message\n lcManager.addStop(regency, m.getSender());\n }\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n jObject = new JSONObject(jsonData[0]);\n DirectionsJsonParser parser = new DirectionsJsonParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n e.printStackTrace();\n }\n return routes;\n }", "public StopResponse createStop(ShipmentStopListRequest shipmentStopListRequest, Long shipmentId) throws Exception;", "public void getStopLocationId(final Step transitStop, final Calendar arrivalTimeAtStop,\n final MapPresenterCallback mapPresenterCallback) throws IllegalArgumentException {\n if (transitStop == null || !transitStop.getTravelMode().equals(TRANSIT)) {\n throw new IllegalArgumentException(ILLEGAL_ARGUMENT_EXCEPTION);\n }\n final String url = buildRetrieveStopIdUrl(transitStop.getStartLocation().latitude,\n transitStop.getStartLocation().longitude);\n\n GsonRequest<StopLocationIdResponse> req = new GsonRequest<>(url, StopLocationIdResponse.class,\n null, new Response.Listener<StopLocationIdResponse>() {\n @Override\n public void onResponse(StopLocationIdResponse response) {\n int trimetLocationId = response.getLocationId();\n transitStop.setTrimetLocationId(trimetLocationId);\n getBusStopArrivalDetails(transitStop, trimetLocationId, arrivalTimeAtStop, mapPresenterCallback);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"An error occured when the getting the bus Stop ID.\", error);\n }\n });\n mDataRequestQueue.addToRequestQueue(req);\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n// Log.e(\"JO\", String.valueOf(jObject));\n DataParser parser = new DataParser();\n\n JSONArray array = jObject.getJSONArray(\"routes\");\n JSONObject JORoutes = array.getJSONObject(0);\n JSONArray JOLegs= JORoutes.getJSONArray(\"legs\");\n JSONObject JOSteps = JOLegs.getJSONObject(0);\n JSONObject JODistance = JOSteps.getJSONObject(\"distance\");\n if (JODistance.has(\"text\")) {\n distance = JODistance.getString(\"text\");\n }\n\n // Starts parsing data\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n e.printStackTrace();\n }\n return routes;\n }", "public HashMap<String, BusStops> readLtaBusStops(String file, String file2) throws IOException {\n\t\t//Reads Lta Bus Stop Codes and add it into a hashmap\n\t\tHashMap<String, BusStops> busStopMap = new HashMap<>();\n\t\tFile ltaBusStopCodes = new File(file); //Instantiates the file to read\n\t\tFile otherFile = new File(file2);\n\t\t//Tries to read the file using buffered reader\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(ltaBusStopCodes))) {\n\t\t\tbr.readLine();//To skip first line\n\t\t\tStringTokenizer st; //String tokenizer to read the csv token by token\n\t\t\tString line;\n\t\t\t//loops through the csv file and read it\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\"); //using StringTokenizer's delimiter for \",\". Each word as a single token.\n\t\t\t\t//2nd while loop to loop each and every word after delimiter \",\"\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString busStopCode = st.nextToken();\n\t\t\t\t\tString roadDesc = st.nextToken();\n\t\t\t\t\tString busStopDesc = st.nextToken();\n\t\t\t\t\t//Creates a LtaBusStopCodes object with the data read from csv and insert into the hashmap\n\t\t\t\t\tBusStops ltaBsStopCode = new BusStops(busStopCode, roadDesc, busStopDesc);\n\t\t\t\t\tbusStopMap.put(ltaBsStopCode.getBusStopCode(), ltaBsStopCode);\n\t\t\t\t}//End while loop for each token\n\t\t\t}//End while loop\n\t\t}\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(otherFile))) {\n\t\t\tbr.readLine();\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tdouble latitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tdouble longitude = Double.parseDouble(st.nextToken());\n\t\t\t\t\tint zid = Integer.parseInt(st.nextToken());\n\t\t\t\t\tBusStops bs = busStopMap.get(st.nextToken());\n\t\t\t\t\tif (bs != null) {\n\t\t\t\t\t\tbs.setX(latitude);\n\t\t\t\t\t\tbs.setY(longitude);\n\t\t\t\t\t\tbs.setZid(zid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn busStopMap;\n\t}", "public static ArrayList<String> getDirections(Context context,\n \t\t\tString system, String route) throws Exception {\n \t\tArrayList<String> directions = new ArrayList<String>();\n \t\tBundle params = new Bundle();\n \t\tparams.putString(\"rt\", route);\n \t\tXmlPullParser xpp = BusTimeAPI.loadData(context, \"getdirections\",\n \t\t\t\tsystem, params);\n \t\tint eventType = xpp.getEventType();\n \t\tString curTag = \"\";\n \t\tBusTimeError err = null;\n \t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\n \t\t\tswitch (eventType) {\n \t\t\tcase XmlPullParser.START_TAG:\n \t\t\t\tcurTag = xpp.getName();\n \t\t\t\tif (curTag.equals(\"dir\")) { // on to new route\n \t\t\t\t\t// nothing yet\n \t\t\t\t} else if (curTag.equals(\"error\"))\n \t\t\t\t\terr = new BusTimeError();\n \t\t\t\tbreak;\n \t\t\tcase XmlPullParser.TEXT:\n \t\t\t\tString text = xpp.getText().trim();\n \t\t\t\tif (!curTag.equals(\"\") && !text.equals(\"\")) {\n \t\t\t\t\tif (err != null)\n \t\t\t\t\t\terr.setField(curTag, text);\n \t\t\t\t\telse\n \t\t\t\t\t\tdirections.add(text);\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase XmlPullParser.END_TAG:\n \t\t\t\tcurTag = \"\";\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\teventType = xpp.next();\n \t\t}\n \t\tif (err != null)\n \t\t\tthrow err;\n \t\treturn directions;\n \t}", "public void getBusStopArrivalDetails(final Step transitStop, int locationId, final Calendar arrivalTime,\n final MapPresenterCallback mapPresenterCallback) {\n final String url = buildBusArrivalUrl(locationId);\n\n GsonRequest<ArrivalResponse> req = new GsonRequest<>(url, ArrivalResponse.class, null, new Response.Listener<ArrivalResponse>() {\n @Override\n public void onResponse(ArrivalResponse response) {\n int id = getBusIdFromArrivalTime(arrivalTime, response);\n transitStop.setVehicleId(id);\n if (id > 0) {\n mapPresenterCallback.queryForNextIncomingtransitVehicle(id);\n\n } else {\n mapPresenterCallback.noVehicleAssigned();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"An error occured when the getting Bus Arrival data.\", error);\n }\n });\n mDataRequestQueue.addToRequestQueue(req);\n }", "@Override\r\n\t protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\r\n\t \r\n\t JSONObject jObject;\r\n\t List<List<HashMap<String, String>>> routes = null;\r\n\t \r\n\t try{\r\n\t jObject = new JSONObject(jsonData[0]);\r\n\t DirectionsJSONParser parser = new DirectionsJSONParser();\r\n\t \r\n\t // Starts parsing data\r\n\t routes = parser.parse(jObject);\r\n\t }catch(Exception e){\r\n\t e.printStackTrace();\r\n\t }\r\n\t return routes;\r\n\t }", "public LiveStreamingRoomStopLiveInfo createFromParcel(Parcel parcel) {\n return new LiveStreamingRoomStopLiveInfo(parcel);\n }", "@Override\n public TopologyResponse stopParserTopology(String name, boolean stopNow) throws RestException {\n // Supplied name could be a group so get the actual job name from Storm\n TopologyStatus topologyStatus = stormStatusService.getTopologyStatus(name);\n String jobName = topologyStatus != null ? topologyStatus.getName() : name;\n return createResponse(stormCLIClientWrapper.stopParserTopology(jobName, stopNow), TopologyStatusCode.STOPPED, TopologyStatusCode.STOP_ERROR);\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n\n Log.d(\"debbbbb\", jsonData[0]);\n\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n e.printStackTrace();\n }\n return routes;\n }", "public static List<Object> getDirectionBetweenTwoLocation(final String sourceAddress, final String destinationAddress, final String API_KEY) {\n\n final List<String> list = new ArrayList<>();\n final List<Object> directionList = new ArrayList<>();\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?\" + \"origin=\" + sourceAddress + \"&destination=\" + destinationAddress + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"routes\");\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONArray legsObject = jsonArray.getJSONObject(2).getJSONArray(\"legs\");\n if (legsObject != null) {\n JSONArray stepsArray = legsObject.getJSONObject(6).getJSONArray(\"steps\");\n if (stepsArray != null && stepsArray.length() > 0) {\n for (int i = 1; i < stepsArray.length(); i++) {\n JSONObject object = stepsArray.getJSONObject(i);\n System.out.println(\"response1\" + object);\n\n String maneuver = object.getString(\"maneuver\");\n list.add(maneuver);\n }\n directionList.addAll(list);\n }\n }\n }\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return directionList;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try{\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n\n // Starts parsing data\n routes = parser.parse(jObject);\n }catch(Exception e){\n\n\n\n e.printStackTrace();\n }\n return routes;\n }", "List<Stop> getStopsPerLine(String line);", "public Stop(int id, String name, double latitude, double longitude, boolean addToList) {\n this.id = id;\n this.name = name;\n this.latitude = latitude;\n this.longitude = longitude;\n if (addToList) {\n addStop(this);\n }\n\n }", "List<Stopsinlinedb> fetchStopsInLines();", "@Override\r\n\tpublic void onStopOrder(StopOrder StopOrder) throws Exception {\n\t\t\r\n\t}", "private List<Edge<Stop>> getWalkingEdgesFromStop(long timeAtStop, Stop stop, Set<Stop> found) {\n //Calculate a list of geohashes around the stop\n List<Geohash> nearbyGeohashes = Geohash.getSurroundingGeohashes(\n BigDecimal.valueOf(stop.getLocation().getLatitude()),\n BigDecimal.valueOf(stop.getLocation().getLongitude()), STOP_INDEX_GEOHASH_LEVEL);\n\n return nearbyGeohashes.stream()\n //Get all stops inside the geohashes\n .flatMap(geohash -> stopByGeohashIndex.getItems(geohash).stream())\n //Filter stops that have been already found\n .filter(stopFromIndex -> !found.contains(stopFromIndex))\n //Filter stops that are too far\n .filter(stopFromIndex -> stopFromIndex.getLocation().distanceTo(stop.getLocation()) <= MAX_WALKING_DISTANCE_IN_METERS\n && !stopFromIndex.getId().equals(stop.getId()))\n .map(walkableStop -> new StopEdge(null, //No public transport route used when walking -> route = null, trip = null\n null,\n TransportMode.WALK,\n stop,\n walkableStop,\n //Calculate walking time\n timeAtStop + 1 + Math.round(walkableStop.getLocation().distanceTo(stop.getLocation()) / AVERAGE_WALKING_SPEED_MS),\n timeAtStop))\n .collect(Collectors.toCollection(() -> new TiraArrayList<>()));\n }", "public List<List<HashMap<String,String>>> parse(JSONObject jObject){\n // Khoi tao cac mang\n List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String,String>>>() ;\n JSONArray jRoutes = null;\n JSONArray jLegs = null;\n JSONArray jSteps = null;\n try {\n // Truy cap vao phan tu chua danh sach tuyen duong\n jRoutes = jObject.getJSONArray(\"routes\");\n for(int i = 0; i < jRoutes.length(); i++){\n jLegs = ((JSONObject)jRoutes.get(i)).getJSONArray(\"legs\");\n List path = new ArrayList<HashMap<String, String>>();\n // Phan tich cac buoc\n for(int j = 0; j < jLegs.length(); j++){\n jSteps = ( (JSONObject)jLegs.get(j)).getJSONArray(\"steps\");\n // Phan tich cac diem\n for(int k = 0; k < jSteps.length(); k++){\n // Danh sach cac duong thang\n String polyline = \"\";\n polyline = (String)((JSONObject)((JSONObject)jSteps.get(k)).get(\"polyline\")).get(\"points\");\n // Giai ma cac duong thang duoc ve tren ban do\n List list = decodePoly(polyline);\n // Gan danh sach cac diem\n for(int l=0;l <list.size();l++){\n HashMap<String, String> hm = new HashMap<String, String>();\n hm.put(\"lat\", Double.toString(((LatLng)list.get(l)).latitude) );\n hm.put(\"lng\", Double.toString(((LatLng)list.get(l)).longitude) );\n path.add(hm);\n }\n }\n routes.add(path);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }catch (Exception e){\n }\n return routes;\n }", "public void getDirections() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/directions/json?\" +\n \"origin=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destination=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n //callback for string request\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n String encodedPolyline = data.getJSONArray(\"routes\").getJSONObject(0).\n getJSONObject(\"overview_polyline\").getString(\"points\");\n List<LatLng> points = PolyUtil.decode(encodedPolyline);\n if (curPoly != null) {\n curPoly.remove();\n }\n curPoly = mMap.addPolyline(new PolylineOptions().addAll(points));\n curPoly.setColor(getColor(R.color.colorAccent));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "public BusStopRecord(Long timestamp, String lineId, String direction, String journeyPatternId, Timestamp timeFrame, Long vehicleJourneyId, String operator, Boolean congestion, BigDecimal latitude, BigDecimal longitude, Integer delay, Integer blockId, Integer vehicleId, String stopId, Boolean atBusStop) {\n super(BusStop.BUS_STOP);\n\n set(0, timestamp);\n set(1, lineId);\n set(2, direction);\n set(3, journeyPatternId);\n set(4, timeFrame);\n set(5, vehicleJourneyId);\n set(6, operator);\n set(7, congestion);\n set(8, latitude);\n set(9, longitude);\n set(10, delay);\n set(11, blockId);\n set(12, vehicleId);\n set(13, stopId);\n set(14, atBusStop);\n }", "public Observable<Stop> getEndPoints() {\n return loadRoutesData()\n .flatMap(availableRoutes ->\n Observable.from(availableRoutes.routes()))\n .flatMap(route -> Observable.from(route.segments()).last())\n .map(segment -> segment.stops().get(segment.stops().size() - 1));\n\n }", "public static List<Stop> findStop(String name) {\n List<Stop> matchingStops = new ArrayList<>();\n String pattern = \"(?i)(.*)\" + name + \"(.*)\";\n for (Stop s : getAllStops()) {\n if (s.getName().matches(pattern)) {\n matchingStops.add(s);\n }\n }\n return matchingStops;\n }", "ResponseDTO stopAllServers();", "public List<List<HashMap<String, String>>> parseRouteFormJSON(JSONObject jObject) {\n List<List<HashMap<String, String>>> routes = new ArrayList<List<HashMap<String, String>>>();\n JSONArray jRoutes = null;\n JSONArray jLegs = null;\n JSONArray jSteps = null;\n try {\n jRoutes = jObject.getJSONArray(\"routes\");\n /** Traversing all routes */\n for (int i = 0; i < jRoutes.length(); i++) {\n jLegs = ((JSONObject) jRoutes.get(i)).getJSONArray(\"legs\");\n List<HashMap<String, String>> path = new ArrayList<HashMap<String, String>>();\n\n /** Traversing all legs */\n for (int j = 0; j < jLegs.length(); j++) {\n jSteps = ((JSONObject) jLegs.get(j)).getJSONArray(\"steps\");\n\n /** Traversing all steps */\n for (int k = 0; k < jSteps.length(); k++) {\n String polyline = \"\";\n polyline = (String) ((JSONObject) ((JSONObject) jSteps\n .get(k)).get(\"polyline\")).get(\"points\");\n List<LatLng> list = decodePoly(polyline);\n\n /** Traversing all points */\n for (int l = 0; l < list.size(); l++) {\n HashMap<String, String> hm = new HashMap<String, String>();\n hm.put(\"lat\",\n Double.toString(((LatLng) list.get(l)).latitude));\n hm.put(\"lng\",\n Double.toString(((LatLng) list.get(l)).longitude));\n path.add(hm);\n }\n }\n routes.add(path);\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n }\n return routes;\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points;\n PolylineOptions lineOptions = null;\n\n MarkerOptions markerOptions = new MarkerOptions();\n String distance = \"\";\n String duration = \"\";\n String address = \"\";\n\n\n if (polylines.size() > 0) {\n polylines.get(0).remove();\n polylines.clear();\n }\n try {\n // Traversing through all the routes\n for (int i = 0; i < result.size(); i++) {\n points = new ArrayList<>();\n lineOptions = new PolylineOptions();\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n // Fetching all the points in i-th route\n for (int j = 0; j < path.size(); j++) {\n HashMap<String, String> point = path.get(j);\n\n if (j == 0) { // Get distance from the list\n distance = (String) point.get(\"distance\");\n continue;\n } else if (j == 1) { // Get duration from the list\n duration = (String) point.get(\"duration\");\n continue;\n }\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n\n LatLng position = new LatLng(lat, lng);\n points.add(position);\n }\n\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(10);\n lineOptions.color(Color.RED);\n Log.d(\"onPostExecute\", \"onPostExecute lineoptions decoded\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(Location.this, \"Please ckeck your internet connection!!\", Toast.LENGTH_SHORT).show();\n }\n\n\n //Now you can get these values from anywhere like this way:\n startAddress = DataParser.mMyAppsBundle.getString(\"startAddress\");\n // Toast.makeText(Location.this, \"Start Address..\"+startAddress, Toast.LENGTH_SHORT).show();\n source_address.setText(startAddress);\n endAddress = DataParser.mMyAppsBundle.getString(\"endAddress\");\n //Toast.makeText(Location.this, \"End Address..\"+endAddress, Toast.LENGTH_SHORT).show();\n destination_address.setText(endAddress);\n //mode = DataParser.mMyAppsBundle.getString(\"travel_mode\");\n\n /* distance_text.setVisibility(View.VISIBLE);\n duration_text.setVisibility(View.VISIBLE);*/\n\n //travelmode_text.setVisibility(View.VISIBLE);\n //empty_text.setVisibility(View.VISIBLE);\n /***********Start and End address needs to be set************/\n\n distance_text.setText(distance);\n duration_text.setText(duration);\n\n // travelmode_text.setText(mode+\" \"+\"Mode\");\n\n // tvDistanceDuration.setText(\"Distance:\"+distance + \", Duration:\"+duration);\n // Drawing polyline in the Google Map for the i-th route\n if (lineOptions != null) {\n line = mMap.addPolyline(lineOptions);\n polylines.add(line);\n } else Log.d(\"onPostExecute\", \"without Polylines drawn\");\n }", "public Stop(int id, String name, double latitude, double longitude) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.latitude = latitude;\n\t\tthis.longitude = longitude;\n\t\taddStop(this);\n\t}", "@Schema(description = \"* FORCEFUL: The VNFM will stop the VNF immediately after accepting the request. * GRACEFUL: The VNFM will first arrange to take the VNF out of service after accepting the request. Once that operation is successful or once the timer value specified in the \\\"gracefulStopTimeout\\\" attribute expires, the VNFM will stop the VNF. \")\n public StopTypeEnum getStopType() {\n return stopType;\n }", "void setListOfStops(ArrayList<TTC> listOfStops) {\n this.listOfStops = listOfStops;\n }", "private void addSTOPedRequestsToClientManager() {\n\n List<TOMMessage> messagesFromSTOP = lcManager.getRequestsFromSTOP();\n if (messagesFromSTOP != null) {\n\n logger.debug(\"Adding to client manager the requests contained in STOP messages\");\n\n for (TOMMessage m : messagesFromSTOP) {\n tom.requestReceived(m, false);\n\n }\n }\n\n }", "public static List<Object> getMidLocationBetweenTwoLocation(final String sourceAddress, final String destinationAddress, final String API_KEY) {\n\n\n final List<String> list = new ArrayList<>();\n final List<Object> midPointList = new ArrayList<>();\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?\" + \"origin=\" + sourceAddress + \"&destination=\" + destinationAddress + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"routes\");\n\n System.out.println(\"response:\" + jsonArray);\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONArray legsObject = jsonArray.getJSONObject(2).getJSONArray(\"legs\");\n if (legsObject != null) {\n JSONArray stepsArray = legsObject.getJSONObject(6).getJSONArray(\"steps\");\n if (stepsArray != null && stepsArray.length() > 0) {\n for (int i = 0; i < stepsArray.length(); i++) {\n JSONObject object = stepsArray.getJSONObject(i);\n\n if (object.has(\"end_location\")) {\n JSONObject end_locationObject = object.getJSONObject(\"end_location\");\n double lat = end_locationObject.getDouble(\"lat\");\n double lng = end_locationObject.getDouble(\"lng\");\n\n URL lat_lng_url = new URL(\"https://maps.googleapis.com/maps/api/geocode/json?\" + \"latlng=\" + lat + \",\" + lng + \"&key=\" + API_KEY);\n\n JSONObject latlngObject = new JSONObject(String.valueOf(lat_lng_url));\n\n JSONArray latlngArray = latlngObject.getJSONArray(\"results\");\n\n if (latlngArray != null && latlngArray.length() > 0) {\n JSONObject addressObj = latlngArray.getJSONObject(1);\n String formatted_address = addressObj.getString(\"formatted_address\");\n list.add(formatted_address);\n }\n }\n }\n midPointList.addAll(list);\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return midPointList;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(JSONObject... jsonData) {\n\n JSONObject jObject;\n\n try {\n if (routes != null) {\n if (routes.size() > 0) {\n routes.clear();\n }\n }\n\n DirectionsJSONParser parser = new DirectionsJSONParser();\n // Starts parsing data\n routes = parser.parse(jsonData[0]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "private List<StopEdge> getPossibleDestinations(Stop stop, long timeAtStop, Route route, String tripId, LocalDate departureDate, long departureTime, List<StopTime> stopTimesOfTrip, Set<Stop> found, Map<String, Long> bestArrivalTime) {\n List<StopEdge> edges = new TiraArrayList<>();\n\n long departureTimeMillis = calculateTime(departureDate, departureTime);\n //If the public transport service departs from the stop before current time, that service cannot be used for the route -> return empty list\n if (departureTimeMillis < timeAtStop) {\n return Collections.emptyList();\n }\n\n for (StopTime stopTime : stopTimesOfTrip) {\n Stop destinationStop = stops.get(stopTime.getStopId());\n if (destinationStop == null) {\n //This should happen only if the GTFS feed is malformed\n return Collections.emptyList();\n }\n\n //Don't add new edge if a better route to the destination was already found\n long arrivalTimeMillis = calculateTime(departureDate, stopTime.getArrivalTime());\n if (arrivalTimeMillis > bestArrivalTime.getOrDefault(destinationStop.getId(), Long.MAX_VALUE)) {\n continue;\n }\n\n if (arrivalTimeMillis > departureTimeMillis) {\n //If the trip would pass through any of already found stops, return empty list as it would be slower to reach the final destination using this route than the route that was used for reaching the previously found route\n if (found.contains(destinationStop)) {\n return Collections.emptyList();\n }\n\n bestArrivalTime.put(destinationStop.getId(), arrivalTimeMillis);\n edges.add(new StopEdge(route.getName(), tripId, route.getMode(), stop, destinationStop, arrivalTimeMillis, departureTimeMillis));\n }\n }\n\n return edges;\n }", "private List<Edge<Stop>> getPublicTransportEdgesFromStop(long timeAtStop, Stop stop, Set<Stop> found) {\n GregorianCalendar gregorianCalendar = new GregorianCalendar(timeZone);\n gregorianCalendar.setTimeInMillis(timeAtStop);\n\n LocalDate date = LocalDate.of(gregorianCalendar.get(java.util.Calendar.YEAR), gregorianCalendar.get(java.util.Calendar.MONTH) + 1, gregorianCalendar.get(java.util.Calendar.DAY_OF_MONTH));\n\n List<StopTime> stopTimes = stopTimesByStopIdIndex.getItems(stop.getId());\n return stopTimes.stream().flatMap(stopTime -> {\n ServiceDates serviceDatesForStopTime = serviceDates.get(trips.get(stopTime.getTripId()).getServiceId());\n\n LocalDate estimatedDepartureDate = date.minus(Math.round(stopTime.getArrivalTime() / 86400f), ChronoUnit.DAYS);\n\n List<StopEdge> edges = new TiraArrayList<>();\n\n //Optimization: list of best arrival times (to ignore routes that would arrive to these stops later than the previously found best route)\n //This optimization is not optimal but should decrease the amount of possible returned edges\n Map<String, Long> bestArrivalTime = new TiraHashMap<>();\n\n /**\n * Check possible departure dates that are: yesterday, today and the day after today\n */\n for (int i = -1; i <= 1; i++) {\n LocalDate departureDate = estimatedDepartureDate.plus(i, ChronoUnit.DAYS);\n\n if (serviceDatesForStopTime.runsOn(departureDate)) {\n edges.addAll(\n getPossibleDestinations(stop,\n timeAtStop,\n routes.get(trips.get(stopTime.getTripId()).getRouteId()),\n stopTime.getTripId(),\n departureDate,\n stopTime.getArrivalTime(),\n stopTimesByTripIdIndex.getItems(stopTime.getTripId()),\n found,\n bestArrivalTime));\n }\n }\n\n return edges.stream();\n }).collect(Collectors.toCollection(() -> new TiraArrayList<>()));\n }", "public interface RealTimeTransportApi {\n\n @GET(\"busstopinformation\")\n Call<PublicStopListResponse> listAllStops(@Query(\"operator\") String operator);\n\n @GET(\"realtimebusinformation\")\n Call<RealtimeRouteResponse> getRealtimeInfo(@Query(\"stopid\") String stopId);\n\n}", "private TOMMessage[] deserializeTOMMessages(byte[] playload) {\n\n ByteArrayInputStream bis;\n ObjectInputStream ois;\n\n TOMMessage[] requests = null;\n\n try { // deserialize the content of the STOP message\n\n bis = new ByteArrayInputStream(playload);\n ois = new ObjectInputStream(bis);\n\n boolean hasReqs = ois.readBoolean();\n\n if (hasReqs) {\n\n // Store requests that the other replica did not manage to order\n //TODO: The requests have to be verified!\n byte[] temp = (byte[]) ois.readObject();\n BatchReader batchReader = new BatchReader(temp,\n controller.getStaticConf().getUseSignatures() == 1);\n requests = batchReader.deserialiseRequests(controller);\n } else {\n \n requests = new TOMMessage[0];\n }\n\n ois.close();\n bis.close();\n\n } catch (IOException | ClassNotFoundException ex) {\n logger.error(\"Could not serialize requests\", ex);\n }\n\n return requests;\n\n }", "private void generateRoute(String json) {\n try {\n JSONObject jsonObject = new JSONObject(json);\n JSONArray routes = jsonObject.optJSONArray(\"routes\");\n if (null == routes || routes.length() == 0) {\n return;\n }\n JSONObject route = routes.getJSONObject(0);\n // get route bounds\n JSONObject bounds = route.optJSONObject(\"bounds\");\n if (null != bounds && bounds.has(\"southwest\") && bounds.has(\"northeast\")) {\n JSONObject southwest = bounds.optJSONObject(\"southwest\");\n JSONObject northeast = bounds.optJSONObject(\"northeast\");\n assert southwest != null;\n LatLng sw = new LatLng(southwest.optDouble(\"lat\"), southwest.optDouble(\"lng\"));\n assert northeast != null;\n LatLng ne = new LatLng(northeast.optDouble(\"lat\"), northeast.optDouble(\"lng\"));\n mLatLngBounds = new LatLngBounds(sw, ne);\n }\n // get paths\n JSONArray paths = route.optJSONArray(\"paths\");\n assert paths != null;\n for (int i = 0; i < paths.length(); i++) {\n JSONObject path = paths.optJSONObject(i);\n List<LatLng> mPath = new ArrayList<>();\n JSONArray steps = path.optJSONArray(\"steps\");\n distanceText = path.getString(\"distanceText\");\n durationText = path.getString(\"durationText\");\n assert steps != null;\n for (int j = 0; j < steps.length(); j++) {\n JSONObject step = steps.optJSONObject(j);\n JSONArray polyline = step.optJSONArray(\"polyline\");\n assert polyline != null;\n for (int k = 0; k < polyline.length(); k++) {\n if (j > 0 && k == 0) {\n continue;\n }\n JSONObject line = polyline.getJSONObject(k);\n double lat = line.optDouble(\"lat\");\n double lng = line.optDouble(\"lng\");\n LatLng latLng = new LatLng(lat, lng);\n mPath.add(latLng);\n }\n }\n mPaths.add(i, mPath);\n }\n mHandler.sendEmptyMessage(ROUTE_PLANNING_SUCCESS);\n } catch (JSONException e) {\n }\n }", "public Schedule getScheduleForSelectedStopAndRoute(String route, int direction, int stopId){\n Schedule selectedStopSchedule = new Schedule();\r\n // Fetch the route id given the route\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n // Store the Route Id\r\n int route_id = getData.getInt(0);\r\n // Calendar id: (90400,90448) - Monday To Friday\r\n final String query = \"select Routes.Route_long_Name, \" +\r\n \"Calendar._Id, Stops.Stop_Name, Stop_Times.Stop_Sequence, Stop_Times.Arrival_Time, routes.route_short_name \" +\r\n \"from Trips join Calendar on Trips.Service_Id=Calendar._Id \" +\r\n \"join Routes on Trips.Route_Id=Routes._Id \" +\r\n \"join Stop_Times on Trips._Id=Stop_Times.Trip_Id \" +\r\n \"join Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id = \" + route_id + \" \" +\r\n \"AND Trips.Direction_Id = \" + direction + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"AND stops._id = \" + stopId + \" \" +\r\n \"order by arrival_time asc\";\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n while (getData.moveToNext()){\r\n selectedStopSchedule.insertData(getData.getString(0), getData.getInt(1), getData.getString(2), getData.getInt(3)\r\n , getData.getString(4), getData.getString(5));\r\n }\r\n return selectedStopSchedule;\r\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n try {\n // Phan tich cac doi tuong json\n jObject = new JSONObject(jsonData[0]);\n DirectionsJSONParser parser = new DirectionsJSONParser();\n // Phan tich cac tuyen duong\n routes = parser.parse(jObject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected StopData[] doInBackground(Void... voids) {\n if(mLocation == null) {\n Log.e(TAG, \"location require to display activity\");\n return null;\n } else {\n Log.i(TAG, \"got location\");\n }\n ArrayList<StopData> stopData = StopService.createNearbyStopList(NearbyActivity.this, mLocation);\n final StopData[] adapterList = new StopData[stopData.size()];\n stopData.toArray(adapterList);\n return adapterList;\n }", "public void addToStopList(String stopID, String stopName, String weekTimes, String satTimes\n , String sunTimes, float latitude, float longitude) {\n Stop s = new Stop(stopID, stopName, weekTimes, satTimes,sunTimes, latitude, longitude);\n this.stopList.add(s);\n }", "@Override\r\n\tpublic void stop() {\n\t\tSystem.out.println(\"Jeep车停止\");\r\n\r\n\t}", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n MarkerOptions markerOptions = new MarkerOptions();\n distance=\"\";\n duration = \"\";\n\n if(result.size()<1){\n Toast.makeText(getBaseContext(), \"No Points\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Traversing through all the routes\n for(int i=0;i<result.size();i++){\n points = new ArrayList<LatLng>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for(int j=0;j<path.size();j++){\n HashMap<String,String> point = path.get(j);\n\n if(j==0){ // Get distance from the list\n distance = (String)point.get(\"distance\");\n continue;\n }else if(j==1){ // Get duration from the list\n duration = (String)point.get(\"duration\");\n continue;\n }\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n LatLng position = new LatLng(lat, lng);\n\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(2);\n lineOptions.color(Color.RED);\n }\n dist.setText(\"Distance:\" + distance);\n dur.setText(\"Duration:\" + duration);\n calculateDuration(duration);\n Log.d(\"Dura\",duration.substring(0,duration.length()-4));\n }", "@Override // com.google.gson.JsonDeserializer\n @org.jetbrains.annotations.Nullable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public com.avito.android.remote.model.SearchRadius deserialize(@org.jetbrains.annotations.NotNull com.google.gson.JsonElement r10, @org.jetbrains.annotations.NotNull java.lang.reflect.Type r11, @org.jetbrains.annotations.NotNull com.google.gson.JsonDeserializationContext r12) {\n /*\n r9 = this;\n java.lang.String r1 = \"json\"\n java.lang.String r3 = \"typeOfT\"\n java.lang.String r5 = \"context\"\n r0 = r10\n r2 = r11\n r4 = r12\n com.google.gson.JsonObject r10 = a2.b.a.a.a.I1(r0, r1, r2, r3, r4, r5)\n java.lang.String r11 = \"id\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n r0 = 0\n if (r11 == 0) goto L_0x001c\n java.lang.String r11 = r11.getAsString()\n r2 = r11\n goto L_0x001d\n L_0x001c:\n r2 = r0\n L_0x001d:\n java.lang.String r11 = \"title\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n if (r11 == 0) goto L_0x002b\n java.lang.String r11 = r11.getAsString()\n r3 = r11\n goto L_0x002c\n L_0x002b:\n r3 = r0\n L_0x002c:\n java.lang.String r11 = \"distanceInMeters\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n if (r11 == 0) goto L_0x003c\n long r0 = r11.getAsLong()\n java.lang.Long r0 = java.lang.Long.valueOf(r0)\n L_0x003c:\n r4 = r0\n java.lang.String r11 = \"coordinates\"\n com.google.gson.JsonElement r10 = r10.get(r11)\n if (r10 == 0) goto L_0x0055\n java.lang.Class<com.avito.android.remote.model.Coordinates> r11 = com.avito.android.remote.model.Coordinates.class\n java.lang.Object r10 = r12.deserialize(r10, r11)\n java.lang.String r11 = \"deserialize(json, T::class.java)\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r11)\n com.avito.android.remote.model.Coordinates r10 = (com.avito.android.remote.model.Coordinates) r10\n if (r10 == 0) goto L_0x0055\n goto L_0x005c\n L_0x0055:\n com.avito.android.remote.model.Coordinates r10 = new com.avito.android.remote.model.Coordinates\n r11 = 0\n double r11 = (double) r11\n r10.<init>(r11, r11)\n L_0x005c:\n r5 = r10\n com.avito.android.remote.model.SearchRadius r10 = new com.avito.android.remote.model.SearchRadius\n r6 = 0\n r7 = 16\n r8 = 0\n r1 = r10\n r1.<init>(r2, r3, r4, r5, r6, r7, r8)\n return r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.avito.android.remote.parse.adapter.SearchRadiusAdapter.deserialize(com.google.gson.JsonElement, java.lang.reflect.Type, com.google.gson.JsonDeserializationContext):com.avito.android.remote.model.SearchRadius\");\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n DataParser parser = new DataParser();\n\n routes = parser.parse(jObject);\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n\t\tprotected void onPostExecute(List<List<HashMap<String, String>>> result) {\n\t\t\tArrayList<LatLng> points = null;\n\t\t\tPolylineOptions lineOptions = null;\n\t\t\tMarkerOptions markerOptions = new MarkerOptions();\n\t\t\tString distance = \"\";\n\t\t\tString duration = \"\";\n\n\t\t\tif (result.size() < 1) {\n\t\t\t\tToast.makeText(getBaseContext(), \"No Points\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Traversing through all the routes\n\t\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\t\tpoints = new ArrayList<LatLng>();\n\t\t\t\tlineOptions = new PolylineOptions();\n\n\t\t\t\t// Fetching i-th route\n\t\t\t\tList<HashMap<String, String>> path = result.get(i);\n\n\t\t\t\t// Fetching all the points in i-th route\n\t\t\t\tfor (int j = 0; j < path.size(); j++) {\n\t\t\t\t\tHashMap<String, String> point = path.get(j);\n\n\t\t\t\t\tif (j == 0) { // Get distance from the list\n\t\t\t\t\t\tdistance = point.get(\"distance\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (j == 1) { // Get duration from the list\n\t\t\t\t\t\tduration = point.get(\"duration\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdouble lat = Double.parseDouble(point.get(\"lat\"));\n\t\t\t\t\tdouble lng = Double.parseDouble(point.get(\"lng\"));\n\t\t\t\t\tLatLng position = new LatLng(lat, lng);\n\t\t\t\t\tpoints.add(position);\n\t\t\t\t}\n\n\t\t\t\t// Adding all the points in the route to LineOptions\n\t\t\t\tlineOptions.addAll(points);\n\t\t\t\tlineOptions.width(10);\n\t\t\t\tlineOptions.color(Color.RED);\n\n\t\t\t}\n\n\t\t\t// tvDistanceDuration.setText(\"Distance:\" + distance + \", Duration:\"\n\t\t\t// + duration);\n\n\t\t\t// Drawing polyline in the Google Map for the i-th route\n\t\t\tgMmap.addPolyline(lineOptions);\n\t\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n } catch (Exception e) {\n Log.d(\"ParserTask\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "private static ArrayList<ParsedRestaurant> parseResults(StringBuilder jsonResults){\r\n\t\tboolean validObject = true;\r\n\t\tArrayList<ParsedRestaurant> resultsList = null;\r\n\t\ttry{ \r\n\t\t\tJSONObject jsonObj = new JSONObject(jsonResults.toString());\r\n\r\n\t\t\t//CREATES results from array with tag \"results\" \r\n\t\t\tJSONArray prediJsonArr = jsonObj.getJSONArray(\"results\");\r\n\r\n\t\t\tif(prediJsonArr!=null){\r\n\t\t\t\tresultsList = new ArrayList<ParsedRestaurant>();\r\n\t\t\t\tfor(int i=0; i<prediJsonArr.length(); i++){\r\n\t\t\t\t\tJSONObject objInArr = prediJsonArr.getJSONObject(i);\r\n\r\n\t\t\t\t\t// Create Restaurant instance\r\n\t\t\t\t\tParsedRestaurant newRest = new ParsedRestaurant();\r\n\t\t\t\t\tnewRest.setName(objInArr.getString(\"name\"));\r\n\t\t\t\t\tnewRest.setId(objInArr.getString(\"place_id\"));\r\n\t\t\t\t\tif(objInArr.has(\"rating\"))\r\n\t\t\t\t\t\tnewRest.setRating(objInArr.getDouble(\"rating\"));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tnewRest.setRating(-1);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Here we can check for types and remove those who\r\n\t\t\t\t\t * are not of interest, that we have saved in UNWANTED_TYPES list.\r\n\t\t\t\t\t * else we set the id to 0\r\n\t\t\t\t\t */\r\n\t\t\t\t\tJSONArray taggedTypes = objInArr.getJSONArray(\"types\");\r\n\t\t\t\t\tfor(int j=0; j<taggedTypes.length(); j++){\r\n\t\t\t\t\t\tif(!UNWANTED_TYPES.contains(taggedTypes.getString(j)))\r\n\t\t\t\t\t\t\tnewRest.addTypes(taggedTypes.getString(j));\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tvalidObject = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if the place id is not 0, the object is valid to add\r\n\t\t\t\t\t * else we don't add it.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif(validObject){\r\n\t\t\t\t\t\t//Create location instance\r\n\t\t\t\t\t\tParsedLocation loc = new ParsedLocation();\r\n\t\t\t\t\t\tloc.setLattitude(objInArr.getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lat\"));\r\n\t\t\t\t\t\tloc.setLongitude(objInArr.getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lng\"));\r\n\t\t\t\t\t\tif(objInArr.has(\"vicinity\"))\r\n\t\t\t\t\t\t\tloc.setAddress(objInArr.getString(\"vicinity\")); //VICINITY OR FORMATTED ADDRESS\r\n\t\t\t\t\t\telse if (objInArr.has(\"formatted_address\"))\r\n\t\t\t\t\t\t\tloc.setAddress(objInArr.getString(\"formatted_address\"));\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tloc.setAddress(\"not avaliable..\");\r\n\t\t\t\t\t\tnewRest.setLocation(loc);\r\n\t\t\t\t\t\tresultsList.add(newRest);\r\n\t\t\t\t\t\tLogger.debug(\"Pared restaurant: \"+ newRest.getId() +\" \"+ newRest.getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalidObject = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * the time from the JSON results is delivered to when the next page is\r\n\t\t\t * created is slightly delayed, this allows the method to sleep for 1 second\r\n\t\t\t * and then runs search for the nextPage \r\n\t\t\t * \r\n\t\t\t * UNCOMMENT TO ALLOW +20 PLACES TO BE FETCHED\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.MILLISECONDS.sleep(2000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tSystem.out.println(\"TIMEUNIT REST ERROR \"+ e);\r\n\t\t\t}\r\n\r\n\t\t\tString nextPageToken = null;\r\n\r\n\t\t\tif (jsonObj.has(NEXT_PAGE_TOKEN)) {\r\n\t\t\t\tnextPageToken = jsonObj.getString(\"next_page_token\");\r\n\t\t\t\tresultsList.addAll(parseResults(searchNextPage(nextPageToken)));\r\n\t\t\t}\r\n\t\t}catch(JSONException e){\r\n\t\t\tSystem.out.println(\"JSON ERROR \"+ e);\r\n\t\t}\r\n\t\treturn resultsList;\r\n\t}", "public static SpeechletResponse handleDuplicateStopResponse(Session session, boolean stopFound, GoogleMaps googleMaps, ObaClient obaClient, ObaDao obaDao) throws SpeechletException {\n ArrayList<ObaStop> stops = (ArrayList<ObaStop>) session.getAttribute(DIALOG_FOUND_STOPS);\n boolean experimentalRegions = (boolean) session.getAttribute(EXPERIMENTAL_REGIONS);\n if (stops != null) {\n if (stopFound && stops.size() > 0) {\n String cityName = (String) session.getAttribute(CITY_NAME);\n\n Optional<Location> location = googleMaps.geocode(cityName);\n if (!location.isPresent()) {\n return CityUtil.askForCity(Optional.of(cityName), obaClient, session);\n }\n\n Optional<ObaRegion> region;\n try {\n region = obaClient.getClosestRegion(location.get(), experimentalRegions);\n } catch (IOException e) {\n log.error(\"Error getting closest region: \" + e.getMessage());\n return CityUtil.askForCity(Optional.of(cityName), obaClient, session);\n }\n\n ObaUserClient obaUserClient;\n try {\n obaUserClient = obaClient.withObaBaseUrl(region.get().getObaBaseUrl());\n } catch (URISyntaxException e) {\n log.error(\"ObaBaseUrl \" + region.get().getObaBaseUrl() + \" for \" + region.get().getName()\n + \" is invalid: \" + e.getMessage());\n // Region didn't have a valid URL - ask again and hopefully we find a different one\n return CityUtil.askForCity(Optional.of(cityName), obaClient, session);\n }\n\n LinkedHashMap<String, String> stopData = (LinkedHashMap<String, String>) stops.get(0);\n return StorageUtil.finishOnboard(session, cityName, stopData.get(\"id\"), stopData.get(\"stopCode\"), region.get(), obaUserClient, obaDao);\n } else if (!stopFound && stops.size() > 1) {\n stops.remove(0);\n session.setAttribute(DIALOG_FOUND_STOPS, stops);\n return StopUtil.askUserAboutDuplicateStops(session, null);\n }\n }\n\n return reaskForStopNumber();\n }", "@Subscribe\n\tpublic void onStop(ServerStoppingEvent event)\n\t{\n\t\ttry\n\t\t{\n\t\t\tdataManager.stop();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(\"Error while shutting down data services. Some values may not have been saved. Details: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// TODO server stop\n\t}", "@Override\r\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\r\n\r\n JSONObject jObject;\r\n List<List<HashMap<String, String>>> routes = null;\r\n\r\n try {\r\n jObject = new JSONObject(jsonData[0]);\r\n Log.d(\"ParserTask\", jsonData[0].toString());\r\n DataParser parser = new DataParser();\r\n Log.d(\"ParserTask\", parser.toString());\r\n\r\n // Starts parsing data\r\n routes = parser.parse(jObject);\r\n Log.d(\"ParserTask\", \"Executing routes\");\r\n Log.d(\"ParserTask\", routes.toString());\r\n\r\n } catch (Exception e) {\r\n Log.d(\"ParserTask\", e.toString());\r\n e.printStackTrace();\r\n }\r\n return routes;\r\n }", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\t// 实例化请求队列\n\t\tRequestQueue queue = Volleyhandle.getInstance(\n\t\t\t\tthis.getApplicationContext()).getRequestQueue();\n\t\t// 活动销毁时取消请求减少内存消耗\n\t\tqueue.cancelAll(\"GET_PROVINCE_LIST\");\n\t}", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\", jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\", \"Executing routes\");\n Log.d(\"ParserTask\", routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask exp\", e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n public void Tick(long deltaInMillis) {\n long wastedDeltaInMillis = 0;\n switch (state) {\n case INACTIVE:\n if(CONFIG.CURRENT_TIME.compareTo(start) >= 0 && CONFIG.CURRENT_TIME.compareTo(start.plus(deltaInMillis, ChronoUnit.MILLIS)) < 0) {\n currRouteIndex = 0;\n SetState(VehicleState.MOVING);\n wastedDeltaInMillis = CONFIG.CURRENT_TIME.minusNanos(start.toNanoOfDay()).toNanoOfDay()/1000000;\n }\n break;\n case MOVING:\n Route currRoute = routes.get(currRouteIndex);\n\n // get current street modifier\n double streetModifier = StreetState.LOW.getModifier();\n for(int i=0; i<currRoute.getRoute().size(); i++) {\n if(Math2D.getRouteLength(currRoute, 0, i) / Math2D.getRouteLength(currRoute) > progressTowardsNextStop)\n break;\n streetModifier = currRoute.getRoute().get(i).getStreet().getStreetState().getModifier();\n }\n\n progressTowardsNextStop += deltaInMillis * streetModifier / (currRoute.getExpectedDeltaTime()*1000);\n // vehicle arrived to next stop\n if(progressTowardsNextStop >= 1) {\n wastedDeltaInMillis = (long)((progressTowardsNextStop-1)*currRoute.getExpectedDeltaTime()/streetModifier)*1000;\n SetState(VehicleState.STOPPED);\n }\n if(currRouteIndex < routes.size())\n CONFIG.controller.SetVehicle(this, getPosition(progressTowardsNextStop));\n break;\n case STOPPED:\n stopTimeInMillis += deltaInMillis;\n // after arriving at a stop, wait for passenger to get off\n if (stopTimeInMillis >= CONFIG.EXPECTED_STOP_TIME*1000) {\n wastedDeltaInMillis = stopTimeInMillis-(long)CONFIG.EXPECTED_STOP_TIME*1000;\n stopTimeInMillis = 0;\n progressTowardsNextStop = 0.0;\n currRouteIndex++;\n\n if(currRouteIndex < routes.size()) {\n // start new route\n SetState(VehicleState.MOVING);\n } else {\n // if there is no route left, delete the vehicle and wait for next day\n SetState(VehicleState.INACTIVE);\n CONFIG.controller.RemoveVehicle(this);\n }\n }\n break;\n }\n\n // when the delta is set to a high number, we might experience situations where one delta is enough to satisfy more states in a row in a single tick\n if(wastedDeltaInMillis > 0) {\n Tick(wastedDeltaInMillis);\n }\n }", "public BusStop getDestinationBusStop() {\r\n return destinationBusStop;\r\n }", "@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n String encodedPolyline = data.getJSONArray(\"routes\").getJSONObject(0).\n getJSONObject(\"overview_polyline\").getString(\"points\");\n List<LatLng> points = PolyUtil.decode(encodedPolyline);\n if (curPoly != null) {\n curPoly.remove();\n }\n curPoly = mMap.addPolyline(new PolylineOptions().addAll(points));\n curPoly.setColor(getColor(R.color.colorAccent));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void onAppOpened(Context context) {\n // Prepare metadata dictionary\n PebbleDictionary first = new PebbleDictionary();\n int stopCount = 0;\n\n // Count saved stops\n for (Direction direction : mPreferencesDataSource.getStops())\n stopCount += direction.getStops().size();\n\n first.addUint32(MESSAGE_TYPE, MESSAGE_STOPS_METADATA);\n first.addUint32(1, stopCount);\n first.addUint32(2, 4);\n\n // Send initial dictionary\n PebbleKit.sendDataToPebbleWithTransactionId(context, WATCHAPP_UUID, first, MESSAGE_STOPS_METADATA);\n\n PebbleKit.registerReceivedAckHandler(context, new PebbleKit.PebbleAckReceiver(WATCHAPP_UUID) {\n /**\n * Runs when the watchapp acknowledges our sent data\n */\n @Override\n public void receiveAck(Context context, int transactionId) {\n switch (transactionId) {\n case MESSAGE_STOPS_METADATA:\n\n break;\n case MESSAGE_STOP_DATA:\n break;\n }\n }\n });\n\n for (Direction direction : mPreferencesDataSource.getStops()) {\n Route route = direction.getRoute();\n\n String routeTag = route.getTag();\n String routeTitle = route.getShortTitle() != null ? route.getShortTitle() : route.getTitle();\n String directionName = direction.getName();\n\n for (Stop stop : direction.getStops()) {\n PebbleDictionary savedStop = new PebbleDictionary();\n savedStop.addUint32(0, MESSAGE_STOP_DATA);\n\n String stopTitle = stop.getShortTitle() != null ? stop.getShortTitle() : stop.getTitle();\n\n savedStop.addString(1, routeTag);\n savedStop.addString(2, routeTitle);\n savedStop.addString(3, directionName);\n savedStop.addString(4, stopTitle);\n\n Log.i(TAG, \"Sending data for stop: \" + stopTitle);\n\n try {\n Thread.sleep(1000L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n PebbleKit.sendDataToPebble(context, WATCHAPP_UUID, savedStop);\n }\n }\n }", "@Override\n protected void onPostExecute(List<List<HashMap<String, String>>> result) {\n ArrayList<LatLng> points = null;\n PolylineOptions lineOptions = null;\n MarkerOptions markerOptions = new MarkerOptions();\n String distance = \"\";\n String duration = \"\";\n\n if(result.size()<1){\n return;\n }\n\n // Traversing through all the routes\n for(int i=0;i<result.size();i++){\n points = new ArrayList<LatLng>();\n lineOptions = new PolylineOptions();\n\n // Fetching i-th route\n List<HashMap<String, String>> path = result.get(i);\n\n // Fetching all the points in i-th route\n for(int j=0;j<path.size();j++){\n HashMap<String,String> point = path.get(j);\n\n if(j==0){ // Get distance from the list\n distance = (String)point.get(\"distance\");\n continue;\n }else if(j==1){ // Get duration from the list\n duration = (String)point.get(\"duration\");\n continue;\n }\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n LatLng position = new LatLng(lat, lng);\n\n points.add(position);\n }\n\n // Adding all the points in the route to LineOptions\n lineOptions.addAll(points);\n lineOptions.width(lWidth);\n lineOptions.color(lColor);\n\n }\n\n onDoneDrawDirectionListener.onDoneDrawDirection(duration, distance);\n\n // Drawing polyline in the Google Map for the i-th route\n gMap.addPolyline(lineOptions);\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "@Override\n protected List<List<HashMap<String, String>>> doInBackground(String... jsonData) {\n\n JSONObject jObject;\n List<List<HashMap<String, String>>> routes = null;\n\n try {\n jObject = new JSONObject(jsonData[0]);\n Log.d(\"ParserTask\",jsonData[0].toString());\n DataParser parser = new DataParser();\n Log.d(\"ParserTask\", parser.toString());\n\n // Starts parsing data\n routes = parser.parse(jObject);\n Log.d(\"ParserTask\",\"Executing routes\");\n Log.d(\"ParserTask\",routes.toString());\n\n } catch (Exception e) {\n Log.d(\"ParserTask\",e.toString());\n e.printStackTrace();\n }\n return routes;\n }", "private void parseTrips(Set<String> routeID){\n \tSystem.out.println(\"start trips parsing\");\n String[] column = new String[]{\"route_id\",\"trip_id\"};\n Set<String> tripID = new HashSet<String>();\n\n List<TripsTransit> beans;\n\n ColumnPositionMappingStrategy<TripsTransit> strategy =\n new ColumnPositionMappingStrategy<TripsTransit>();\n strategy.setType(TripsTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<TripsTransit> csvToBean = new CsvToBean<>();\n\n CSVReader csvReader;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\trips.csv\"));\n\t\t\t beans = csvToBean.parse(strategy, csvReader);\n\n\t Iterator<TripsTransit> itr = beans.iterator();\n\t while(itr.hasNext()) {\n\t TripsTransit i = itr.next();\n\t String id = i.getRoute_id();\n\t if (!routeID.contains(id)) {\n\t itr.remove();\n\t }\n\t }\n\n\t for(TripsTransit data: beans){\n\t tripID.add(data.getTrip_id());\n\t }\n\t parseStopTimes(tripID);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"end trips parsing\");\n }", "public void setStopLocationList(List<LocationGroup> list) {\n stopLocationList = list;\n }" ]
[ "0.63309574", "0.62983143", "0.6065789", "0.5775774", "0.57070225", "0.56139755", "0.5576917", "0.55270505", "0.5500497", "0.54566616", "0.5440536", "0.5421789", "0.5418187", "0.53597367", "0.5325197", "0.5257354", "0.524339", "0.51599985", "0.5123624", "0.50689054", "0.5028097", "0.5018466", "0.499768", "0.49848643", "0.49319202", "0.49181396", "0.49092522", "0.48982632", "0.4884367", "0.4868363", "0.48634866", "0.48508134", "0.4844906", "0.4839158", "0.48323435", "0.48123318", "0.48041946", "0.4798208", "0.47979018", "0.4795275", "0.4793328", "0.47896135", "0.4783998", "0.4782127", "0.47650367", "0.47628775", "0.4713915", "0.4712557", "0.47040704", "0.469639", "0.46666425", "0.4655062", "0.46522403", "0.4650462", "0.46470916", "0.4637075", "0.4631525", "0.4613179", "0.46033126", "0.45972866", "0.45957777", "0.45927373", "0.45846197", "0.45833197", "0.45788115", "0.4554291", "0.45519236", "0.4541504", "0.4541419", "0.45391154", "0.45380327", "0.45379138", "0.45365667", "0.4509157", "0.4506831", "0.45050225", "0.45016074", "0.44908664", "0.44885737", "0.44802165", "0.44796774", "0.4473492", "0.44709286", "0.44610453", "0.4457829", "0.4447099", "0.4443261", "0.4436165", "0.4433925", "0.44276732", "0.44223702", "0.4416895", "0.4413892", "0.44102263", "0.44072318", "0.43989646", "0.43989646", "0.43989646", "0.43951786", "0.43894228" ]
0.6838292
0
This method is used to calculate employee's weekly pay
private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException { System.out.println("Enter Employee First Name: "); String firstName = reader.readLine(); System.out.println("Enter Employee Last Name: "); String lastName = reader.readLine(); System.out.println("Enter Employee Type (Salaried or Hourly or Commissioned): "); String employeeType = reader.readLine(); if (employeeType.equalsIgnoreCase("Salaried")) { System.out.println("Please enter your monthly salary: "); double monthlySalary = Double.parseDouble(reader.readLine()); final SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false); employeeDetails.add(salariedEmployee); salariedEmployeeEarningReport(salariedEmployee); } else if (employeeType.equalsIgnoreCase("Hourly")) { System.out.println("Please enter your hourly rate: "); double hourlyRate = Double.parseDouble(reader.readLine()); System.out.println("Please enter your weekly worked hours: "); double weeklyWorkedHours = Double.parseDouble(reader.readLine()); final HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false); employeeDetails.add(hourlyEmployee); hourlyEmployeeEarningReport(hourlyEmployee); } else if (employeeType.equalsIgnoreCase("Commissioned")) { System.out.println("Please enter your weekly sales amount: "); double weeklySalesAmount = Double.parseDouble(reader.readLine()); final CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false); employeeDetails.add(commissionedEmployee); commissionedEmployeeEarningReport(commissionedEmployee); } else { System.out.println("Invalid employee type"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calculateWeeklyPay(){\r\n double weeklyPay = salary / 52.0;\r\n return weeklyPay;\r\n }", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }", "@Override\n public double calculatePay(double nmHrs) {\n //52 weeks in a year and 40 hours per week\n double hrRate = getSalary() / (40*52);\n //calculate their weekly pay\n double paycheck = 40 * hrRate;\n //determine if they worked overtime and calculate it\n if (nmHrs > 40) {\n double OT = nmHrs - 40;\n double OTMoney = OT * (hrRate*1.5);\n return OTMoney + paycheck;\n }\n //else return their normal weekly paycheck\n else {\n return paycheck;\n }\n\n }", "@Override\r\n public int calculateSalary()\r\n {\r\n return weeklySalary*4;\r\n }", "public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }", "int weeklyPay(int hoursWorked, int hourlyRate) {\n if (hoursWorked < 0 || hourlyRate < 0) {\n return 0;\n }\n\n if (hoursWorked > 40) {\n //return (hoursWorked * hourlyRate) + ((hoursWorked - 40) * (hourlyRate * 2)); //logic error - incorrect answer\n //return (40 * hourlyRate) + ((hoursWorked - 40) * (hourlyRate * 2)); //works\n return (hoursWorked * hourlyRate) + ((hoursWorked - 40) * hourlyRate); //also works\n }\n else {\n return hoursWorked * hourlyRate;\n }\n }", "private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(hourlyEmployee.getFirstName()).append(\" \").append(hourlyEmployee.getLastName());\r\n\r\n\t\tdouble weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate();\r\n\r\n\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\tif (hourlyEmployee.getWeeklyWorkedHours() > 40) {\r\n\t\t\tdouble overtime = hourlyEmployee.getWeeklyWorkedHours() - 40;\r\n\t\t\tdouble overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2);\r\n\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t}\r\n\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(weeklyPayAmount));\r\n\t}", "public double calculatePay() \r\n\t{\r\n\t\treturn (payRate*hoursWorked);\r\n\t}", "public double earnings() {\n\t\treturn weeklySalary; \n\t}", "public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}", "public int calculatingDailyWage() {\n\t\tsalary = workingHrs * wagePerHr;\n\t\treturn salary;\n\t}", "@Override \n public double getPaymentAmount() \n { \n return getWeeklySalary(); \n }", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "private double calculate(boolean salary, double employeeShift, double hrsIn, double payRate){\n\n if (salary){// --------- Salaried employee\n return payRate * hrsIn;\n }\n\n if (employeeShift == 2){\n payRate = payRate * 0.05 + payRate;// ------------ adjust payRate for 2nd shift --------\n\n }\n\n if (employeeShift == 3){\n payRate = payRate * 0.10 + payRate;// ------------ adjust payRate for 3rd shift --------\n\n }\n\n if (hrsIn <= 40) {//----------- check for overtime\n return hrsIn * payRate;//--------No O.T.\n }\n else{// ----------- Calculate O.T. rate\n double otHrs = hrsIn - 40;\n double otRate = payRate * 1.5;\n return (payRate * 40) + (otHrs * otRate);\n }\n }", "DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();", "@Override\r\n\tpublic void calculateSalary() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t salary = hoursWorked * hourlyWages;\r\n\t\t this.setSalary(salary);\r\n\t}", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "@Override\n\tpublic int calculateSalary() {\n\t\treturn this.getPaymentPerHour() * this.workingHours;\n\t}", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "@Override\n public double calculatePay(double numHours) {\n double hourlyRate = this.getSalary() / (40 * 52);\n return hourlyRate * 40 + hourlyRate * 1.5 * (numHours - 40);\n }", "public double givenWeeklyWageEstimateIncomeAll(double weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeAll()) + givenWeeklyWageEstimateIncomeGetInterceptAll());\n\t}", "public double calculateSalary(double hoursWorked) {\n\t\tif(hoursWorked<=getNormalWorkweek()){\n\t\t\treturn ((getHourlyRate()*(hoursWorked))+(calculateOvertime(hoursWorked)));\n\t\t}else{\n\t\t\treturn ((getHourlyRate()*(getNormalWorkweek()))+(calculateOvertime(hoursWorked)));\n\t\t}\n\t}", "protected double getPay() {\n\t\tint extraHrs = 0;\n\t\tif (this.hoursWrkd > 40) {\n\t\t\textraHrs = this.hoursWrkd - 40;\n\t\t\treturn (hourlyRate * 40) + (extraHrs * (hourlyRate * 1.5));\n\t\t} else {\n\t\t\treturn hoursWrkd * hourlyRate;\n\t\t}\t\t\n\t}", "public double givenWeeklyWageEstimateIncomeAll(int weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeAll()) + givenWeeklyWageEstimateIncomeGetInterceptAll());\n\t}", "public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }", "public String payWorker() {\n\t\tString ret;\n\t\tif (!super.payWorker().isEmpty()) {\n\t\t\tNumberFormat formatter = new DecimalFormat(\"#0.00\");\n\t\t\tret = getName() + \" is an hourly Worker and is paid \" + formatter.format(getPayment());\n\t\t\tSystem.out.println(ret);\n\t\t\tthis.num_hours = 0;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\tret = getName() + \" has already been paid and needs to work more hours this week.\";\n\t\t\tSystem.out.println(ret);\n\t\t\treturn ret;\n\t\t}\n\t}", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}", "private void parseWorkDetailsForWeek(WBData wbData, ParametersResolved pars) throws Exception {\n\n \tDate dateToCheck = new Date(pars.firstDayOfWeek.getTime());\n \tMap eligibleDollarsMap = new HashMap();\n \tpars.otEarned = 0;\n\n \t// For each Date, parse the work details and premiums to get the\n \t// flsaEligibleDollars, and otEarned.\n \twhile (dateToCheck.getTime() <= wbData.getWrksWorkDate().getTime()) {\n if (StringHelper.equalsIgnoreCase(PARAM_VAL_WD_WORK_PREMIUMS, pars.detailsCalculated)){\n // only parse work premiums\n parseWorkDetailsForDay(wbData.getWorkPremiumsForDate(dateToCheck),\n eligibleDollarsMap, wbData.getCodeMapper()\n , pars);\n }\n else{\n // calculate both in other cases\n parseWorkDetailsForDay(wbData.getWorkDetailsForDate(dateToCheck),\n eligibleDollarsMap, wbData.getCodeMapper(), pars);\n parseWorkDetailsForDay(wbData.getWorkPremiumsForDate(dateToCheck),\n eligibleDollarsMap, wbData.getCodeMapper()\n , pars);\n }\n\n \t\tdateToCheck = DateHelper.addDays(dateToCheck, 1);\n \t}\n\n \t// Calculate the flsaEligibleDollars from the Map.\n \t// The Map key is tcode_htype, and value is a double of total dollars for the\n \t// combination.\n \tIterator i = eligibleDollarsMap.values().iterator();\n \tDouble tcodeHtypeDollars = null;\n \tpars.flsaEligibleDollars = 0;\n \twhile (i.hasNext()) {\n \t\ttcodeHtypeDollars = (Double) i.next();\n \t\tpars.flsaEligibleDollars += tcodeHtypeDollars.doubleValue();\n \t}\n\n \t// Output the values for debugging.\n \tif (logger.isDebugEnabled()) {\n\n \t\ti = eligibleDollarsMap.keySet().iterator();\n \t\tString tcodeHtype = null;\n \t\ttcodeHtypeDollars = null;\n\n \t\tlogger.debug(\"--- Begin Dollars per Tcode/Htype -----\");\n \t\twhile (i.hasNext()) {\n\t \t\ttcodeHtype = (String) i.next();\n\t \t\ttcodeHtypeDollars = (Double) eligibleDollarsMap.get(tcodeHtype);\n\t \t\tlogger.debug(\"tcodeHtype: \" + tcodeHtype + \", dollars: \" + tcodeHtypeDollars);\n\t \t}\n \t\tlogger.debug(\"--- End Dollars per Tcode/Htype -----\");\n \t}\n }", "public static int dailyEmpWage()\n {\n\tif(IS_FULL_TIME()){\n\t\twage = WagePerHrs * FullDayHrs;\n\t}\n wage = WagePerHrs * FullDayHrs/2;\n return wage;\n }", "public void calculateEarnings(){\n if (wages.size() > expenses.size()){\n //check size difference\n int sizeUp = wages.size() - expenses.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no expenses for the week(s))\n expenses.add(BigDecimal.ZERO);\n }\n }\n\n if(expenses.size() > wages.size()){\n //check size difference\n int sizeUp = expenses.size() - wages.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no income for the week(s))\n wages.add(BigDecimal.ZERO);\n }\n }\n for(int i=0; i < wages.size(); i++){\n BigDecimal profits;\n profits = wages.get(i).subtract(expenses.get(i));\n BigDecimal roundUp = profits.setScale(2, RoundingMode.HALF_UP);\n earningsList.add(roundUp);\n }\n }", "public static double hoursSpent()\n\t{\n\t\treturn 7.0;\n\t}", "@Test\n public void computeFactor_WinterTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-17 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-10-27 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-10-01 00:00:00\", \"2012-11-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "private int calculatingWeeklySavings(String accountUid, String categoryUid, String lastTimeStamp,\n String currentTimeStamp) throws Exception {\n LOGGER.debug(\"Going into Client Service Layer to get list of transactions. CategoryUid: \"+categoryUid);\n List<FeedItemSummary> feedItems =clientService.getWeeksOutGoingTransactions(accountUid, categoryUid,lastTimeStamp,\n currentTimeStamp);\n //equals feed item but minimised to amounts as thats all i want\n\n //get round up amount\n int savingsAddition=0;\n\n for (FeedItemSummary item:feedItems) {\n savingsAddition+=100-(item.getAmount()%100);\n }\n LOGGER.info(\"Calculated amount to be transfered to savings\");\n return savingsAddition;\n }", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "@Override\n public double calculateSalary(){\n return this.horas_trabajadas*EmployeeByHours.VALOR_HORA;\n }", "public void calculateSalary() {\n if (hours < 0 || hourlyRate < 0) {\r\n salary = -1;\r\n }\r\n else if (hours > 40) {\r\n salary = 40 * hourlyRate;\r\n }\r\n else {\r\n salary = hours * hourlyRate;\r\n }\r\n }", "double calculateOvertime(double hoursWorked){\n\t\tif(hoursWorked<getNormalWorkweek()){\n\t\t\treturn(0.0);\n\t\t}else{\n\t\t\treturn((getHourlyRate()*2)*(hoursWorked-getNormalWorkweek()));\n\t\t}\n\t}", "int main()\n{\n int week[7], t = 0, sum = 0;\n for(int i = 0; i < 7; i++) {\n cin >> week[i];\n t += week[i];\n }\n t = t - week[0] - week[6];\n for (int i = 1; i < 6; i++) {\n if (week[i] <= 8)\n sum += week[i] * 100;\n else\n sum += week[i] * 100 + (week[i] - 8) * 15;\n }\n sum += week[0] * 150;\n sum += week[6] * 125;\n if(t > 40)\n sum += (t - 40) * 25;\n \n cout << sum;\n}", "public double salaryPay() {\n\t\treturn overtimePay() + getSalary();\n\t}", "public void getSalary() {\n this.payDay(this.monthlyIncome);\n }", "public static void main(String[] args) {\n final double FEDERAL_TAX_PERCENT=10.00;\n final double STATE_TAX_PERCENT=4.5;\n final double SS_PERCENT=6.2;\n final double MEDICARE_PERCENT= 1.45;\n final double PAY_PER_HOUR=7.25;\n\t\nint hoursPerWeek;\n\ndouble grossPay, stateTax, netPay, medicare, federalTax, socialSecurity;\n\n\nScanner keyboard = new Scanner(System.in);\n\n//main codes\nSystem.out.println(\"ENTER NUMBER OF WEEKS\");\nhoursPerWeek=keyboard.nextInt();\ngrossPay=hoursPerWeek * PAY_PER_HOUR;\n\nfederalTax=(grossPay * FEDERAL_TAX_PERCENT)/100;\n\nstateTax=(grossPay * STATE_TAX_PERCENT)/100;\n\nsocialSecurity=(grossPay * SS_PERCENT)/100;\n\nmedicare=(grossPay* MEDICARE_PERCENT)/100;\n\nnetPay= grossPay-(socialSecurity+medicare+stateTax+federalTax);\n\n//Codes that will be executed on console as output:\n\nSystem.out.println(\"Hours Per Week:\\t\\t\"+ hoursPerWeek);\n\nSystem.out.println(\"Gross Pay:\\t\\t\" + grossPay);\n\nSystem.out.println(\"Net Pay:\\t\\t\"+netPay);\n\nSystem.out.println();\n\nSystem.out.println(\"Deductions\");\n\nSystem.out.println(\"Federal:\\t\\t\" + federalTax);\n\nSystem.out.println(\"State:\\t\\t\\t\"+stateTax);\n\nSystem.out.println(\"Social Security:\\t\"+ socialSecurity);\n\nSystem.out.println(\"Medicare:\\t\\t\"+medicare);\nkeyboard.close();\n\t\n\t}", "public double givenWorkWeeksEstimateIncomeAll(double workWeeks){\n\t return formatReturnValue((workWeeks * givenWorkWeeksEstimateIncomeGetSlopeAll()) + givenWorkWeeksEstimateIncomeGetInterceptAll());\n\t}", "public void weeklyCharges() {\n System.out.println(this.customerName);\n System.out.println(this.customerAddress);\n System.out.println(this.customerPhone);\n System.out.println(this.squareFootage);\n System.out.println(this.propertyName);\n\n /**\n * format the cost to look pretty\n */\n\n NumberFormat nf = NumberFormat.getCurrencyInstance();\n nf.setGroupingUsed(true);\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n if (multiProperty) {\n double cost = ((this.squareFootage/1000) * COMMERCIAL_RATE) * .9;\n System.out.println(\"Your weekly charge with discount is: \" + nf.format(cost));\n\n } else {\n double cost = ((this.squareFootage/1000) * COMMERCIAL_RATE);\n System.out.println(\"Your weekly charge is: \" + nf.format(cost));\n }\n\n }", "@Test\n public void computeFactor_SummerTimeWeek() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-03-01 00:00:00\", \"2012-04-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.WEEK,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(2, factor, 0);\n }", "public double givenWorkWeeksEstimateIncomeAll(int workWeeks){\n\t return formatReturnValue((workWeeks * givenWorkWeeksEstimateIncomeGetSlopeAll()) + givenWorkWeeksEstimateIncomeGetInterceptAll());\n\t}", "public static void empWageForMonth()\n {\n int WagePerHrs = 20;\n double totalSalary = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHr = 0;\n int numWorkingDays = 20;\n double salary = 0;\n for (int day=1; day<=numWorkingDays; day++)\n { \n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHr = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n\n case 2:\n empHr = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHr = 0;\n\n }\t\t \n salary = (empHr * WagePerHrs);\n System.out.println(\"Daily Emp Wages is :\" +salary);\n totalSalary = (totalSalary + salary);\n System.out.println(\"Monthly emp salary:\" +totalSalary);\n\t\t}\n}", "public double getWages() {\r\n int x = -1;\r\n for(int i = 0; i < 7; i++) {\r\n if (idInput == EMPLOYEEID[i]) {\r\n x = i;\r\n break;\r\n }\r\n }\r\n return wages[x];\r\n }", "public void calculateWage(){\n\t\tfor(CompEmpWage detail: arrayList){\n\t\t\tdetail.setTotalWage(calculateWage(detail));\n detail.print();\n System.out.println(\" Daily Wage : \" + dailyWageArrayList);\n\t\t}\n}", "public double pay()\r\n{\r\ndouble pay = hoursWorked * payRate;\r\nhoursWorked = 0;\r\nreturn pay;\r\n//IMPLEMENT THIS\r\n}", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public double earnings()\r\n {\r\n /* write code to return the earnings for a PieceWorker */\r\n return getWage() * getPieces();\r\n }", "public double calculatePayment (int hours);", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public abstract double calculateQuarterlyFees();", "private float[] calculateAllGrossPay()\n {\n int numberEmployees = employees.size();\n float[] allGrossPay = new float[numberEmployees];\n int position = 0;\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext())\n {\n myEmployee = emp.next();\n allGrossPay[position] = myEmployee.getHours() * myEmployee.getRate();\n position++;\n }\n return allGrossPay;\n }", "public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "public void work(int hours) {\n\t\twhile(age++ < RETIREMENT_AGE) {//Method calculates total salary earned\n\n\t\tfor(int i = 1; i<=hours; i++)\n\t\t\tearned += hourlyIncome;\n\t\t\n\t\tfor(int j = 1; j<=OVERTIME; j++)\n\t\t\tearned += hourlyIncome;\n\t\t}\n\t}", "@Override\n\tpublic double computeMonthlyPremium(double salary) {\n\t\treturn salary*0.08;\n\t}", "public static double calculateEmployeePension(int employeeSalaryForBenefits) {\n double total = 0;\n try {\n Scanner stdin = new Scanner(System.in);\n\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n stdin.close();\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n Integer yearsEmployed = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if ( Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0]) ) {\n yearsEmployed--;\n }\n\n total = (((employeeSalaryForBenefits * 12) * 0.05) * yearsEmployed);\n\n\n\n\n System.out.println(\"Total pension to receive by employee based on \" + yearsEmployed + \" years with the company \" +\n \"(5% of yearly salary for each year, based on employee's monthly salary of $\" + employeeSalaryForBenefits + \"): \" + total);\n\n }\n catch (NumberFormatException e) {\n e.printStackTrace();\n }\n return total;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(Payroll.OVERTIME_RATE);\n\t\tSystem.out.println(Payroll.REGULAR_WEEK);\n\t\tSystem.out.println(Payroll.LEVEL_ONE_PAY);\n\t\tSystem.out.println(Payroll.LEVEL_TWO_PAY);\n\t\tSystem.out.println(Payroll.LEVEL_THREE_PAY);\n\t\tSystem.out.println(Payroll.PayLevel.ONE);\n\t\tSystem.out.println(Payroll.PayLevel.TWO);\n\t\tSystem.out.println(Payroll.PayLevel.THREE);\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(Payroll.calculatePay(1, Payroll.PayLevel.ONE));\n\t\tSystem.out.println(Payroll.calculatePay(10, Payroll.PayLevel.TWO));\n\t\tSystem.out.println(Payroll.calculatePay(20, Payroll.PayLevel.THREE));\n\t\tSystem.out.println(Payroll.calculatePay(70, Payroll.PayLevel.TWO));\n\t\t\n\t\ttry {\n\t\t\t System.out.println(Payroll.calculatePay(100, Payroll.PayLevel.TWO));\n\t\t\t} catch (IllegalArgumentException ex) {\n\t\t\t System.out.println(\"failure\");\n\t\t\t}\n\t\t\n\t\tPayroll.REGULAR_WEEK = 20;\n\t\tSystem.out.println(Payroll.calculatePay(25, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 2;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tPayroll.LEVEL_ONE_PAY = 12;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.ONE));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 25;\n\t\tPayroll.LEVEL_TWO_PAY = 30;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tPayroll.LEVEL_THREE_PAY = 50;\n\t\tSystem.out.println(Payroll.calculatePay(10, Payroll.PayLevel.THREE));\n\t}", "public void payAllEmployeers() {\n\t\t\n\t\tSystem.out.println(\"PAYING ALL THE EMPLOYEES:\\n\");\n\t\t\n\t\tfor(AbsStaffMember staffMember: repository.getAllMembers())\n\t\t{\n\t\t\tstaffMember.pay();\n\t\t\tSystem.out.println(\"\\t- \" + staffMember.getName() + \" has been paid a total of \" + staffMember.getTotalPaid());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\");\n\t}", "public double getHoursPerWeek()\r\n {\r\n return hoursPerWeek;\r\n }", "public void wagesTillCondition() {\n\t\twhile (true) {\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\ttotalHrs = totalHrs + workingHrs;\n\t\t\ttotalDays = totalDays + 1;\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\tif (totalHrs == 100 || totalDays == 20) {\n\t\t\t\tSystem.out.println(totalSalary);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public double getPer_week(){\n\t\tdouble amount=this.num_of_commits/52;\n\t\treturn amount;\t\t\n\t}", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "float getMonthlySalary();", "public double getBiweeklySalary(){\r\n return this.employeeSalary / 26;\r\n }", "public int calculateWage(CompEmpWage companyDetail){\n\tint workHrs=0 ,totalWage=0, zeroDayHr=0;\n\tdailyWageArrayList = new ArrayList<Integer>();\n\tcompNameArrayList.add(companyDetail.companyName);\n\tfor (int i=1;i<=companyDetail.day && workHrs<=companyDetail.workingHr;i++){\n\t\t\tswitch(getrandom()){\n\t\t\tcase 1:\n\t\t\ttotalWage = gettotalWage(companyDetail.wagePerHr, companyDetail.fullDayHr ,totalWage); \n\t\t\tworkHrs=getWorkingHrs(companyDetail.fullDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, companyDetail.halfDayHr ,totalWage);\n\t\t\tworkHrs=getWorkingHrs(companyDetail.halfDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, zeroDayHr ,totalWage);\n\t\t\t\tworkHrs=getWorkingHrs(zeroDayHr,workHrs);\n\t\t\t}\t\n\t}\n\ttotalWageArrayList.add(totalWage);\n\t\n\treturn totalWage;\n}", "public double countWeeklyBudget() {\n return (countBalance() / 4);\n }", "private void loadAllEmployees() throws AccessException, SQLException {\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = constructSQL();\n\t\tint[] empID = new int[1];\n\t\tint dailyOffset=0;\n\t\tif (WorkedNMinutesAlertSource.DAILY_CHECK.equalsIgnoreCase(\"yesterday\")) {\n\t\t\tdailyOffset = -1;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tif (minAgeSet) {\n\t\t\t\tDatetime birthThreshold = DateHelper.addDays(DateHelper.getCurrentDate(), -(365*minAge));\n\t\t\t\tps.setDate(1, new java.sql.Date(birthThreshold.getTime()));\n\t\t\t}\n\t\t\trs = ps.executeQuery();\n\t\t\tboolean isWeekly = tPeriod.equalsIgnoreCase(\"weekly\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\t//for each employee, retrieve work details for the day before\n\t\t\t\t//and process accordingly.\n\t\t\t\tempID[0] = new Integer(rs.getString(1)).intValue();\n\t\t\t\tWorkDetailAccess wrkDetAccess = new WorkDetailAccess(conn);\n\t\t\t\tWorkDetailList wdl = null;\n\n\t\t\t\tif (!isWeekly) {\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), \"D\", null);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString firstDayOfWeek = Registry.getVarString(\"/system/WORKBRAIN_PARAMETERS/DAY_WEEK_STARTS\");\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper.getWeeksFirstDate(\n\t\t\t\t\t\t\tDateHelper.getCurrentDate(), firstDayOfWeek), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getWeeksFirstDate(DateHelper.getCurrentDate(), \n\t\t\t\t\t\t\t\t\tfirstDayOfWeek), 7), \"D\", null);\n\t\t\t\t}\n\t\t\t\tIterator wdlIter = wdl.iterator();\n\t\t\t\taccumulatedTime=0;\n\t\t\t\twhile (wdlIter.hasNext()) {\n\t\t\t\t\tprocessWorkDetail((WorkDetailData) wdlIter.next(), rs\n\t\t\t\t\t\t\t.getString(2));\n\t\t\t\t}\n\t\t\t\tif (accumulatedTime >= new Integer(nMinutes).intValue()) {\n\t\t\t\t\tfor (int i=0;i < tempRows.size(); i++) {\n\t\t\t\t\t\trows.add(tempRows.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttempRows = null;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException();\n\t\t} finally {\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\n\t\t\tif (ps != null)\n\t\t\t\tps.close();\n\t\t}\n\n\t}", "public double calculatePay() {\n\t\treturn 0;\r\n\t}", "double getYesterdaysExpenditureAmount() {\n Long time = new Date().getTime();\n Date date = new Date(time - time % (DAY_DURATION));\n return getExpenditureAmount(date.getTime() - DAY_DURATION, date.getTime());\n }", "@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "public double averageFollowupsPerArticleToOneWeekPublishedArticle() {\n\t\tcheckAuthority();\n\t\tlong dias = TimeUnit.DAYS.toMillis(7);\n\t\tDate moment = new Date(System.currentTimeMillis() - dias);\n\t\ttry {\n\t\t\treturn this.administratorRepository\n\t\t\t\t\t.averageFollowupsPerArticleToOneWeekPublishedArticle(moment);\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\t}", "void setUserVoteSalaryWeeklyDayOfWeek(DayOfWeek voteSalaryDayOfWeek);", "public double calcPrice() {\r\n\t\tdouble drinkPrice = getBasePrice();\r\n\t\tif(this.getSize()==SIZE.MEDIUM) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\telse if(this.getSize()==SIZE.LARGE) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\t\r\n\t\tif(onWeekend) {\r\n\t\t\tdrinkPrice+=0.6;\r\n\t\t}\r\n\t\treturn drinkPrice;\r\n\t}", "public double givenWorkWeeksEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(workWeeksFindIncome.getSlopeAll());\n\t}", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public static double calculateWage(final int ratePerHrs, final int totalHr)\n {\n return ratePerHrs * totalHr;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to Employee Wage Computation Program\");\n\t\tEmployee obj1 = new Employee(20,\"Dmart\");\n\t\tEmployee obj = new Employee();\n\t\tobj.isFullTimePresent = 1;\n\t\tobj.wagePerHr = 20;\n\t\tobj.totalSalary = 0;\n\t\tobj.wagesTillCondition();\n\t\tSystem.out.print(\"Total Salary : \");\n\t\tSystem.out.println(obj.totalSalary);\n\t\tSystem.out.println(obj.totalHrs);\n\t\tSystem.out.println(obj.totalDays);\n\t}", "int getWeek();", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "public double givenWeeklyWageEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(weeklyWageFindIncome.getSlopeAll());\n\t}", "private void addToDailyReport(String day, double empHours, double empPay)\r\n\t{\r\n\t\t//reset singleDay just in case\r\n\t\tDailyHours singleDay = null;\r\n\t\t\r\n\t\t//call the findEntryByDate method to find the date\r\n\t\tsingleDay = findEntryByDate(day);\r\n\t\t\r\n\t\t//if the date is not found, create a new date object.\r\n\t\tif(singleDay == null)\r\n\t\t{\r\n\t\t\t//date not found, so create a new date object\r\n\t\t\tsingleDay = new DailyHours(day);\r\n\t\t\t\r\n\t\t\t//add the day to our inventory\r\n\t\t\tdailyHourLog.add(singleDay);\r\n\t\t}//end create new day \r\n\t\t\r\n\t\t//add the employee hours and pay to that day\r\n\t\tsingleDay.addHours(empHours);\r\n\t\tsingleDay.addPay(empPay,empHours);\r\n\t}", "double getTotalProfit();", "public double fineAsToHours(int numOfDays,int h1,int h2,int m1, int m2){\n double fine=0.0;\n int y=0;\n\n //if overdue is minus there is no need to calculate a fine\n if(numOfDays<0){\n fine=0.0;\n }\n\n //if it is 0 if the reader returns book on or before the due hour, again no fine\n //if reader returns book after due hour minutes will be taken in to count\n else if(numOfDays==0){\n if(h2<=h1){\n fine=0.0;\n }\n else{\n //ex:if due=10.30, returnTime=12.20, fine will be charged only for 10.30 to 11.30 period\n //which is returnTime-1-due\n if(m2<m1){\n y=(h2-h1)-1;\n fine=y*0.2;\n }\n //if returnTime=12.45 fine will be charged for 10.30 to 12.45 period\n //which is returnTime-due\n else if(m2>=m1){\n y=h2-h1;\n fine=y*0.2;\n }\n }\n }\n\n //if over due is 3days or less\n else if(numOfDays<=3){\n //ex: due=7th 10.30, returned=9th 9.30\n //finr will be charged for 24h and the extra hours from 8th, and extra hours from 9th\n if(h2<=h1){\n y=((numOfDays-1)*24)+((24-h1)+h2);\n fine=y*0.2;\n }\n else{\n //ex: due=7th 10.30, returned= 9th 12.15\n //total 2*24h will be added. plus, time period frm 9th 10.30 to 11.30\n if(m2<m1){\n y=(numOfDays*24)+((h2-h1)-1);\n fine=y*0.2;\n }\n else if(m2>=m1){\n //returned=9th 12.45\n //total 2*24h, plus 2hours difference from 10.30 to 12.30\n y=(numOfDays*24)+(h2-h1);\n fine=y*0.2;\n }\n }\n\n }\n\n\n //same logic and will multiply the 1st 3 days form 0.2 as to the requirement\n\n else if(numOfDays>3){\n if(h2<=h1){\n y=((numOfDays-4)*24)+((24-h1)+h2);\n fine=(y*0.5)+(24*3*0.2);\n }\n\n else{\n if(m2<m1){\n y=((numOfDays-3)*24)+((h2-h1)-1);\n fine=(y*0.5)+(3*24*0.2);\n }\n\n else if(m2>m1){\n y=((numOfDays-3)*24)+(h2-h1);\n fine=(y*0.5)+(3*24*0.2);\n }\n }\n\n\n }\n\n return fine;\n\n }", "public int getCurrentWeek()\n {\n\n return sem.getCurrentWeek(startSemester,beginHoliday,endHoliday,endSemester);\n }", "@Override\r\n\tpublic Map<String, BigDecimal> getHoursToFlsaWeekMap(String principalId, \r\n\t\t\tDateTime payEndDate, List<String> payCalendarLabels, \r\n\t\t\tList<TimeBlock> lstTimeBlocks, List<LeaveBlock> leaveBlocks, Long workArea, \r\n\t\t\tCalendarEntry payCalendarEntry, Calendar payCalendar,\r\n\t\t\tDateTimeZone dateTimeZone, List<Interval> dayIntervals) {\r\n\t\t\r\n\t\tMap<String, BigDecimal> hoursToFlsaWeekMap = new LinkedHashMap<String, BigDecimal>();\r\n\r\n TkTimeBlockAggregate tkTimeBlockAggregate = buildAndMergeAggregates(lstTimeBlocks, leaveBlocks, payCalendarEntry, payCalendar, dayIntervals);\r\n\t\tList<List<FlsaWeek>> flsaWeeks = tkTimeBlockAggregate.getFlsaWeeks(dateTimeZone, principalId);\r\n\t\t\r\n\t\tint weekCount = 1;\r\n\t\tfor (List<FlsaWeek> flsaWeekParts : flsaWeeks) {\r\n\t\t\tBigDecimal weekTotal = new BigDecimal(0.00);\r\n\t\t\tfor (FlsaWeek flsaWeekPart : flsaWeekParts) {\r\n\t\t\t\tfor (FlsaDay flsaDay : flsaWeekPart.getFlsaDays()) {\r\n\t\t\t\t\tfor (TimeBlock timeBlock : flsaDay.getAppliedTimeBlocks()) {\r\n for (TimeHourDetail thd : timeBlock.getTimeHourDetails()) {\r\n if (workArea != null) {\r\n if (timeBlock.getWorkArea().compareTo(workArea) == 0) {\r\n weekTotal = weekTotal.add(thd.getHours(), HrConstants.MATH_CONTEXT);\r\n } else {\r\n weekTotal = weekTotal.add(new BigDecimal(\"0\"), HrConstants.MATH_CONTEXT);\r\n }\r\n } else {\r\n weekTotal = weekTotal.add(thd.getHours(),HrConstants.MATH_CONTEXT);\r\n }\r\n\t\t\t\t\t }\r\n }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\thoursToFlsaWeekMap.put(\"Week \" + weekCount++, weekTotal);\r\n\t\t}\r\n\t\t\r\n\t\treturn hoursToFlsaWeekMap;\r\n\t}", "public int getWeeksElapsed() {\n return weeksElapsed;\n }", "public double monthlyEarning()\n\t{\n\t\treturn hourlyRate * STAFF_MONTHLY_HOURS_WORKED;\n\t}", "public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }", "public static void empWage()\n {\n int WagePerHrs = 20;\n double DailyEmpWage = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHrs;\n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHrs = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n case 2:\n empHrs = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHrs = 0;\n }\n DailyEmpWage = WagePerHrs * empHrs;\n System.out.println(\"Daily Emp Wages is :\" +DailyEmpWage);\n }", "private PtoPeriodDTO accruePto(PtoPeriodDTO init, Employee employee) {\n\n\t\tDouble hoursAllowed = init.getHoursAllowed().doubleValue();\n\t\tDouble daysInPeriod = init.getDaysInPeriod().doubleValue();\n\t\tDouble dailyAccrual = hoursAllowed / daysInPeriod;\n\n\t\tlog.info(\"Daily Accrual Rate for this PTO Period: \" + dailyAccrual);\n\n\t\t// Check what the current date is, take the number of days difference\n\t\t// Since the beginning of the period\n\t\t\n\t\tDate beginDate = determineBeginDate(employee);\t\t\n\t\tDate endDate = ZonedDateTimeToDateConverter.INSTANCE.convert(init.getEndDate());\n\t\tDate today = ZonedDateTimeToDateConverter.INSTANCE.convert(ZonedDateTime.now());\n\t\t\n\t\tLong diff = today.getTime() - beginDate.getTime();\n\t\tLong daysPassed = (long) ((TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS)));\n\t\tlog.info(\"Days Passed: \" + daysPassed);\n\t\tLong hoursAccrued = (long) ((TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS)) * dailyAccrual);\n\t\tlog.info(\"Hours: \" + hoursAccrued);\n\t\tinit.setHoursAccrued(hoursAccrued);\n\t\tinit = deductTimeOff(init);\n\t\treturn init;\n\t\t\n\t}", "public double givenWeeklyWageEstimateIncomeMiddleTwoThirds(int weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeMiddleTwoThirds()) + givenWeeklyWageEstimateIncomeGetInterceptMiddleTwoThirds());\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n String emp1, emp2,emp3;\n int hours1, hours2, hours3;\n int xhours1, xhours2, xhours3;\n double rate1, rate2, rate3;\n double gross1, gross2, gross3;\n \n System.out.print(\"Enter first employee: \");\n emp1 = input.next();\n System.out.print(\"Enter second employee: \");\n emp2 = input.next();\n System.out.print(\"Enter third employee: \");\n emp3 = input.next();\n \n System.out.print(\"Enter the normal hours worked by \" + emp1+\" is: \");\n hours1 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by \"+ emp1+\" is: \");\n xhours1 = input.nextInt();\n System.out.print(\"Enter the rate for \" + emp1 + \" is: \");\n rate1 = input.nextDouble();\n gross1 = ((hours1*rate1) + (xhours1*(rate1/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n\",emp1,gross1);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp2);\n hours2 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \"+ emp2);\n xhours2 = input.nextInt();\n System.out.print(\"Enter the rate for : \"+ emp2);\n rate2 = input.nextDouble();\n gross2 = ((hours2*rate2) + (xhours2*(rate2/2)));\n System.out.printf(\"The gross pay for %s is: %2\\n\",emp2, gross2);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp3);\n hours3 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \" + emp3);\n xhours3 = input.nextInt();\n System.out.print(\"Enter the rate for: \" + emp3);\n rate3 = input.nextDouble();\n gross3 = ((hours3*rate3) + (xhours3*(rate3/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n: \",emp3, gross3);\n }" ]
[ "0.81439763", "0.7506096", "0.7434818", "0.74157476", "0.72080004", "0.7073465", "0.6934784", "0.6745882", "0.6660558", "0.66145873", "0.66077816", "0.65945786", "0.6570814", "0.6555925", "0.6552758", "0.65263623", "0.65152246", "0.64832336", "0.64016473", "0.6348226", "0.6322941", "0.62937814", "0.628817", "0.6280365", "0.6274704", "0.6273448", "0.6260803", "0.6259673", "0.6252412", "0.62314326", "0.6223676", "0.6205499", "0.617907", "0.61754876", "0.613189", "0.61221623", "0.6075061", "0.60712904", "0.604859", "0.60055476", "0.5999683", "0.59783566", "0.59567887", "0.5943503", "0.5924748", "0.58899623", "0.58853585", "0.5858488", "0.5856771", "0.5838104", "0.5832966", "0.5829885", "0.5823004", "0.58190054", "0.5790799", "0.5774968", "0.5765897", "0.57603633", "0.5750287", "0.57264024", "0.5717822", "0.5712858", "0.5712257", "0.57077473", "0.570652", "0.5702668", "0.56945145", "0.56933194", "0.56886655", "0.5677352", "0.5653669", "0.5652291", "0.5648732", "0.5619365", "0.5612519", "0.5582155", "0.5560387", "0.5552758", "0.55485296", "0.55003715", "0.5480792", "0.5479345", "0.5475846", "0.5474924", "0.54744834", "0.54656476", "0.54622555", "0.5456593", "0.54387397", "0.54144084", "0.5409385", "0.5396054", "0.5390069", "0.538841", "0.53859997", "0.53798825", "0.53784186", "0.53774476", "0.53764784", "0.5373479" ]
0.68712157
7
This method is used to print the earning report of a salaried employee
private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) { System.out.format("%s\t\t\t%s\n", "Name", "Weekly Pay Amount"); System.out.println("===================================================================="); final StringBuilder employeeName = new StringBuilder(); employeeName.append(salariedEmployee.getFirstName()).append(" ").append(salariedEmployee.getLastName()); final NumberFormat formatter = NumberFormat.getCurrencyInstance(); System.out.format("%s\t\t\t%s", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override \n public String toString() \n { \n return String.format(\"salaried employee: %s%n%s: $%,.2f\",\n super.toString(), \"weekly salary\", getWeeklySalary());\n }", "private static void printEmployeeDetails(final List<Employee> employeeDetails) {\r\n\t\tString headerFormat = \"%-25s%-20s%-20s%-20s%-20s%-20s\\n\";\r\n\t\tString rowFormat = \"%-25s%-20s%-20s%-20s%-20s%-20s\\n\";\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Employee details:\");\r\n\t\tSystem.out.println(\"=============================================================================================================================\");\r\n\t\tSystem.out.format(headerFormat, \"Name\", \"Class\", \"Hours\", \"Sales\", \"Rate\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"=============================================================================================================================\");\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tfor (Employee employee : employeeDetails) {\r\n\t\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\t\temployeeName.append(employee.getFirstName()).append(\" \").append(employee.getLastName());\r\n\r\n\t\t\tif (employee.getClassType().equalsIgnoreCase(\"Salaried\")) {\r\n\r\n\t\t\t\tdouble monthlySalary = ((SalariedEmployee) employee).getMonthlySalary();\r\n\t\t\t\tboolean isRewarded = employee.isRewarded();\r\n\t\t\t\tif (isRewarded) {\r\n\t\t\t\t\tmonthlySalary += monthlySalary * 0.1;\r\n\t\t\t\t}\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\tsb.append(formatter.format(monthlySalary / 4));\r\n\t\t\t\tsb.append(isRewarded ? \"*\" : \"\");\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), \"\", \"\", \"\", sb.toString());\r\n\r\n\t\t\t} else if (employee.getClassType().equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\t\tdouble weeklyWorkedHours = ((HourlyEmployee) employee).getWeeklyWorkedHours();\r\n\t\t\t\tdouble hourlyRate = ((HourlyEmployee) employee).getHourlyRate();\r\n\t\t\t\tdouble weeklyPayAmount = 40 * ((HourlyEmployee) employee).getHourlyRate();\r\n\r\n\t\t\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\t\t\tif (((HourlyEmployee) employee).getWeeklyWorkedHours() > 40) {\r\n\t\t\t\t\tdouble overtime = ((HourlyEmployee) employee).getWeeklyWorkedHours() - 40;\r\n\t\t\t\t\tdouble overtimePay = overtime * (((HourlyEmployee) employee).getHourlyRate() * 2);\r\n\t\t\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), weeklyWorkedHours, \"\", formatter.format(hourlyRate), formatter.format(weeklyPayAmount));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tdouble weeklySales = ((CommissionedEmployee) employee).getWeeklySales();\r\n\t\t\t\tdouble commissionRate = ((CommissionedEmployee) employee).getCommissionRate();\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), \"\", formatter.format(weeklySales), \"\", formatter.format(weeklySales * commissionRate));\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nNote: * A 10% bonus is awarded\\n\");\r\n\r\n\t}", "private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(hourlyEmployee.getFirstName()).append(\" \").append(hourlyEmployee.getLastName());\r\n\r\n\t\tdouble weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate();\r\n\r\n\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\tif (hourlyEmployee.getWeeklyWorkedHours() > 40) {\r\n\t\t\tdouble overtime = hourlyEmployee.getWeeklyWorkedHours() - 40;\r\n\t\t\tdouble overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2);\r\n\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t}\r\n\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(weeklyPayAmount));\r\n\t}", "public String EmployeeSummary(){\r\n\t\treturn String.format(\"%d\\t%d\\t\\tJunior\\t\\t$%,.2f\\t\\t$%,.2f\\r\\n\", getID(), getYearHired(), getBaseSalary(), CalculateTotalCompensation());\r\n\t}", "public static void getSalesInformation(Employee [] employee) {\n\t\tdouble total = 0;\n\t\tString report = \"-------List of employees with sales information-------\\n\";\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no Employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\ttotal += employee[i+1].getSales().getEachSales();\n\t\t\t\treport += ((i+1) + \" \" + employee[i+1].getName() + \" Sales: \" + employee[i+1].getSales().getEachSales() + \"\\n\"\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\treport += \"\\nTotal: \" + total;\n\t\t\tJOptionPane.showMessageDialog(null, report);\n\t\t}\n\t}", "@Override\n public String toString(){\n String empDetails = super.toString() + \"::FULL TIME::Annual Salary \"\n \t\t+ doubleToDollar(this.annualSalary);\n return empDetails;\n }", "@Override\n public String toString ()\n {\n String format = \"Employee %s: %s , %s\\n Commission Rate: $%.1f\\n Sales: $%.2f\\n\";\n\n return String.format(format, this.getId(), this.getLastName(), this.getFirstName(), this.getRate(), this.getSales());\n }", "public void displayAmount(char r,int t,double s){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n r=Character.toUpperCase(r);\n System.out.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n pw.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getTenure()<t&&e.getRate()==r&&\n s<=(e.getSalary())){\n System.out.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "@Override\n public String toString(){\n return String.format(\"Hourly Employee : %s\\n%s : %,.2f\", \n super.toString(), \"Hourly Wage\", getWage());\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 }", "public void print() {\n\t\tSystem.out.print(salary);\n\t}", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "public String toString()\n\t{\n\t\treturn super.toString() + \"\\n\" +\n\t\t\t \"\\t\" + \"Full Time\" + \"\\n\" +\n\t\t\t \"\\t\" + \"Monthly Salary: $\" + Double.toString(monthlyEarning());\n\t}", "public String toString(){\r\n return String.format(\"%-15s%-15s%-30s%,8.2f\", this.employeeFirstName, \r\n this.employeeLastName, this.employeeEmail, getBiweeklySalary());\r\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "public void logPayRaise(){\r\n\t\tSystem.out.println(\"Log message: employee \" + this.employeeName + \" has new salary: \" + this.salary);\r\n\t}", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public void outputInfo(){\n outputHeader();\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayInfo(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public String toString(){\n return \"Employee First Name: \" + firstName \t\n + \", Surname: \" + secondName\n + \", Hourly Rate \" + hourlyRate;\n }", "public void printReport(){\n StdOut.println(name);\n double total = cash;\n for (int i=0; i<n; i++){\n int amount = shares[i];\n double price = StockQuote.priceOf(stocks[i]);\n total+= amount*price;\n StdOut.printf(\"%4d %5s \", amount, stocks[i]);\n StdOut.printf(\"%9.2f %11.2f\\n\", price, amount*price);\n }\n StdOut.printf(\"%21s %10.2f\\n\", \"Cash: \", cash);\n StdOut.printf(\"%21s %10.2f\\n\", \"Total: \", total);\n }", "@Override\n public String toString (int num)\n {\n String format = \"Weekly pay for %s, %s employee id %s is $%.2f\\n\";\n return String.format(format, this.getLastName(), this.getFirstName(), this.getId(), this.calculatePay());\n }", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public String toString(){\n String s = \"\";\n s+=\"Employee: \"+name+\"\\n\";\n s+=\"Employee ID: \" + idnum +\"\\n\";\n s+=\"Current Position: \"+position+\"\\n\";\n s+=\"Current Salary: $\" +salary+\"\\n\";\n s+=\"Vacation Balance: \" + vacationBal+ \" days\\n\";\n s+=\"Bonus: $\" +annualBonus+\"\\n\";\n return s;\n }", "@Override\n public String toString()\n {\n return super.toString() + \"::FULL TIME::Annual Salary \" + toDollars(annualSalary);\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 void printTotalRentProfit () {\n System.out.println(\"The total rent profit is currently: \" + totalRent + \" US Dollars.\");\n }", "public final void Display() {\r\n\t\t//Displaying the Total Leave count\r\n\t\tSystem.out.println(\"Employee leave count per year : \" + myLeaveCount);\r\n\t}", "public int printSaleReportToConsole() {\n int result = 0;\n Enumeration<String> keyEnum = storageSale.keys();\n int totalNumberOfSalesOfProduct = 0;\n String key = null;\n float totalValue = 0;\n while (keyEnum.hasMoreElements()) {\n key = keyEnum.nextElement();\n totalNumberOfSalesOfProduct = getTotalNumberOfSales(key);\n totalValue = getValueOfSales(key);\n System.out.println(\"REPORT: SALE ---> Product: \" + key + \" total number of sales: \"\n + totalNumberOfSalesOfProduct + \" total value: \" + totalValue);\n result++;\n }\n return result;\n }", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "public String toString(){\r\n return super.toString() + \"\\nYearly Salary: \" + salary;\r\n }", "public void summary() {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur));\r\n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }", "public static void main(String[] args){\n int emp_id;\n String emp_name;\n float basic_salary,HRA ,DA,TA,PF,Gross;\n\n Scanner scanner = new Scanner(System.in);\n emp_id = scanner.nextInt();\n System.out.println(\"Input employee id : \");\n\n emp_name = scanner.next();\n System.out.println(\"Input employee name: \");\n\n basic_salary = scanner.nextFloat();\n System.out.println(\"Input employee basic salary\");\n HRA = (basic_salary*10)/100;\n DA = (basic_salary*8)/100;\n TA = (basic_salary*9)/100;\n PF = (basic_salary*20)/100;\n Gross = (basic_salary + HRA + TA + DA - PF);\n\n System.out.println(\"HRA 10% of basic salary:\" +HRA);\n System.out.println(\"DA 8% of basic salary:\" +DA);\n System.out.println(\"TA 9% of basic salary:\" +TA);\n System.out.println(\"PF 20% of basic salary:\" +PF);\n System.out.println(\"Gross basic salary + HRA + DA + TA - PF :\" + Gross);\n\n\n }", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "public static void printOffers() {\r\n\t\tSystem.out.println(\"\\nOffers Available are:\\n\");\r\n\t\tSystem.out.println(\"If Total Price is >= 1000 then discount = 2%\");\r\n\t\tSystem.out.println(\"If Total Price is >= 2000 then discount = 4%\");\r\n\t\tSystem.out.println(\"If Total Price is >= 3000 then discount = 5%\");\r\n\t\tSystem.out.println(\"On every purcahse of 1000rs 10 points will be added to your account \");\r\n\t\tSystem.out.println();\r\n\t}", "public void printMonthlySummary() {\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Rolls Sold -------\");\r\n double totalRollsSold = totalRollSales.get(\"egg\") + totalRollSales.get(\"jelly\") + totalRollSales.get(\"pastry\") + totalRollSales.get(\"sausage\") + totalRollSales.get(\"spring\");\r\n double egg = totalRollSales.get(\"egg\");\r\n double jelly = totalRollSales.get(\"jelly\");\r\n double pastry = totalRollSales.get(\"pastry\");\r\n double sausage = totalRollSales.get(\"sausage\");\r\n double spring = totalRollSales.get(\"spring\");\r\n System.out.println(\"Total Rolls Sold: \" + totalRollsSold);\r\n System.out.println(\"Total EggRolls Sold: \" + egg);\r\n System.out.println(\"Total JellyRolls Sold: \" + jelly);\r\n System.out.println(\"Total PastryRolls Sold: \" + pastry);\r\n System.out.println(\"Total SausageRolls Sold: \" + sausage);\r\n System.out.println(\"Total SpringRolls Sold: \" + spring);\r\n System.out.println(\"\");\r\n \r\n\r\n System.out.println(\"------- Total Monthly Income -------\");\r\n double totalSales = 0; \r\n totalSales = totalCustomerSales.get(\"Casual\") + totalCustomerSales.get(\"Business\") + totalCustomerSales.get(\"Catering\"); \r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Roll Outage Impacts -------\");\r\n System.out.println(totalShortageImpact);\r\n }", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "@Override\n public String toString(){\n return String.format(\"%s %s; %s: $%,.2f\",\n \"base-salaried\", super.toString(),\n \"base salary\", getBaseSalary());\n }", "@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}", "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}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "public static void printReport() throws Exception\r\n\t{\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\r\n\t\t//Print out headers for table\r\n\t\tSystem.out.printf(\"%5s%20s%10s%15s%20s%15s%15s%20s%10s%20s%10s\\n\\n\", \r\n\t\t\t\t\"ID\", \"Name\", \"Gender\", \"Hourly Rate\", \"Contracted Hours\",\t\"Gross Pay\", \r\n\t\t\t\t\"Income Tax\", \"National Insurance\", \"Pension\", \"Total Deductions\", \"Net pay\");\r\n\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t//Calculates the annual gross in order to calculate the income tax per week\r\n\t\t\tannualgross=gross*52;\r\n\t\t\t\r\n\t\t\t//Calculates Income Tax\r\n\t\t\tdouble p,b,h,a;\r\n\t\t\t\r\n\t\t\tif(annualgross<=12500)\r\n\t\t\t{\r\n\t\t\t\tp=0;\r\n\t\t\t\tb=0;\r\n\t\t\t\th=0;\r\n\t\t\t\ta=0;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>12500 && annualgross<=50000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t\tb = annualgross - 12500;\r\n\t\t\t\th = 0;\r\n\t\t\t\ta = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse if(annualgross>50000 && annualgross<=150000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t b = 37500;\r\n\t\t\t h = annualgross - 50000;\r\n\t\t\t a = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t p = 12500;\r\n\t\t b = 37500;\r\n\t\t h = 100000;\r\n\t\t a = annualgross - 150000;\r\n\r\n\t\t\t}\r\n\t\t\ttax= (p * 0 + b * 0.2 + h * 0.4 + a * 0.45)/52;\r\n\t\t\t\r\n\t\t\t//Calculates National Insurance Contribution\r\n\t\t\tif(annualgross>8500 && annualgross<50000)\r\n\t\t\t{\r\n\t\t\t\tnirate=0.12;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnirate=0.02;\r\n\t\t\t}\r\n\t\t\tnitax=gross*nirate;\r\n\t\t\t\r\n\t\t\t//Calculates Pension Contribution\r\n\t\t\tif(annualgross<27698)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.074;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=27698 && annualgross<37285)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.086;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=37285 && annualgross<44209)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.096;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.117;\r\n\t\t\t}\r\n\t\t\tpension=gross*penrate;\r\n\t\t\t\r\n\t\t\t//Calculates total deductions\r\n\t\t\tdeduct=tax+nitax+pension;\r\n\t\t\t\r\n\t\t\t//Calculates net pay\r\n\t\t\tnet=gross-deduct;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"%5d%20s%10s%15.2f%20.2f%15.2f%15.2f%15.2f%15.2f%20.2f%10.2f\\n\",\r\n\t\t\t\t\tid, fname+\" \"+sname, gen, hrate, hrs, gross, tax, nitax, pension, deduct, net);\r\n\t\t}\r\n\t\tfs.close();\r\n\t\t\r\n\t}", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRUtility.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\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 }", "@Override\n public double earnings() {\n return salary + commission + quantity;\n }", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "public void payAllEmployeers() {\n\t\t\n\t\tSystem.out.println(\"PAYING ALL THE EMPLOYEES:\\n\");\n\t\t\n\t\tfor(AbsStaffMember staffMember: repository.getAllMembers())\n\t\t{\n\t\t\tstaffMember.pay();\n\t\t\tSystem.out.println(\"\\t- \" + staffMember.getName() + \" has been paid a total of \" + staffMember.getTotalPaid());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\");\n\t}", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public String toString() {\n \tString ret;\n \tint sumWait = 0;\n \tfor(Teller t : employees)\n \t{\n \t\tsumWait += t.getSumWaitTime();\n \t}\n \t\n \tret = \"Total elapsed time: \" + clock;\n \tret = ret + \"\\nTotal customers helped: \"+ numCust;\n \tret = ret + \"\\nAvg. wait time: \"+String.format(\"%.3f\",(float)sumWait/numCust);\n \tfor(Teller t : employees)\n \t{\n \t\tret = ret + \"\\nTeller \"+t.getID()+\": % time idle: \"+String.format(\"%.3f\",(float)(100*t.getIdleTime())/clock)+\" Number of customers helped: \"+t.getNumHelped();\n \t}\n \treturn ret;\n }", "String showPaySlip(int empId) {\n\t\tString payslip=\"Employee with given empid is not available in database\";\n\t\tIterator<Employee> iter=list.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tEmployee em=iter.next();\n\t\t\tif(em.getEmpId()==empId) \n\t\t\t\tpayslip=\"Payslip of Employee with EmpID \"+em.getEmpId()+\" is \"+em.getSalary();\n\t\t}\n\t\treturn payslip;\n\t\t\n\t}", "@Override\n public String toString() {\n return super.toString() + \", Annual Sales: $\" + this.getAnnualSales();\n }", "public abstract String printEmployeeInformation();", "public String[][] displayEmployee() {\r\n\t\t\t\t\r\n\t\t// Print the employee numbers for the employees stored in each bucket's ArrayList,\r\n\t\t// starting with bucket 0, then bucket 1, and so on.\r\n \r\n if (numInHashTable > 0){\r\n dataTable = new String[numInHashTable][5];\r\n int q = 0;\r\n \r\n for (ArrayList<EmployeeInfo> bucket : buckets){\r\n for (int i = 0; i < bucket.size(); i++){\r\n EmployeeInfo theEmployee = bucket.get(i);\r\n \r\n //display specfically for a PTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof PTE) {\r\n PTE thePTE = (PTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"PTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(thePTE.calcNetAnnualIncome()); \r\n q++;\r\n }\r\n \r\n //display specfically for a FTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"FTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(theFTE.calcNetAnnualIncome());\r\n q++;\r\n } \r\n }\r\n }\r\n }\r\n return dataTable;\r\n }", "private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException {\r\n\t\tSystem.out.println(\"Enter Employee First Name: \");\r\n\t\tString firstName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Last Name: \");\r\n\t\tString lastName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Type (Salaried or Hourly or Commissioned): \");\r\n\t\tString employeeType = reader.readLine();\r\n\r\n\t\tif (employeeType.equalsIgnoreCase(\"Salaried\")) {\r\n\t\t\tSystem.out.println(\"Please enter your monthly salary: \");\r\n\t\t\tdouble monthlySalary = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false);\r\n\t\t\temployeeDetails.add(salariedEmployee);\r\n\r\n\t\t\tsalariedEmployeeEarningReport(salariedEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\tSystem.out.println(\"Please enter your hourly rate: \");\r\n\t\t\tdouble hourlyRate = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tSystem.out.println(\"Please enter your weekly worked hours: \");\r\n\t\t\tdouble weeklyWorkedHours = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false);\r\n\t\t\temployeeDetails.add(hourlyEmployee);\r\n\r\n\t\t\thourlyEmployeeEarningReport(hourlyEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Commissioned\")) {\r\n\t\t\tSystem.out.println(\"Please enter your weekly sales amount: \");\r\n\t\t\tdouble weeklySalesAmount = Double.parseDouble(reader.readLine());\r\n\t\t\tfinal CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false);\r\n\t\t\temployeeDetails.add(commissionedEmployee);\r\n\r\n\t\t\tcommissionedEmployeeEarningReport(commissionedEmployee);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Invalid employee type\");\r\n\t\t}\r\n\t}", "public void displayReport() {\r\n\t\tint ticketsSold = 0;\r\n\t\tint aTicketsSold = 0;\r\n\t\tint cTicketsSold = 0;\r\n\t\tint sTicketsSold = 0;\r\n\t\tdouble totalSales = 0;\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tif (current.getTicketType() == 'A') {\r\n\t\t\taTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 10;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'C') {\r\n\t\t\tcTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 5;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'S') {\r\n\t\t\tsTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 7.5;\r\n\t\t}\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\t\taTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 10;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\t\tcTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 5;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\t\tsTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 7.5;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total seats in theater: \" + numRows*numCols);\r\n\t\tSystem.out.println(\"Total tickets sold: \" + ticketsSold);\r\n\t\tSystem.out.println(\"Adult tickets sold: \" + aTicketsSold);\r\n\t\tSystem.out.println(\"Child tickets sold: \" + cTicketsSold);\r\n\t\tSystem.out.println(\"Senior tickets sold: \" + sTicketsSold);\r\n\t\tSystem.out.println(\"Total ticket sales: $\" + String.format(\"%.2f\", totalSales));\r\n\t}", "public void getSalary() {\n this.payDay(this.monthlyIncome);\n }", "public void listAll(){\n /*\n for(int i=0;i<employeesList.size();i++){\n System.out.println(i);\n Employee employee=(Employee)employeesList.get(i);\n System.out.print(employeesList.get(i));\n */ \n \n \n //for used to traverse employList in order to print all employee's data\n for (int i = 0; i < employeesList.size(); i++) {\n System.out.println(\"Name: \" + employeesList.get(i).getName()); \n System.out.println(\"Salary_complement: \"+employeesList.get(i).getSalary_complement()); \n \n }\n \n \n }", "public int printAdjReportToConsole() {\n int result = 0;\n Collection<LinkedList<AdjustmentToSale>> colVal = storageAdjustment.values();\n Iterator<LinkedList<AdjustmentToSale>> itList = colVal.iterator();\n LinkedList<AdjustmentToSale> tempList = null;\n Iterator<AdjustmentToSale> itSales = null;\n AdjustmentToSale tempSale = null;\n while (itList.hasNext()) {\n tempList = itList.next();\n itSales = tempList.iterator();\n while (itSales.hasNext()) {\n tempSale = itSales.next();\n System.out.println(\"REPORT: ADJUSTMENT --->Product: \" + tempSale.getProductType() + \" adjustment value: \"\n + tempSale.getValue() + \" adjustment operator: \"\n + tempSale.getOper().toString());\n result++;\n }\n }\n return result;\n }", "public void printStatistics() throws SQLException {\n\t\t\temployeeDAO.printStatistics();\n\t\t\t\n\t\t}", "public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }", "public String getRecord() {\n return \"Employee name: \\t\" + employeeName + \"\\n\" +\n \"Employee pay:\\t$\" + String.format(\"%.2f\",currentPay);\n }", "@Override\n\tpublic String toString() {\n\t\tint temp = totalFees-feesPayed;\n\t\treturn (\"Student: \" + name + \" Total Fees Payed: $\" + feesPayed + \" Total Fees Remaining: $\" + temp);\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuffer s1 = new StringBuffer();\n\t\ts1.append(\"Employee name : \");\n\t\ts1.append(this.name);\n\t\ts1.append(\" Id is: \");\n\t\ts1.append(Integer.toString(this.id));\n\t\ts1.append(\" salary is \");\n\t\ts1.append(Integer.toString(this.salary));\n\t\treturn s1.toString();\n\n\t}", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tdouble grossPay;\n\t\tdouble netPay;\n\t\tString employeeName;\n\t\tdouble totalDeductions;\n\t\tdouble federalTaxRate = 0.15;\n\t\tdouble stateTaxRate = 0.035;\n\t\tdouble ssTaxRate = 0.0575;\n\t\tdouble medTaxRate = 0.0275;\n\t\tdouble pensionPlanRate = 0.05;\n\t\tdouble healthInsuranceDeduction = 75.00;\n\t\tdouble federalTaxDeduction;\n\t\tdouble stateTaxDeduction;\n\t\tdouble ssTaxDeduction;\n\t\tdouble medTaxDeduction;\n\t\tdouble pensionPlanDeduction;\n\t\t\n\t\t// Gather employees gross pay and name from user\n\t\tSystem.out.println(\"Enter employees name: \");\n\t\temployeeName = scan.nextLine();\n\t\tSystem.out.println(\"Enter employees gross pay: \");\n\t\tgrossPay = scan.nextDouble();\n\t\t\n\t\t// Apply tax deductions to get net pay\n\t\t// Federal Tax\n\t\tfederalTaxDeduction = grossPay * federalTaxRate;\n\t\t// State Tax\n\t\tstateTaxDeduction = grossPay * stateTaxRate;\n\t\t// Social Security Tax\n\t\tssTaxDeduction = grossPay * ssTaxRate;\n\t\t// Medicare/Medicaid Tax\n\t\tmedTaxDeduction = grossPay * medTaxRate;\n\t\t// Pension Plan\n\t\tpensionPlanDeduction = grossPay * pensionPlanRate;\n\t\t// Apply deductions to get net pay\n\t\ttotalDeductions = (healthInsuranceDeduction + federalTaxDeduction\n\t\t\t\t+ stateTaxDeduction + ssTaxDeduction + medTaxDeduction \n\t\t\t\t+ pensionPlanDeduction);\n\t\t\n\t\tnetPay = grossPay - totalDeductions;\n\t\t\n\t\t// Output each deduction as well as net pay\n\t\tSystem.out.println(\"\\n\" + employeeName);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Gross Amount:\", grossPay);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Federal Tax:\", federalTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"State Tax:\", stateTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Social Security Tax:\", ssTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Medicare/Medicaid Tax:\", medTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Pension Plan:\", pensionPlanDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Health Insurance:\", healthInsuranceDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Net Pay:\", netPay);\n\t}", "public void printPaymentSummary() {\n System.out.print(\"+========================+\\n\");\n System.out.print(\"| Payment Summary |\\n\");\n System.out.print(\"+========================+\\n\");\n System.out.printf(\"Payment_ID: %s\\n\", payment_id);\n System.out.printf(\"STAFF_NAME: %s\\t\\t\\tSTAFF_ID : %s\\n\", order_staff.getName().toUpperCase(),\n order_staff.getId());\n System.out.printf(\"CUST_NAME : %s\\t\\tCurrent_Date: %s\\n\", order_member.getName().toUpperCase(),\n java.time.LocalDate.now());\n System.out.printf(\"CUST_ICNO : %s\\t\\tCurrent_Time: %s\\n\", order_member.getMemberIC(),\n java.time.LocalTime.now());\n System.out.print(\"----------------------------------------------------------------\\n\");\n System.out.printf(\"Total : %.2f\\n\", total_sales_of_transaction);\n System.out.printf(\"Payment Type Used : %s\\n\", payment_used);\n System.out.printf(\"Bike Brand : %s\\n\", order.getBike().getBrand());\n System.out.printf(\"Bike Price : %.2f\\n\", order.getBike().getPrice());\n System.out.println(\"\\n\");\n System.out.println(\"\\n\");\n }", "private void SummaryProfile() {\n //format the date & number\n DateFormat df = DateFormat.getDateInstance( DateFormat.LONG, Locale.ENGLISH );\n NumberFormat nf = NumberFormat.getCurrencyInstance( new Locale(\"id\",\"id\"));\n \n GregorianCalendar gregorian = new GregorianCalendar( );\n \n String[] displayMonths = new DateFormatSymbols().getMonths();\n \n //month and year variable ( month start from 0, so 0 is january, 11 is december )\n int gregorianmonth = gregorian.get(Calendar.MONTH);\n int gregorianyear = gregorian.get(Calendar.YEAR);\n \n \n //the title of the summary\n //ok, we must use temporary variable because of missmatch with db standard date\n int displaygregorianmonth = gregorianmonth;\n int displaygregorianyear = gregorianyear;\n \n //december watchout\n //if the current month is january ( 0 ) then we must display summary for \n //dec ( 11 ) last year ( current year - 1 )\n if(displaygregorianmonth==0) {\n displaygregorianmonth = 11;\n displaygregorianyear = gregorianyear - 1;\n }\n //if the current month is not january, then just minus it with one, current year is \n //same\n else {\n displaygregorianmonth -= 1;\n }\n DateLB.setText(\"Summary of the Company in \" + \n displayMonths[displaygregorianmonth] + \" \" + displaygregorianyear );\n \n //the summary report ( month start from 1 so no need minus anymore )\n SummarySaleLB.setText( \"Total Value of Sale Transaction : \" +\n nf.format( reportdb.TotalSaleValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryPurchaseLB.setText( \"Total Value of Purchase Transaction : \" +\n nf.format( reportdb.TotalPurchaseValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalesmanCommisionLB.setText( \"Total Value of Salesman Commision Transaction : \" +\n nf.format( reportdb.TotalSalesmanCommisionValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalaryPaymentLB.setText( \"Total Value of Salary Payment Transaction : \" + \n nf.format( reportdb.TotalSalaryPaymentValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryChargesLB.setText( \"Total Value of Outcome Payment Transaction : \" +\n nf.format( reportdb.TotalOutcomeValue( gregorianmonth,\n gregorianyear ) ) );\n \n }", "public String toString() {\n return \"Employee Id:\" + id + \" Employee Name: \" + name+ \"Employee Address:\" + address + \"Employee Salary:\" + salary;\n }", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public String toString(){\n StringBuilder builder = new StringBuilder();\n builder.append(\"Employee :[ Name : \" + name + \", dept : \" + dept + \", salary :\"\n + salary+\", subordinates = \\n\");\n for(Employee e : this.subordinates) {\n builder.append(\"\\t\" + e + \"\\n\");\n }\n builder.append(\" ]\");\n return builder.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "private void btnPrintEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintEmployeeActionPerformed\n if(searched == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Perform a search on database first.\");\n return;\n }\n try {\n String report = \"IReports\\\\Employee.jrxml\";\n JasperReport jReport = JasperCompileManager.compileReport(report);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, newHandler.getConnector());\n JasperViewer.viewReport(jPrint, false);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(rootPane, ex.getMessage());\n }\n }", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "public static void printEmployees(ArrayList<Employee> newEmployee){\n for(int i = 0; i < newEmployee.size(); i++){\n System.out.print(newEmployee.get(i).toString());\n }\n }", "@Override\npublic String toString()\n{\n Employee emp = new Employee();\n \n StringBuilder sb = new StringBuilder();\n sb.append(\"Employee{\");\n sb.append(\"Name=\");\n sb.append(emp.getName());\n sb.append(\",Salary complement=\");\n sb.append(emp.getSalary_complement());\n sb.append(\"}\");\n\n return sb.toString();\n}", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "public String toString(){\r\n String details = \"Name: \" + name + \" Monthly Salary: \" + monthlySalary;\r\n return details; \r\n }", "public static void main(String[] args) {\n EmployeeTimed employeeTimed = null;\n try {\n employeeTimed = new EmployeeTimed(120000000000004L, \"Employee 1\", 100);\n } catch (IDException e) {\n e.printStackTrace();\n }\n /*\n try {\n employeeTimed.setID(1000000L);\n } catch (IDException e) {\n e.printStackTrace();\n }\n */\n System.out.println(employeeTimed.toString());\n\n// System.out.println(employeeSalaried.CalculateSalary());\n System.out.println(employeeTimed.CalculateSalary());\n\n }", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "public void listEmployees() {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tList employees = session.createQuery(\"FROM Employee\").list();\n\t\t\tfor (@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = employees.iterator(); iterator.hasNext();) {\n\t\t\t\tEmployee employee = (Employee) iterator.next();\n\t\t\t\tSystem.out.print(\"First Name: \" + employee.getFirstName());\n\t\t\t\tSystem.out.print(\" Last Name: \" + employee.getLastName());\n\t\t\t\tSystem.out.println(\" Salary: \" + employee.getSalary());\n\t\t\t}\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "public double earnings() {\n\t\treturn weeklySalary; \n\t}", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "public static void main(String[] args) {\n\t\temployee employee =new employee (\"hilal\",5000,20,2021);\n\t System.out.println(employee.toString());\n \n\t}", "public void print() {\n super.print();\r\n System.out.println(\"Hourly Wage: \" + hourlyWage);\r\n System.out.println(\"Hours Per Week: \" + hoursPerWeek);\r\n System.out.println(\"Weeks Per Year: \" + weeksPerYear);\r\n }", "public String toString() \r\n\t{\r\n\t\treturn(super.toString() + \"\\'s wages are:\" + calculatePay());\r\n\t}", "public static void main(String[] args) throws NullPointerException {\n\n\t\t// default constructor\n\t\tEmployeeInfo employeeInfo = new EmployeeInfo();\n\t\tEmployeeInfo employeeInfo1 = new EmployeeInfo(\" FORTUNE COMPANY \");\n\n\t\tEmployeeInfo emp1 = new EmployeeInfo(1, \"Abrah Lincoln\", \"Accounts\", \"Manager\", \"Hodgenville, KY\");\n\t\tEmployeeInfo emp2 = new EmployeeInfo(2, \"John F Kenedey\", \"Marketing\", \"Executive\", \"Brookline, MA\");\n\t\tEmployeeInfo emp3 = new EmployeeInfo(3, \"Franklin D Rossevelt\", \"Customer Realation\", \"Assistnt Manager\",\n\t\t\t\t\"Hyde Park, NY\");\n\n\n\t\t// Printing Employee information in this pattern\n\t\t// \"ID Name Number Department Position Years Worked Pension Bonus Total salary \"\n\n\t\tSystem.out.println(emp1.employeeId() + \"\\t\" + emp1.employeeName() + \"\\t\\t\" + emp1.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp1.getJobTitle() + \"\\t\\t\\t\" + emp1.getYearsWorked() + \"\\t\\t\" + emp1.calculateEmployeePension()\n\t\t\t\t+ \"\\t\" + emp1.calculateEmployeeBonus() + \"\\t\\t\" + emp1.calculateSalary());\n\n\t\tSystem.out.println(emp2.employeeId() + \"\\t\" + emp2.employeeName() + \"\\t\\t\" + emp2.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp2.getJobTitle() + \"\\t\\t\" + emp2.getYearsWorked() + \"\\t\\t\" + emp2.calculateEmployeePension() + \"\\t \"\n\t\t\t\t+ emp2.calculateEmployeeBonus() + \"\\t\\t\" + emp2.calculateSalary());\n\n\t\tSystem.out.println(emp3.employeeId() + \"\\t\" + emp3.employeeName() + \"\\t\" + emp3.getDepartment() + \"\\t\"\n\t\t\t\t+ emp3.getJobTitle() + \"\\t\" + emp3.getYearsWorked() + \"\\t\\t \" + emp3.calculateEmployeePension() + \"\\t\"\n\t\t\t\t+ emp3.calculateEmployeeBonus() + \" \\t\\t\" + emp3.calculateSalary());\n\n\n\n\t}", "@Override\n public String getPayMemo() {\n return String.format(\"Employee ID: %d, Pay Date: %s\", this.getEmpID(),\n HRUtility.dateToStr(new Date()));\n }" ]
[ "0.72260404", "0.7134632", "0.71149707", "0.6740287", "0.65809226", "0.6579418", "0.6562177", "0.6474682", "0.6452782", "0.63650924", "0.6361563", "0.63111913", "0.62485135", "0.62416774", "0.6217038", "0.62146336", "0.61879057", "0.6162815", "0.6157233", "0.6133299", "0.61253977", "0.6120161", "0.6115119", "0.6098913", "0.6070987", "0.6062719", "0.6038535", "0.60286665", "0.6002658", "0.59977275", "0.5986606", "0.598463", "0.5976108", "0.5939738", "0.59384054", "0.5933235", "0.59143144", "0.59131336", "0.5912184", "0.5908325", "0.5897973", "0.5888258", "0.5878894", "0.58777833", "0.58775693", "0.58768517", "0.58766186", "0.58625156", "0.58593595", "0.5851794", "0.58430845", "0.5838064", "0.5831185", "0.5826061", "0.5816067", "0.5799563", "0.57657737", "0.5763789", "0.5760179", "0.5751593", "0.57400244", "0.5735462", "0.5734942", "0.5725581", "0.57168376", "0.57162005", "0.5708708", "0.57066834", "0.56989825", "0.56951076", "0.56735986", "0.56693983", "0.56647086", "0.56574875", "0.5650377", "0.5648674", "0.564001", "0.5635872", "0.56205934", "0.5609757", "0.5591448", "0.5588108", "0.5576522", "0.5572019", "0.5567332", "0.5555645", "0.5534699", "0.55321074", "0.552989", "0.5527618", "0.5521648", "0.5519775", "0.55079234", "0.5507666", "0.55056983", "0.5503567", "0.5498987", "0.54979336", "0.5495432", "0.54787725" ]
0.86862284
0
This method is used to print the earning report of an hourly employee
private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) { System.out.format("%s\t\t\t%s\n", "Name", "Weekly Pay Amount"); System.out.println("===================================================================="); final StringBuilder employeeName = new StringBuilder(); employeeName.append(hourlyEmployee.getFirstName()).append(" ").append(hourlyEmployee.getLastName()); double weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate(); // Rate will be doubled if it’s beyond 40 hours/week. if (hourlyEmployee.getWeeklyWorkedHours() > 40) { double overtime = hourlyEmployee.getWeeklyWorkedHours() - 40; double overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2); weeklyPayAmount += overtimePay; } final NumberFormat formatter = NumberFormat.getCurrencyInstance(); System.out.format("%s\t\t\t%s", employeeName.toString(), formatter.format(weeklyPayAmount)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "@Override\n public String toString(){\n return String.format(\"Hourly Employee : %s\\n%s : %,.2f\", \n super.toString(), \"Hourly Wage\", getWage());\n }", "private static void printEmployeeDetails(final List<Employee> employeeDetails) {\r\n\t\tString headerFormat = \"%-25s%-20s%-20s%-20s%-20s%-20s\\n\";\r\n\t\tString rowFormat = \"%-25s%-20s%-20s%-20s%-20s%-20s\\n\";\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Employee details:\");\r\n\t\tSystem.out.println(\"=============================================================================================================================\");\r\n\t\tSystem.out.format(headerFormat, \"Name\", \"Class\", \"Hours\", \"Sales\", \"Rate\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"=============================================================================================================================\");\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tfor (Employee employee : employeeDetails) {\r\n\t\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\t\temployeeName.append(employee.getFirstName()).append(\" \").append(employee.getLastName());\r\n\r\n\t\t\tif (employee.getClassType().equalsIgnoreCase(\"Salaried\")) {\r\n\r\n\t\t\t\tdouble monthlySalary = ((SalariedEmployee) employee).getMonthlySalary();\r\n\t\t\t\tboolean isRewarded = employee.isRewarded();\r\n\t\t\t\tif (isRewarded) {\r\n\t\t\t\t\tmonthlySalary += monthlySalary * 0.1;\r\n\t\t\t\t}\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\tsb.append(formatter.format(monthlySalary / 4));\r\n\t\t\t\tsb.append(isRewarded ? \"*\" : \"\");\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), \"\", \"\", \"\", sb.toString());\r\n\r\n\t\t\t} else if (employee.getClassType().equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\t\tdouble weeklyWorkedHours = ((HourlyEmployee) employee).getWeeklyWorkedHours();\r\n\t\t\t\tdouble hourlyRate = ((HourlyEmployee) employee).getHourlyRate();\r\n\t\t\t\tdouble weeklyPayAmount = 40 * ((HourlyEmployee) employee).getHourlyRate();\r\n\r\n\t\t\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\t\t\tif (((HourlyEmployee) employee).getWeeklyWorkedHours() > 40) {\r\n\t\t\t\t\tdouble overtime = ((HourlyEmployee) employee).getWeeklyWorkedHours() - 40;\r\n\t\t\t\t\tdouble overtimePay = overtime * (((HourlyEmployee) employee).getHourlyRate() * 2);\r\n\t\t\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), weeklyWorkedHours, \"\", formatter.format(hourlyRate), formatter.format(weeklyPayAmount));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tdouble weeklySales = ((CommissionedEmployee) employee).getWeeklySales();\r\n\t\t\t\tdouble commissionRate = ((CommissionedEmployee) employee).getCommissionRate();\r\n\t\t\t\tSystem.out.format(rowFormat, employeeName.toString(), employee.getClassType(), \"\", formatter.format(weeklySales), \"\", formatter.format(weeklySales * commissionRate));\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nNote: * A 10% bonus is awarded\\n\");\r\n\r\n\t}", "public void displayOfficeHours(){\n\t\tSystem.out.println(\"office hours \" + this.officeHourDay + \" from \" + (this.officeHourTime) + \" to \" + (this.officeHourTime + 2));\n\t}", "@Override\r\n public String toString () {\r\n return \"HourlyWorker: \" + hours + \", \" + hourlyRate + \", \" + salary + \", \" + super.toString();\r\n }", "public String toString(){\n return \"Employee First Name: \" + firstName \t\n + \", Surname: \" + secondName\n + \", Hourly Rate \" + hourlyRate;\n }", "@Override \n public String toString() \n { \n return String.format(\"salaried employee: %s%n%s: $%,.2f\",\n super.toString(), \"weekly salary\", getWeeklySalary());\n }", "public String EmployeeSummary(){\r\n\t\treturn String.format(\"%d\\t%d\\t\\tJunior\\t\\t$%,.2f\\t\\t$%,.2f\\r\\n\", getID(), getYearHired(), getBaseSalary(), CalculateTotalCompensation());\r\n\t}", "public String[][] displayEmployee() {\r\n\t\t\t\t\r\n\t\t// Print the employee numbers for the employees stored in each bucket's ArrayList,\r\n\t\t// starting with bucket 0, then bucket 1, and so on.\r\n \r\n if (numInHashTable > 0){\r\n dataTable = new String[numInHashTable][5];\r\n int q = 0;\r\n \r\n for (ArrayList<EmployeeInfo> bucket : buckets){\r\n for (int i = 0; i < bucket.size(); i++){\r\n EmployeeInfo theEmployee = bucket.get(i);\r\n \r\n //display specfically for a PTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof PTE) {\r\n PTE thePTE = (PTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"PTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(thePTE.calcNetAnnualIncome()); \r\n q++;\r\n }\r\n \r\n //display specfically for a FTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"FTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(theFTE.calcNetAnnualIncome());\r\n q++;\r\n } \r\n }\r\n }\r\n }\r\n return dataTable;\r\n }", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public void outputInfo(){\n outputHeader();\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayInfo(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public 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 }", "@Override\n public String toString(){\n String empDetails = super.toString() + \"::FULL TIME::Annual Salary \"\n \t\t+ doubleToDollar(this.annualSalary);\n return empDetails;\n }", "public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "public void displayAmount(char r,int t,double s){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n r=Character.toUpperCase(r);\n System.out.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n pw.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getTenure()<t&&e.getRate()==r&&\n s<=(e.getSalary())){\n System.out.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "public void printHourlyCounts()\n {\n System.out.println(\"Hr: Count\");\n for(int hour = 0; hour < hourCounts.length; hour++) {\n System.out.println(hour + \": \" + hourCounts[hour]);\n }\n }", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "@Override\n public String toString() {return super.toString()+\" payment by hours\";}", "public String displayHours() {\n String hrs=day+\" Hours: \" +getStartHours()+ \" to \"+get_endingHour();\n return hrs;\n }", "@Override\n public String toString (int num)\n {\n String format = \"Weekly pay for %s, %s employee id %s is $%.2f\\n\";\n return String.format(format, this.getLastName(), this.getFirstName(), this.getId(), this.calculatePay());\n }", "private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public String toString() {\n \tString ret;\n \tint sumWait = 0;\n \tfor(Teller t : employees)\n \t{\n \t\tsumWait += t.getSumWaitTime();\n \t}\n \t\n \tret = \"Total elapsed time: \" + clock;\n \tret = ret + \"\\nTotal customers helped: \"+ numCust;\n \tret = ret + \"\\nAvg. wait time: \"+String.format(\"%.3f\",(float)sumWait/numCust);\n \tfor(Teller t : employees)\n \t{\n \t\tret = ret + \"\\nTeller \"+t.getID()+\": % time idle: \"+String.format(\"%.3f\",(float)(100*t.getIdleTime())/clock)+\" Number of customers helped: \"+t.getNumHelped();\n \t}\n \treturn ret;\n }", "public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "@Override\n public String toString ()\n {\n String format = \"Employee %s: %s , %s\\n Commission Rate: $%.1f\\n Sales: $%.2f\\n\";\n\n return String.format(format, this.getId(), this.getLastName(), this.getFirstName(), this.getRate(), this.getSales());\n }", "public static void addHours (int [] [] ary1)\n {\n\n //Top of table formatting\n\n System.out.println(\"\\nEmployee# Weekly Hours\");\n System.out.println(\"____________________________\");\n\n //Nested for loop steps through the array and sums all the values in each row. It then prints the sums in table format.\n\n int x, y;\n int count1;\n int sum;\n\n for (x = 0; x <= 2; x++)\n {\n\n count1 = 0;\n sum = 0;\n\n System.out.print(\" \");\n\n for (y = 0; y <= 6; y++)\n {\n\n count1++;\n\n if (count1 <= 6)\n sum = sum + ary1[x][y];\n\n }\n\n System.out.printf(\"%-15d\",(x + 1));\n System.out.printf(\"%-15d\\n\",sum);\n\n }\n\n }", "public String toString()\n\t{\n\t\treturn super.toString() + \"\\n\" +\n\t\t\t \"\\t\" + \"Full Time\" + \"\\n\" +\n\t\t\t \"\\t\" + \"Monthly Salary: $\" + Double.toString(monthlyEarning());\n\t}", "public void outputToExcel(String startTime,String endTime) throws ParseException {\n\t\tDate[] dates = new Date[2];\r\n\t\tif (startTime != null && endTime != null) {\r\n\t\t\t\r\n\t\t\tString dateRange = startTime +\" - \"+endTime;\r\n\t\t\tdates = WebUtil.changeDateRangeToDate(dateRange);\r\n\t\t}else {\r\n\t\t\tdates[0] = null;\r\n\t\t\tdates[1] = null;\r\n\t\t}\r\n\t\t\r\n\t\tList<Profit> profits = profitMapper.getProfit(dates[0], dates[1]);\r\n\t\tList<CourseProfit> courseProfits = courseSelectMapper.getCourseProfit(dates[0],WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<CardProfit> cardProfits = cardFeeMapper.getCardProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\tList<MachineBuyConfig> machineBuyConfigs = machineConfigMapper.getMachineProfit(dates[0], WebUtil.getEndTime(dates[1], 1));\r\n\t\t\r\n\t\tMap<String, String> profitMap = new LinkedHashMap<String, String>();\r\n\t\tprofitMap.put(\"date\", \"时间\");\r\n\t\tprofitMap.put(\"vip\", \"会员收益\");\r\n\t\tprofitMap.put(\"course\", \"课程收益\");\r\n\t\tprofitMap.put(\"mechine\", \"器械支出\");\r\n\t\tprofitMap.put(\"sum\", \"总计\");\r\n\t\tString sheetName = \"财务总表\";\r\n\t\t\r\n\t\tMap<String, String> courseProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcourseProfitMap.put(\"selectTime\", \"时间\");\r\n\t\tcourseProfitMap.put(\"courseName\", \"课程名称\");\r\n\t\tcourseProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcourseProfitMap.put(\"courseCost\", \"课程收益\");\r\n\t\tString courseSheet = \"课程收益\";\r\n\t\t\r\n\t\tMap<String, String> cardProfitMap = new LinkedHashMap<String, String>();\r\n\t\tcardProfitMap.put(\"startTime\", \"时间\");\r\n\t\tcardProfitMap.put(\"vipName\", \"会员姓名\");\r\n\t\tcardProfitMap.put(\"cardType\", \"办卡类型\");\r\n\t\tcardProfitMap.put(\"cardFee\", \"办卡收益\");\r\n\t\tString cardSheet = \"办卡收益(1、年卡会员 2、季卡会员 3、月卡会员)\";\r\n\t\t\r\n\t\tMap<String, String> machineOutMap = new LinkedHashMap<String, String>();\r\n\t\tmachineOutMap.put(\"time\", \"时间\");\r\n\t\tmachineOutMap.put(\"machineName\", \"器械名称\");\r\n\t\tmachineOutMap.put(\"machineBrand\", \"器械品牌\");\r\n\t\tmachineOutMap.put(\"machineCost\", \"单价\");\r\n\t\tmachineOutMap.put(\"machineCount\", \"购买数量\");\r\n\t\tmachineOutMap.put(\"sumCost\", \"支出\");\r\n\t\tString machineSheet = \"器械支出\";\r\n\t\t\r\n\t\tExportExcel.excelExport(profits, profitMap, sheetName);\r\n\t\tExportExcel.excelExport(courseProfits, courseProfitMap, courseSheet);\r\n\t\tExportExcel.excelExport(cardProfits, cardProfitMap, cardSheet);\r\n\t\tExportExcel.excelExport(machineBuyConfigs, machineOutMap, machineSheet);\r\n\t}", "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 HourlyDetail() {\n\t\tthis.numberOfShiftBeginning = 0;\n\t\tthis.numberOfShiftEnding = 0;\n\t\tthis.costPerHour = 0;\n\t}", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "public static void printReport() throws Exception\r\n\t{\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\r\n\t\t//Print out headers for table\r\n\t\tSystem.out.printf(\"%5s%20s%10s%15s%20s%15s%15s%20s%10s%20s%10s\\n\\n\", \r\n\t\t\t\t\"ID\", \"Name\", \"Gender\", \"Hourly Rate\", \"Contracted Hours\",\t\"Gross Pay\", \r\n\t\t\t\t\"Income Tax\", \"National Insurance\", \"Pension\", \"Total Deductions\", \"Net pay\");\r\n\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t//Calculates the annual gross in order to calculate the income tax per week\r\n\t\t\tannualgross=gross*52;\r\n\t\t\t\r\n\t\t\t//Calculates Income Tax\r\n\t\t\tdouble p,b,h,a;\r\n\t\t\t\r\n\t\t\tif(annualgross<=12500)\r\n\t\t\t{\r\n\t\t\t\tp=0;\r\n\t\t\t\tb=0;\r\n\t\t\t\th=0;\r\n\t\t\t\ta=0;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>12500 && annualgross<=50000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t\tb = annualgross - 12500;\r\n\t\t\t\th = 0;\r\n\t\t\t\ta = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse if(annualgross>50000 && annualgross<=150000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t b = 37500;\r\n\t\t\t h = annualgross - 50000;\r\n\t\t\t a = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t p = 12500;\r\n\t\t b = 37500;\r\n\t\t h = 100000;\r\n\t\t a = annualgross - 150000;\r\n\r\n\t\t\t}\r\n\t\t\ttax= (p * 0 + b * 0.2 + h * 0.4 + a * 0.45)/52;\r\n\t\t\t\r\n\t\t\t//Calculates National Insurance Contribution\r\n\t\t\tif(annualgross>8500 && annualgross<50000)\r\n\t\t\t{\r\n\t\t\t\tnirate=0.12;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnirate=0.02;\r\n\t\t\t}\r\n\t\t\tnitax=gross*nirate;\r\n\t\t\t\r\n\t\t\t//Calculates Pension Contribution\r\n\t\t\tif(annualgross<27698)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.074;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=27698 && annualgross<37285)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.086;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=37285 && annualgross<44209)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.096;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.117;\r\n\t\t\t}\r\n\t\t\tpension=gross*penrate;\r\n\t\t\t\r\n\t\t\t//Calculates total deductions\r\n\t\t\tdeduct=tax+nitax+pension;\r\n\t\t\t\r\n\t\t\t//Calculates net pay\r\n\t\t\tnet=gross-deduct;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"%5d%20s%10s%15.2f%20.2f%15.2f%15.2f%15.2f%15.2f%20.2f%10.2f\\n\",\r\n\t\t\t\t\tid, fname+\" \"+sname, gen, hrate, hrs, gross, tax, nitax, pension, deduct, net);\r\n\t\t}\r\n\t\tfs.close();\r\n\t\t\r\n\t}", "public static void EmployeeHoursWorked() {\r\n\t\t\r\n\t\tJLabel e5 = new JLabel(\"Employee's Hours Worked:\");\r\n\t\te5.setFont(f);\r\n\t\tGUI1Panel.add(e5);\r\n\t\tGUI1Panel.add(employeeHoursWorked);\r\n\t\te5.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t}", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "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 }", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "public abstract String printEmployeeInformation();", "public static void getSalesInformation(Employee [] employee) {\n\t\tdouble total = 0;\n\t\tString report = \"-------List of employees with sales information-------\\n\";\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no Employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\ttotal += employee[i+1].getSales().getEachSales();\n\t\t\t\treport += ((i+1) + \" \" + employee[i+1].getName() + \" Sales: \" + employee[i+1].getSales().getEachSales() + \"\\n\"\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\treport += \"\\nTotal: \" + total;\n\t\t\tJOptionPane.showMessageDialog(null, report);\n\t\t}\n\t}", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "public void work(int hours) {\n\t\twhile(age++ < RETIREMENT_AGE) {//Method calculates total salary earned\n\n\t\tfor(int i = 1; i<=hours; i++)\n\t\t\tearned += hourlyIncome;\n\t\t\n\t\tfor(int j = 1; j<=OVERTIME; j++)\n\t\t\tearned += hourlyIncome;\n\t\t}\n\t}", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\temployeerecords e1 = new employeerecords(\"emp001\",\"John Smith\",\"IT\",150000);\n\t\temployeerecords e2 = new employeerecords(\"emp002\",\"Brenda Kein\",\"FINANCE\",250000);\n\t\temployeerecords e3 = new employeerecords(\"emp003\", \"Clark Hope\",\"HR\",100000);\n\t\temployeerecords e4 = new employeerecords(\"emp004\",\"Diane Garner\",\"IT\",200000);\n\t\temployeerecords e5 = new employeerecords(\"emp005\",\"Julian Aniston\",\"MARKETING\",125000);\n\t\t\n\t\t\n\t\tHashMap hm = new HashMap();\n\t\t\n\t\thm.put(1,e1);\n\t\thm.put(2,e2);\n\t\thm.put(3,e3);\n\t\thm.put(4,e4);\n\t\thm.put(5,e5);\n\t\t\n\t\tIterator trav = hm.entrySet().iterator();\n\t\t\n\t\twhile(trav.hasNext())\n\t\t{\n\t\t\t\n\t\tMap.Entry record = (Map.Entry)trav.next();\n\t\temployeerecords e=(employeerecords)record.getValue();\n\t\tSystem.out.print(record.getKey() + \" \");\n\t\tSystem.out.println(e.employeeid +\" \"+ e.employeename+\" \"+e.officedepartment+\" \"+e.empsalary);\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public static void empWageForMonth()\n {\n int WagePerHrs = 20;\n double totalSalary = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHr = 0;\n int numWorkingDays = 20;\n double salary = 0;\n for (int day=1; day<=numWorkingDays; day++)\n { \n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHr = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n\n case 2:\n empHr = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHr = 0;\n\n }\t\t \n salary = (empHr * WagePerHrs);\n System.out.println(\"Daily Emp Wages is :\" +salary);\n totalSalary = (totalSalary + salary);\n System.out.println(\"Monthly emp salary:\" +totalSalary);\n\t\t}\n}", "@Override\n public String getPayMemo() throws ParseException {\n return \"Employee ID: \" + getEmpID() + \", Pay Date: \" + HRDateUtils.strToDate(\"2019-10-01\");\n }", "public void report(){\n outTime = ElevatorControl.getTick();\n Report.addToReport(this);\n }", "public void printReport(){\n StdOut.println(name);\n double total = cash;\n for (int i=0; i<n; i++){\n int amount = shares[i];\n double price = StockQuote.priceOf(stocks[i]);\n total+= amount*price;\n StdOut.printf(\"%4d %5s \", amount, stocks[i]);\n StdOut.printf(\"%9.2f %11.2f\\n\", price, amount*price);\n }\n StdOut.printf(\"%21s %10.2f\\n\", \"Cash: \", cash);\n StdOut.printf(\"%21s %10.2f\\n\", \"Total: \", total);\n }", "@Test(priority = 1, groups= {\"regression\",\"smoke\"})\r\n\tpublic void PrintHospitals()\r\n\t{\r\n\t\tlogger= report.createTest(\"Printing Hospitals as per requirement\");\r\n\t\tDisplayHospitalNames hp=Base.nextPage1();\r\n\t\thp.selectLocation();\r\n\t\thp.selectHospital();\r\n\t\thp.applyFilters();\r\n\t\thp.hospitals();\r\n\t\thp.Back();\r\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Hours in the day\");\n //parameters for the morning hours\n printHours(\"AM\");\n System.out.println();\n //parameters for the evening hours\n printHours(\"PM\");\n }", "public Employee getHRhead();", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }", "public static void main(String[] args) {\n\t\t int isFullTime=1;\n\t\t int isPartTime=2;\n\t\t int isAbsent=0;\n\t\t int wageperhour=20;\n\t\t int hours;\n\t\t int totalhours=0;\n\t\t int wage=0;\n\t\t int sumofsalary=0;\n\t\t for (int i=0; i < 20; i++)\n\t {\n\t double attendance=Math.floor(Math.random()*10)%3;\n\t int value = (int) attendance;\n\t while(totalhours<90)\n\t {\n\t switch(value)\n\t {\n\t case 1:\n\t \t if(totalhours<100)\n\t \t {\n\t \t hours=16;\n\t \twage=wageperhour*hours;\n\t \tsumofsalary=sumofsalary+wage;\n\t \ttotalhours=totalhours+hours;\n\t \t }\n\t \tbreak;\n\t case 2:\n\t \t if(totalhours<100)\n\t \t {\n\t \t hours=6;\n\t \twage=wageperhour*hours;\n\t \tsumofsalary=sumofsalary+wage;\n\t \ttotalhours=totalhours+hours;\n\t \t }\n\t \tbreak;\n\t case 0:\n\t \t sumofsalary=sumofsalary+wage;\n\t \tbreak;\n\t }\n\t }\n\t }\n\t\t \n\t\t \n\t\t System.out.println(\"Total Hours of Month:\" + totalhours);\n\t\t System.out.println(\"Total Monthly Salary (20 days) which include parttime,fulltime and absence is:\" + sumofsalary);\n\t\t \n\t}", "public void print() {\n super.print();\r\n System.out.println(\"Hourly Wage: \" + hourlyWage);\r\n System.out.println(\"Hours Per Week: \" + hoursPerWeek);\r\n System.out.println(\"Weeks Per Year: \" + weeksPerYear);\r\n }", "private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException {\r\n\t\tSystem.out.println(\"Enter Employee First Name: \");\r\n\t\tString firstName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Last Name: \");\r\n\t\tString lastName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Type (Salaried or Hourly or Commissioned): \");\r\n\t\tString employeeType = reader.readLine();\r\n\r\n\t\tif (employeeType.equalsIgnoreCase(\"Salaried\")) {\r\n\t\t\tSystem.out.println(\"Please enter your monthly salary: \");\r\n\t\t\tdouble monthlySalary = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false);\r\n\t\t\temployeeDetails.add(salariedEmployee);\r\n\r\n\t\t\tsalariedEmployeeEarningReport(salariedEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\tSystem.out.println(\"Please enter your hourly rate: \");\r\n\t\t\tdouble hourlyRate = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tSystem.out.println(\"Please enter your weekly worked hours: \");\r\n\t\t\tdouble weeklyWorkedHours = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false);\r\n\t\t\temployeeDetails.add(hourlyEmployee);\r\n\r\n\t\t\thourlyEmployeeEarningReport(hourlyEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Commissioned\")) {\r\n\t\t\tSystem.out.println(\"Please enter your weekly sales amount: \");\r\n\t\t\tdouble weeklySalesAmount = Double.parseDouble(reader.readLine());\r\n\t\t\tfinal CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false);\r\n\t\t\temployeeDetails.add(commissionedEmployee);\r\n\r\n\t\t\tcommissionedEmployeeEarningReport(commissionedEmployee);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Invalid employee type\");\r\n\t\t}\r\n\t}", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "public void summary() {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur));\r\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n String emp1, emp2,emp3;\n int hours1, hours2, hours3;\n int xhours1, xhours2, xhours3;\n double rate1, rate2, rate3;\n double gross1, gross2, gross3;\n \n System.out.print(\"Enter first employee: \");\n emp1 = input.next();\n System.out.print(\"Enter second employee: \");\n emp2 = input.next();\n System.out.print(\"Enter third employee: \");\n emp3 = input.next();\n \n System.out.print(\"Enter the normal hours worked by \" + emp1+\" is: \");\n hours1 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by \"+ emp1+\" is: \");\n xhours1 = input.nextInt();\n System.out.print(\"Enter the rate for \" + emp1 + \" is: \");\n rate1 = input.nextDouble();\n gross1 = ((hours1*rate1) + (xhours1*(rate1/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n\",emp1,gross1);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp2);\n hours2 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \"+ emp2);\n xhours2 = input.nextInt();\n System.out.print(\"Enter the rate for : \"+ emp2);\n rate2 = input.nextDouble();\n gross2 = ((hours2*rate2) + (xhours2*(rate2/2)));\n System.out.printf(\"The gross pay for %s is: %2\\n\",emp2, gross2);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp3);\n hours3 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \" + emp3);\n xhours3 = input.nextInt();\n System.out.print(\"Enter the rate for: \" + emp3);\n rate3 = input.nextDouble();\n gross3 = ((hours3*rate3) + (xhours3*(rate3/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n: \",emp3, gross3);\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public final void Display() {\r\n\t\t//Displaying the Total Leave count\r\n\t\tSystem.out.println(\"Employee leave count per year : \" + myLeaveCount);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tEmployee employees[] = new Employee[4];\n\n\t// Assign objects of Employee to employees declared above\n\t\t\n\t\tSystem.out.println(\"Enter the Date Of Report :\" );\n\t\tString dtReport = Console.readLine();\n\t\t\n\t//\tCreate an object of EmployeeReport\n\n\t// Invoke display() method by passing the employee array\n\t}", "public void displayReport() {\r\n\t\tint ticketsSold = 0;\r\n\t\tint aTicketsSold = 0;\r\n\t\tint cTicketsSold = 0;\r\n\t\tint sTicketsSold = 0;\r\n\t\tdouble totalSales = 0;\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tif (current.getTicketType() == 'A') {\r\n\t\t\taTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 10;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'C') {\r\n\t\t\tcTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 5;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'S') {\r\n\t\t\tsTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 7.5;\r\n\t\t}\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\t\taTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 10;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\t\tcTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 5;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\t\tsTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 7.5;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total seats in theater: \" + numRows*numCols);\r\n\t\tSystem.out.println(\"Total tickets sold: \" + ticketsSold);\r\n\t\tSystem.out.println(\"Adult tickets sold: \" + aTicketsSold);\r\n\t\tSystem.out.println(\"Child tickets sold: \" + cTicketsSold);\r\n\t\tSystem.out.println(\"Senior tickets sold: \" + sTicketsSold);\r\n\t\tSystem.out.println(\"Total ticket sales: $\" + String.format(\"%.2f\", totalSales));\r\n\t}", "public void print() {\n\t\tSystem.out.print(salary);\n\t}", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "void work(){\n System.out.println(\"Emploee \"+ empID+\" is \"+age+\" years old\");\n }", "public int getEmpRatePerHour()\t{\n\t\treturn EMP_RATE_PER_HOUR;\n\t}", "public void logPayRaise(){\r\n\t\tSystem.out.println(\"Log message: employee \" + this.employeeName + \" has new salary: \" + this.salary);\r\n\t}", "public static void main(String[] args) {\n\t\temployee employee =new employee (\"hilal\",5000,20,2021);\n\t System.out.println(employee.toString());\n \n\t}", "public void printStatistics() throws SQLException {\n\t\t\temployeeDAO.printStatistics();\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n\r\n\t\tEmployee employees[] = new Employee[4];\r\n\r\n\t\temployees[0] = new HourlyEmployee(1, \"Jim\", \"Halpert\", 52, 25.99);\r\n\t\temployees[1] = new SalariedEmployee(2, \"Pam\", \"Beesly\", 3000);\r\n\t\temployees[2] = new CommissionEmployee(3, \"Michael\", \"Scott\", 0.08, 2000, 85000);\r\n\t\temployees[3] = new CommissionEmployee(4, \"Oscar\", \"Martinez\", 0.02, 1400, 62000);\r\n\r\n\t\t// For loop in array, and toString method, to display employees and salaries\r\n\r\n\t\tfor (int i = 0; i < employees.length; i++) {\r\n\t\t\tSystem.out.println(employees[i]);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t}", "private void viewAll(HashMap<Integer, Employee> viewAllEmployee) {\r\n\t\tSet<Entry<String, String>> set = employee.entrySet();\r\n\t\tset.stream().forEach((element) -> System.out.println(element.getValue() + \" \" + element.getKey()));\r\n\t}", "public static void main(String[] args) throws NullPointerException {\n\n\t\t// default constructor\n\t\tEmployeeInfo employeeInfo = new EmployeeInfo();\n\t\tEmployeeInfo employeeInfo1 = new EmployeeInfo(\" FORTUNE COMPANY \");\n\n\t\tEmployeeInfo emp1 = new EmployeeInfo(1, \"Abrah Lincoln\", \"Accounts\", \"Manager\", \"Hodgenville, KY\");\n\t\tEmployeeInfo emp2 = new EmployeeInfo(2, \"John F Kenedey\", \"Marketing\", \"Executive\", \"Brookline, MA\");\n\t\tEmployeeInfo emp3 = new EmployeeInfo(3, \"Franklin D Rossevelt\", \"Customer Realation\", \"Assistnt Manager\",\n\t\t\t\t\"Hyde Park, NY\");\n\n\n\t\t// Printing Employee information in this pattern\n\t\t// \"ID Name Number Department Position Years Worked Pension Bonus Total salary \"\n\n\t\tSystem.out.println(emp1.employeeId() + \"\\t\" + emp1.employeeName() + \"\\t\\t\" + emp1.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp1.getJobTitle() + \"\\t\\t\\t\" + emp1.getYearsWorked() + \"\\t\\t\" + emp1.calculateEmployeePension()\n\t\t\t\t+ \"\\t\" + emp1.calculateEmployeeBonus() + \"\\t\\t\" + emp1.calculateSalary());\n\n\t\tSystem.out.println(emp2.employeeId() + \"\\t\" + emp2.employeeName() + \"\\t\\t\" + emp2.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp2.getJobTitle() + \"\\t\\t\" + emp2.getYearsWorked() + \"\\t\\t\" + emp2.calculateEmployeePension() + \"\\t \"\n\t\t\t\t+ emp2.calculateEmployeeBonus() + \"\\t\\t\" + emp2.calculateSalary());\n\n\t\tSystem.out.println(emp3.employeeId() + \"\\t\" + emp3.employeeName() + \"\\t\" + emp3.getDepartment() + \"\\t\"\n\t\t\t\t+ emp3.getJobTitle() + \"\\t\" + emp3.getYearsWorked() + \"\\t\\t \" + emp3.calculateEmployeePension() + \"\\t\"\n\t\t\t\t+ emp3.calculateEmployeeBonus() + \" \\t\\t\" + emp3.calculateSalary());\n\n\n\n\t}", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRUtility.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n EmployeeTimed employeeTimed = null;\n try {\n employeeTimed = new EmployeeTimed(120000000000004L, \"Employee 1\", 100);\n } catch (IDException e) {\n e.printStackTrace();\n }\n /*\n try {\n employeeTimed.setID(1000000L);\n } catch (IDException e) {\n e.printStackTrace();\n }\n */\n System.out.println(employeeTimed.toString());\n\n// System.out.println(employeeSalaried.CalculateSalary());\n System.out.println(employeeTimed.CalculateSalary());\n\n }", "public String toString()\r\n{\r\nreturn super.toString() + \"\\n\" + \"Hours Worked\" + hoursWorked;\r\n//IMPLEMENT THIS\r\n}", "public void userAppointmentsReport() {\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getUserAppointments();\n System.out.println(reportsList.toArray().length);\n StringBuilder sb = new StringBuilder();\n sb.append(\"Appointments Added By User Report:\" + \"\\n\");\n\n reportsList.forEach(r -> sb.append(\"\\n\" + r.getUserName().toUpperCase() + \"\\n\" +\n r.getAppointmentCount() + \" appointments scheduled for \" + r.getCustomerCount() + \" customers\\n\"));\n reportLabel.setText(sb.toString());\n }", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public void printt() {\n for (int i=0 ; i<number ; i++) {\n System.out.println(\"LAB\" + (i+1) + \" ON \" + labs[i].getDay() + \" TEACHING BY: \" + labs[i].getTeacher());\n for (int j=0 ; j<labs[i].getCurrentSize() ; j++) {\n System.out.println(labs[i].getStudents()[j].getFirstName() + \" \" + labs[i].getStudents()[j].getLastName() + \" \" + labs[i].getStudents()[j].getId() + \" \" +labs[i].getStudents()[j].getGrade());\n }\n System.out.println(\"THE CAPACITY OF THE LAB IS: \" + labs[i].getCapacity());\n System.out.println(\"THE AVERAGE IS : \" + labs[i].getAvg());\n System.out.println();\n }\n }", "public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }", "@Override\n public String toString()\n {\n return super.toString() + \"::FULL TIME::Annual Salary \" + toDollars(annualSalary);\n }", "public String toString(){\n String s = \"\";\n s+=\"Employee: \"+name+\"\\n\";\n s+=\"Employee ID: \" + idnum +\"\\n\";\n s+=\"Current Position: \"+position+\"\\n\";\n s+=\"Current Salary: $\" +salary+\"\\n\";\n s+=\"Vacation Balance: \" + vacationBal+ \" days\\n\";\n s+=\"Bonus: $\" +annualBonus+\"\\n\";\n return s;\n }", "public void writeReport() {\n\t\tint gridSize = 55; // Total character spaces between the borders\n\t\tprint(\"+-------------------------------------------------------+\");\n\t\tprint(String.format(\"|%s|\", centerName(gridSize)));\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t/*\n\t\t * Loops through each room in the hotel and prints out the relevant\n\t\t * information on a new line And draws southern, eastern and western\n\t\t * borders to allow it to connect up to the main table.\n\t\t */\n\t\tfor (int i = 0; i < myHotel.getSize(); i++) {\n\t\t\tprint(formatRooms(i).toUpperCase());\n\t\t\tprint(formatAmount(i).toUpperCase());\n\t\t\tprint(formatSleepAmount(i).toUpperCase());\n\t\t\tprint(formatOccupied(i).toUpperCase());\n\t\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t}\n\t\t/*\n\t\t * After every hotel room's information has been displayed The overall\n\t\t * hotel information is displayed such as total occupancy, if there is a\n\t\t * vacancy. And if there is a vacancy, the total amount of free rooms\n\t\t * and beds.\n\t\t */\n\t\tprint(String.format(\"| Hotel\\t\\t|\\tTotal Occupancy:\\t%s\\t|\", getHotel().getTotalOccupancy()).toUpperCase());\n\t\tprint(String.format(\"| information:\\t|\\tHas Vacancies:\\t\\t%s\\t|\", convertBoolean(getHotel().getVacancies()))\n\t\t\t\t.toUpperCase());\n\t\tif (getHotel().getVacancies()) {\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Rooms:\\t\\t%s\\t|\", getHotel().getEmptyRooms()).toUpperCase());\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Beds:\\t\\t%s\\t|\", getHotel().getTotalVacancy()).toUpperCase());\n\t\t}\n\t\t/*\n\t\t * Draws a final southern border to close the table\n\t\t */\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t}", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "@Override\t\r\n\tpublic String getDailyWorkout() {\n\t\treturn \"practice 30 hrs daily\";\r\n\t}", "@Override\n public String getSavingsHours() {\n\n final String savingsHrs = getElement(getDriver(), By.className(SAVINGS_HOURS), TINY_TIMEOUT)\n .getText();\n setLogString(\"Savings Hours:\" + savingsHrs, true, CustomLogLevel.HIGH);\n return savingsHrs.substring(savingsHrs.indexOf(\"(\") + 1, savingsHrs.indexOf(\"h\"));\n }", "public static void main(String[] args){\n int emp_id;\n String emp_name;\n float basic_salary,HRA ,DA,TA,PF,Gross;\n\n Scanner scanner = new Scanner(System.in);\n emp_id = scanner.nextInt();\n System.out.println(\"Input employee id : \");\n\n emp_name = scanner.next();\n System.out.println(\"Input employee name: \");\n\n basic_salary = scanner.nextFloat();\n System.out.println(\"Input employee basic salary\");\n HRA = (basic_salary*10)/100;\n DA = (basic_salary*8)/100;\n TA = (basic_salary*9)/100;\n PF = (basic_salary*20)/100;\n Gross = (basic_salary + HRA + TA + DA - PF);\n\n System.out.println(\"HRA 10% of basic salary:\" +HRA);\n System.out.println(\"DA 8% of basic salary:\" +DA);\n System.out.println(\"TA 9% of basic salary:\" +TA);\n System.out.println(\"PF 20% of basic salary:\" +PF);\n System.out.println(\"Gross basic salary + HRA + DA + TA - PF :\" + Gross);\n\n\n }", "@Override\n\tpublic String outportinmoneylog(Employee em, String starttime, String endtime) {\n\t\tStringBuffer buffer = new StringBuffer(\"select m.machineno,SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.paystate=1 and m.empid=\")\n\t\t\t\t.append(em.getId());\n\t\tbuffer.append(addtime(starttime, endtime));\n\t\tList<Object[]> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\tString filename = gen_excelinmoney(lst);\n\n\t\treturn filename;\n\t}", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}" ]
[ "0.74494135", "0.66738683", "0.6577949", "0.6377804", "0.6374425", "0.6353882", "0.6211138", "0.6211061", "0.61167514", "0.6109261", "0.5981768", "0.5956424", "0.59467125", "0.59332025", "0.59322506", "0.59258366", "0.5902391", "0.5874628", "0.5854812", "0.5835949", "0.5805292", "0.5801251", "0.57966447", "0.5787056", "0.5782341", "0.5775854", "0.577401", "0.5773745", "0.57710123", "0.5750823", "0.5741927", "0.5738889", "0.57139105", "0.57006615", "0.5678838", "0.56623095", "0.5654034", "0.5639718", "0.5637174", "0.56355965", "0.5629604", "0.5615308", "0.56003404", "0.5576331", "0.556811", "0.5563802", "0.5554933", "0.5547367", "0.55381703", "0.5521063", "0.552042", "0.55145466", "0.5508621", "0.5500448", "0.54892826", "0.5484399", "0.54747385", "0.5468371", "0.54652065", "0.54582334", "0.54505026", "0.54438365", "0.54432696", "0.543854", "0.543579", "0.5435209", "0.54341507", "0.5421636", "0.54196125", "0.5415897", "0.54140526", "0.54005414", "0.5399039", "0.5394888", "0.538507", "0.53849447", "0.53836703", "0.53750247", "0.5364842", "0.5362769", "0.53601164", "0.53540105", "0.5352072", "0.534647", "0.53431076", "0.5333561", "0.5315514", "0.53062433", "0.5302974", "0.52974397", "0.5296377", "0.5292103", "0.5291645", "0.5285079", "0.5284853", "0.5280397", "0.5277722", "0.52741164", "0.5268032", "0.52549666" ]
0.77725
0
This method is used to choose and reward a salaried employee
private static void rewardSalariedEmployee(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException { System.out.print("Do you want to reward an employee? (y/n): "); String rewardFlag = reader.readLine(); if (!rewardFlag.isEmpty() || rewardFlag.equalsIgnoreCase("y")) { System.out.println("Please choose any salaried employee name for the reward: "); final String rewardedEmployeeName = reader.readLine(); boolean employeeFound = false; for (Employee employee : employeeDetails) { if (employee.getName().equalsIgnoreCase(rewardedEmployeeName)) { if (!employee.getClassType().equalsIgnoreCase("Salaried")) { System.out.println("\nERROR: Please choose only salaried employee for the reward"); employeeFound = true; } else if (employee.isRewarded()) { System.out.println("\nERROR: This employee has already been awarded, please choose another employee"); employeeFound = true; } else { employee.setRewarded(true); employeeFound = true; printEmployeeDetails(employeeDetails); } break; } } if (!employeeFound) { System.out.println("\nERROR: Employee not found!"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "public static void EmployeeTest()\r\n\t{\n\t\t\tScanner getVar = new Scanner(System.in);\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t//Arrays to hold final values.\r\n\t\t\tString[] employeeNameArr = new String[100];\r\n\t\t\tdouble[] employeeSalArr = new double[100];\r\n\t\t\t\r\n\t\t\t//Variable for user choice.\r\n\t\t\tint choice;\r\n\t\t\t\r\n\t\t\t//Loop the menu until exit.\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t//Creating the menu.\r\n\t\t\t\tSystem.out.println(\"1. Create employee\\n2. Give Employee 10% Raise\\n3. Display Employees\\n4. Exit\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"Enter a choice: \");\r\n\t\t\t\tchoice = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tswitch(choice)\r\n\t\t\t\t{\r\n\t\t\t\t/*CREATE EMPLOYEE: ASKS FOR USERS NAME AND MONTHLY SALARY\r\n\t\t\t\t \t\t\t\tCONVERTS THE MONTHLY SALARY TO YEARLY SALARY\r\n\t\t\t\t \t\t\t\tENSURES THAT THE EMPLOYEE IS PAYED.*/\r\n\t\t\t\tcase 1:\r\n\t\t\t\t{\r\n\t\t\t\t\t//Setting Employee's First Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's First Name: \");\r\n\t\t\t\t\tString fName = getVar.next();\r\n\t\t\t\t\tsetFirstName(fName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Last Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's Last Name: \");\r\n\t\t\t\t\tString lName = getVar.next();\r\n\t\t\t\t\tsetLastName(lName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Monthly Salary\r\n\t\t\t\t\twhile(true) {\r\n\t\t\t\t\t\tSystem.out.print(\"Enter the Employee's MONTHLY Salary: \");\r\n\t\t\t\t\t\tdouble createSal = getVar.nextDouble()*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Making Sure the Employee is Paid Properly\r\n\t\t\t\t\t\tif(createSal<=0) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid Salary\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tsetMonthlySalary(createSal);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Pushes the names and values into an array.\r\n\t\t\t\t\t\t\tfor(int i = 0; i <= employeeNameArr.length; i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(employeeNameArr[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\temployeeNameArr[i] = getFirstName() + \" \" + getLastName();\r\n\t\t\t\t\t\t\t\t\temployeeSalArr[i] = getMonthlySalary();\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t/*GIVE EMPLOYES 10% RAISE: ADDS 10% TO THE MONTHLY SALARY\r\n\t\t\t\t \t\t\t\t\t\tALLOWS USER TO CHOOSE EMPLOYEE FROM LIST\r\n\t\t\t\t \t\t\t\t\t\tMAKES SURE THERE IS AT LEAST ONE EMPLOYEE*/\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Confirming that there is at least one employee\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Listing each employee and their yearly salary (i+1 to avoid displaying 0)\r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println((i+1)+\". \"+employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//User inputs which employee gets the raise.\r\n\t\t\t\t\tSystem.out.print(\"Which employee should receive the raise? : \");\r\n\t\t\t\t\tint salChoice = getVar.nextInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Calculating the raise to the monthly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = (employeeSalArr[salChoice-1]/12) * .10 + employeeSalArr[salChoice-1]/12;\r\n\t\t\t\t\t//Converting monthly salary to yearly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = employeeSalArr[salChoice-1]*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Outputting new information.\r\n\t\t\t\t\tSystem.out.println(\"New yearly salary for \" + employeeNameArr[salChoice-1] + \": \" + employeeSalArr[salChoice-1] + \"\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*DISPLAY EMPLOYEES: MAKES SURE THERE IS AT LEAST ONE EMPLOYEE\r\n\t\t\t\t * \t\t\t\t\tLISTS ALL AVAILABLE EMPLOYEES IN ORDER OF CREATION*/\r\n\t\t\t\tcase 3:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Displaying the employees \r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*EXIT: EXITS THE PROGRAM\r\n\t\t\t\t * \t\tFREES THE SCANNERS FROM MEMORY*/\r\n\t\t\t\tcase 4:\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Logging out...\");\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\tgetVar.close();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public static void main(String[] args) {\n String inputLine = \"\";\n char action = ' ';\n Employee[] employees = new Employee[] {\n new Employee(\"John\", \"+1-518-383-9901\", 9000),\n new Employee(\"Tom\", \"+1-518-383-6664\", 12000),\n new Employee(\"Diane\", \"+1-518-383-4025\", 5000),\n new Employee(\"Robert\", \"+1-518-383-7971\", 16000),\n new Employee(\"Patrick\", \"+1-518-383-5503\", 7000),\n new Employee(\"David\", \"+1-518-383-9905\", 8000),\n new Employee(\"Kate\", \"+1-518-383-3334\", 2000),\n new Employee(\"Mary\", \"+1-518-383-4545\", 4500),\n new Employee(\"Steven\", \"+1-518-383-7845\", 3500),\n new Employee(\"Bill\", \"+1-518-383-0456\", 7500),\n new Employee(\"Peter\", \"+1-518-383-3578\", 2500),\n new Employee(\"Mike\", \"+1-518-383-3895\", 3500),\n new Employee(\"Amanda\", \"+1-518-383-1001\", 4000)\n } ;\n Company company = new Company(\"1741 Technology Drive, Suite 400, San Jose, California 95110\", \"+1-408-273-8900\", employees);\n\n while (true) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Input 1 to add new employee/ Input 2 to remove employee / Input 3 to get list of company employees\");\n System.out.println(\"Input 3 to print sum of all salaries/ Input 4 to print average salary / Input 5 to print employee name with the highest salary\");\n System.out.println(\"Input 7 to Exit\");\n inputLine = br.readLine();\n action = inputLine.charAt(0);\n\n switch (action) {\n case '1':\n System.out.print(\"Input employee name: \");\n String name = br.readLine();\n System.out.print(\"Input employee phone: \");\n String phone = br.readLine();\n System.out.print(\"Input employee salary: \");\n String salaryStr = br.readLine();\n int salary = Integer.parseInt(salaryStr);\n Employee emp = new Employee(name, phone, salary);\n company.addEmployee(emp);\n break;\n case '2':\n System.out.println(\"Input name of employee to remove\");\n String employeeName = br.readLine();\n company.removeEmployee(employeeName);\n break;\n case '3':\n System.out.println(\"Here is list of all company employees\");\n company.printEmployees();\n break;\n case '4':\n System.out.println(\"Sum of all salaries is \" + company.getSumOfAllSalaries());\n break;\n case '5':\n System.out.println(\"Average company salary is \" + company.getAverageSalary());\n break;\n case '6':\n System.out.println(\"Employee name with the highest salary is \" + company.getEmployeeNameWithMaxSalary());\n break;\n case '7': System.exit(0);\n default:\n System.out.println(\"You have written wrong or not supported action!\");\n break;\n }\n }\n catch (NumberFormatException e) {\n System.out.println(\"You entered non-number salary for employee!\");\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void employeeServiceApprove() {\n\t\t\n\t\tEmployee employee = new Employee();\n\t\t employee.approve();\n\t}", "private static void profelEmployee(Employee e) {\n\t\tString choix = scannerResultat(e.affichageMenu());\n\t\twhile (!choix.equalsIgnoreCase(\"Q\")) {\n\t\t\tif (choix.equalsIgnoreCase(\"A\")) {\n\t\t\t\te.CreeUneOperation();\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"B\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"C\")) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"D\")) {\n\t\t\t\te.afficherLaListe();\n\t\t\t}\n\t\t\tif (choix.equalsIgnoreCase(\"E\")) {\n\t\t\t\tchoix = \"Q\";\n\t\t\t}\n\t\t}\n\t}", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public void employeeMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Employee Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Register a game |\");\n System.out.println(\"| 2. Remove a game |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 3. Register an album |\");\n System.out.println(\"| 4. Remove an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. Register a customer |\");\n System.out.println(\"| 6. Upgrade a customer |\");\n System.out.println(\"| 7. Remove a customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 8. Return rented item |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. View all games and albums (sorted) |\");\n System.out.println(\"| 10. View all customers |\");\n System.out.println(\"| 11. View all rentals and history |\");\n System.out.println(\"| 12. View total rent profit |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Send message to customer |\");\n System.out.println(\"| 14. Send message to employee |\");\n System.out.println(\"| 15. Read my messages \" + messageController.checkNewMsg(activeId, \"Employee\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 16. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> dartController.addGame();\n case \"2\" -> dartController.deleteProduct(\"Game\");\n case \"3\" -> dartController.addAlbum();\n case \"4\" -> dartController.deleteProduct(\"Album\");\n case \"5\" -> userController.addCustomer();\n case \"6\" -> userController.upgradeCustomerView(null);\n case \"7\" -> userController.deleteCustomer();\n case \"8\" -> dartController.returnRental();\n case \"9\" -> productSortView(activeId);\n case \"10\" -> userController.displayCustomers(false);\n case \"11\" -> dartController.viewCurrentRentals();\n case \"12\" -> dartController.viewRentalTotalProfit();\n case \"13\" -> messageController.buildMessage(activeId, \"Employee\", \"Customer\", null, \"message\", null);\n case \"14\" -> messageController.buildMessage(activeId, \"Employee\", \"Employee\", null, \"message\", null);\n case \"15\" -> messageController.openInbox(activeId, \"Employee\");\n case \"16\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }", "public static void menu(Scanner input, ArrayList<Employee> newEmployee){\n String menuAns;\n int userAnswer = 0;\n \n //Infinite loop until user selected exit\n while(true){\n System.out.print(\"\\nWhat would you like to do at this time?\"+\n \"\\n1) Add Employee\"+ \n \"\\n2) Add Shift Supervisor\"+ \n \"\\n3) Add Production Worker\"+\n \"\\n4) Add Team Leader\"+\n \"\\n5) Print employees\"+\n \"\\n6) Exit the Program\"+\n \"\\nPlease enter a choice: \");\n menuAns = input.nextLine();\n userAnswer = UtilityMethods.verifyInt(input, menuAns);\n switch(userAnswer){\n case 1: \n addEmployee(input, newEmployee);\n break;\n \n case 2:\n addShiftSupervisor(input, newEmployee);\n break;\n \n case 3:\n addProductionWorker(input, newEmployee);\n break;\n \n case 4:\n addTeamLeader(input, newEmployee);\n break;\n\n case 5:\n printEmployees(newEmployee);\n break;\n \n case 6:\n farewell();\n \n }\n } \n }", "public static void work(Employee [] employee) {\n\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\tif (employee[i+1].isAdminOrNot()) { //Administrative\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Rental Customer Info.\", \"Sales Info.\"\n\t\t\t\t\t\t, \"Employee Info.\", \"Vehicle Info.\", \"Exit\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Administrative user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Sales Information\");\n\t\t\t\t\t\t\t\tgetSalesInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Information\");\n\t\t\t\t\t\t\t\tgetEmployeeInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Vehicle Information\");\n\t\t\t\t\t\t\t\tgetVehicleInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\tdefault: JOptionPane.showMessageDialog(null, \"Error\");\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t} else { //Regular\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Enter Customer Information\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Regular user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Enter Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t}\n\t\t}\n\t}", "public static void rentVehicle(Employee employee) {\n\t\t\n\t\tString brand;\n\t\tdo {\n\t\t\tbrand = JOptionPane.showInputDialog(\"Please enter a brand name.\");\n\t\t\tif (!employee.getVehicle().setBrand(brand)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: invalid brand name!\");\n\t\t\t}\n\t\t} while(!employee.getVehicle().setBrand(brand));\n\t\tdouble mileage;\n\t\tdo {\n\t\t\ttry {\n\t\t\tmileage = Double.parseDouble(JOptionPane.showInputDialog(\"Please enter mileage\"));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tmileage = -1;\n\t\t\t}\n\t\t\tif (!employee.getVehicle().setMileage(mileage)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: invalid mileage amount!\");\n\t\t\t}\n\t\t} while(!employee.getVehicle().setMileage(mileage));\n\t\tString name;\n\t\tdo {\n\t\t\tname = JOptionPane.showInputDialog(\"Please enter a name of the vehicle.\");\n\t\t\tif (!employee.getVehicle().setName(name)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: invalid name of the vehicle!\");\n\t\t\t}\n\t\t} while(!employee.getVehicle().setName(name));\n\t\tString plate;\n\t\tdo {\n\t\t\tplate = JOptionPane.showInputDialog(\"Please enter a plate number.\");\n\t\t\tif (!employee.getVehicle().setPlate(plate)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: invalid plate number!\");\n\t\t\t}\n\t\t} while(!employee.getVehicle().setPlate(plate));\n\t\tint year;\n\t\tdo {\n\t\t\ttry {\n\t\t\tyear = Integer.parseInt(JOptionPane.showInputDialog(\"Please enter a year of this vehicle.\"));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tyear = -1;\n\t\t\t}\n\t\t\tif (!employee.getVehicle().setYear(year)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error: year of the vehicle!\");\n\t\t\t}\n\t\t} while(!employee.getVehicle().setYear(year));\n\t\temployee.getVehicle().setAvailability(JOptionPane.showConfirmDialog(null, \"Is this vehicle available?\",\n\t\t\t\t\"Availability\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION);\n\t\tJOptionPane.showMessageDialog(null, employee.getVehicle().toString());\n\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\tif(employees.size() >= 1){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeId()== Integer.parseInt(empIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tempJTextArea.setText(\"Employee ID: \"+employee.getEmployeeId()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Name: \" +employee.getEmployeeName() \n\t\t\t\t\t\t\t\t\t\t+\"\\n Access Level: \" +employee.getAccess()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Password: \" +employee.getPassword()\n\t\t\t\t\t\t\t\t\t\t+\"\\n Salary: \" +employee.getSalary());\n\t\t\t\t\t\t\t\tempIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Id should be a number.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Employees Found\");\n\t\t\t\t}\n\t\t\t}", "public void employeeAttendanceUsingCase() {\n\t\tswitch (randomCheck) {\n\t\tcase 1:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t}\n\t}", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public abstract void raiseSalary();", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public int employeeSalaryForBenefits(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n return actualSalaryOfEmployee;\n\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(employees.size() >= 1){\n\t\t\t\t\tif(empNameCombo.getSelectedIndex() != 0){\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeName().equalsIgnoreCase(empNameCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tempJTextArea.setText(\"Employee ID: \"+employee.getEmployeeId()\n\t\t\t\t\t\t\t+\"\\n Name: \" +employee.getEmployeeName() \n\t\t\t\t\t\t\t+\"\\n Access Level: \" +employee.getAccess()\n\t\t\t\t\t\t\t+\"\\n Password: \" +employee.getPassword()\n\t\t\t\t\t\t\t+\"\\n Salary: \" +employee.getSalary());\n\t\t\t\t\t\t\tempNameCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Employee.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Employees Found\");\n\t\t\t\t}\n\t\t\t}", "public static void empWageForMonth()\n {\n int WagePerHrs = 20;\n double totalSalary = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHr = 0;\n int numWorkingDays = 20;\n double salary = 0;\n for (int day=1; day<=numWorkingDays; day++)\n { \n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHr = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n\n case 2:\n empHr = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHr = 0;\n\n }\t\t \n salary = (empHr * WagePerHrs);\n System.out.println(\"Daily Emp Wages is :\" +salary);\n totalSalary = (totalSalary + salary);\n System.out.println(\"Monthly emp salary:\" +totalSalary);\n\t\t}\n}", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException {\r\n\t\tSystem.out.println(\"Enter Employee First Name: \");\r\n\t\tString firstName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Last Name: \");\r\n\t\tString lastName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Type (Salaried or Hourly or Commissioned): \");\r\n\t\tString employeeType = reader.readLine();\r\n\r\n\t\tif (employeeType.equalsIgnoreCase(\"Salaried\")) {\r\n\t\t\tSystem.out.println(\"Please enter your monthly salary: \");\r\n\t\t\tdouble monthlySalary = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false);\r\n\t\t\temployeeDetails.add(salariedEmployee);\r\n\r\n\t\t\tsalariedEmployeeEarningReport(salariedEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\tSystem.out.println(\"Please enter your hourly rate: \");\r\n\t\t\tdouble hourlyRate = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tSystem.out.println(\"Please enter your weekly worked hours: \");\r\n\t\t\tdouble weeklyWorkedHours = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false);\r\n\t\t\temployeeDetails.add(hourlyEmployee);\r\n\r\n\t\t\thourlyEmployeeEarningReport(hourlyEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Commissioned\")) {\r\n\t\t\tSystem.out.println(\"Please enter your weekly sales amount: \");\r\n\t\t\tdouble weeklySalesAmount = Double.parseDouble(reader.readLine());\r\n\t\t\tfinal CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false);\r\n\t\t\temployeeDetails.add(commissionedEmployee);\r\n\r\n\t\t\tcommissionedEmployeeEarningReport(commissionedEmployee);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Invalid employee type\");\r\n\t\t}\r\n\t}", "public Employee(String firstName, String lastName, int salary, int bonus) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.salary = salary;\n this.bonus = bonus;\n this.taxableSalary=this.salary+this.bonus-this.taxAllowance;\n }", "public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(viewEmpIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tif(editEmpNameField.getText().isEmpty() || editEmpAccessField.getText().isEmpty() || \n\t\t\t\t\t\t\teditEmpSalaryField.getText().isEmpty() || editEmpPasswordField.getText().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Complete All Fields\");\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tif(employee.getEmployeeId() == Integer.parseInt(viewEmpIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\temployee.setEmployeeName(editEmpNameField.getText());\n\t\t\t\t\t\t\t\temployee.setAccess(Integer.parseInt(editEmpAccessField.getText()));\n\t\t\t\t\t\t\t\temployee.setSalary(Double.parseDouble(editEmpSalaryField.getText()));\n\t\t\t\t\t\t\t\temployee.setPassword(Integer.parseInt(editEmpPasswordField.getText()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Updated\");\n\t\t\t\t\t\t\t\tviewEmpIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\teditEmpNameField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpAccessField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpSalaryField.setText(\"\");\n\t\t\t\t\t\t\t\teditEmpPasswordField.setText(\"\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Employee.\");\n\t\t\t\t}\n\t\t\t}", "public void manage(int employeeID){\n ID = employeeID;\n int choice;\n do {\n choice = GetChoiceFromUser.getSubChoice(5,new MenuForBranchEmployee(data.getBranchEmployee(employeeID).getFirstName()));\n if (choice==1) {\n enterShipment();\n } else if (choice == 2){\n removeShipment();\n }\n else if(choice == 3){\n addCustomer();\n }\n else if(choice == 4){\n removeCustomer();\n }\n else if(choice == 5){\n updateStatusOfShipment(data.getBranchEmployee(ID).getFirstName(),data.getBranchEmployee(ID).getBranchID());\n }\n\n }while (choice!=0);\n }", "private void updateEmployeeSeating() {\n BookingModel bookingModel1 = new BookingModel();\n UserModel userModel1 = new UserModel();\n try {\n bookingModel1.updateBookingSeat(employeeID, seatNum);\n userModel1.setPreviousSeat(seatNum);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void extensionEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name of the employee:\");\n\t\t\tString nameEmployee = reader.nextLine();\n\t\t\tSystem.out.println(\"How do you want to perform the search:\");\n\t\t\tSystem.out.println(\"L\");\n\t\t\tSystem.out.println(\"Z\");\n\t\t\tSystem.out.println(\"X\");\n\t\t\tSystem.out.println(\"O\");\n\t\t\tSystem.out.println(\"R. spiral by row\");\n\t\t\tchar travel = reader.nextLine().charAt(0);\n\t\t\tSystem.out.println(\"The extension of the cubicle of the employee is \"+theHolding.extensionEmployee(selected, nameEmployee, travel));\n\t\t}\n\t}", "public void createExpReward() {\n try {\n int exp = RandomBenefitModel.getExpReward(encounter, characterVM.getDistance());\n if (exp > 0) characterVM.addExp(exp);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n String emp1, emp2,emp3;\n int hours1, hours2, hours3;\n int xhours1, xhours2, xhours3;\n double rate1, rate2, rate3;\n double gross1, gross2, gross3;\n \n System.out.print(\"Enter first employee: \");\n emp1 = input.next();\n System.out.print(\"Enter second employee: \");\n emp2 = input.next();\n System.out.print(\"Enter third employee: \");\n emp3 = input.next();\n \n System.out.print(\"Enter the normal hours worked by \" + emp1+\" is: \");\n hours1 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by \"+ emp1+\" is: \");\n xhours1 = input.nextInt();\n System.out.print(\"Enter the rate for \" + emp1 + \" is: \");\n rate1 = input.nextDouble();\n gross1 = ((hours1*rate1) + (xhours1*(rate1/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n\",emp1,gross1);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp2);\n hours2 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \"+ emp2);\n xhours2 = input.nextInt();\n System.out.print(\"Enter the rate for : \"+ emp2);\n rate2 = input.nextDouble();\n gross2 = ((hours2*rate2) + (xhours2*(rate2/2)));\n System.out.printf(\"The gross pay for %s is: %2\\n\",emp2, gross2);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp3);\n hours3 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \" + emp3);\n xhours3 = input.nextInt();\n System.out.print(\"Enter the rate for: \" + emp3);\n rate3 = input.nextDouble();\n gross3 = ((hours3*rate3) + (xhours3*(rate3/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n: \",emp3, gross3);\n }", "@Override\n\tpublic void approveAcceptedOffer(String matriculation) {\n\t\tofferman.approveAcceptedOffer(matriculation);\n\t\t\n\t}", "@Then(\"^user selects the accommodation and enters the quantity$\")\n\tpublic void user_selects_the_accommodation_and_enters_the_quantity() throws Throwable {\n\t\tamendFerry.updateExtraAccom();\n\t\tamendFerry.updateExtra();\n\t}", "public static void empWage()\n {\n int WagePerHrs = 20;\n double DailyEmpWage = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHrs;\n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHrs = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n case 2:\n empHrs = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHrs = 0;\n }\n DailyEmpWage = WagePerHrs * empHrs;\n System.out.println(\"Daily Emp Wages is :\" +DailyEmpWage);\n }", "@Test\n public void getAvailableEmployeeById() {\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n\n //creating dummy shiftlist\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n //test\n assertNotNull(availableEmployeeResource.getAvailableEmployees(new AvailableEmployee(2,\"2017-02-02\",3)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser(\"dummy3\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy3\"));\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tLong id = (Long) employeeTable.getValueAt(employeeTable.getSelectedRow(), 6);\n\t\t\t\tbuchungssystem.models.employee.Employee employee = new buchungssystem.models.employee.Employee(id);\n\t\t\t\tString firstName = (String) employeeTable.getValueAt(employeeTable.getSelectedRow(), 0);\n\t\t\t\tif ( !firstName.equals(\"Superadmin\") ) {\n\t\t\t\t\treturnCode = currentUser.SoftDeleteEmployee(employee);\n\t\t\t\t} else {\n\t\t\t\t\tMainFrame.popupWindow(\"Admin kann nicht gelöscht werden\", 400, 100, Color.RED);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (returnCode) {\n\t\t\t\t\tinitTable();\n\t\t\t\t\tgetEmployeeTableModel().fireTableDataChanged();\n\t\t\t\t\tMainFrame.popupWindow(\"Mitarbeiter erfolgreich gelöscht\", 300, 100, Color.RED);\n\t\t\t\t}\n\t\t\t}", "public void calculateSalary() {\n if (hours < 0 || hourlyRate < 0) {\r\n salary = -1;\r\n }\r\n else if (hours > 40) {\r\n salary = 40 * hourlyRate;\r\n }\r\n else {\r\n salary = hours * hourlyRate;\r\n }\r\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "private static void updateEmployeeHelper() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Insert Employee's ID\");\n\t\tString newID = input.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insert Current name\");\n\t\tString newName = input.nextLine();\n\n\t\tSystem.out.println(\"Insert Old Department\");\n\t\tString oldDepartment = input.nextLine();\n\n\t\tSystem.out.println(\"Insert New Department\");\n\t\tString newDepartment = input.nextLine();\n\n\t\tems2.updateEmployee(newID, newName, oldDepartment, newDepartment);\n\t}", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "private double calculate(boolean salary, double employeeShift, double hrsIn, double payRate){\n\n if (salary){// --------- Salaried employee\n return payRate * hrsIn;\n }\n\n if (employeeShift == 2){\n payRate = payRate * 0.05 + payRate;// ------------ adjust payRate for 2nd shift --------\n\n }\n\n if (employeeShift == 3){\n payRate = payRate * 0.10 + payRate;// ------------ adjust payRate for 3rd shift --------\n\n }\n\n if (hrsIn <= 40) {//----------- check for overtime\n return hrsIn * payRate;//--------No O.T.\n }\n else{// ----------- Calculate O.T. rate\n double otHrs = hrsIn - 40;\n double otRate = payRate * 1.5;\n return (payRate * 40) + (otHrs * otRate);\n }\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString firstName = (String) employeeTable.getValueAt(employeeTable.getSelectedRow(), 0);\n\t\t\t\tLong employeeID = (Long) employeeTable.getValueAt(employeeTable.getSelectedRow(), 6);\n\t\t\t\tif ( !firstName.equals(\"Superadmin\") ) {\n\t\t\t\t\temployeeUpdateDialog.setEmployeeID(employeeID);\n\t\t\t\t\temployeeUpdateDialog.setVisible(true);\n\t\t\t\t} else {\n\t\t\t\t\tMainFrame.popupWindow(\"Superadmin darf nicht geändert werden\", 400, 100, Color.RED);\n\t\t\t\t}\n\t\t\t}", "protected OfferApproval breakWithEmployeeByOccupation(RetailscmUserContext userContext, String offerApprovalId, String occupationId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithOccupation(offerApproval, occupationId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "public static double calculateEmployeeBonus(int employeeSalaryForBenefits, int numberOfYearsWithCompany, String employeePerformance) {\n double total = 0;\n\n try {\n Scanner stdin = new Scanner(System.in);\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n numberOfYearsWithCompany = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if (Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0])) {\n numberOfYearsWithCompany--;\n }\n\n System.out.println(\"Please enter this year's performance, as indicated by HR: \");\n employeePerformance = stdin.nextLine();\n stdin.close();\n\n if (numberOfYearsWithCompany >= 1) {\n if (employeePerformance.equals(\"Excellent\")) {\n total = (employeeSalaryForBenefits * 0.15);\n } else if (employeePerformance.equals(\"Good\")) {\n total = (employeeSalaryForBenefits * 0.10);\n } else if (employeePerformance.equals(\"Average\")) {\n total = (employeeSalaryForBenefits * 0.05);\n } else if (employeePerformance.equals(\"Bad\")) {\n total = 0;\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"This will be the yearly bonus for this Employee's performance: \" + total);\n return total;\n }", "public static double calculateEmployeePension(int employeeSalaryForBenefits) {\n double total = 0;\n try {\n Scanner stdin = new Scanner(System.in);\n\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n stdin.close();\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n Integer yearsEmployed = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if ( Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0]) ) {\n yearsEmployed--;\n }\n\n total = (((employeeSalaryForBenefits * 12) * 0.05) * yearsEmployed);\n\n\n\n\n System.out.println(\"Total pension to receive by employee based on \" + yearsEmployed + \" years with the company \" +\n \"(5% of yearly salary for each year, based on employee's monthly salary of $\" + employeeSalaryForBenefits + \"): \" + total);\n\n }\n catch (NumberFormatException e) {\n e.printStackTrace();\n }\n return total;\n }", "public static void addShiftSupervisor(Scanner input, ArrayList<Employee> newEmployee){\n \n ShiftSupervisor newSupervisor = new ShiftSupervisor();\n String empNumber, empHireDate, salary, bonus;\n \n System.out.print(\"Please enter the employee's first and last name: \");\n newSupervisor.setName(input.nextLine());\n System.out.print(\"Please enter the new employee's Employee Number.\\nThe Employee Number must match XXX-L including the dash where X is a digit and L is a letter A-M: \");\n empNumber = input.nextLine();\n newSupervisor.setNumber(verifyEmpNum(input, empNumber));\n System.out.print(\"Please enter the new employee's hire date.\\nMake sure the date you enter matches IX/JX/KXXX including the slashes\"\n + \"\\nwhere I is a 0 or 1, J is 0-3, K is a 1 or 2, and X is a digit 0-9: \");\n empHireDate = input.nextLine();\n newSupervisor.setDate(verifyHireDate(input, empHireDate));\n System.out.print(\"Please enter the salary the new Supervisor will be paid as a double: \");\n salary = input.nextLine();\n newSupervisor.setSalary(UtilityMethods.verifyDouble(input, salary));\n System.out.print(\"Please enter the bonus the new Supervisor could be paid as a double: \");\n bonus = input.nextLine();\n newSupervisor.setBonus(UtilityMethods.verifyDouble(input, bonus));\n \n newEmployee.add(newSupervisor);\n }", "public void id700_1() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"general\");\n\t\tchangeEmployeeInfo(driver,\"general\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_1 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_1 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}", "public boolean requestBonus(Employee e, double bonus){\n BusinessLead lead = (BusinessLead) e;\n return lead.approveBonus(e,bonus);\n }", "public void sauverEmploye(Employe employe) {\n\n\t}", "public EmployeeBoarding addEmployee(RetailscmUserContext userContext, String employeeBoardingId, String companyId, String title, String departmentId, String familyName, String givenName, String email, String city, String address, String cellPhone, String occupationId, String responsibleForId, String currentSalaryGradeId, String salaryAccount , String [] tokensExpr) throws Exception;", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// Give all details of first employee\n\t\tSystem.out.println(\"Give the information about first employee\");\n\t\tSystem.out.println(\"Name of first employee\");\n\n\t\t// Take name of first employee from user\n\t\tString name1 = sc.next();\n\n\t\tSystem.out.println(\"Department id of first employee\");\n\n\t\t// Take department id of first employee from user\n\t\tString id1 = sc.next();\n\n\t\tSystem.out.println(\"Salary of first employee\");\n\n\t\t// Take salary of first employee from user\n\t\tint salary1 = sc.nextInt();\n\n\t\t// Provide details of first employee\n\t\tEmployeeQ7 e1 = new EmployeeQ7(name1, id1, salary1);\n\n\t\t// Give all details of second employee\n\t\tSystem.out.println(\"Give the information about second employee\");\n\t\tSystem.out.println(\"Name of second employee\");\n\n\t\t// Take name of second employee from user\n\t\tString name2 = sc.next();\n\n\t\tSystem.out.println(\"Department id of second employee\");\n\n\t\t// Take department id of second employee from user\n\t\tString id2 = sc.next();\n\n\t\tSystem.out.println(\"salary of second employee\");\n\n\t\t// Take salary of second employee from user\n\t\tint salary2 = sc.nextInt();\n\n\t\t// Provide details of second employee\n\t\tEmployeeQ7 e2 = new EmployeeQ7(name2, id2, salary2);\n\n\t\t// Call compareEmployeeSalary method and provide details of both\n\t\t// employee\n\t\tcompareEmployeeSalary(e1, e2);\n\n\t}", "protected OfferApproval breakWithEmployeeByCurrentSalaryGrade(RetailscmUserContext userContext, String offerApprovalId, String currentSalaryGradeId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithCurrentSalaryGrade(offerApproval, currentSalaryGradeId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "@GetMapping(\"/employeewiseapprovals\")\n\t\tpublic List<Approval> getEmployeeWiseApprovals(@RequestParam(\"employeeId\") int employeeId)\n\t\t{\n\t\t\tList<Approval> approval= service.searchemployeewiseapproval(employeeId);\n\t\t\treturn approval;\n\t\t}", "public boolean approveCheckIn(SoftwareEngineer e){\n int i;\n\n for(i=0;i<this.curHeadCount;i++){\n if(employee[i].equals(e)) break;\n }\n\n return (i<this.curHeadCount && e.access);\n }", "public boolean ApproveReimbursement(int employeeID, int reimburseID, String reason, int status);", "public int chooseFromReservationMenu() {\n\t\tfinal int NEW_RESERVATION =1;\t\t\t\t\t\t\t\t\t//option from the reservations sub menu\n\t\tfinal int VIEW_RESERVATION =2;\n\t\tfinal int CANCEL_RESERVATION =3;\n\n\t\tuserChoice = keyboard.nextInt();\n\n\t\tint scenario = 0; \n\t\tif (userChoice == NEW_RESERVATION)\n\t\t\tscenario = 1;\n\t\telse if(userChoice == VIEW_RESERVATION)\n\t\t\tscenario = 2;\n\t\telse if(userChoice == CANCEL_RESERVATION)\n\t\t\tscenario = 3;\n\t\telse\n\t\t\tscenario = 4;\n\n\t\treturn scenario;\t\t\t\t\t\t\t\t\t\t\t\t\t//int scenario returned is entered into a 'switch'\n\t}", "Salesman() {\n super();\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(-1);\n }", "public Reimbursements viewMyEmployeeReqs(int id) {\r\n\t\tEmployee e = getEmployeebyId(id);\r\n\t\tReimbursements r = rs.getReimByEID(e.getId());\r\n\t\treturn r;\r\n\t}", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public String submitByEmployee() throws IOException {\r\n\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\tif(application.getApprover()==null||\"\".equals(application.getApprover())){\r\n\t\t\tapplication.setApprover(\"Cindy\");\r\n\t\t\tif(\"Cindy\".equalsIgnoreCase(userRole.getEmpName()) ){\r\n\t\t\t application.setApprover(\"Cindy\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(application.getCc()==null||\"\".equals(application.getCc())){\r\n\t\t\tapplication.setCc(\"Eve;\");\r\n\t\t\tif(\"Eve\".equalsIgnoreCase(userRole.getEmpName()) ){\r\n\t\t\t\t application.setCc(\"Eve;\");\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(\"disapproved\".equals(application.getStatus())){\r\n\t\t\tapplication.setStatus(\"resubmitted\");\r\n\t\t}else{\r\n\t\t\tapplication.setStatus(\"submitted\");\r\n\t\t}\r\n\t\tapplication.setEmpId(userRole.getEmpId());\r\n\t\tapplication.setEmpName(userRole.getEmpName());\r\n\t\tiad.setApplicationCompanyCoverRate(application);\r\n\t\tiad.setApplicationCompanyCoverCn(application);\r\n\t\tiad.setApplicationTotalCostCn(application);\r\n\t\tString cc = application.getCc();\r\n\t\tString approver=application.getApprover();\r\n\t\tString[] approver1=approver.split(\"\\\\.\");\r\n\t\tString approve2=\"\";\r\n\t\tfor(int i=0;i<approver1.length;i++){\r\n\t\t\tapprove2+=approver1[i]+\" \";\r\n\t\t}\r\n\t\tString program=application.getTrainingProgram();\r\n\t\tString ename=application.getEmpName();\r\n\t\tString [] name=ename.split(\"\\\\.\");\r\n\t\tString ename1=\"\";\r\n\t\tfor(int i=0;i<name.length;i++){\r\n\t\t\tename1+=name[i]+\" \";\r\n\t\t}\t\r\n\t\tif(application.getDataId()>0){\r\n\t\t\t\r\n\t\t\tif(iad.updateByDataId(application)){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\t\treturn \"adminAsEmp_insertSUCCESS\";\r\n\t\t\t\t}\r\n\t\t\t\tif(userRole.isApprover()){\r\n\t\t\t\t\treturn \"approverAsEmp_insertSUCCESS\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"emp_updateSUCCESS\";\r\n\t\t\t}\r\n\t\t }\r\n\t\tif(iad.insertApplication(application)){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\treturn \"adminAsEmp_insertSUCCESS\";\r\n\t\t\t}\r\n\t\t\tif(userRole.isApprover()){\r\n\t\t\t\treturn \"approverAsEmp_insertSUCCESS\";\r\n\t\t\t}\r\n\t \treturn \"emp_insertSUCCESS\";\r\n\t }else{\r\n\t \r\n\t \treturn \"error\";\r\n\t }\r\n\t}", "private Employee setNextEmployee(Employee nextEmployee, Employee currentEmployee) {\n\tcurrentEmployee.setFree(true);\n\tswitch (currentEmployee.getEmType().getValue()) {\n\tcase 0:\n\t respondentQueue.enqueue(currentEmployee);\n\t break;\n\tcase 1:\n\t managerQueue.enqueue(currentEmployee);\n\t break;\n\tcase 2:\n\t directorQueue.enqueue(currentEmployee);\n\t break;\n\t}\n\treturn nextEmployee;\n }", "public static void main(String[] args){\n int emp_id;\n String emp_name;\n float basic_salary,HRA ,DA,TA,PF,Gross;\n\n Scanner scanner = new Scanner(System.in);\n emp_id = scanner.nextInt();\n System.out.println(\"Input employee id : \");\n\n emp_name = scanner.next();\n System.out.println(\"Input employee name: \");\n\n basic_salary = scanner.nextFloat();\n System.out.println(\"Input employee basic salary\");\n HRA = (basic_salary*10)/100;\n DA = (basic_salary*8)/100;\n TA = (basic_salary*9)/100;\n PF = (basic_salary*20)/100;\n Gross = (basic_salary + HRA + TA + DA - PF);\n\n System.out.println(\"HRA 10% of basic salary:\" +HRA);\n System.out.println(\"DA 8% of basic salary:\" +DA);\n System.out.println(\"TA 9% of basic salary:\" +TA);\n System.out.println(\"PF 20% of basic salary:\" +PF);\n System.out.println(\"Gross basic salary + HRA + DA + TA - PF :\" + Gross);\n\n\n }", "public Skills chooseSkill();", "@Given(\"^the gender of the employee$\")\r\n\tpublic void the_gender_of_the_employee() throws Throwable {\n\t\tthrow new PendingException();\r\n\t}", "public int employeeSalary(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"The salary earned by this employee is: \");\n return actualSalaryOfEmployee;\n\n }", "public void createInventoryReward() {\n if (inventoryEntityToRetrieve == null) {\n try {\n inventoryEntityToRetrieve = RandomBenefitModel.getInventoryRewards(application, encounter, characterVM.getDistance());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "public static void request(int type) {\n\n String array[] = null;\n Scanner scanner = new Scanner(System.in);\n\n switch (type) {\n case 1:\n// array=Employee.EmployeeChoices();\n break;\n /* min=1;\n max=8;*/\n case 2:\n break;// type 3 is to quit\n case 4:\n// array= HREmployee.employeeHRChoices();\n break;\n default:\n System.out.println(\"Error! Call tech team\");\n break;\n }\n int min = 1;// 0 is the name of the prompt, not a choice\n int max = array.length;\n printPrompt(array);\n int request = scanner.nextInt();\n validRequest(request, min, max);\n //directs to Homepage where the actions are\n if (type == 4) {\n// HREmployee.HRhomePage(request);\n } else if (type == 1) {\n// Employee.employeeHomePage(request);\n }\n\n\n /* choices(type,request);*/\n }", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "public static void addTeamLeader(Scanner input, ArrayList<Employee> newEmployee){\n \n TeamLeader newTeamLeader = new TeamLeader();\n \n String empNumber, empHireDate, monthlyBonus, trainingHours, payRate, shift, requiredTrainingHours;\n int shiftNum;\n \n System.out.print(\"Please enter the employee's first and last name: \");\n newTeamLeader.setName(input.nextLine());\n System.out.print(\"Please enter the new employee's Employee Number.\\nThe Employee Number must match XXX-L including the dash where X is a digit and L is a letter A-M: \");\n empNumber = input.nextLine();\n newTeamLeader.setNumber(verifyEmpNum(input, empNumber));\n System.out.print(\"Please enter the new employee's hire date.\\nMake sure the date you enter matches IX/XX/XXXX including the slashes\\nwhere I is a 0 or 1 and X is a digit 0-9: \");\n empHireDate = input.nextLine();\n newTeamLeader.setDate(verifyHireDate(input, empHireDate));\n System.out.print(\"Please enter the Production Team Leader's shift, 1 for day shift and 2 for night shift: \");\n shift = input.nextLine();\n shiftNum = UtilityMethods.verifyInt(input, shift);\n newTeamLeader.setShift(verifyShift(input, shiftNum));\n System.out.print(\"Please enter the pay rate of the Production Team Leader as a double: \");\n payRate = input.nextLine();\n newTeamLeader.setPayRate(UtilityMethods.verifyDouble(input, payRate));\n System.out.print(\"Please enter the monthly bonus that the Team Leader could receive: \");\n monthlyBonus = input.nextLine();\n newTeamLeader.setMonthlyBonus(UtilityMethods.verifyDouble(input, monthlyBonus));\n System.out.print(\"Please enter the number of training hours that the Team Leader requires as an integer: \");\n requiredTrainingHours = input.nextLine();\n newTeamLeader.setRequiredTrainingHours(UtilityMethods.verifyInt(input, requiredTrainingHours));\n System.out.print(\"Please enter the number of hours that the Team Leader has already acquired: \");\n trainingHours = input.nextLine();\n newTeamLeader.setTrainingHours(UtilityMethods.verifyInt(input, trainingHours));\n \n newEmployee.add(newTeamLeader);\n }", "@Test(groups = {\"Regression\", \"IntakeLender\"})\t\n\tpublic void LoAssignment() throws InterruptedException, AWTException {\n\t\t// Login to the BLN with provided credentials\n\t\tHomePage homePage = new HomePage(d);\n\t\t// Login to BLN Application\n\t\thomePage.logIntoBLN();\n\t\t// Navigating to MyProfile Tab\n\t\tUsers Users1 = homePage.navigateToUsers();\n\t\tLender Lender1=Users1.select_RCNLender();\n\t\tLender1.RCN_loanOfficers();\n\t\t// Navigating to MyProfile Tab\n\t\tUsers Users2 = homePage.navigateToUsers();\n\t\tUsers2.select_intakeLender();\n\t\tApplication Application1 = homePage.createLoanRequest();\n\t\tApplication1.LoanOfficer();\n\t\tApplication1.LoanOfficerTest(Users1.sortedList1,Users2.sortedList1);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "public Employee(String name,String pos,int sal, int Vbal, int AnBon){\n Random rnd = new Random();\n this.idnum = 100000 + rnd.nextInt(900000);\n this.name = name;\n this.position = pos;\n this.salary = sal;\n this.vacationBal = Vbal;\n this.annualBonus = AnBon;\n this.password = \"AJDLIAFYI\";\n salaryHist[0] = salary;\n }", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "void assign (int departmentId, AssignEmployeeRequest empList);", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public void getSalary() {\n this.payDay(this.monthlyIncome);\n }", "public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}", "private void meetWithHrForBenefitAndSalryInfo() {\n metWithHr = true;\n }", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public boolean requestBonus(Employee e, double bonus) {\n\n return true;\n }", "@Override\n public void action() {\n DFAgentDescription appointmentAgentDescription = dfSubscription.getAgentDescription();\n List<AllocationState> preferredAllocations = patientAgent.getAllocationStates();\n\n if (patientAgent.getCurrentAllocation() == GlobalAgentConstants.APPOINTMENT_UNINITIALIZED) {\n /* Patient agent has not got any appointment from the hospital agent yet */\n return;\n\n } else if (preferredAllocations.isEmpty()) {\n /* Patient Agent has its most preferred appointment */\n isHappyWithAppointment = true;\n\n } else if (appointmentAgentDescription != null) {\n\n /* Loop executed when action is executed for the first time */\n if (preferredAllocationsIterator == null) {\n /* Querying patient preferences */\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n }\n\n\n if (!preferredAllocationsIterator.hasNext()) {\n /* Condition executed when no more swaps available */\n updatePreferences();\n\n } else if (expectedMessageTemplate == null) {\n\n /* We are not expecting any response, we can make another swap proposal */\n proposeSwap(preferredAllocationsIterator.next(), appointmentAgentDescription);\n\n } else {\n /* Some message has been sent, awaiting a response */\n ACLMessage expectedMessage = patientAgent.receive(expectedMessageTemplate);\n if (expectedMessage != null) {\n boolean wasSwapSuccessful = receiveResponse(expectedMessage, appointmentAgentDescription);\n expectedMessageTemplate = null;\n currentlyProposedAllocationSwap = null;\n\n /* If swap has been successful, we need to update our preference list\n as the patient agent has got new appointment */\n if (wasSwapSuccessful) {\n updatePreferences();\n }\n }\n }\n }\n }", "public PolicyBinderPage endorsementFromActionDropDown() {\r\n sleep(3000);\r\n ExtentReporter.logger.log(LogStatus.INFO,\r\n \"Select Policy Actions-> Endorsement. Verify Endorse policy window displays.\");\r\n if (selectDropdownByValueFromPolicyActionDDL(driver, policyAction,\r\n policybinderpageDTO.valueOfPolicyActionEndorse, \"Policy Action\").equals(\"false\")) {\r\n sleep(2000);\r\n\r\n // This method will select the policy using required criteria\r\n PolicyQuotePage quotepage = new PolicyQuotePage(driver);\r\n quotepage.searchBackUpPolicyUsingSearchCriteria();\r\n sleep(4000);\r\n\r\n if (selectDropdownByValueFromPolicyActionDDL(driver, policyAction,\r\n policybinderpageDTO.valueOfPolicyActionEndorse, \"Policy Action\").equals(\"false\")) {\r\n\r\n // navigate through policy list till policy with expected\r\n // criteria is found\r\n RateApolicyPage rateapolicypage = new RateApolicyPage(driver);\r\n rateapolicypage.searchThroughPolicyList(policybinderpageDTO.valueOfPolicyActionEndorse);\r\n }\r\n }\r\n return new PolicyBinderPage(driver);\r\n }", "public void registerNewEmployee(Administrator user, List<Employee> employees, UserType userType){\n boolean flag;\n String dni;\n do{\n System.out.print(\"\\t Ingrese el dni: \");\n dni = new Scanner(System.in).nextLine();\n flag = user.verifyEmployeeDni(dni,employees);\n if(flag){\n System.out.println(\"El DNI ingresado ya pertenece a un empleado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el nombre: \");\n String name = new Scanner(System.in).nextLine();\n System.out.print(\"\\t Ingrese el apellido: \");\n String surname = new Scanner(System.in).nextLine();\n int age = this.enterNumber(\"la edad\");\n String username;\n do{\n System.out.print(\"\\t Ingrese el username: \");\n username = new Scanner(System.in).nextLine();\n flag = user.verifySystemUsername(username,employees);\n if(flag){\n System.out.println(\"Ese usuario ya esta registrado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el password: \");\n String password = new Scanner(System.in).nextLine();\n\n Employee employee = user.createEmployee(userType,name,surname,dni,age,username,password);\n employees.add(employee);\n }", "public void attemptToCreateEmployee(String firstName, String lastName, String employeeId, String documentNo) {\n driver.findElement(By.cssSelector(\"ms-add-button[tooltip=\\\"EMPLOYEE.TITLE.ADD\\\"]\")).click();\n\n // Fill in the form\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname='firstName']>input\")).sendKeys(firstName);\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname=\\\"lastName\\\"]>input\")).sendKeys(lastName);\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"employeeId\\\"]\")).sendKeys(employeeId);\n\n driver.findElement(By.cssSelector(\"mat-card >div:nth-child(2)>:nth-child(1)\")).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\"mat-option:nth-child(1)\"))).click();\n\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"documentNumber\\\"]\")).sendKeys(documentNo);\n\n //Click on Save button\n driver.findElement(By.cssSelector(\"ms-save-button > button\")).click();\n }", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }", "public static void main(String[] args) {\n\t\tScanner myScan = new Scanner(System.in);\r\n\t\tString strAns, empName;\r\n\t\tdouble sumSalaries=0;\r\n\t\tboolean found=false;\r\n\t\tDeptEmployee[ ] department = new DeptEmployee [6];\r\n\t\tGregorianCalendar hired;\r\n\t\t\r\n\t\t//Professors\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tProfessor prof1 = new Professor(\"Joseph\",200000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,5,1);\r\n\t\tProfessor prof2 = new Professor(\"Carlos\",150000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,6,1);\r\n\t\tProfessor prof3 = new Professor(\"Mauricio\",100000,hired.getTime(),10);\r\n\t\t\r\n\t\t//Secretaries\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tSecretary sec1 = new Secretary(\"Lina\",50000,hired.getTime(),200);\r\n\t\thired = new GregorianCalendar(1998,5,1);\r\n\t\tSecretary sec2 = new Secretary(\"Lucy\",55000,hired.getTime(),200);\r\n\t\t\r\n\t\t//Administrators\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tAdministrator admin1 = new Administrator(\"Monica\",180,hired.getTime(),160);\r\n\t\t\r\n\t\t//Populate array\r\n\t\tdepartment[0] = prof1;\r\n\t\tdepartment[1] = prof2;\r\n\t\tdepartment[2] = prof3;\r\n\t\tdepartment[3] = sec1;\r\n\t\tdepartment[4] = sec2;\r\n\t\tdepartment[5] = admin1;\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to see the sum of salaries in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tfor (DeptEmployee e : department) \r\n\t\t\t\tsumSalaries += e.computeSalary();\r\n\t\t\tSystem.out.println(\"Sum of department salaries is: \"+sumSalaries);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to locate an employee in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tSystem.out.println(\"Enter the employee name:\");\r\n\t\t\tstrAns = myScan.next();\r\n\t\t\t\r\n\t\t\tfor (DeptEmployee e : department) {\r\n\t\t\t\tempName=e.getName();\r\n\t\t\t\tif (strAns.equals(e.getName())) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tSystem.out.printf(\"The employee %s doesn't exists in department\",strAns);\r\n\t\t\t}\r\n\t }\r\n\t}", "public Executive(int salary, String name, String department, int yearlyBonus){\n super(salary,name,department); \n this.yearlyBonus = yearlyBonus;\n }", "static void compareEmployeeSalary(EmployeeQ7 e1, EmployeeQ7 e2) {\n\t\tif (e1.getSalary() > e2.getSalary()) {\n\t\t\te1.display();\n\t\t} else {\n\t\t\te2.display();\n\t\t}\n\n\t}", "public static void main(String args[])\r\n\t{\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your first name:\");\r\n\t\tString firstname = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name:\");\r\n\t\tString lastname = sc.nextLine();\r\n\t\tSystem.out.println(\"Please enter the department from the folloiwng \\n 1.Technical \\n 2.Admin \\n 3.Human Resource \\n 4.Legal \");\r\n\t\tint choice = sc.nextInt();\r\n\t\t\r\n\t\tEmployee emp;\r\n\t\t\r\n\t\tswitch( choice ) {\r\n\t\t\tcase 1:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"tech\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"adm\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"hr\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"lg\" );\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println( \"Incorrect choice\" );\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t\t//generate email\r\n\t\tCredentialService cs = new CredentialService();\r\n\t\tString email = cs.generateEmailAddress( emp );\r\n\t\tString password = cs.GeneratePassword();\r\n\t\tcs.showCredentials(emp, email, password);\r\n\r\n\r\n\t\t}", "public int giveRaise(int bonus) {\n if (bonus >= 0) {\n this.salary += bonus;\n }\n return this.salary;\n }", "public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "protected OfferApproval breakWithEmployeeByResponsibleFor(RetailscmUserContext userContext, String offerApprovalId, String responsibleForId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithResponsibleFor(offerApproval, responsibleForId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "public void payAllEmployeers() {\n\t\t\n\t\tSystem.out.println(\"PAYING ALL THE EMPLOYEES:\\n\");\n\t\t\n\t\tfor(AbsStaffMember staffMember: repository.getAllMembers())\n\t\t{\n\t\t\tstaffMember.pay();\n\t\t\tSystem.out.println(\"\\t- \" + staffMember.getName() + \" has been paid a total of \" + staffMember.getTotalPaid());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "@Override\n\tpublic void computeSalary(int empid) {\n\t\t\n\t}", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}" ]
[ "0.63277334", "0.62388915", "0.6126844", "0.5908046", "0.59019685", "0.5857189", "0.5835149", "0.5769849", "0.5705592", "0.5692954", "0.5680198", "0.5610442", "0.56014913", "0.5577", "0.5548099", "0.55440867", "0.55376023", "0.55181175", "0.5506366", "0.54985714", "0.5496383", "0.5490575", "0.54757553", "0.5448337", "0.5446375", "0.5441224", "0.5437004", "0.54286814", "0.5404819", "0.53916806", "0.53903365", "0.5386607", "0.5380909", "0.537908", "0.5374667", "0.536886", "0.5363303", "0.53518075", "0.53495324", "0.53347874", "0.53283197", "0.530979", "0.5302071", "0.53019625", "0.5300732", "0.52790254", "0.5273597", "0.52572244", "0.52563995", "0.5255842", "0.5253719", "0.52530104", "0.5249695", "0.52432007", "0.52352124", "0.5233902", "0.5230955", "0.52207106", "0.5219017", "0.5218533", "0.52168", "0.5209016", "0.51909995", "0.5187163", "0.51868665", "0.5180058", "0.5159512", "0.51472694", "0.51421034", "0.51403743", "0.5139459", "0.5134041", "0.51333004", "0.5129029", "0.5123117", "0.5118716", "0.5113004", "0.511159", "0.5110696", "0.5109126", "0.510281", "0.51005256", "0.5098014", "0.50959176", "0.5094382", "0.5090306", "0.50891817", "0.5084682", "0.5073341", "0.5071143", "0.50690305", "0.5064941", "0.5064162", "0.50630456", "0.5055726", "0.5052682", "0.50508034", "0.5047632", "0.50444245", "0.50366944" ]
0.67504627
0
This method is used to print the employee details.
private static void printEmployeeDetails(final List<Employee> employeeDetails) { String headerFormat = "%-25s%-20s%-20s%-20s%-20s%-20s\n"; String rowFormat = "%-25s%-20s%-20s%-20s%-20s%-20s\n"; System.out.println(); System.out.println("Employee details:"); System.out.println("============================================================================================================================="); System.out.format(headerFormat, "Name", "Class", "Hours", "Sales", "Rate", "Weekly Pay Amount"); System.out.println("============================================================================================================================="); final NumberFormat formatter = NumberFormat.getCurrencyInstance(); for (Employee employee : employeeDetails) { final StringBuilder employeeName = new StringBuilder(); employeeName.append(employee.getFirstName()).append(" ").append(employee.getLastName()); if (employee.getClassType().equalsIgnoreCase("Salaried")) { double monthlySalary = ((SalariedEmployee) employee).getMonthlySalary(); boolean isRewarded = employee.isRewarded(); if (isRewarded) { monthlySalary += monthlySalary * 0.1; } StringBuilder sb = new StringBuilder(); sb.append(formatter.format(monthlySalary / 4)); sb.append(isRewarded ? "*" : ""); System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), "", "", "", sb.toString()); } else if (employee.getClassType().equalsIgnoreCase("Hourly")) { double weeklyWorkedHours = ((HourlyEmployee) employee).getWeeklyWorkedHours(); double hourlyRate = ((HourlyEmployee) employee).getHourlyRate(); double weeklyPayAmount = 40 * ((HourlyEmployee) employee).getHourlyRate(); // Rate will be doubled if it’s beyond 40 hours/week. if (((HourlyEmployee) employee).getWeeklyWorkedHours() > 40) { double overtime = ((HourlyEmployee) employee).getWeeklyWorkedHours() - 40; double overtimePay = overtime * (((HourlyEmployee) employee).getHourlyRate() * 2); weeklyPayAmount += overtimePay; } System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), weeklyWorkedHours, "", formatter.format(hourlyRate), formatter.format(weeklyPayAmount)); } else { double weeklySales = ((CommissionedEmployee) employee).getWeeklySales(); double commissionRate = ((CommissionedEmployee) employee).getCommissionRate(); System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), "", formatter.format(weeklySales), "", formatter.format(weeklySales * commissionRate)); } } System.out.println("\nNote: * A 10% bonus is awarded\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public void 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 }", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public abstract String printEmployeeInformation();", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "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 String toString() {\n return \"Employee Id:\" + id + \" Employee Name: \" + name+ \"Employee Address:\" + address + \"Employee Salary:\" + salary;\n }", "public void outputInfo(){\n outputHeader();\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayInfo(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "public static void printEmployees(ArrayList<Employee> newEmployee){\n for(int i = 0; i < newEmployee.size(); i++){\n System.out.print(newEmployee.get(i).toString());\n }\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuffer s1 = new StringBuffer();\n\t\ts1.append(\"Employee name : \");\n\t\ts1.append(this.name);\n\t\ts1.append(\" Id is: \");\n\t\ts1.append(Integer.toString(this.id));\n\t\ts1.append(\" salary is \");\n\t\ts1.append(Integer.toString(this.salary));\n\t\treturn s1.toString();\n\n\t}", "public static void display(List<Employee> empList) {\r\n\t\t\r\n\t\tfor(Employee e : empList) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getEmployeeId()+\"\\t\"+e.getEmployeeName()+\"\\t\"+e.getEmployeeAddress());\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "private void doViewAllEmployees() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Staffs\");\n\n List<Employee> employees = employeeControllerRemote.retrieveAllEmployees();\n\n employees.forEach((employee) -> {\n System.out.println(\"Employee ID: \" + employee.getEmployeeId() + \"First Name: \" + employee.getFirstName() + \"Last Name: \" + employee.getLastName() + \"Job Role: \" + employee.getJobRole().toString() + \"Username: \" + employee.getUserName() + \"Password: \" + employee.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public void listAll(){\n /*\n for(int i=0;i<employeesList.size();i++){\n System.out.println(i);\n Employee employee=(Employee)employeesList.get(i);\n System.out.print(employeesList.get(i));\n */ \n \n \n //for used to traverse employList in order to print all employee's data\n for (int i = 0; i < employeesList.size(); i++) {\n System.out.println(\"Name: \" + employeesList.get(i).getName()); \n System.out.println(\"Salary_complement: \"+employeesList.get(i).getSalary_complement()); \n \n }\n \n \n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"ID:\" + this.empid + \",NAME:\" + this.name;\r\n\t}", "public String toString(){\n StringBuilder builder = new StringBuilder();\n builder.append(\"Employee :[ Name : \" + name + \", dept : \" + dept + \", salary :\"\n + salary+\", subordinates = \\n\");\n for(Employee e : this.subordinates) {\n builder.append(\"\\t\" + e + \"\\n\");\n }\n builder.append(\" ]\");\n return builder.toString();\n }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void parseAndPrintRecords() {\n ArrayList<Employee> employees;\n\n employees = parseData(data);\n\n System.out.printf(\"%10s%10s%10s\\n\", \"Last\", \"First\", \"Salary\");\n for(Employee employee : employees) {\n System.out.printf(\"%10s%10s%10d\\n\", employee.lName, employee.fName, employee.salary);\n }\n\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "public static void main(String[] args) throws NullPointerException {\n\n\t\t// default constructor\n\t\tEmployeeInfo employeeInfo = new EmployeeInfo();\n\t\tEmployeeInfo employeeInfo1 = new EmployeeInfo(\" FORTUNE COMPANY \");\n\n\t\tEmployeeInfo emp1 = new EmployeeInfo(1, \"Abrah Lincoln\", \"Accounts\", \"Manager\", \"Hodgenville, KY\");\n\t\tEmployeeInfo emp2 = new EmployeeInfo(2, \"John F Kenedey\", \"Marketing\", \"Executive\", \"Brookline, MA\");\n\t\tEmployeeInfo emp3 = new EmployeeInfo(3, \"Franklin D Rossevelt\", \"Customer Realation\", \"Assistnt Manager\",\n\t\t\t\t\"Hyde Park, NY\");\n\n\n\t\t// Printing Employee information in this pattern\n\t\t// \"ID Name Number Department Position Years Worked Pension Bonus Total salary \"\n\n\t\tSystem.out.println(emp1.employeeId() + \"\\t\" + emp1.employeeName() + \"\\t\\t\" + emp1.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp1.getJobTitle() + \"\\t\\t\\t\" + emp1.getYearsWorked() + \"\\t\\t\" + emp1.calculateEmployeePension()\n\t\t\t\t+ \"\\t\" + emp1.calculateEmployeeBonus() + \"\\t\\t\" + emp1.calculateSalary());\n\n\t\tSystem.out.println(emp2.employeeId() + \"\\t\" + emp2.employeeName() + \"\\t\\t\" + emp2.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp2.getJobTitle() + \"\\t\\t\" + emp2.getYearsWorked() + \"\\t\\t\" + emp2.calculateEmployeePension() + \"\\t \"\n\t\t\t\t+ emp2.calculateEmployeeBonus() + \"\\t\\t\" + emp2.calculateSalary());\n\n\t\tSystem.out.println(emp3.employeeId() + \"\\t\" + emp3.employeeName() + \"\\t\" + emp3.getDepartment() + \"\\t\"\n\t\t\t\t+ emp3.getJobTitle() + \"\\t\" + emp3.getYearsWorked() + \"\\t\\t \" + emp3.calculateEmployeePension() + \"\\t\"\n\t\t\t\t+ emp3.calculateEmployeeBonus() + \" \\t\\t\" + emp3.calculateSalary());\n\n\n\n\t}", "public String toString(){\n String s = \"\";\n s+=\"Employee: \"+name+\"\\n\";\n s+=\"Employee ID: \" + idnum +\"\\n\";\n s+=\"Current Position: \"+position+\"\\n\";\n s+=\"Current Salary: $\" +salary+\"\\n\";\n s+=\"Vacation Balance: \" + vacationBal+ \" days\\n\";\n s+=\"Bonus: $\" +annualBonus+\"\\n\";\n return s;\n }", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public void xxx() {\n System.out.println(\"Salary: \" + salary);\n printInfo();\n\n Employee e = new Employee(\"Andy\", \"123\", 26);\n// System.out.println(\"Name: \" + e.name + \"; Age: \" + e.age + \";ID: \" + e.id);\n\n Manager m = new Manager(\"Andylee\", \"124\", 27);\n// System.out.println(\"Name: \" + m.name + \"; Age: \" + m.age + \";ID: \" + m.id);\n\n }", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "public static void printCustomerInformation(Employee [] employee) {\n\t\tif (Customer.getCustomerQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no customer!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Customer.getCustomerQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Customers-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getVehicle().getCustomer().getName() + \"\\n\");\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "public static void showEmployee(RequestHandler handler, Employee e) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\n*****************************************\");\n\t\tsb.append(\"\\nEmployee ID: \" + e.getId());\n\t\tsb.append(\"\\n Name: \" + e.getName());\n\t\tsb.append(\"\\n Email: \" + e.getEmail());\n\t\tsb.append(\"\\n Department: \" + e.getDepartment());\n\t\tsb.append(\"\\n*****************************************\");\n\t\thandler.sendMessage(sb.toString());\n\t}", "@Override\n public String toString ()\n {\n String format = \"Employee %s: %s , %s\\n Commission Rate: $%.1f\\n Sales: $%.2f\\n\";\n\n return String.format(format, this.getId(), this.getLastName(), this.getFirstName(), this.getRate(), this.getSales());\n }", "public String toString(){\n return \"Employee First Name: \" + firstName \t\n + \", Surname: \" + secondName\n + \", Hourly Rate \" + hourlyRate;\n }", "public static void main(String[] args) {\n\t\temployee employee =new employee (\"hilal\",5000,20,2021);\n\t System.out.println(employee.toString());\n \n\t}", "public void printWhoIsPresent() {\n for(Employee emp : employees) {\n if(emp.isPresent()) {\n System.out.println(emp);\n }\n }\n }", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public static void main(String[] args) {\n\n\n String employeeName = \"Gurcu\";\n String companyName = \"Kucuk Holding\";\n int employeeId = 5;\n String jobTitle = \" CEO \";\n double salary = 100000.5;\n int ssn = 12345678;\n\n System.out.println(\"Employee Name: \"+employeeName);\n System.out.println(\"Company Name: \"+companyName);\n System.out.println(\"Employee Id :\" +employeeId );\n System.out.println(\"Job Title :\"+jobTitle);\n System.out.println(\"Social Security Number:\"+ssn);\n System.out.println(\"Salary:\"+salary);\n\n System.out.println(\"Employee Name:\"+employeeName + \"\\nCompany Name:\"+companyName +\n \"\\nEmployee ID: \" +employeeId + \"\\nJob Title: \" + jobTitle +\n \"\\nSalary:\"+ salary + \"\\nSnn:\" +ssn);\n\n System.out.println(\"==================================================\");\n\n String firstName = \"Zeynep\";\n String lastName = \"Dere\";\n\n System.out.println(\"Full Name: \" + firstName+\" \"+lastName);\n\n\n }", "@Override\npublic String toString()\n{\n Employee emp = new Employee();\n \n StringBuilder sb = new StringBuilder();\n sb.append(\"Employee{\");\n sb.append(\"Name=\");\n sb.append(emp.getName());\n sb.append(\",Salary complement=\");\n sb.append(emp.getSalary_complement());\n sb.append(\"}\");\n\n return sb.toString();\n}", "public String EmployeeSummary(){\r\n\t\treturn String.format(\"%d\\t%d\\t\\tJunior\\t\\t$%,.2f\\t\\t$%,.2f\\r\\n\", getID(), getYearHired(), getBaseSalary(), CalculateTotalCompensation());\r\n\t}", "public void print() {\n\t\tSystem.out.print(salary);\n\t}", "@Override\n public String toString(){\n String empDetails = super.toString() + \"::FULL TIME::Annual Salary \"\n \t\t+ doubleToDollar(this.annualSalary);\n return empDetails;\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "private void getemp( String name,int id ) {\r\n\t\tSystem.out.println(\" name and id\"+name+\" \"+id);\r\n\t}", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\n\n String employeeName = \"Orkhan\";\n String companyName = \"Amazon\";\n int employeeID = 9;\n String jobTitle = \"QA\";\n double salary = 100000.5;\n int ssn = 123456789;\n // employee name : Orkhan\n\n System.out.println(\" Employee Name: \"+employeeName);\n System.out.println(\" Company Name: \"+companyName);\n System.out.println(\" Employee ID: \"+jobTitle);\n System.out.println(\" Salary: \"+salary);\n System.out.println(\" SSN: \"+ ssn);\n\n\n\n/*\nSystem.out.println(\"Employee Name: \" + employeeName + \"\\nCompany Name: \" + companyName + \"\\nEmployee ID: \" + salary + \"\\nSSN: \" + ssn);\n */\n\n System.out.println(\"==========================================================================================================================\");\n String FirstName = \"Yegana\";\n String LastName = \"Musayeva\";\n\n System.out.println(\"My full name is: \" + FirstName + \" \"+ LastName);\n\n\n\n // Full Name: Yegana Musayeva\n\n\n\n }", "public void print() {\r\n Person tmp = saf.get(0);\r\n System.out.println(\"Person name : \" + tmp.getName() +\r\n \" Entering time : \" + tmp.getTime() +\r\n \" Waiting time : \" + tmp.getExitTime());\r\n }", "public void listEmployees() {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tList employees = session.createQuery(\"FROM Employee\").list();\n\t\t\tfor (@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = employees.iterator(); iterator.hasNext();) {\n\t\t\t\tEmployee employee = (Employee) iterator.next();\n\t\t\t\tSystem.out.print(\"First Name: \" + employee.getFirstName());\n\t\t\t\tSystem.out.print(\" Last Name: \" + employee.getLastName());\n\t\t\t\tSystem.out.println(\" Salary: \" + employee.getSalary());\n\t\t\t}\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "void work(){\n System.out.println(\"Emploee \"+ empID+\" is \"+age+\" years old\");\n }", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "@Override \n public String toString() \n { \n return \"user\" + \n \"\\n\\t RecordNo: \" + this.recordNo + \n \"\\n\\t EmployeeName: \" + this.name + \n \"\\n\\t Age: \" + this.age + \n \"\\n\\t Sex: \" + this.sex + \n \"\\n\\t Date of Birth: \" + this.dob + \n \"\\n\\t Remark: \" + this.remark; \n }", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public String getEmployeeDetails(int employeeId) {\n\treturn employeeService.getEmployeeDetails(employeeId).toString(); \n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}", "@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 void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "public void printUser() {\n\t\tSystem.out.println(\"First name: \" + this.firstname);\n\t\tSystem.out.println(\"Last name: \" + this.lastname);\n\t\tSystem.out.println(\"Age: \" + this.age);\n\t\tSystem.out.println(\"Email: \" + this.email);\n\t\tSystem.out.println(\"Gender: \" + this.gender);\n\t\tSystem.out.println(\"City: \" + this.city);\n\t\tSystem.out.println(\"State: \" + this.state + \"\\n\");\n\t}", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tEmployee_Demo ans= new Employee_Demo();\r\n\t\t\r\n\t\tans.setAge(25);\r\n\t\tans.setEmployeeName(\"sankar suresh\");\r\n\t\tans.setCity(\"pondicherry\");\r\n\t\tans.setemployeID(785303);\r\n\t\tans.setSalary(30000);\r\n\t\tans.setSex(\"male\");\r\n\t\tSystem.out.println(\"age of the emp :\"+ans.getAge());\r\n\t\tSystem.out.println(\"City of the emp :\"+ans.getCity());\r\n\t\tSystem.out.println(\" salary of the emp :\"+ans.getSalary());\r\n\t\tSystem.out.println(ans.getEmployeID());\r\n\t\tSystem.out.println(ans.getSex());\r\n\r\n\t\t\r\n\r\n\t}", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRUtility.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n }", "public static void showEmployees(RequestHandler handler) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\nDisplaying all employees:\");\n\t\thandler.sendMessage(sb.toString());\n\t\tfor (Employee e : EmployeeData.getEmployees()) {\n\t\t\tshowEmployee(handler, e);\n\t\t}\n\t\thandler.sendMessage(new StringBuilder(\"Finished Displaying Employees\"));\n\t}", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "public void showemplist() throws Exception {\n\t\t Log.info(\"*******started execution of showemplist() in TC_hrms_102***********\");\n\t\tActions action = new Actions(g.driver);\n\t\taction.moveToElement(g.driver.findElement(By.linkText(\"PIM\"))).perform();\n\t\tThread.sleep(3000);\n\t\t\n\t\t//clicking on addemployee submenu link\n\t\tg.driver.findElement(By.id(\"menu_pim_viewEmployeeList\")).click();\n\t\tThread.sleep(3000);\n\t\tSystem.out.println(\"Clicked on Employee List submenu\");\n\t\t Log.info(\"*******end of execution of showemplist() in TC_hrms_102***********\");\n\t}", "private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }", "public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public static void main(String[] args) {\n\r\n\r\n Employee e1=new Employee();\r\n\r\n e1.name=\"avinash\";\r\n e1.city=\"ongole\";\r\n e1.age=58;\r\n\r\n e1.display();\r\n }", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "@Override\n public String toString(){\n return String.format(\"Hourly Employee : %s\\n%s : %,.2f\", \n super.toString(), \"Hourly Wage\", getWage());\n }", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "public 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 String f9employee() throws Exception {\r\n\t\tString query = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN, \"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME ,HRMS_EMP_OFFC.EMP_ID,\"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_DIV,NVL(DIV_NAME,' ') FROM HRMS_EMP_OFFC \"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_CENTER ON HRMS_CENTER.CENTER_ID = HRMS_EMP_OFFC.EMP_CENTER\"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_DIVISION ON (HRMS_DIVISION.DIV_ID = HRMS_EMP_OFFC.EMP_DIV)\";\r\n\t\t\t\tquery += getprofileQuery(bulkForm16);\r\n\t\t\t\tquery += \"\tORDER BY HRMS_EMP_OFFC.EMP_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"empToken\", \"empName\", \"empId\",\r\n\t\t\t\t\"divisionId\", \"divisionName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void summary() {\r\n System.out.println(this.nama + \" usia \" + this.usia + \" tahun bekerja di Perusahaan \" + Employee.perusahaan);\r\n System.out.println(\"Memiliki total gaji \" + (Employee.pendapatan + Employee.lembur));\r\n }", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }" ]
[ "0.86426127", "0.79865575", "0.78874636", "0.7820998", "0.78063047", "0.75201005", "0.7424492", "0.7337442", "0.7336151", "0.7331718", "0.72877985", "0.72554225", "0.71868485", "0.71707046", "0.7155571", "0.70511425", "0.70186913", "0.698087", "0.6926412", "0.6897978", "0.6872937", "0.68708444", "0.683678", "0.6833047", "0.6830725", "0.6826652", "0.68257815", "0.6822227", "0.68153447", "0.67858374", "0.67779493", "0.6771868", "0.6767192", "0.67451847", "0.67124635", "0.6706897", "0.6705531", "0.6696858", "0.6694133", "0.6691292", "0.66854316", "0.66843617", "0.6659778", "0.6648865", "0.664012", "0.66399664", "0.66185904", "0.65890986", "0.65761477", "0.6565354", "0.65608406", "0.65553", "0.6546794", "0.65466756", "0.6499355", "0.64953583", "0.6492827", "0.64906895", "0.6473499", "0.6435965", "0.64312196", "0.6429759", "0.6426415", "0.64227223", "0.64111865", "0.6405891", "0.640257", "0.6400234", "0.63990045", "0.63835436", "0.6379391", "0.6366257", "0.6361442", "0.63558143", "0.63520515", "0.6351075", "0.63295025", "0.632818", "0.6327107", "0.6326608", "0.63244206", "0.63028777", "0.6298775", "0.6295345", "0.6293874", "0.6293823", "0.62928396", "0.62916315", "0.6287113", "0.628156", "0.62675184", "0.6250116", "0.62332636", "0.62302667", "0.622585", "0.62216425", "0.62195194", "0.6218576", "0.62161845", "0.6213052" ]
0.7593184
5
This method is used to load the employee details
private static void loadEmployeeDetails(final List<Employee> employeeDetails) { final SalariedEmployee salariedEmployee1 = new SalariedEmployee("James", "Hogan", "Salaried", 13200.00, true); final SalariedEmployee salariedEmployee2 = new SalariedEmployee("Joan", "Han", "Salaried", 10400.00, false); final HourlyEmployee hourlyEmployee1 = new HourlyEmployee("Jennifer", "Waltz", "Hourly", 45, 10.95, false); final HourlyEmployee hourlyEmployee2 = new HourlyEmployee("Moly", "Smith", "Hourly", 32, 15, false); final CommissionedEmployee commissionedEmployee = new CommissionedEmployee("Marry", "Butler", "Commissioned", 10000, false); employeeDetails.add(salariedEmployee1); employeeDetails.add(salariedEmployee2); employeeDetails.add(hourlyEmployee1); employeeDetails.add(hourlyEmployee2); employeeDetails.add(commissionedEmployee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "private void loadEmployeesFromDatabase() {\n Cursor cursor = mDatabase.getAllEmployees();\n\n if (cursor.moveToFirst()) {\n\n usernameholder= cursor.getString(0);\n emailholder= cursor.getString(1);\n usertypeholder=cursor.getInt(2);\n\n\n\n\n\n }\n }", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "@Override\n\tpublic EmployeeBean getEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.getEmployeeDetails(id);\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.GET)\r\n\tpublic Employee getEmployeedetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getEmployee(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "private void loadEmployees() {\n Cursor cursor = databaseHelper.getAllPersons();\n\n if (cursor.moveToFirst()) {\n do {\n personList.add(new PersonClass(\n cursor.getString(0),\n cursor.getString(1),\n cursor.getInt(2),\n cursor.getString(3)\n\n ));\n } while (cursor.moveToNext());\n cursor.close();\n\n PersonAdapter personAdapter = new PersonAdapter(this, R.layout.list_person, personList, databaseHelper);\n listView.setAdapter(personAdapter);\n\n\n }\n }", "private void loadEmployee(HttpServletRequest request, HttpServletResponse response) \r\n\t\tthrows Exception {\n\t\tString theEmployeeId = request.getParameter(\"employeeId\");\r\n\t\t\r\n\t\t// get student from database (db util)\r\n\t\tEmployee theEmployee = employeeDAO.getEmployee(theEmployeeId);\r\n\t\t\r\n\t\t// place student in the request attribute\r\n\t\trequest.setAttribute(\"THE_EMPLOYEE\", theEmployee);\r\n\t\t\r\n\t\t// send to jsp page: update-student-form.jsp\r\n\t\tRequestDispatcher dispatcher = \r\n\t\t\t\trequest.getRequestDispatcher(\"/update-employee-form.jsp\");\r\n\t\tdispatcher.forward(request, response);\t\t\r\n\t}", "public Employee getEmployeeDetailById(int id) {\n\t\treturn dao.getEmployeeDetailById(id);\n\t}", "public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}", "public Employee getEmployeeDetails() throws SQLException {\n Cursor cursor = db.query(true, Constants.EMPLOYEE_TABLE, new String[]{Constants.EMPLOYEE_PHOTO,\r\n Constants.EMPLOYEE_NAME, Constants.EMPLOYEE_AGE}, null, null, null, null, null, null);\r\n\r\n if (cursor.moveToLast()) { //if statement executes from top to down and decides whether a certain statement will executes or not\r\n String employeeName = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_NAME));\r\n String employeeAge = cursor.getString(cursor.getColumnIndex(Constants.EMPLOYEE_AGE));\r\n byte[] blob = cursor.getBlob(cursor.getColumnIndex(Constants.EMPLOYEE_PHOTO));\r\n cursor.close();\r\n return new Employee(employeeName, employeeAge, CommonUtilities.getPhoto(blob));\r\n }\r\n cursor.close();\r\n return null; // Return statement\r\n }", "EmployeeDetail getById(long identifier) throws DBException;", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "public Employeedetails getEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"select * from employeeregister where employeeid ='\"\n\t\t\t\t\t+ employeeId + \"';\";\n\t\t\trs = statement.executeQuery(squery);\n\t\t\tif (rs.next()) {\n\t\t\t\t/*\n\t\t\t\t * return \"<h2>Details of Employee # \" + employeeId + \" </h2><p><h3>Employee\n\t\t\t\t * name: \" + rs.getString(2) + \"</h3>\";\n\t\t\t\t */\n\t\t\t\temployeeDetail.setEmployeeName(rs.getString(2));\n\n\t\t\t} else {\n\t\t\t\temployeeDetail.setEmployeeName(\"0\");\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "@Override\n\tpublic Empdetails getemp(int empid) {\n\t\treturn empDAO.getemp(empid);\n\t}", "private void loadAllEmployees() throws AccessException, SQLException {\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = constructSQL();\n\t\tint[] empID = new int[1];\n\t\tint dailyOffset=0;\n\t\tif (WorkedNMinutesAlertSource.DAILY_CHECK.equalsIgnoreCase(\"yesterday\")) {\n\t\t\tdailyOffset = -1;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tif (minAgeSet) {\n\t\t\t\tDatetime birthThreshold = DateHelper.addDays(DateHelper.getCurrentDate(), -(365*minAge));\n\t\t\t\tps.setDate(1, new java.sql.Date(birthThreshold.getTime()));\n\t\t\t}\n\t\t\trs = ps.executeQuery();\n\t\t\tboolean isWeekly = tPeriod.equalsIgnoreCase(\"weekly\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\t//for each employee, retrieve work details for the day before\n\t\t\t\t//and process accordingly.\n\t\t\t\tempID[0] = new Integer(rs.getString(1)).intValue();\n\t\t\t\tWorkDetailAccess wrkDetAccess = new WorkDetailAccess(conn);\n\t\t\t\tWorkDetailList wdl = null;\n\n\t\t\t\tif (!isWeekly) {\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), \"D\", null);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString firstDayOfWeek = Registry.getVarString(\"/system/WORKBRAIN_PARAMETERS/DAY_WEEK_STARTS\");\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper.getWeeksFirstDate(\n\t\t\t\t\t\t\tDateHelper.getCurrentDate(), firstDayOfWeek), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getWeeksFirstDate(DateHelper.getCurrentDate(), \n\t\t\t\t\t\t\t\t\tfirstDayOfWeek), 7), \"D\", null);\n\t\t\t\t}\n\t\t\t\tIterator wdlIter = wdl.iterator();\n\t\t\t\taccumulatedTime=0;\n\t\t\t\twhile (wdlIter.hasNext()) {\n\t\t\t\t\tprocessWorkDetail((WorkDetailData) wdlIter.next(), rs\n\t\t\t\t\t\t\t.getString(2));\n\t\t\t\t}\n\t\t\t\tif (accumulatedTime >= new Integer(nMinutes).intValue()) {\n\t\t\t\t\tfor (int i=0;i < tempRows.size(); i++) {\n\t\t\t\t\t\trows.add(tempRows.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttempRows = null;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException();\n\t\t} finally {\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\n\t\t\tif (ps != null)\n\t\t\t\tps.close();\n\t\t}\n\n\t}", "@GetMapping(value=\"/employes/{Id}\")\n\tpublic Employee getEmployeeDetailsByEmployeeId(@PathVariable Long Id){\n\t\t\n\t\tEmployee employee = employeeService.fetchEmployeeDetailsByEmployeeId(Id);\n\t\t\n\t\treturn employee;\n\t\t}", "public List<EmployeeDetails> getEmployeeDetails();", "public List<Employee> getAllEmployees() {\n\t\tList<Employee> list = new ArrayList<Employee>();\n\t\tlist = template.loadAll(Employee.class);\n\t\treturn list;\n\t}", "@Override\n\tpublic Employee getEmployeeById(int emp_id) {\n\t\tlog.debug(\"EmplyeeService.getEmployeeById(int emp_id) return Employee object with id\" + emp_id);\n\t\treturn repositary.findById(emp_id);\n\t}", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "@Then(\"List Employee specific details\")\r\n\tpublic void list_Employee_specific_details() {\n\t\trestTester.getSpecificEmployeeIdRecord(generatedEmployeeId);\r\n\t\tSystem.out.println(restTester.returnResponseAsString());\r\n\t\tassertTrue(restTester.returnResponseAsString().contains(\"false\"));\r\n\t}", "@Override\n\tpublic ArrayList<Employee> getEmpList() throws HrExceptions {\n\t\tSystem.out.println(\"In getEmpList() of Dao\");\n\t\treturn null;\n\t}", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "public EmployeeList() {\r\n initComponents();\r\n\r\n empName = getEmployeeName();\r\n empPosition = getEmployeePosition();\r\n System.out.println(empName + \"----- \" + empPosition);\r\n details = (ArrayList<String>) setEmployeeDetails(empName, empPosition);\r\n initializeComponents(details);\r\n\r\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "public List<EmployeeEntity> retrieveAllEmployeeData(StorageContext context) throws PragmaticBookSelfException {\n\t\tList<EmployeeEntity> listOfEmployeeData = null;\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\tString queryString = \"FROM EmployeeEntity\"; // select * from employee;//\n\t\ttry {\n\t\t\tQuery query = hibernateSession.createQuery(queryString);\n\t\t\tlistOfEmployeeData = query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn listOfEmployeeData;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployeeList() throws Exception {\n\t\t\r\n\t\treturn (List<Employee>) employeeRepository.findAll();\r\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "@Override\n\tpublic List<Empdetails> getemplist() {\n\t\treturn empDAO.getemplist();\n\t}", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }", "@Override\n\tpublic Empdetails findById(int empid) {\n\t\t\t\treturn empDAO.findById(empid);\n\t}", "public Employee getByID(int empId) {\n\t\tEmployee e = employees.get(empId);\n\t\tSystem.out.println(e);\n\t\treturn e;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "public EmployeeLookup() {\r\n\t\tfill();\r\n\t\tinitialize();\r\n\t\t//AutoCompleteDecorator.decorate(el);\r\n\t}", "public Employee getEmployeeById(Long employeeId) {\n return employeeRepository.findEmployeeById(employeeId);\n }", "@Override\n\tpublic Employee getEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.getEmployeeByID(empid);\n\t}", "@GetMapping(\"/employebyid/{empId}\")\n\t public ResponseEntity<Employee> getEmployeeById(@PathVariable int empId)\n\t {\n\t\tEmployee fetchedEmployee = employeeService.getEmployee(empId);\n\t\tif(fetchedEmployee.getEmpId()==0)\n\t\t{\n\t\t\tthrow new InvalidEmployeeException(\"No employee found with id= : \" + empId);\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn new ResponseEntity<Employee>(fetchedEmployee,HttpStatus.OK);\n\t\t}\n }", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Employee getEmployeeByID(int id) {\n\t\t\r\n\t\ttry {\r\n\t\t\tEmployee f = temp.queryForObject(\"Select * from fm_employees where EID =?\",new EmployeeMapper(),id);\r\n\t\t\treturn f;\r\n\t\t} catch (EmptyResultDataAccessException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Employee viewInformation(int id) {\n\t\tEmployee employee = new Employee(); \n\t\ttry{ \n\n\t\t\tString sql = \"select * from employees where id = \"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\tresultSet.next();\n\t\t\temployee.setId(resultSet.getInt(\"employee_id\"));\n\t\t\temployee.setUsername(resultSet.getString(\"username\"));\n\t\t\temployee.setPassword(resultSet.getString(\"password\"));\n\t\t\temployee.setFirstName(resultSet.getString(\"first_name\"));\n\t\t\temployee.setLastName(resultSet.getString(\"last_name\"));\n\t\t\temployee.setEmail(resultSet.getString(\"email\"));\n\t\t\t\n\t\t\treturn employee;\n\t\t\t \n\t\t}catch(Exception e){System.out.println(e);} \n\t\treturn null; \t\t\n\t}", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "@Override\n\tpublic List<Map<String, String>> employeeList() throws Exception {\n\t\treturn null;\n\t}", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "@Override\n\tpublic Employee getEmployeeById(int empId) {\n\t\treturn null;\n\t}", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "@Override\n\tpublic EmployeeBean getEmployee(int employeeId) {\n\t\tLOGGER.info(\"starts getEmployee method\");\n\t\tLOGGER.info(\"Ends getEmployee method\");\n\t\treturn adminEmployeeDao.getEmployee(employeeId);\n\t}", "List<Employee> allEmpInfo();", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "private PIM_AddEmployeeListPage() {\n\t\tPropertyFileReader propReader = new PropertyFileReader();\n\t\tPIM_AddEmployeePageProperties = propReader.readPropertyFile(\"PIM_AddEmployeeListProperties\");\n\t}", "@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\n\t}", "public ResponseEntity<List<Employee>> getAllEmployees() {\n \tList<Employee> emplist=empService.getAllEmployees();\n\t\t\n\t\tif(emplist==null) {\n\t\t\tthrow new ResourceNotFoundException(\"No Employee Details found\");\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<>(emplist,HttpStatus.OK);\t\t\n }", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "@Override\n\tpublic Employee getEmployeeById(int employeeId) {\n\t\ttry {\n\t\t\treturn template.queryForObject(\"select * from employee where empid = ?\", new Object[] { employeeId },\n\t\t\t\t\tnew RowMapper<Employee>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic Employee mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tEmployee emp = new Employee();\n\t\t\t\t\t\t\temp.setEmployeeId(rs.getInt(\"empid\"));\n\t\t\t\t\t\t\temp.setFirstName(rs.getString(\"fname\"));\n\t\t\t\t\t\t\temp.setLastName(rs.getString(\"lname\"));\n\t\t\t\t\t\t\temp.setEmail(rs.getString(\"email\"));\n\t\t\t\t\t\t\temp.setDesignation(rs.getString(\"desig\"));\n\t\t\t\t\t\t\temp.setLocation(rs.getString(\"location\"));\n\t\t\t\t\t\t\temp.setSalary(rs.getInt(\"salary\"));\n\t\t\t\t\t\t\treturn emp;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t} catch (EmptyResultDataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\n\t}", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employee getEmployeeById(int id) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Employee findEmployeeById(int empId) {\n\t\tEmployee employee = null;\r\n\t\tString findData = \"select * from employee where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(findData);\r\n\t\t\tps.setInt(1, empId);\r\n\r\n\t\t\tResultSet set = ps.executeQuery();\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\temployee = new Employee(id, sal, name, tech);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employee;\r\n\r\n\t}", "public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }", "public Employee getEmployee(String employeeID) {\n\n\t\tEmployee employee = new Employee();\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE E.ID = \\'\" + employeeID + \"\\' AND P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\trs.next();\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employee;\n\t}", "@GetMapping(\"/getoffer/{empId}\")\n\t public ResponseEntity<List<Offer>> getAllOffers(@PathVariable int empId)\n\t {\n\t\t List<Offer> fetchedOffers=employeeService.getAllOffers(empId);\n\t\t if(fetchedOffers.isEmpty())\n\t\t {\n\t\t\t throw new InvalidEmployeeException(\"No Employee found with id= : \" + empId);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t return new ResponseEntity<List<Offer>>(fetchedOffers,HttpStatus.OK);\n\t\t }\n\t }", "@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}", "public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }", "public void listEmployees() {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tList employees = session.createQuery(\"FROM Employee\").list();\n\t\t\tfor (@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = employees.iterator(); iterator.hasNext();) {\n\t\t\t\tEmployee employee = (Employee) iterator.next();\n\t\t\t\tSystem.out.print(\"First Name: \" + employee.getFirstName());\n\t\t\t\tSystem.out.print(\" Last Name: \" + employee.getLastName());\n\t\t\t\tSystem.out.println(\" Salary: \" + employee.getSalary());\n\t\t\t}\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "public Employee getEmployeeById(int id) {\r\n\t\treturn employee1.get(id);\r\n\t}", "public EmployeeEntity getEmployeeDataById(int employeeId, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tEmployeeEntity result = null;\n\t\tSession hibernateSession = context.getHibernateSession();\n\t\tresult = (EmployeeEntity) hibernateSession.get(EmployeeEntity.class, employeeId);\n\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Employee> getEmpList() throws EmpException {\n\t\treturn dao.getEmpList();\n\t}", "public String getEmployees(){\n return employees;\n }", "@Override\n\tpublic Employee getById(Integer employeeId) {\n\t\treturn employeeDao.getById(employeeId);\n\t}", "@Override\n public Employee getEmployee(int employeeId) {\n return null;\n }", "@Override\r\n\tpublic DataResult<Employees> getById(int id) {\n\t\treturn null;\r\n\t}", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Booking> getDetails(String empid) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"from Booking where employeeId=\"+empid);\n\t\treturn query.list();\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "@Override\n public List<Employee> getAllEmployees() {\n return null;\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "@GetMapping(\"/employees\")\npublic List <Employee> findAlll(){\n\treturn employeeService.findAll();\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}" ]
[ "0.70637125", "0.7017771", "0.700428", "0.69982475", "0.6944469", "0.69190645", "0.68120205", "0.67769647", "0.6752102", "0.6742692", "0.663137", "0.66176325", "0.66070396", "0.6578362", "0.6558353", "0.6530432", "0.65197337", "0.65132976", "0.6505257", "0.6492967", "0.6465321", "0.64543825", "0.6448873", "0.6443853", "0.6434689", "0.6417312", "0.63842887", "0.6374789", "0.6373561", "0.63733906", "0.6366509", "0.63536435", "0.6348823", "0.6342543", "0.63347036", "0.6332609", "0.63259226", "0.6323063", "0.63224286", "0.63149023", "0.6312801", "0.6302529", "0.6298962", "0.62933254", "0.6287542", "0.6271608", "0.6266384", "0.62641776", "0.6245202", "0.624103", "0.62344265", "0.6228755", "0.6210947", "0.6203353", "0.61899877", "0.61858445", "0.61833274", "0.61811006", "0.6176833", "0.6175162", "0.6173787", "0.616747", "0.6166743", "0.61522543", "0.61475277", "0.61378473", "0.613741", "0.61297154", "0.6128479", "0.61280924", "0.6122359", "0.6121412", "0.6118793", "0.6103753", "0.6103753", "0.6094223", "0.609052", "0.60889775", "0.60808426", "0.607549", "0.6072289", "0.6070412", "0.60532266", "0.60492766", "0.6047388", "0.60473204", "0.60458905", "0.6042672", "0.6036527", "0.60314846", "0.60298723", "0.6022163", "0.60179543", "0.6016922", "0.6016922", "0.6012723", "0.60096395", "0.60093427", "0.6009248", "0.6004888" ]
0.7121047
0
Converts objects to Json
public String objectToJson(Object o){ Gson gson = new Gson(); String json = gson.toJson(o); return json; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object toJson();", "public abstract String toJson();", "public JsonObject toJson();", "public String toJson(Object obj){\n return new Gson().toJson(obj);\n }", "JSONObject toJson();", "JSONObject toJson();", "String toJSON();", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }", "byte[] toJson(Object object) throws Exception {\r\n return this.mapper.writeValueAsString(object).getBytes();\r\n }", "public abstract String toJsonString();", "String parseObjectToJson(Object obj);", "String toJSONString(Object data);", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public static String object2Json(Object object) {\n\t\treturn JSON.toJSONString(object, features);\n\t}", "private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}", "public JSONObject toJson() {\n }", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "@Override\n public String toJson(Object object) {\n if (null == object) {\n return null;\n }\n return JSON.toJSONString(object, SerializerFeature.DisableCircularReferenceDetect);\n }", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }", "public static String toJson(Object obj) {\n\t\treturn toJson(obj, true, true);\n\t}", "public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "@Override\n\tpublic JSONObject toJson() throws JSONException {\n\t\tJSONObject result = super.toJson();\n\t\treturn result;\n\t}", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public static String obj2json(Object obj) throws Exception {\n return objectMapper.writeValueAsString(obj);\n }", "public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }", "public String toJson() { return new Gson().toJson(this); }", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "public static String toJson(Object o)\n {\n return g.toJson(o);\n }", "String toJson() throws IOException;", "public String getJson();", "public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }", "@Override\r\n public byte[] toBinary(Object obj) {\r\n return JSON.toJSONBytes(obj, SerializerFeature.WriteClassName);\r\n }", "private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String toJSON() throws JSONException;", "public String writeAsJson(final Object object) {\n String jsonRepresentation = null;\n try {\n if (object != null) {\n jsonRepresentation = jsonMapper.writeValueAsString(object);\n }\n } catch (final JsonProcessingException e) {\n // LOGGER.error(\"Failed writing object as json\", e);\n }\n\n if (applyMasking) {\n jsonRepresentation = jsonMaskingUtil.mask(jsonRepresentation);\n }\n return jsonRepresentation;\n }", "private JSONArray foodsToJson() {\n JSONArray jsonArray = new JSONArray();\n\n for (Food f : units) {\n jsonArray.put(f.toJson());\n }\n\n return jsonArray;\n }", "public JSONObject toJSON() {\n JSONObject jsonObject = new JSONObject();\n JSONObject json_posts = new JSONObject();\n for (Post post : this.getPost()) {\n JSONObject json_post = new JSONObject();\n JSONObject json_files = new JSONObject();\n for (UserFile userFile : post.getFile()) {\n JSONObject json_file = new JSONObject();\n json_file.put(\"FileID\", userFile.getFileID());\n json_file.put(\"FilePath\", userFile.getFilePath());\n json_files.put(\"File\" + userFile.getFileID(), json_file);\n }\n json_post.put(\"PostID\", post.getPostID());\n json_post.put(\"Title\", post.getTitle());\n json_post.put(\"Body\", post.getBody());\n json_post.put(\"Files\", json_files);\n json_posts.put(\"Post\" + post.getPostID(), json_post);\n }\n jsonObject.put(\"UID\", this.getUID());\n jsonObject.put(\"UserName\", this.getUserName());\n jsonObject.put(\"PassWord\", this.getPassWord());\n jsonObject.put(\"Email\", this.getEmail());\n jsonObject.put(\"Posts\", json_posts);\n return jsonObject;\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "public String jsonify() {\n return gson.toJson(this);\n }", "private static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}", "public String parseObjectToJson(Object object) {\n\n return gson.toJson(object);\n }", "public String toJson(Object src) {\n return getGson().toJson(src);\n }", "<T> String toJson(T source);", "public static <T> String object2String(T obj){\n\t\treturn JSON.toJSONString(obj);\n\t}", "private String objectToJson(Object o) throws JsonProcessingException {\n ObjectMapper om = new ObjectMapper();\n om.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);\n return om.writeValueAsString(o);\n }", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "public final static String toJson(final Object src) {\n\t\treturn gson.toJson(src);\n\t}", "public static String getJson(final Object obj)\n\t{\n\t\tString json = null;\n\t\ttry\n\t\t{\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.setSerializationInclusion(Include.ALWAYS);\n\t\t\tjson = mapper.writer().writeValueAsString(obj);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting Java object to json string. Exception message: \", exception);\n\t\t}\n\t\treturn json;\n\t}", "@Override\r\n public JSONObject toJSON() {\r\n return this.studente.toJSON();\r\n }", "private static String nativeObjectToJSONString(NativeObject nativeObject) throws Exception \n { \n \tMap<String, String> mapJson = new LinkedHashMap<String, String>();\n \tMap<String, Class<?>> mapTypeJson = new LinkedHashMap<String, Class<?>>();\n \t\n Object[] ids = nativeObject.getIds(); \n for (Object id : ids) \n { \n String key = id.toString();\n Object value = nativeObject.get(key, nativeObject);\n if(!(value instanceof Undefined)) {\n Object json = toJson(value);\n mapJson.put(key, json+\"\");\n if(!(json instanceof String) && json!=null) mapTypeJson.put(key, json.getClass()); \n }\n } \n \n return HAPUtilityJson.buildMapJson(mapJson, mapTypeJson); \n }", "public static String getJsonString(Object object) throws Exception {\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\r\n\t\treturn mapper.writeValueAsString(object);\t\r\n\t}", "public static void convertBottleJavaObjectToJSON() throws JsonGenerationException, JsonMappingException, IOException{\n\t\t\n\t\tDataBinder binder = new DataBinder();\n\t\tBottle bottle = binder.new Bottle(\"Cello Traveller\",\"Silver\",\"91828283732\");\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE,true); \n\t\tmapper.writeValue(System.out, bottle);\n\t}", "public static String toJson(Object o) throws JsonProcessingException {\n var mapper = new ObjectMapper();\n mapper.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd\"));\n mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);\n var ow = mapper.writer();\n return ow.writeValueAsString(o);\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n protected String convertObjectToJson(Object object) {\n try {\n Set<EventDataValue> eventDataValues =\n object == null ? Collections.emptySet() : (Set<EventDataValue>) object;\n\n Map<String, EventDataValue> tempMap = new HashMap<>();\n\n for (EventDataValue eventDataValue : eventDataValues) {\n tempMap.put(eventDataValue.getDataElement(), eventDataValue);\n }\n\n return writer.writeValueAsString(tempMap);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }", "private static String valueToJSONString(Object value) throws Exception \n {\n\t\t JSONObject json = new JSONObject(); \n\t if (value instanceof IdScriptableObject && \n\t ((IdScriptableObject)value).getClassName().equals(\"Date\") == true) \n\t { \n\t // Get the UTC values of the date \n\t Object year = NativeObject.callMethod((IdScriptableObject)value, \"getUTCFullYear\", null); \n\t Object month = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMonth\", null); \n\t Object date = NativeObject.callMethod((IdScriptableObject)value, \"getUTCDate\", null); \n\t Object hours = NativeObject.callMethod((IdScriptableObject)value, \"getUTCHours\", null); \n\t Object minutes = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMinutes\", null); \n\t Object seconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCSeconds\", null); \n\t Object milliSeconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMilliseconds\", null); \n\t \n\t // Build the JSON object to represent the UTC date \n\t \n\t json.put(\"zone\",\"UTC\"); \n\t json.put(\"year\",year); \n\t json.put(\"month\",month); \n\t json.put(\"date\",date); \n\t json.put(\"hours\",hours); \n\t json.put(\"minutes\",minutes); \n\t json.put(\"seconds\",seconds); \n\t json.put(\"milliseconds\",milliSeconds); \n\t return json.toString(); \n\t } \n\t else if (value instanceof NativeJavaObject) \n\t { \n\t Object javaValue = Context.jsToJava(value, Object.class); \n\t return javaValue.toString(); \n\t } \n\t else if (value instanceof NativeArray) \n\t { \n\t // Output the native array \n\t return nativeArrayToJSONString((NativeArray)value); \n\t } \n\t else if (value instanceof NativeObject) \n\t { \n\t // Output the native object \n\t return nativeObjectToJSONString((NativeObject)value); \n\t } \n\t else if( value instanceof Function){\n\t \treturn Context.toString(value);\n\t }\n\t else \n\t { \n\t return value.toString(); \n\t } \n }", "public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}", "@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"frontInfo\", frontInfo);\n json.put(\"backInfo\", backInfo);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(startTime);\n\n json.put(\"startTime\", formattedDate);\n json.put(\"cardID\", cardID);\n return json;\n }", "void generateJSON(JSONObject object, String name);", "private JsonNode toJson() {\n ObjectMapper mapper = new ObjectMapper();\n ObjectNode root = mapper.createObjectNode();\n root.put(\"packages\", jsonPackages(mapper));\n root.put(\"cycleSegments\", jsonCycleSegments(mapper, catalog.getCycleSegments()));\n root.put(\"summary\", jsonSummary(mapper));\n return root;\n }", "public static String toJSON(final Object object) {\r\n\t\tString jsonString = null;\r\n\t\ttry\t{\r\n\t\t\tif (object != null)\t{\r\n\t\t\t\tjsonString = SERIALIZER.serialize(object);\r\n\t\t\t}\r\n\t\t} catch (SerializeException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in serializing to json\",\r\n\t\t\t\t\tex);\r\n\t\t\tjsonString = null;\r\n\r\n\t\t}\r\n\t\treturn jsonString;\r\n\t}", "public Object getJsonObject() {\n return JSONArray.toJSON(values);\n }", "void toJson(JsonStaxPrinter printer) throws PrintingException, IOException;", "public static String toJson(Object o) {\r\n\t\ttry {\r\n\t\t\treturn mapper.writeValueAsString(o);\r\n\t\t} catch (JsonGenerationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (JsonMappingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String toJSON(final Object object) {\n return gson.toJson(object);\n }", "public JsonObject toJson(){\n JsonObject json = new JsonObject();\n if(username != null){\n json.addProperty(\"username\" , username);\n }\n json.addProperty(\"title\", title);\n json.addProperty(\"description\", description);\n json.addProperty(\"date\", date);\n json.addProperty(\"alarm\", alarm);\n json.addProperty(\"alert_before\", alert_before);\n json.addProperty(\"location\", location);\n\n return json;\n }", "public JsonObject toJson() {\n\t\tJsonObject json = new JsonObject();\n\t\t\n\t\tif (id != null) {\n\t\t\tjson.addProperty( \"id\", id );\n\t\t}\n\t\tif (name != null) {\n\t\t\tjson.addProperty( \"name\", name );\n\t\t}\n\t\tif (version != null) {\n\t\t\tjson.addProperty( \"version\", version );\n\t\t}\n\t\tif (context != null) {\n\t\t\tjson.addProperty( \"context\", context );\n\t\t}\n\t\tif (provider != null) {\n\t\t\tjson.addProperty( \"provider\", provider );\n\t\t}\n\t\tif (description != null) {\n\t\t\tjson.addProperty( \"description\", description );\n\t\t}\n\t\tif (status != null) {\n\t\t\tjson.addProperty( \"status\", status );\n\t\t}\n\t\treturn json;\n\t}", "protected JSONArray individualsToJson(List<Individual> individuals) throws ServletException {\n try{\n \tJSONArray ja = new JSONArray();\n \tfor (Individual ent: individuals) {\n JSONObject entJ = new JSONObject();\n entJ.put(\"name\", ent.getName());\n entJ.put(\"URI\", ent.getURI());\n ja.put( entJ );\n }\n \treturn ja;\n }catch(JSONException ex){\n throw new ServletException(\"could not convert list of Individuals into JSON: \" + ex);\n }\n }", "public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}", "public interface JsonUtil {\n /**\n * Encode {@link org.schemarepo.Subject}s into a {@link String} for use by\n * {@link #subjectNamesFromJson(String)}\n *\n * The format is an array of objects containing a name field, for example:\n *\n * [{\"name\": \"subject1\"}, {\"name\": \"subject2\"}]\n *\n * @param subjects the Subject objects to encode\n * @return The {@link org.schemarepo.Subject} objects encoded as a String\n */\n String subjectsToJson(Iterable<Subject> subjects);\n\n /**\n * Decode a string created by {@link #subjectsToJson(Iterable)}\n *\n * @param str The String to decode\n * @return an {@link java.lang.Iterable} of {@link Subject}\n */\n Iterable<String> subjectNamesFromJson(String str);\n\n /**\n * Encode {@link org.schemarepo.SchemaEntry} objects into a {@link String} for use by\n * {@link #schemasFromJson(String)}\n *\n * The format is an array of objects containing id and schema fields, for example:\n *\n * [{\"id\": \"0\", \"schema\": \"schema1\"}, {\"id\": \"2\", \"schema\": \"schema2\"}]\n *\n * @param allEntries the SchemaEntry objects to encode\n * @return The {@link org.schemarepo.SchemaEntry} objects encoded as a String\n */\n String schemasToJson(Iterable<SchemaEntry> allEntries);\n\n /**\n * Decode a string created by {@link #schemasToJson(Iterable)}\n *\n * @param str The String to decode\n * @return An {@link java.lang.Iterable} of {@link SchemaEntry}\n */\n Iterable<SchemaEntry> schemasFromJson(String str);\n}", "public String toJSON() {\n return new Gson().toJson(this);\n }", "public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}", "public JSONObject transformer() {\n JSONObject jsonObject = new JSONObject();\n JSONArray listening = new JSONArray();\n JSONArray listening_correction = new JSONArray();\n JSONArray reading = new JSONArray();\n JSONArray reading_correction = new JSONArray();\n JSONArray historique = new JSONArray();\n\n for (int i = 0; i < this.listening.size(); i++) {\n listening.put(this.listening.get(i).whoIs());\n listening_correction.put(this.listening_correction.get(i).whoIs());\n }\n\n for (int j = 0; j < this.reading.size(); j++) {\n reading.put(this.reading.get(j).whoIs());\n reading_correction.put(this.reading_correction.get(j).whoIs());\n }\n\n for(int k=0; k < this.historique.size(); k++){\n historique.put( transforme(this.historique.get(k)) );\n }\n\n try {\n jsonObject.put(\"nom\", this.nom);\n jsonObject.put(\"listening\", listening);\n jsonObject.put(\"reading\", reading);\n jsonObject.put(\"listening_correction\", listening_correction);\n jsonObject.put(\"reading_correction\", reading_correction);\n jsonObject.put(\"historique\",historique);\n jsonObject.put(\"etat\", this.etat);\n jsonObject.put(\"mode\", this.mode);\n jsonObject.put(\"est_termine\", this.est_termine);\n jsonObject.put(\"chronometre\", this.chronometre);\n Log.i(\"jsonObject\",jsonObject.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonObject;\n }", "@SuppressWarnings({\"hiding\", \"static-access\"})\n @Override\n public RavenJObject toJson() {\n RavenJObject ret = new RavenJObject();\n ret.add(\"Key\", new RavenJValue(key));\n ret.add(\"Method\", RavenJValue.fromObject(getMethod().name()));\n\n RavenJObject patch = new RavenJObject();\n patch.add(\"Script\", new RavenJValue(this.patch.getScript()));\n patch.add(\"Values\", RavenJObject.fromObject(this.patch.getValues()));\n\n ret.add(\"Patch\", patch);\n ret.add(\"DebugMode\", new RavenJValue(debugMode));\n ret.add(\"AdditionalData\", additionalData);\n ret.add(\"Metadata\", metadata);\n\n if (etag != null) {\n ret.add(\"Etag\", new RavenJValue(etag.toString()));\n }\n if (patchIfMissing != null) {\n RavenJObject patchIfMissing = new RavenJObject();\n patchIfMissing.add(\"Script\", new RavenJValue(this.patchIfMissing.getScript()));\n patchIfMissing.add(\"Values\", RavenJObject.fromObject(this.patchIfMissing.getValues()));\n ret.add(\"PatchIfMissing\", patchIfMissing);\n }\n return ret;\n }", "private String stringify(Object object) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(object);\n }", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }", "public static String convertObjToString(Object clsObj) {\n String jsonSender = new Gson().toJson(clsObj, new TypeToken<Object>() {\n }.getType());\n return jsonSender;\n }", "@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String getEmployeeListJSON(){\n\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t\t.setDateFormat(\"dd/MM/yyyy\")\n\t\t\t\t\t\t.create();\n\t\t String rtnString = gson.toJson(daoImpl.getEmployees());\n\t\t \n\t\t return rtnString;\n\t}", "private static String jsonToString(final Object obj) throws JsonProcessingException {\n String result;\n try {\n final ObjectMapper mapper = new ObjectMapper();\n final String jsonContent = mapper.writeValueAsString(obj);\n result = jsonContent;\n } catch (JsonProcessingException e) {\n result = \"Json processing error\";\n }\n return result;\n }", "public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }", "public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;", "public JsonObject covertToJson() {\n JsonObject transObj = new JsonObject(); //kasutaja portf. positsiooni tehing\n transObj.addProperty(\"symbol\", symbol);\n transObj.addProperty(\"type\", type);\n transObj.addProperty(\"price\", price);\n transObj.addProperty(\"volume\", volume);\n transObj.addProperty(\"date\", date);\n transObj.addProperty(\"time\", time);\n transObj.addProperty(\"profitFromSell\", profitFromSell);\n transObj.addProperty(\"averagePurchasePrice\", averagePurchasePrice);\n return transObj;\n }", "@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"name\", name);\n json.put(\"startingTime\", startingTime);\n json.put(\"endingTime\", endingTime);\n json.put(\"event\", eventToJson());\n json.put(\"duration\", duration);\n return json;\n }", "private String convertToJson(Contacts contact) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contact); \n\t}", "private static JsonAluno toBasicJson(Aluno aluno) {\r\n\t\tJsonAluno jsonAluno = new JsonAluno();\r\n\t\tapplyBasicJsonValues(jsonAluno, aluno);\r\n\t\treturn jsonAluno;\r\n\t}" ]
[ "0.7857138", "0.7185203", "0.70883334", "0.70429426", "0.6979893", "0.6979893", "0.6969938", "0.681829", "0.6812914", "0.6786549", "0.6755135", "0.6738429", "0.6662659", "0.6641544", "0.6640691", "0.65919304", "0.65700835", "0.6557524", "0.6537391", "0.64670885", "0.6463336", "0.64206797", "0.6395654", "0.6375884", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.6363672", "0.63616353", "0.63193816", "0.62928987", "0.626579", "0.6255425", "0.6252683", "0.6248289", "0.62380356", "0.62213624", "0.6199887", "0.619035", "0.6183774", "0.61826247", "0.61769307", "0.6164996", "0.6164817", "0.6164817", "0.6159985", "0.61526376", "0.61491346", "0.614226", "0.6138775", "0.6130467", "0.612732", "0.611323", "0.6097204", "0.60752946", "0.6074574", "0.60645807", "0.60486394", "0.60423976", "0.6039933", "0.6036463", "0.60300034", "0.60112655", "0.59965783", "0.5986497", "0.5976897", "0.5966682", "0.59664303", "0.594528", "0.594166", "0.5926686", "0.5917095", "0.5911383", "0.5909799", "0.5909521", "0.5907415", "0.5906002", "0.5882988", "0.58729565", "0.5855373", "0.58540183", "0.5852994", "0.5852756", "0.58457565", "0.58443385", "0.58439523", "0.5826549", "0.58203965", "0.58171946", "0.5793718", "0.5790549", "0.5787585", "0.57830125", "0.5781867" ]
0.68120325
9
Converts Json to a basic object type
public Object stringToObject(String s, Class c){ Gson gson = new Gson(); Object o = gson.fromJson(s, c); return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T parseToObject(Object json, Class<T> classObject);", "T fromJson(Object source);", "public abstract void fromJson(JSONObject jsonObject);", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "<T> T fromJson(String json, Class<T> type);", "public native Object parse( Object json );", "private <T> T getObjectFromJsonObject(JSONObject j, Class<T> clazz) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n T t = null;\n t = mapper.readValue(j.toString(), clazz);\n\n return t;\n }", "public static final <V> V toObject(String json, Type type) {\n return gson.fromJson(json, type);\n }", "<T> T fromJson(String source, JavaType type);", "public interface ApiObject {\n\n String toJson();\n\n Object fromJson(JsonObject json);\n}", "@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Appointment properly\", object.getClass(), actual.getClass());\n }", "public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"error mapJsonToObject: \" + e.getMessage());\n\t\t}\n\t\treturn obj;\n\t}", "<T> T fromJson(String source, Class<T> type);", "@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "private static <T> T getObjectFromJson(JsonNode dataJson) {\n Object object=null;\n if(!dataJson.has(CLASS_FIELD)) {\n return null;\n }\n /** Determine class of object and return with cast*/\n String classField=dataJson.get(CLASS_FIELD).asText();\n\n /** Lists -> All lists are converted into ArrayLists*/\n if(classField.startsWith(LIST_CLASS)) {\n try {\n String[] listType=classField.split(SEPERATOR);\n if(listType.length<2) {\n return (T) new ArrayList<>();\n }\n Class type=Class.forName(listType[1]);\n String json=dataJson.get(DATA_FIELD).toString();\n List<Object> list=new ArrayList<>();\n ArrayNode array=(ArrayNode) mapper.readTree(json);\n for(JsonNode item : array) {\n Object o=mapper.readValue(item.toString(), type);\n list.add(o);\n }\n return (T) list;\n }\n catch(JsonProcessingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n /** Single objects*/\n else {\n Class type=null;\n try {\n type=Class.forName(classField);\n /** Read primitive types (String,Integer,...)*/\n if(dataJson.has(PRIMITIVE_FIELD)) {\n object=mapper.readValue(dataJson.get(PRIMITIVE_FIELD).toString(), type);\n }\n else {\n object=mapper.readValue(dataJson.toString(), type);\n }\n return (T) object;\n }\n catch(ClassNotFoundException | JsonProcessingException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public FilterItems jsonToObject(String json){\n json = json.replace(\"body=\",\"{ \\\"body\\\" : \");\n json = json.replace(\"&oil=\",\", \\\"oil\\\" : \");\n json = json.replace(\"&transmission=\",\", \\\"transmission\\\" :\");\n json = json + \"}\";\n json = json.replace(\"[]\",\"null\");\n ObjectMapper mapper = new ObjectMapper();\n FilterItems itemSearch = null;\n try {\n itemSearch = mapper.readValue(json, FilterItems.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return itemSearch;\n }", "@Test\n public void readSystemObjectClassPrescription() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Prescription\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Prescription properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void readSystemObjectClassMedicine() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Medicine\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Medicine properly\", object.getClass(), actual.getClass());\n }", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {\n return JSON.parseObject(inputMessage.getBody(), this.fastJsonConfig.getCharset(), (Type) clazz, this.fastJsonConfig.getFeatures());\n }", "public static <T> T pasarAObjeto(String json, Class<T> tipo) {\r\n try {\r\n ObjectMapper mapper = getBuilder().build();\r\n return mapper.readValue(json, tipo);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public abstract Object deserialize(Object object);", "public interface JsonConverter {\n /** Deserializes a JSON string into a Java object.\n * @param source JSON string.\n * @param type Class type.\n * @param <T> type of class to return.\n * @return A Java object representing the same information as found in the JSON string.\n */\n <T> T fromJson(String source, Class<T> type);\n\n /** Deserializes a JSON string into a Java object.\n * @param source JSON string.\n * @param type JavaType class type.\n * @param <T> type of class to return.\n * @return A Java object representing the same information as found in the JSON string.\n */\n <T> T fromJson(String source, JavaType type);\n\n /** Serializes a Java object into a JSON string.\n * @param source A Java object.\n * @param <T> type of class of the source.\n * @return A JSON string representing the data represented in the Java object.\n */\n <T> String toJson(T source);\n}", "void mo28373a(JSONObject jSONObject);", "public static <T> T convertJsonStringToObject(String json,\n\t\t\tClass<T> valueType) {\n\t\ttry {\n\t\t\treturn mapper.readValue(json, valueType);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Error converting Json String [\" + json\n\t\t\t\t\t+ \"] to [\" + valueType.getCanonicalName() + \"]\", e);\n\t\t}\n\t}", "public interface JsonConverter {\n\n String toJson(Object o) throws IOException;\n\n String toJsonIgnoreException(Object o);\n\n <T> T fromJson(String json, Class<T> type) throws IOException;\n\n <T> T fromJson(String json, TypeData<T> typeData) throws IOException;\n\n <T> T convert(Object o, TypeData<T> typeData) throws IOException;\n}", "@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract T zzb(JSONObject jSONObject);", "@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }", "public <T> T fromJson(String json, Type type) {\n return getGson().fromJson(json, type);\n }", "<T> T toJsonPOJO(String jsonString, Class<T> classType);", "public static <T> T fromJson(String json, Class<T> type)\n {\n return g.fromJson(json, type);\n }", "@Test\n public void readSystemObjectClassMedicineOrderRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"MedicineOrderRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return MedicineOrderRequest properly\", object.getClass(), actual.getClass());\n }", "public void deserialize(JsonObject src);", "public static Object fromJSON(quark.reflect.Class cls, Object result, io.datawire.quark.runtime.JSONObject json) {\n if (((json)==(null) || ((Object)(json) != null && ((Object) (json)).equals(null))) || ((json).isNull())) {\n return null;\n }\n Integer idx = 0;\n if ((result)==(null) || ((Object)(result) != null && ((Object) (result)).equals(null))) {\n if (((cls).name)==(\"quark.String\") || ((Object)((cls).name) != null && ((Object) ((cls).name)).equals(\"quark.String\"))) {\n String s = (json).getString();\n return s;\n }\n if (((cls).name)==(\"quark.float\") || ((Object)((cls).name) != null && ((Object) ((cls).name)).equals(\"quark.float\"))) {\n Double flt = (json).getNumber();\n return flt;\n }\n if (((cls).name)==(\"quark.int\") || ((Object)((cls).name) != null && ((Object) ((cls).name)).equals(\"quark.int\"))) {\n Integer i = ((int) Math.round((json).getNumber()));\n return i;\n }\n if (((cls).name)==(\"quark.bool\") || ((Object)((cls).name) != null && ((Object) ((cls).name)).equals(\"quark.bool\"))) {\n Boolean b = (json).getBool();\n return b;\n }\n result = (cls).construct(new java.util.ArrayList(java.util.Arrays.asList(new Object[]{})));\n }\n if (((cls).name)==(\"quark.List\") || ((Object)((cls).name) != null && ((Object) ((cls).name)).equals(\"quark.List\"))) {\n java.util.ArrayList<Object> list = (java.util.ArrayList<Object>) (result);\n while ((idx) < ((json).size())) {\n (list).add(Functions.fromJSON(((cls).getParameters()).get(0), null, (json).getListItem(idx)));\n idx = (idx) + (1);\n }\n return list;\n }\n java.util.ArrayList<quark.reflect.Field> fields = (cls).getFields();\n while ((idx) < ((fields).size())) {\n quark.reflect.Field f = (fields).get(idx);\n idx = (idx) + (1);\n if (Boolean.valueOf(((f).name).startsWith(\"_\"))) {\n continue;\n }\n if (!(((json).getObjectItem((f).name)).isNull())) {\n ((io.datawire.quark.runtime.QObject) (result))._setField((f).name, Functions.fromJSON((f).getType(), null, (json).getObjectItem((f).name)));\n }\n }\n return result;\n }", "ValueType getJsonValueType();", "public Object jsonToObject(Class<?> clazz, JSONObject jsonObject) throws ClassNotFoundException, SecurityException,\n\t\t\tIllegalAccessException, InvocationTargetException, InstantiationException, JSONException {\n\n\t\tObject object = clazz.newInstance();\n\n\t\tField[] fields = clazz.getDeclaredFields();\n\n\t\tfor (Field field : fields) {\n\n\t\t\tfield.setAccessible(true);\n\n\t\t\tClass<?> typeClazz = field.getType();\n\n\t\t\tif (typeClazz.isPrimitive()) {\n\t\t\t\t/*\n\t\t\t\t * field.set(object,jsonObject.get(field.getName()));\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t} else {\n\n\t\t\t\tif (String.class.isAssignableFrom(field.getType())) {\n\t\t\t\t\t\n\t\t\t\t\tfield.set(object, jsonObject.get(field.getName()));\n\n\t\t\t\t} else if (field.getType().isArray()\n\t\t\t\t\t\t&& (String.class.isAssignableFrom(field.getType().getComponentType()))) {\n\n\t\t\t\t\tJSONArray jArray = jsonObject.getJSONArray(field.getName());\n\t\t\t\t\tint len = jArray.length();\n\t\t\t\t\tString[] array = new String[len];\n\t\t\t\t\tfor (int i = 0; i < len; i++) {\n\n\t\t\t\t\t\tarray[i] = jArray.getString(i);\n\t\t\t\t\t}\n\t\t\t\t\tfield.set(object, array);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfield.set(object, jsonToObject(typeClazz, jsonObject.getJSONObject(field.getName())));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn object;\n\t}", "public void mo15090a(JSONObject jSONObject) {\n }", "public Object parseJsonToObject(String response, Class<?> modelClass) {\n\n try {\n return gson.fromJson(response, modelClass);\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }", "public interface JsonParser {\n\n /**\n * convert string to POJO\n *\n * @param jsonString - string to convert to POJO\n * @param classType - POJO Type / Class Type to use for the deserialization\n * @param <T> the returned desirialized POJO\n * @return desiarilized POJO\n */\n <T> T toJsonPOJO(String jsonString, Class<T> classType);\n\n /**\n * convert from POJO to json string\n * @param data POJO to convert to json String\n * @return json string\n */\n String toJSONString(Object data);\n}", "@Test\n public void readSystemObjectClassAccDelRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountDeletionRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountDeletionRequest properly\", object.getClass(), actual.getClass());\n }", "public @NotNull T read(@NotNull final JsonObject object) throws JsonException;", "String parseObjectToJson(Object obj);", "@Test\n public void readSystemObjectClassMessage() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Message\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Message properly\", object.getClass(), actual.getClass());\n }", "public abstract Object toJson();", "GistUser deserializeUserFromJson(String json);", "private static FluidIngredient deserializeObject(JsonObject json) {\n if (json.entrySet().isEmpty()) {\n return EMPTY;\n }\n\n // fluid match\n if (json.has(\"name\")) {\n // don't set both, obviously an error\n if (json.has(\"tag\")) {\n throw new JsonSyntaxException(\"An ingredient entry is either a tag or an fluid, not both\");\n }\n\n // parse a fluid\n return FluidMatch.deserialize(json);\n }\n\n // tag match\n if (json.has(\"tag\")) {\n return TagMatch.deserialize(json);\n }\n\n throw new JsonSyntaxException(\"An ingredient entry needs either a tag or an fluid\");\n }", "public static <T> T string2Object(String source, Class<T> type){\n\t\treturn JSON.parseObject(source, type);\n\t}", "@Test\n public void readUserClassPatient() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Patient\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Patient properly\", Factory.createUser(\"Patient\").getClass(), actual.getClass());\n }", "public static <T> T parseJSON(final String jsonString, Class<T> type) {\r\n\t\tT retObject = null;\r\n\t\ttry {\r\n\t\t\tretObject = PARSER.parse(jsonString, type);\r\n\t\t} catch (ParseException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in de-serializing to object\", ex);\r\n\t\t\tretObject = null;\r\n\t\t}\r\n\t\treturn retObject;\r\n\t}", "protected <T> Object fromJson(String jsonString, Class<T> classInstance) {\n\n\t\tSystem.out.println(\"jsonString = \" + jsonString);\n\t\treturn gson.fromJson(jsonString, classInstance);\n\n\t}", "public <T> T toObject(Class<T> c) {\n if (JsonSerializable.class.isAssignableFrom(c) || String.class.isAssignableFrom(c)\n || Number.class.isAssignableFrom(c) || Boolean.class.isAssignableFrom(c)) {\n throw new IllegalArgumentException(\"c can only be a POJO class or JSONObject\");\n }\n if (JSONObject.class.isAssignableFrom(c)) {\n // JSONObject\n if (JSONObject.class != c) {\n throw new IllegalArgumentException(\"We support JSONObject but not its sub-classes.\");\n }\n return c.cast(this.propertyBag);\n } else {\n // POJO\n JsonSerializable.checkForValidPOJO(c);\n try {\n return this.getMapper().readValue(this.toJson(), c);\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to get POJO.\", e);\n }\n }\n }", "T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;", "public <T> T fromJson(String json, Class<T> clazz) {\n return getGson().fromJson(json, clazz);\n }", "JsonObject raw();", "@Test\n public void readUserClassDoctor() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Doctor\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Doctor properly\", Factory.createUser(\"Doctor\").getClass(), actual.getClass());\n }", "public static JinyouTestOne fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, JinyouTestOne.class);\n }", "public interface JsonPaser<C> {\n public JsonPaser me();\n\n public C toJson(String json);\n\n public String toJsonString(Object object);\n\n public <T> T toObject(String json, Class<T> type);\n\n public <T> T[] toObjectArray(String json, Class<T> type);\n\n public <T> Collection<T> toObjectList(String json, Class<T> type);\n\n public <T> T toObject(String name, C c, Class<T> type);\n\n public <T> T[] toObjectArray(String name, C c, Class<T> type);\n\n public <T> Collection<T> toObjectList(String name, C c, Class<T> type);\n\n}", "@Test\n public void simpleConversion() {\n SimpleBasicMessage arec = new SimpleBasicMessage(\"my msg\");\n String json = arec.toJSON();\n System.out.println(json);\n assertNotNull(\"missing JSON\", json);\n\n SimpleBasicMessage arec2 = AbstractMessage.fromJSON(json, SimpleBasicMessage.class);\n assertNotNull(\"JSON conversion failed\", arec2);\n assertNotSame(arec, arec2);\n assertEquals(arec.getMessage(), arec2.getMessage());\n assertEquals(arec.getDetails(), arec2.getDetails());\n }", "public interface PojoParser {\n\n\n /**\n * Method which converts the Pojo to JSON Object\n * @return return the framed {@link JSONObject} instance\n */\n public abstract JSONObject toJson();\n\n /**\n * Method which convert JSON to POJO.\n * @param jsonObject Josn object which need to be parsed.\n */\n public abstract void fromJson(JSONObject jsonObject);\n}", "private <T> T formatObject(String objectName, JSONObject object, Class objectClass){\n Gson gson = new Gson();\n String stringObject = object.getJSONObject(objectName).toString();\n T formattedObject = (T) gson.fromJson(stringObject,objectClass);\n return formattedObject;\n }", "public native Object parse( Object json, String texturePath );", "@Test\n public void simpleObject() throws IOException {\n String obj = \"{\\\"name\\\":\\\"value\\\",\\\"int\\\":1302,\\\"float\\\":1.57,\"\n + \"\\\"negint\\\":-5,\\\"negfloat\\\":-1.57,\\\"floatexp\\\":-1.5e7}\";\n JsonLexer l = new JsonLexer(new StringReader(obj));\n JsonParser p = new JsonParser(l);\n Map<String, Object> m = p.parseObject();\n\n assertEquals(6, m.size());\n assertEquals(\"value\", m.get(\"name\"));\n assertEquals(1302L, m.get(\"int\"));\n assertEquals(1.57, m.get(\"float\"));\n assertEquals(-5L, m.get(\"negint\"));\n assertEquals(-1.57, m.get(\"negfloat\"));\n assertEquals(-1.5e7, m.get(\"floatexp\"));\n }", "@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }", "@Test\n public void readUserClassSecretary() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Secretary\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Secretary properly\", Factory.createUser(\"Secretary\").getClass(), actual.getClass());\n }", "public void fromJSON(String json) throws JSONException;", "@SuppressWarnings(\"unchecked\")\n public <V> V toJavaObject(JsonValue jsonValue, Type valueType) {\n Objects.requireNonNull(jsonValue);\n Objects.requireNonNull(valueType);\n if (valueType instanceof Class && JsonValue.class.isAssignableFrom((Class<?>) valueType)) {\n return (V) jsonValue;\n }\n Map.Entry<Class<?>, Class<?>> typeArguments = getTypeArguments(valueType);\n return toJavaObject(jsonValue, (Class<V>) typeArguments.getValue(), typeArguments.getKey());\n }", "@Test\n public void verifyJsonBackWardCompatible() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_noDesc.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }", "private Object readJSON() throws JSONException\n {\n switch(read(3))\n {\n case zipObject:\n return readObject();\n case zipArrayString:\n return readArray(true);\n case zipArrayValue:\n return readArray(false);\n case zipEmptyObject:\n return new JSONObject();\n case zipEmptyArray:\n return new JSONArray();\n case zipTrue:\n return Boolean.TRUE;\n case zipFalse:\n return Boolean.FALSE;\n default:\n return JSONObject.NULL;\n }\n }", "@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetItemID(Integer.parseInt(j.getString(KEY_ITEMS_IDITEMS)));\n\t\tsetReceiptID(Integer.parseInt(j.getString(KEY_RECEIPT_IDRECEIPT)));\n\t\tsetMileage(Integer.parseInt(j.getString(KEY_WORKMILEAGE)));\n\t\tsetNotes(j.getString(KEY_WORKNOTES));\n\t\t\n\t}", "public static <T extends IJsonObject> JsonResultObject<T> getJsonAsObjectOf(\r\n final String url,\r\n final Class<T> newClass)\r\n {\r\n JsonResultObject<T> json = new JsonResultObject<T>();\r\n json = getJson(url, json);\r\n\r\n T newObject = null;\r\n\r\n if (json.getJsonObject() != null && json.getJsonObject().length() > 0)\r\n {\r\n try\r\n {\r\n newObject = newClass.newInstance();\r\n }\r\n catch (final Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n if (newObject != null)\r\n {\r\n newObject.initialize(json.getJsonObject());\r\n }\r\n }\r\n\r\n json.setObject(newObject);\r\n\r\n return json;\r\n }", "private static JsonUser toBasicJson(User user) {\r\n\t\tJsonUser jsonUser = new JsonUser();\r\n\t\tapplyBasicJsonValues(jsonUser, user);\r\n\t\treturn jsonUser;\r\n\t}", "public static <T> T getJSONObject(final String json, final Class<T> typeReference)\n\t{\n\t\tT obj = null;\n\t\ttry\n\t\t{\n\t\t\tobj = new ObjectMapper().readValue(json, typeReference);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting string into object. Exception message: \", exception);\n\t\t}\n\t\treturn obj;\n\t}", "public static Anuncio fromJson(String json) throws JsonParseException{\n Gson gson = new Gson();\n return gson.fromJson(json, Anuncio.class);\n }", "public static RegistrationResult fromJson(JsonObject object) {\n String type = object.getAsJsonPrimitive(\"type\").getAsString();\n\n if (type.equals(\"Success\"))\n return Success.fromJson(object);\n else if (type.equals(\"InvalidEmail\"))\n return InvalidEmail.fromJson(object);\n else if (type.equals(\"EmailExists\"))\n return EmailExists.fromJson(object);\n else if (type.equals(\"InvalidNameLength\"))\n return InvalidNameLength.fromJson(object);\n else if (type.equals(\"InvalidPasswordLength\"))\n return InvalidPasswordLength.fromJson(object);\n else if (type.equals(\"InvalidNameSymbols\"))\n return InvalidNameSymbols.fromJson(object);\n else if (type.equals(\"NameExists\"))\n return NameExists.fromJson(object);\n else if (type.equals(\"MalformedJson\"))\n return MalformedJson.fromJson(object);\n else if (type.equals(\"IncorrectData\"))\n return IncorrectData.fromJson(object);\n return null;\n }", "JSONConverter getDefaultConverter();", "@Test\n public void readUserClassAdmin() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Administrator\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return user class properly\", Factory.createUser(\"Administrator\").getClass(), actual.getClass());\n }", "Gist deserializeGistFromJson(String json);", "public static <T> T json2pojo(String jsonStr, Class<T> clazz)\n throws Exception {\n return objectMapper.readValue(jsonStr, clazz);\n }", "@Override\r\n public Object fromBinaryJava(byte[] bytes, Class<?> clazz) {\r\n return JSON.parseObject(bytes, clazz);\r\n }", "abstract Object read(@NonNull JsonReader reader) throws IOException;", "@Override\n public BitfinexModel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException\n {\n JsonElement bitfinexModel = json.getAsJsonObject();\n\n /**\n * Deserialize the JsonElement as GSON\n */\n return new Gson().fromJson(bitfinexModel, BitfinexModel.class);\n }", "private static JsonItemType toBasicJson(ItemType itemType) {\r\n\t\tJsonItemType jsonItemType = new JsonItemType();\r\n\t\tapplyBasicJsonValues(jsonItemType, itemType);\r\n\t\treturn jsonItemType;\r\n\t}", "private FieldDocument _fromJson (String json) {\n try {\n FieldDocument fd = this.mapper.readValue(json, FieldDocument.class);\n return fd;\n }\n catch (IOException e) {\n log.error(\"File json not found or unmappable: {}\",\n e.getLocalizedMessage());\n };\n return (FieldDocument) null;\n }", "private Tamagotchi tamagotchiToJson(JSONObject jsonObject) {\n String name = jsonObject.getString(\"name\");\n Tamagotchi tr = new Tamagotchi(name);\n return tr;\n }", "private JsonUtils() {}", "public static Personagem fromJson(JSONObject json){\n Personagem personagem = new Personagem(\n json.getString(\"nome\"),\n json.getString(\"raca\"),\n json.getString(\"profissao\"),\n json.getInt(\"mana\"),\n json.getInt(\"ataque\"),\n json.getInt(\"ataqueMagico\"),\n json.getInt(\"defesa\"),\n json.getInt(\"defesaMagica\"),\n json.getInt(\"velocidade\"),\n json.getInt(\"destreza\"),\n json.getInt(\"experiencia\"),\n json.getInt(\"nivel\")\n\n );\n return personagem;\n }", "private JsonObject getActualJsonObject(JsonObject jsonObject, RootJsonObjectMapping jsonObjectMapping, MarshallingContext context, Resource resource) {\n if (jsonObject instanceof RawJsonObject) {\n String json = ((RawJsonObject) jsonObject).getJson();\n JsonContentMapping jsonContentMapping = jsonObjectMapping.getContentMapping();\n JsonContentMappingConverter jsonContentMappingConverter;\n if (jsonContentMapping != null) {\n jsonContentMappingConverter = (JsonContentMappingConverter) jsonContentMapping.getConverter();\n } else {\n jsonContentMappingConverter = (JsonContentMappingConverter) context.getConverterLookup().\n lookupConverter(CompassEnvironment.Converter.DefaultTypeNames.Mapping.JSON_CONTENT_MAPPING);\n }\n jsonObject = jsonContentMappingConverter.getContentConverter().fromJSON(resource.getAlias(), json);\n }\n return jsonObject;\n }", "private DatasetJsonConversion() {}", "public static SofortInfo fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, SofortInfo.class);\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "@Override\n public Object convertJsonToObject(String content) {\n try {\n Map<String, EventDataValue> data = reader.readValue(content);\n\n return convertEventDataValuesMapIntoSet(data);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public static FeedWrapper convertToObjects(String json) {\n // TODO: GSON is created during each conversion - reusing possibilities need to be analyzed\n return new Gson().fromJson(json, FeedWrapper.class); // json -> pojos\n }", "public static Object decode(JsonObject content) {\n return new exercise(content);\n }", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "public ClaseJson() {\n }", "@Override\n\tpublic <T extends BaseModel> T decodeContent(JSONObject object)\n\t{\n\t\treturn null;\n\t}", "static <T extends JSONSerializable> T deserialize(String json, Class<T> type) throws Exception {\n T result = type.newInstance();\n result.jsonDeserialize(json);\n return result;\n }", "public static void main(String[] args) {\n Employee employee = new Employee();\n employee.setName(\"utkarsh tyagi\");\n employee.setEmpNo(1001);\n employee.setSalary(20000);\n String jsonEmployee = JsonUtil.convertJavaToJson(employee);\n System.out.println(jsonEmployee);\n\n Employee emp1 =JsonUtil.convertJsonToJava(jsonEmployee,Employee.class);\n System.out.println(emp1.getName()+ \" \"+ emp1.getEmpNo()+\" \"+emp1.getSalary());\n }" ]
[ "0.72859555", "0.72023046", "0.703118", "0.6989617", "0.68373346", "0.6764001", "0.6691497", "0.66303885", "0.6609684", "0.65962285", "0.6574948", "0.6446123", "0.64023453", "0.63731533", "0.6361438", "0.63561547", "0.63448954", "0.62906545", "0.62822807", "0.6235275", "0.62217236", "0.62191844", "0.62105554", "0.6188755", "0.61815375", "0.61727774", "0.61612105", "0.61556756", "0.61521935", "0.615161", "0.6138869", "0.6138319", "0.6129388", "0.6116173", "0.61143476", "0.60725945", "0.6068294", "0.60594934", "0.6052209", "0.60481316", "0.60292333", "0.6013475", "0.6011914", "0.5981656", "0.59797883", "0.5971567", "0.59674877", "0.5961768", "0.5954311", "0.5942332", "0.5932568", "0.59148026", "0.5898516", "0.58972055", "0.58918554", "0.58800745", "0.5863811", "0.5848972", "0.5842743", "0.58401823", "0.5834911", "0.57936054", "0.5780109", "0.5759371", "0.5744675", "0.5742829", "0.5738204", "0.5732058", "0.5722788", "0.57026523", "0.5702524", "0.5698922", "0.5696601", "0.5696177", "0.5690917", "0.5680697", "0.5661705", "0.56603396", "0.56573504", "0.564946", "0.5642073", "0.5638593", "0.56371415", "0.56194615", "0.5613109", "0.56101", "0.5608194", "0.5607595", "0.5596162", "0.5594904", "0.5594601", "0.5590634", "0.5590447", "0.55882376", "0.5588141", "0.5583908", "0.5575937", "0.5571175", "0.5568342", "0.5562123", "0.55619085" ]
0.0
-1
Takes a file name and converts the Json to a string
public String fileToString(String file){ String path = new File("./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json").getAbsolutePath(); File fileObj = new File(path); Log.d("Reading JSON file", "File exists: " + fileObj.exists()); Log.d("Reading JSON file", "File is directory: " + fileObj.isDirectory()); Log.d("Reading JSON file", "File can read: " + fileObj.canRead()); Log.d("Reading JSON file", "Current directory: " + path); Log.d("Reading JSON file", "The path is: " + file); try(Scanner in = new Scanner(new File(file))){ StringBuilder sb = new StringBuilder(); while(in.hasNextLine()){ sb.append(in.nextLine()); sb.append('\n'); } in.close(); return sb.toString(); } catch (FileNotFoundException ex){ ex.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "public String readJsonFile(String fileName)\n {\n FileInputStream fileInputStream = null;\n String text;\n StringBuilder stringBuilder = new StringBuilder();\n\n try\n {\n fileInputStream = mainContext.openFileInput(fileName);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while((text = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(text).append(\"\\n\");\n }\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n }\n\n return stringBuilder.toString();\n }", "public static String readJsonObject(String filename) {\r\n\t\tBufferedReader br = null;\r\n\t\tFileReader fr = null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString sCurrentLine;\r\n\t\ttry {\r\n\r\n\t\t\tfr = new FileReader(filename);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(sCurrentLine);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "public static String getFilenameExtension() {return \"json\";}", "public static String loadJSONFromAsset(Context context, String fileName) {\n String jsonString = null;\n try {\n InputStream is = context.getAssets().open(fileName);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n jsonString = new String(buffer, StandardCharsets.UTF_8);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return jsonString;\n }", "private String readJsonFile(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n byte bufferByte[] = new byte[1024];\n int length;\n try {\n while ((length = inputStream.read(bufferByte)) != -1) {\n outputStream.write(bufferByte, 0, length);\n }\n outputStream.close();\n inputStream.close();\n } catch (IOException e) {\n\n }\n return outputStream.toString();\n }", "public static String loadJSONFromAsset(Context context,String filePath) {\n String json = null;\n try {\n InputStream is = context.getAssets().open(filePath);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, ENCODING);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public static JsonObject fileToJson(File jsonFile) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();\n JsonObject jsonObject = null;\n\n try {\n Reader reader = new FileReader(jsonFile);\n jsonObject = gson.fromJson(reader, JsonObject.class);\n } catch (FileNotFoundException e) {\n //log.error(\"FileNotFound Exception occurred when converting JSON file to JSON Object\", e); //todo: FileNotFound exception occured. error message?\n e.printStackTrace();\n }\n\n return jsonObject;\n }", "@Override\n public String toString() {return \"Json-File Reader\";}", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "public String loadJSONFromAsset() {\n String json;\n try {\n InputStream is = getAssets().open(\"track_v0649.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public static String getFileType() {return \"json\";}", "public String readJsonResponse(String filePath){\n\t\tBufferedReader br = null;\n\t\tString jsonString=\"\";\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filePath));\n\t\t\tString line=\"\";\n\t\t\twhile((line = br.readLine()) != null){\n\t\t\t\tjsonString += line +\"\\n\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treportObj.AddDataToTestReport(\"Exception in readJsonResponse. \"+e.getMessage(), false);\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(br != null){\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn jsonString;\n\t}", "public String getJson()\n {\n String json=null;\n try\n {\n // Opening cities.json file\n InputStream is = getAssets().open(\"cities.json\");\n // is there any content in the file\n int size = is.available();\n byte[] buffer = new byte[size];\n // read values in the byte array\n is.read(buffer);\n // close the stream --- very important\n is.close();\n // convert byte to string\n json = new String(buffer, \"UTF-8\");\n }\n catch (IOException ex)\n {\n ex.printStackTrace();\n return json;\n }\n return json;\n }", "private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }", "public String loadJSONFromAsset (String strJson) {\n String json = null;\n try {\n InputStream is = getAssets().open(strJson);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "public String getStringJson(alisa.json.Object obj, String name){\n try{\n alisa.json.Data text = obj.findData(name);\n if (text == null || !text.isString()){\n this._error = \"Error on <ClientFileThread> \" + name; \n return null;\n }\n return text.getString();\n } catch(NullPointerException e){\n return null;\n }\n }", "public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }", "public String loadJSONFromAsset(Context context) {\n json = null;\n try {\n InputStream is = getApplicationContext().getAssets().open(\"techdrop.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}", "public String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"election-county-2012.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private static String fileToString(String path) throws IOException {\n\n\t\tbyte[] encoded = Files.readAllBytes(Paths.get(path));\n\t\treturn new String(encoded, StandardCharsets.UTF_8);\n\t}", "public static String readFileAsString(String fileName) {\n String text = \"\";\n\n try {\n text = new String(Files.readAllBytes(Paths.get(fileName)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return text;\n }", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\ttry {\r\n\t\t\t\tjsonstr = getStringFromFile(filePath);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\treturn jsonstr;\r\n\t\t}", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\ttry {\r\n\t\t\t\tjsonstr = getStringFromFile(filePath);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\treturn jsonstr;\r\n\t\t}", "@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\ttry {\r\n\t\t\t\tjsonstr = getStringFromFile(filePath);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\treturn jsonstr;\r\n\t\t}", "private String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"playerData.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private static String file2string(String file) {\n StringBuilder sb = new StringBuilder();\n try {\n BufferedReader br = new BufferedReader(new FileReader(new File(file)));\n String line;\n\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return (sb != null) ? sb.toString() : \"\";\n }", "private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }", "public static String testFileToString(String filename) throws IOException {\n return testFileToString(filename, null);\n }", "String getJson();", "String getJson();", "String getJson();", "private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "String toJson() throws IOException;", "@JsonGetter(\"fileName\")\r\n public String getFileName ( ) { \r\n return this.fileName;\r\n }", "public String readFileIntoString(String filepath) throws IOException;", "String readSampleJsonDoc(String file) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tBufferedReader br = null;\n\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(new File(file)));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "String getJSON();", "public String loadJSONFromAsset(Context context) {\n String json = null;\n try {\n InputStream is;\n int id = context.getResources().getIdentifier(\"sentiment\", \"raw\", context.getPackageName());\n is = context.getResources().openRawResource(id);\n\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }", "public static String getResponseFilePath(String fileName, Response response) {\n\t\tFileWriter writer = null;\n\t\tString filePath = \"responseJSON/\" + fileName + \".json\";\n\t\ttry {\n\t\t\twriter = new FileWriter(filePath);\n\t\t\twriter.write(response.asPrettyString());\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn filePath;\n\t}", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\n }\n }", "String getFile();", "String getFile();", "String getFile();", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "private String readDeserialize(String fileName, AssetManager assetManager) {\n StringBuffer sb = new StringBuffer();\n try {\n InputStream is = assetManager.open(fileName);\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n\n String line = br.readLine();\n while (line != null) {\n sb.append(line);\n line = br.readLine();\n }\n br.close();\n isr.close();\n is.close();\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", String.format(\"File not found: %s\", e.toString()));\n } catch (IOException e) {\n Log.e(\"login activity\", String.format(\"Can not read file: %s\", e.toString()));\n }\n return sb.toString();\n }", "public String loadJSONFile(int resourceIdentifier) {\n if (resourceIdentifier != 0) {\n InputStream input = getResources().openRawResource(resourceIdentifier);\n java.util.Scanner s = new java.util.Scanner(input).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : null;\n } else {\n return null;\n }\n }", "default String fileExtension() {\n\t\treturn \".json\";\n\t}", "private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}", "public static String localFileToString(String fileName) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\n\t\ttry\n\t {\n\t StringBuilder sb = new StringBuilder();\n\t String line = br.readLine();\n\n\t while (line != null)\n\t {\n\t sb.append(line);\n\t sb.append(\"\\n\");\n\t line = br.readLine();\n\t }\n\t \n\t return sb.toString();\n\t }\n\t finally\n\t {\n\t br.close();\n\t }\n\t}", "public String getStringFile(){\n return fileView(file);\n }", "public static String getAsString(File file) {\n\t\tInputStream is = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(file);\n\t\t\tString rtn = getAsString(is);\n\t\t\treturn rtn;\n\t\t} catch (Exception exp) {\n\t\t\tthrow new RuntimeException(exp);\n\t\t} finally {\n\t\t\tif (is != null) {\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (Exception exp) {\n\t\t\t\t\tthrow new RuntimeException(exp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "String getStringFromDictionary(JSONObject json, String str);", "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n catch (Exception ex)\n {\n Log.e(\"ivan\", \"Error al escribir fichero a memoria interna\");\n }\n finally\n {\n try {\n if(escritor!=null)\n escritor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n }", "public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}", "public static String readFileToString(File file) throws IOException {\n return readFileToString(file, null);\n }", "public static void writeJSONString(@Nullable Object value, Path file) throws IOException {\n // We escape everything, so pure ASCII remains\n try (Writer out = IO.openOutputFile(file, StandardCharsets.US_ASCII)) {\n writeJSONString(value, out);\n }\n }", "public void writeToFile (String json) {\n // reset fos to null for checks\n FileOutputStream fos = null;\n try {\n String FILE_NAME = \"ExportedLearningCards.json\";\n fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n fos.write(json.getBytes());\n Toast.makeText(this, \"Saved to \" + getFilesDir() + \"/\" + FILE_NAME,\n Toast.LENGTH_LONG).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private static String getFilesContent() {\n String content = \"\";\n try {\n //cameras.json\n AssetManager am = MarketApplication.getMarketApplication().getAssets();\n InputStream stream = am.open(CAMERAS_FILE_NAME);\n int size = stream.available();\n byte[] buffer = new byte[size];\n stream.read(buffer);\n mJsonCameras = new String(buffer);\n\n //videogames.json\n stream = am.open(VIDEO_GAMES_FILE_NAME);\n size = stream.available();\n buffer = new byte[size];\n stream.read(buffer);\n mJsonVideogames = new String(buffer);\n\n //clothes.json\n stream = am.open(CLOTHES_FILE_NAME);\n size = stream.available();\n buffer = new byte[size];\n stream.read(buffer);\n stream.close();\n mJsonClothesProducts = new String(buffer);\n\n\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't read the file\");\n }\n return content;\n }", "public JSONObject LoadJson(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tStringBuffer buffer = new StringBuffer(1024);\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tbuffer.append(line);\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\treturn new JSONObject(buffer.toString());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to parse json file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public String generateJsonFileFromParsedTextFile(String textFilePathStr) {\n\t\tBufferedReader br = null;\n\t\tList<String> wordList = new ArrayList<>();\n\t\tFile file = new File (textFilePathStr);\n\t\tif (!file.exists() || file.isDirectory()) {\n\t\t\tSystem.out.println(\"Text file \" + file.getAbsolutePath() + \" does not exist\");\n\t\t\treturn \"not found\";\n\t\t}\n\t\ttry {\n\t\t \n\t br = new BufferedReader(new FileReader(textFilePathStr));\n\t String line;\n while ((line = br.readLine()) != null) {\n \t populateListFromLine(line, wordList);\n }\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n } finally {\n \tif (br != null) {\n \t\ttry {\n \t\t br.close();\n \t\t}\n \t\tcatch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }\n\t\tString jsonStr = getWordStatsFromList(wordList);\n\t\tFile outFile = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().indexOf(file.getName()) ) + \"//\" + JSONOUTPUTFILE);\n\t\ttry (PrintWriter out = new PrintWriter(outFile)) {\n\t\t out.println(jsonStr);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"done\";\n\t}", "public static List<String> filesToListOfStrings(List<String> fileNames) throws FileNotFoundException {\n List<String> jsonStrings = new ArrayList<>();\n\n for(int i = 0; i < fileNames.size(); i ++){\n String s = fileToString(fileNames.get(i));\n jsonStrings.add(s);\n }\n\n return jsonStrings;\n }", "public static String getFileContentsAsString(String filename) {\n\n // Java uses Paths as an operating system-independent specification of the location of files.\n // In this case, we're looking for files that are in a directory called 'data' located in the\n // root directory of the project, which is the 'current working directory'.\n final Path path = FileSystems.getDefault().getPath(\"Resources\", filename);\n\n try {\n // Read all of the bytes out of the file specified by 'path' and then convert those bytes\n // into a Java String. Because this operation can fail if the file doesn't exist, we\n // include this in a try/catch block\n return new String(Files.readAllBytes(path));\n } catch (IOException e) {\n // Since we couldn't find the file, there is no point in trying to continue. Let the\n // user know what happened and exit the run of the program. Note: we're only exiting\n // in this way because we haven't talked about exceptions and throwing them in CS 126 yet.\n System.out.println(\"Couldn't find file: \" + filename);\n System.exit(-1);\n return null; // note that this return will never execute, but Java wants it there.\n }\n }", "public String loadFileAsString(String filename) throws java.io.IOException {\n\t final int BUFLEN=1024;\n\t BufferedInputStream is = new BufferedInputStream(new FileInputStream(filename), BUFLEN);\n\t try {\n\t ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFLEN);\n\t byte[] bytes = new byte[BUFLEN];\n\t boolean isUTF8=false;\n\t int read,count=0; \n\t while((read=is.read(bytes)) != -1) {\n\t if (count==0 && bytes[0]==(byte)0xEF && bytes[1]==(byte)0xBB && bytes[2]==(byte)0xBF ) {\n\t isUTF8=true;\n\t baos.write(bytes, 3, read-3); // drop UTF8 bom marker\n\t } else {\n\t baos.write(bytes, 0, read);\n\t }\n\t count+=read;\n\t }\n\t return isUTF8 ? new String(baos.toByteArray(), \"UTF-8\") : new String(baos.toByteArray());\n\t } finally {\n\t try{ is.close(); } catch(Exception ex){} \n\t }\n\t }", "public abstract String toStringForFileName();", "public static String getStringFromFile(String filename) {\r\n try {\r\n FileInputStream fis = new FileInputStream(filename);\r\n int available = fis.available();\r\n byte buffer[] = new byte[available];\r\n fis.read(buffer);\r\n fis.close();\r\n\r\n String tmp = new String(buffer);\r\n //System.out.println(\"\\nfrom file:\"+filename+\":\\n\"+tmp);\r\n return tmp;\r\n\r\n } catch (Exception ex) {\r\n // System.out.println(ex);\r\n // ex.printStackTrace();\r\n return \"\";\r\n } // endtry\r\n }", "@VisibleForTesting\n interface JsonReader {\n /**\n * Returns the contents of the JSON file that is pointed to by the given {@code resId} as\n * a string.\n *\n * @param context The current Context.\n * @param resId The resource id of the JSON file.\n * @return A string representation of the file or {@code null} if an error occurred.\n */\n @Nullable\n String jsonFileToString(Context context, @RawRes int resId);\n }", "private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}", "public static String readFromFile(String filename) {\n InputStream is = ResourceUtils.class.getClassLoader().getResourceAsStream(filename);\n return convertStreamToString(is);\n\n }", "public static String fileToString(File file) throws IOException{\n\t\tBufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(file));\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(inputStream));\n\t\tStringBuilder file_content = new StringBuilder();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null) {\n\t\t file_content.append(line);\n\t\t}\n\t\t\n\t\treturn file_content.toString();\n\t}", "public static String getAsString(String filePath) {\n\t\tInputStream is = FileUtil.class.getResourceAsStream(filePath);\n\t\treturn getAsString(is);\n\t}", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static String fileToString(String fileName) throws FileNotFoundException {\n Scanner in = new Scanner(new File(fileName));\n String result = \"\";\n\n while(in.hasNextLine()){\n result += in.nextLine();\n }\n\n return result;\n }", "public static String readFileAsString(String path) throws IOException {\n return readFileAsString(path, Charset.defaultCharset().name());\n }", "public static String loadFileAsString(String filePath) throws java.io.IOException{\n\t StringBuffer fileData = new StringBuffer(1000);\n\t BufferedReader reader = new BufferedReader(new FileReader(filePath));\n\t char[] buf = new char[1024];\n\t int numRead=0;\n\t while((numRead=reader.read(buf)) != -1){\n\t String readData = String.valueOf(buf, 0, numRead);\n\t fileData.append(readData);\n\t }\n\t reader.close();\n\t return fileData.toString();\n\t}", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "public File findJSON(List<File> files) {\n\t\t\tFile jsonFile = null;\n\t\t\tfor (File file : files) {\n\t\t\t\tif (file.getName().endsWith(\".json\")) {\n\t\t\t\t\tjsonFile = file;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (jsonFile == null) {\n\t\t\t\tSystem.err.println(\"JSON file not found !!!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\treturn jsonFile;\n\t\t}", "public static HashMap<String,String> read_json_file(String filepath){\n HashMap<String,String> map = new HashMap<String,String>();\n try{\n BufferedReader bufferedReader = new BufferedReader(new FileReader(filepath));\n Gson gson = new Gson();\n Object json = gson.fromJson(bufferedReader, Object.class);\n map = new Gson().fromJson(\n json.toString(), new TypeToken<HashMap<String, String>>() {}.getType()\n );\n } catch (FileNotFoundException e ) {\n e.printStackTrace();\n }\n return map;\n }", "public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }", "public static String loadFileAsString(String filename) throws java.io.IOException {\r\n final int BUFLEN=1024;\r\n BufferedInputStream is = new BufferedInputStream(new FileInputStream(filename), BUFLEN);\r\n try {\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFLEN);\r\n byte[] bytes = new byte[BUFLEN];\r\n boolean isUTF8=false;\r\n int read,count=0;\r\n while((read=is.read(bytes)) != -1) {\r\n if (count==0 && bytes[0]==(byte)0xEF && bytes[1]==(byte)0xBB && bytes[2]==(byte)0xBF ) {\r\n isUTF8=true;\r\n baos.write(bytes, 3, read-3); // drop UTF8 bom marker\r\n } else {\r\n baos.write(bytes, 0, read);\r\n }\r\n count+=read;\r\n }\r\n return isUTF8 ? new String(baos.toByteArray(), \"UTF-8\") : new String(baos.toByteArray());\r\n } finally {\r\n try{ is.close(); } catch(Exception ex){}\r\n }\r\n }", "public static String stringFromFileNamed(String fileName) \n\tthrows java.io.IOException {\n\t\t\n\tfinal int BUFLEN = 1024;\n\tchar buf[] = new char[BUFLEN];\n\t\n\tFileReader in = new FileReader(fileName);\n\tStringWriter out = new StringWriter();\n\t\n\ttry {\n\t\twhile (true) {\n\t\t\tint len = in.read(buf, 0, BUFLEN);\n\t\t\tif (len == -1) {\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t\tout.write(buf, 0, len);\n\t\t}\t\n\t}\n\tfinally {\n\t\tout.close();\n\t\tin.close();\n\t}\t\n\treturn out.toString();\n}", "private String profileTest() {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\n \"/home/pascal/bin/workspace_juno/pgu-geo/war/WEB-INF/pgu/profile.json\"));\n } catch (final FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n\n final StringBuilder sb = new StringBuilder();\n String line = null;\n\n try {\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n return sb.toString();\n }", "private String getJsonDocumentName(final String path) {\n final int dotPos = path.indexOf('.');\n final String jsonName = path.substring(0, dotPos);\n return jsonName;\n }", "@SuppressWarnings(\"unused\")\n public AppCMSPageUI getDataFromFile(String fileName) {\n StringBuilder buf = new StringBuilder();\n try {\n InputStream json = currentActivity.getAssets().open(fileName);\n BufferedReader in =\n new BufferedReader(new InputStreamReader(json, \"UTF-8\"));\n String str;\n\n while ((str = in.readLine()) != null) {\n buf.append(str);\n }\n\n in.close();\n } catch (Exception e) {\n //Log.e(TAG, \"Error getting data from file: \" + e.getMessage());\n }\n\n Gson gson = new Gson();\n\n return gson.fromJson(buf.toString().trim(), AppCMSPageUI.class);\n }", "public String autocreateJSON(String filePath, JSONObject jsonObject) throws ExistException, UnderlyingStorageException, UnimplementedException {\n \t\ttry {\n \t\t\tDocument doc=cspace266Hack_munge(jxj.json2xml(jsonObject));\n \t\t\tSystem.err.println(\"153 got \"+doc.asXML());\n \t\t\tReturnedURL url = conn.getURL(RequestMethod.POST,\"collectionobjects/\",doc);\n \t\t\tif(url.getStatus()>299 || url.getStatus()<200)\n \t\t\t\tthrow new UnderlyingStorageException(\"Bad response \"+url.getStatus());\n \t\t\treturn url.getURLTail();\n \t\t} catch (BadRequestException e) {\n \t\t\tthrow new UnderlyingStorageException(\"Service layer exception\",e);\n \t\t} catch (InvalidXTmplException e) {\n \t\t\tthrow new UnimplementedException(\"Error in template\",e);\n \t\t}\n \t}", "public static String getStringFromFile(String filename) {\r\n BufferedReader br = null;\r\n StringBuilder sb = new StringBuilder();\r\n try {\r\n br = new BufferedReader(new FileReader(filename));\r\n try {\r\n String s;\r\n while ((s = br.readLine()) != null) {\r\n sb.append(s);\r\n sb.append(\"\\n\");\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n return sb.toString();\r\n }", "private Path makeFilePath(String name) {\n Path baseFilePath = Paths.get(portManager.getBfp());\n if (name.length() > 4 && name.substring(name.length() - 5).equals(\".json\")) {\n return baseFilePath.resolve(name);\n } else {\n return baseFilePath.resolve(name + \".json\");\n }\n }", "public static Quote[] readFromJson(String filename) throws IOException {\n File file = new File(filename);\n file.createNewFile();\n Gson read = new Gson();\n InputStream inStream = new FileInputStream(filename);\n BufferedReader buffer = new BufferedReader(new InputStreamReader(inStream));\n Quote[] quotes = read.fromJson(buffer, Quote[].class);\n buffer.close();\n return quotes;\n }" ]
[ "0.73262626", "0.72774357", "0.7165768", "0.7096283", "0.65093946", "0.64483833", "0.6441551", "0.63715804", "0.63233846", "0.62945324", "0.6268541", "0.62673223", "0.62526464", "0.62442106", "0.62354434", "0.6188096", "0.6169043", "0.6142823", "0.6133365", "0.60864085", "0.60614675", "0.60550314", "0.6008677", "0.5993911", "0.5989078", "0.59799886", "0.59196514", "0.5901676", "0.5880389", "0.5872907", "0.5872907", "0.5872907", "0.5852976", "0.5824981", "0.5822644", "0.5806335", "0.57908607", "0.57908607", "0.57908607", "0.5775453", "0.5751258", "0.5746332", "0.5742787", "0.5736396", "0.5732938", "0.5724267", "0.5713185", "0.5689121", "0.56646043", "0.5634412", "0.56292254", "0.56292254", "0.56292254", "0.55947757", "0.55854934", "0.55777735", "0.5573813", "0.5567754", "0.5565285", "0.5556099", "0.5553129", "0.5549549", "0.553807", "0.55326414", "0.55254", "0.5500652", "0.5493597", "0.5481477", "0.54689884", "0.54417616", "0.5432805", "0.5429362", "0.5422923", "0.54193413", "0.54156846", "0.5413275", "0.54085696", "0.54034853", "0.54022205", "0.5394075", "0.53755385", "0.5375066", "0.5372766", "0.53663844", "0.5355115", "0.53544074", "0.5348373", "0.5327589", "0.53175837", "0.53144586", "0.52934676", "0.529189", "0.5287015", "0.52845174", "0.52748865", "0.5273269", "0.5250866", "0.52459455", "0.5243762", "0.5243079" ]
0.7328905
0
Check for empty data in the form
public void onClick(View view) { Log.d("Edit","EDITED"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n || source.equals(\"\") || references.equals(\"\") || description.equals(\"\")) {\n throw new EmptyTextFieldException();\n }\n }", "private boolean isFormEmpty(){\n if(pickupLocationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(destinationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(notesInput.getText().toString().length() != 0){\n return false;\n }\n\n return true;\n }", "private boolean noFieldsEmpty() {\n if ( nameField.getText().isEmpty()\n || addressField.getText().isEmpty()\n || cityField.getText().isEmpty()\n || countryComboBox.getSelectionModel().getSelectedItem() == null\n || divisionComboBox.getSelectionModel().getSelectedItem() == null\n || postalField.getText().isEmpty()\n || phoneField.getText().isEmpty() ) {\n errorLabel.setText(rb.getString(\"fieldBlank\"));\n return false;\n }\n return true;\n }", "private boolean isAnyEmpty(){\n //get everything\n return (fname.getText().toString().trim().length() == 0)\n || (lname.getText().toString().trim().length() == 0)\n || (email.getText().toString().trim().length() == 0)\n || (password.getText().toString().trim().length() == 0);\n }", "public boolean verifyData()\n {\n if(jTextFieldName.getText().equals(\"\") && jTextFieldNumber.getText().equals(\"\") \n || jTextFieldSupplier.getText().equals(\"\") || jTextArea1.getText().equals(\"\") || jTextFieldModel.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null, \"One or More Fields Are Empty\");\n return false;\n }\n \n else\n {\n return true;\n }\n \n }", "private void validateEmptyElements()\n {\n // Check if something is missing\n if (_dietTreatment.getName().length() < 1)\n {\n getErrors().add(\"Kein Name angegeben.\");\n }\n\n // TODO: check that at least one user is TREATING!\n if (_dietTreatment.getSystemUsers().isEmpty())\n {\n getErrors().add(\"Kein verantwortlicher User angegeben.\");\n }\n\n if (_dietTreatment.getPatientStates().isEmpty())\n {\n getErrors().add(\"Keine Zuweisungsdiagnose angegeben.\");\n }\n }", "private void checkFieldsForEmptyValues() {\n String s1 = edtEmail.getText().toString();\n String s2 = edtDisplayName.getText().toString();\n String s3 = edtPaswd.getText().toString();\n\n if (s1.equals(\"\") || s2.equals(\"\") || s3.equals(\"\")) { //disables the button\n btnRegister.setEnabled(false);\n } else { //enables the button\n btnRegister.setEnabled(true);\n }\n }", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "private boolean isEmptyField (EditText editText){\n boolean result = editText.getText().toString().length() <= 0;\n if (result)\n Toast.makeText(UserSignUp.this, \"Fill all fields!\", Toast.LENGTH_SHORT).show();\n return result;\n }", "private boolean emptyBoxes() {\n return (FirstName.getText().toString().isEmpty() || LastName.getText().toString().isEmpty() ||\n ID.getText().toString().isEmpty() || PhoneNumber.getText().toString().isEmpty() ||\n EmailAddress.getText().toString().isEmpty() || CreditCard.getText().toString().isEmpty() ||\n Password.getText().toString().isEmpty());\n }", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "private boolean hayCamposVacios() {\r\n\t\tif(nomTextField.getText().isEmpty()\r\n\t\t\t|| claveTextField.getText().isEmpty()\r\n\t\t\t\t|| reingresoTextField.getText().isEmpty()\r\n\t\t\t\t\t|| preguntaTextField.getText().isEmpty()\r\n\t\t\t\t\t\t|| respuestaTextField.getText().isEmpty())\r\n\t\t\treturn true;\t\t\r\n\t\treturn false;\r\n\t}", "private Boolean isFieldEmpty(EditText field) {\n return field.getText().toString().trim().equals(\"\");\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@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 testCannotBeEmpty()\n {\n form.setVerificationCode(\"\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }", "public boolean isEmpty() {\n return labeledFieldEmptyOrHidden;\n }", "protected boolean isFieldEmpty(EditText text) {\n if (text.getText().toString().trim().length() == 0) {\n text.setError(getString(R.string.empty_field));\n text.requestFocus();\n return true;\n }\n return false;\n }", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "private void checkAndSave(){\n if (haveEmptyField()){\n JOptionPane.showMessageDialog(dialog,\n \"Some field are empty!\",\n \"Not valid\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n saveStudent();\n }\n }", "protected boolean isAllRequiredTxtFieldsFilled() {\r\n JTextField[] txtFields = {\r\n txtFieldFirstName, txtFieldLastName,\r\n txtFieldDateOfBirth, txtFieldIBAN,\r\n txtFieldState, txtFieldHouseNumber,\r\n txtFieldPostcode, txtFieldLocation,\r\n txtFieldCountry, txtFieldState\r\n };\r\n\r\n for (JTextField txtField : txtFields) {\r\n if (txtField.getText().equals(\"\")) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "@Test(priority=1)\n\tpublic void testWhenFieldsAreEmpty() {\n\t\tsignup.clearAllFields();\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\n\t\t// when all fields are empty errors list is greater than 2\n\t\t// the best way to do it is to have a list of all expected values and compare it with the actual received strings\n\t\tAssert.assertTrue(3<errors.size());\n\t}", "private boolean isComboBoxEmpty(String entry){\n return entry == null || entry.isBlank();\n }", "public boolean checkInput(){\n if(spelerIDField.getText().equals(\"\") || typeField.getText().equals(\"\") || codeField.getText().equals(\"\") || heeftBetaaldField.getText().equals(\"\")){\n return true;\n } else { return false; }\n }", "public void setNotEmpty(){\n this.empty = false;\n }", "public abstract boolean isBlank() throws Exception;", "public boolean isEmpty()\n {return data == null;}", "public boolean validarCampos(){\n String nome = campoNome.getText().toString();\n String descricao = campoDescricao.getText().toString();\n String valor = String.valueOf(campoValor.getRawValue());\n\n\n if(!nome.isEmpty()){\n if(!descricao.isEmpty()){\n if(!valor.isEmpty() && !valor.equals(\"0\")){\n return true;\n }else{\n exibirToast(\"Preencha o valor do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha a descrição do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha o nome do seu serviço\");\n return false;\n }\n }", "public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }", "private boolean checkInputField(String price) {\n if (productName.isEmpty() || price.isEmpty()) {\n final AlertDialog alertDialog = new AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Not all fields filled in\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Please fill in all fields first\");\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n return false;\n }\n return true;\n }", "public boolean dataComplete() {\n return !item_category.getText().toString().isEmpty() && !item_name.getText().toString().isEmpty()\n && !item_price.getText().toString().isEmpty() && !item_description.getText().toString().isEmpty();\n }", "public boolean check(){\n for(TextField texts:textFields){\n if(texts.getText().isEmpty()){\n return false;\n }\n }\n return true;\n }", "private void verifyInput(){\n String firstName = mFirstNameField.getText().toString();\n String lastName = mLastNameField.getText().toString();\n\n mNameFieldsFilled = !TextUtils.isEmpty(firstName) && !TextUtils.isEmpty(lastName);\n\n }", "private boolean checkfields() {\n try {\n Integer.parseInt(checknum.getText().toString());\n Integer.parseInt(banknum.getText().toString());\n Integer.parseInt(branchnum.getText().toString());\n Integer.parseInt(accountnum.getText().toString()); //was commented\n\n } catch (NumberFormatException e) { // at least one of these numbers is not Integer\n return false;\n }\n\n if (checknum.getText().toString().equals(null) || banknum.getText().toString().equals(null) ||branchnum.getText().toString().equals(null)|| accountnum.getText().toString().equals(null))\n return false; // At least one of the fields is empty\n\n return true;\n }", "public boolean is_empty() {\n\t\treturn false;\n\t}", "private boolean checkInputValidation(){\n if(facility_EDT_value.getText().toString().trim().isEmpty()){\n Toast.makeText(getContext(), \"Please enter search value!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public boolean externalFilled() {\n return firstName != null && !firstName.isEmpty()\n || lastName != null && !lastName.isEmpty()\n || email != null && !email.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return false;\n }", "private boolean fieldsFilled(){\n return !editTextEmail.getText().toString().isEmpty() &&\n !editTextPassword.getText().toString().isEmpty();\n }", "@Override\n public boolean isEmpty() { return true; }", "public boolean isValid() {\n return !TextUtils.isEmpty(getId())\n && !TextUtils.isEmpty(getName())\n && getControlFilter() != null;\n }", "@Override\n public boolean highlightEmptyFields() {\n boolean returnValue = false;\n if (titleField.getText().toString().trim().isEmpty()) {\n titleField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (descriptionField.getText().toString().trim().isEmpty()) {\n descriptionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (questionField.getText().toString().trim().isEmpty()) {\n questionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer1Field.getText().toString().trim().isEmpty()) {\n answer1Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer2Field.getText().toString().trim().isEmpty()) {\n answer2Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer3Field.getText().toString().trim().isEmpty()) {\n answer3Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer4Field.getText().toString().trim().isEmpty()) {\n answer4Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer5Field.getText().toString().trim().isEmpty()) {\n answer5Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n return returnValue;\n }", "private boolean areFieldsNotBlank() {\r\n boolean ok=true;\r\n if (dogNameField.getText() == null) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n } else if (dogNameField.getText().isBlank()) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n }\r\n return ok;\r\n }", "public void CheckEditTextIsEmptyOrNot()\r\n {\r\n ename_holder = name_event.getText().toString();\r\n edesc_holder = desc_event.getText().toString();\r\n eloc_holder = loc_event.getText().toString();\r\n edate_holder = date_event.getText().toString();\r\n etime_holder = time_event.getText().toString();\r\n elat_holder = lat_event.getText().toString();\r\n elong_holder = long_event.getText().toString();\r\n\r\n if(TextUtils.isEmpty(ename_holder) || TextUtils.isEmpty(edesc_holder) || TextUtils.isEmpty(eloc_holder) || TextUtils.isEmpty(edate_holder) || TextUtils.isEmpty(etime_holder) || TextUtils.isEmpty(elat_holder) || TextUtils.isEmpty(elong_holder))\r\n {\r\n CheckEditText = false;\r\n }\r\n else\r\n {\r\n CheckEditText = true;\r\n }\r\n }", "public final boolean empty() {\n return data == null;\n }", "public boolean isEmpty() {\n return data.isEmpty();\n }", "private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "private boolean validarCampos() {\r\n\t\tif (cedula.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || telefono.equals(\"\")) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean fieldsAreFilled(){\r\n boolean filled = true;\r\n if(txtFName.getText().trim().isEmpty() | txtFEmail.getText().trim().isEmpty() | txtFPhone.getText().trim().isEmpty()){\r\n filled = false;\r\n }\r\n return filled;\r\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private boolean isEmpty(EditText etText) {\n return etText.getText().toString().trim().length() <= 0;\n }", "@Override\n public boolean isValid() {\n if((eMultipleAnswerType == null && textAnswerIn.getText().toString().trim().isEmpty()) || (eMultipleAnswerType != null && !compoundButtonController.isChecked())){\n try {\n invalidText = getResources().getString(R.string.output_invalidField_questionAnswering_notAnswered);\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "private boolean checkEpisodeInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"episodeTitle\") != null && request.getParameter(\"episodeTitle\").length() > 0\n && request.getParameter(\"episodeDescription\") != null && request.getParameter(\"episodeDescription\").length() > 0\n && request.getParameter(\"episodeNumber\") != null && request.getParameter(\"episodeNumber\").length() > 0\n && request.getParameter(\"episodeSeason\") != null && request.getParameter(\"episodeSeason\").length() > 0\n && request.getParameter(\"series\") != null && request.getParameter(\"series\").length() > 0;\n }", "protected boolean areIntFieldsBlank(EditText age, EditText mobilenum) {\n if (age.getText().toString().isEmpty() || mobilenum.getText().toString().isEmpty()) {\n Toast.makeText(FreelanceEditProfileActivity.this,\n \"ERROR: You may not leave any of the fields empty.\",\n Toast.LENGTH_SHORT).show();\n return true;\n }\n else\n return false;\n }", "private boolean isInvalid(JTextField campo) {\n return campo.getText().isEmpty();\n }", "private boolean formComplete(){\r\n return NAME_FIELD.getLength()>0 && ADDRESS_1_FIELD.getLength()>0 &&\r\n CITY_FIELD.getLength()>0 && ZIP_FIELD.getLength()>0 && \r\n COUNTRY_FIELD.getLength()>0 && PHONE_FIELD.getLength()>0; \r\n }", "public boolean isEmpty() { return this.filterExpression.length()==0; }", "private void InputTextValidator () {\n isNotNull = !txtCategoryNo.getText().equals(\"\") && !txtCategoryName.getText().equals(\"\");\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isEmpty() {\n return super.isEmpty() && ElementUtil.isEmpty(subsidyCode, programCode, prescriberTypes, notes, cautionaryNotes,\n restriction, commonwealthExManufacturerPrice, manufacturerExManufacturerPrice);\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "public boolean isEmpty(EditText etText){\n return etText.getText().toString().length() == 0;\n }", "private boolean fieldsAreFilled(){\n return !textboxName.isEnabled() && !textboxInitialValue.isEnabled();\n }", "public boolean empty() {\n return data.size() == 0;\n }", "public boolean isEmpty() {\n return (this.text == null);\n }", "public boolean isEmpty() {\n // YOUR CODE HERE\n return true;\n }", "private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}", "public boolean getBlank(){\n return blank;\n }", "public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean checkSeriesInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"seriesName\") != null && request.getParameter(\"seriesName\").length() > 0\n && request.getParameter(\"seriesYear\") != null && request.getParameter(\"seriesYear\").length() > 0\n && request.getParameter(\"seriesDescription\") != null && request.getParameter(\"seriesDescription\").length() > 0\n && request.getParameter(\"seriesImageURL\") != null && request.getParameter(\"seriesImageURL\").length() > 0\n && request.getParameter(\"state\") != null && request.getParameter(\"state\").length() > 0;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public boolean isEmpty() {\n\t\treturn memberNo == 0 && (name == null || name.isEmpty()) && minTotalPrice == 0 && maxTotalPrice == 0\n\t\t && getBeginOrderDate() == null && getEndOrderDate() == null;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn super.isEmpty() || getFluid() == Fluids.EMPTY;\n\t}", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }" ]
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.65614015", "0.6561197", "0.6557458", "0.65566516", "0.65559155", "0.6550873", "0.6550554", "0.6494519", "0.643224", "0.6411604", "0.6402695", "0.6385545", "0.63736856", "0.6369345", "0.6366376", "0.6363486", "0.63296837", "0.6326861", "0.6317433", "0.6303087", "0.6298332", "0.62938976", "0.62907946", "0.62898076", "0.6287838", "0.62831295", "0.62791336", "0.6278554", "0.62752944", "0.62722343", "0.62681264", "0.62547594", "0.62534815", "0.6253226", "0.6251766", "0.6249174", "0.623162", "0.62304854", "0.6228732", "0.6222629", "0.62158734", "0.6203041", "0.619997", "0.61807084", "0.61770165", "0.61770165", "0.6172683", "0.6167884", "0.61548984", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6140368", "0.6140331", "0.61361694", "0.6129578", "0.6126557", "0.61224866", "0.6117711", "0.61148864", "0.6101233", "0.6089232", "0.6083371", "0.60792977", "0.6079042", "0.60778743", "0.6076239", "0.6067723", "0.6067616", "0.6063715", "0.60579497", "0.60570353", "0.6053881", "0.6053881", "0.6053881", "0.6053881", "0.6053881" ]
0.0
-1
Check for empty data in the form
public void onClick(View view) { Log.d("Edit1","EDITED1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n || source.equals(\"\") || references.equals(\"\") || description.equals(\"\")) {\n throw new EmptyTextFieldException();\n }\n }", "private boolean isFormEmpty(){\n if(pickupLocationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(destinationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(notesInput.getText().toString().length() != 0){\n return false;\n }\n\n return true;\n }", "private boolean noFieldsEmpty() {\n if ( nameField.getText().isEmpty()\n || addressField.getText().isEmpty()\n || cityField.getText().isEmpty()\n || countryComboBox.getSelectionModel().getSelectedItem() == null\n || divisionComboBox.getSelectionModel().getSelectedItem() == null\n || postalField.getText().isEmpty()\n || phoneField.getText().isEmpty() ) {\n errorLabel.setText(rb.getString(\"fieldBlank\"));\n return false;\n }\n return true;\n }", "private boolean isAnyEmpty(){\n //get everything\n return (fname.getText().toString().trim().length() == 0)\n || (lname.getText().toString().trim().length() == 0)\n || (email.getText().toString().trim().length() == 0)\n || (password.getText().toString().trim().length() == 0);\n }", "public boolean verifyData()\n {\n if(jTextFieldName.getText().equals(\"\") && jTextFieldNumber.getText().equals(\"\") \n || jTextFieldSupplier.getText().equals(\"\") || jTextArea1.getText().equals(\"\") || jTextFieldModel.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null, \"One or More Fields Are Empty\");\n return false;\n }\n \n else\n {\n return true;\n }\n \n }", "private void validateEmptyElements()\n {\n // Check if something is missing\n if (_dietTreatment.getName().length() < 1)\n {\n getErrors().add(\"Kein Name angegeben.\");\n }\n\n // TODO: check that at least one user is TREATING!\n if (_dietTreatment.getSystemUsers().isEmpty())\n {\n getErrors().add(\"Kein verantwortlicher User angegeben.\");\n }\n\n if (_dietTreatment.getPatientStates().isEmpty())\n {\n getErrors().add(\"Keine Zuweisungsdiagnose angegeben.\");\n }\n }", "private void checkFieldsForEmptyValues() {\n String s1 = edtEmail.getText().toString();\n String s2 = edtDisplayName.getText().toString();\n String s3 = edtPaswd.getText().toString();\n\n if (s1.equals(\"\") || s2.equals(\"\") || s3.equals(\"\")) { //disables the button\n btnRegister.setEnabled(false);\n } else { //enables the button\n btnRegister.setEnabled(true);\n }\n }", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "private boolean isEmptyField (EditText editText){\n boolean result = editText.getText().toString().length() <= 0;\n if (result)\n Toast.makeText(UserSignUp.this, \"Fill all fields!\", Toast.LENGTH_SHORT).show();\n return result;\n }", "private boolean emptyBoxes() {\n return (FirstName.getText().toString().isEmpty() || LastName.getText().toString().isEmpty() ||\n ID.getText().toString().isEmpty() || PhoneNumber.getText().toString().isEmpty() ||\n EmailAddress.getText().toString().isEmpty() || CreditCard.getText().toString().isEmpty() ||\n Password.getText().toString().isEmpty());\n }", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "private boolean hayCamposVacios() {\r\n\t\tif(nomTextField.getText().isEmpty()\r\n\t\t\t|| claveTextField.getText().isEmpty()\r\n\t\t\t\t|| reingresoTextField.getText().isEmpty()\r\n\t\t\t\t\t|| preguntaTextField.getText().isEmpty()\r\n\t\t\t\t\t\t|| respuestaTextField.getText().isEmpty())\r\n\t\t\treturn true;\t\t\r\n\t\treturn false;\r\n\t}", "private Boolean isFieldEmpty(EditText field) {\n return field.getText().toString().trim().equals(\"\");\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@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 testCannotBeEmpty()\n {\n form.setVerificationCode(\"\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }", "public boolean isEmpty() {\n return labeledFieldEmptyOrHidden;\n }", "protected boolean isFieldEmpty(EditText text) {\n if (text.getText().toString().trim().length() == 0) {\n text.setError(getString(R.string.empty_field));\n text.requestFocus();\n return true;\n }\n return false;\n }", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "private void checkAndSave(){\n if (haveEmptyField()){\n JOptionPane.showMessageDialog(dialog,\n \"Some field are empty!\",\n \"Not valid\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n saveStudent();\n }\n }", "protected boolean isAllRequiredTxtFieldsFilled() {\r\n JTextField[] txtFields = {\r\n txtFieldFirstName, txtFieldLastName,\r\n txtFieldDateOfBirth, txtFieldIBAN,\r\n txtFieldState, txtFieldHouseNumber,\r\n txtFieldPostcode, txtFieldLocation,\r\n txtFieldCountry, txtFieldState\r\n };\r\n\r\n for (JTextField txtField : txtFields) {\r\n if (txtField.getText().equals(\"\")) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "@Test(priority=1)\n\tpublic void testWhenFieldsAreEmpty() {\n\t\tsignup.clearAllFields();\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\n\t\t// when all fields are empty errors list is greater than 2\n\t\t// the best way to do it is to have a list of all expected values and compare it with the actual received strings\n\t\tAssert.assertTrue(3<errors.size());\n\t}", "private boolean isComboBoxEmpty(String entry){\n return entry == null || entry.isBlank();\n }", "public boolean checkInput(){\n if(spelerIDField.getText().equals(\"\") || typeField.getText().equals(\"\") || codeField.getText().equals(\"\") || heeftBetaaldField.getText().equals(\"\")){\n return true;\n } else { return false; }\n }", "public void setNotEmpty(){\n this.empty = false;\n }", "public abstract boolean isBlank() throws Exception;", "public boolean isEmpty()\n {return data == null;}", "public boolean validarCampos(){\n String nome = campoNome.getText().toString();\n String descricao = campoDescricao.getText().toString();\n String valor = String.valueOf(campoValor.getRawValue());\n\n\n if(!nome.isEmpty()){\n if(!descricao.isEmpty()){\n if(!valor.isEmpty() && !valor.equals(\"0\")){\n return true;\n }else{\n exibirToast(\"Preencha o valor do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha a descrição do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha o nome do seu serviço\");\n return false;\n }\n }", "public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }", "private boolean checkInputField(String price) {\n if (productName.isEmpty() || price.isEmpty()) {\n final AlertDialog alertDialog = new AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Not all fields filled in\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Please fill in all fields first\");\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n return false;\n }\n return true;\n }", "public boolean dataComplete() {\n return !item_category.getText().toString().isEmpty() && !item_name.getText().toString().isEmpty()\n && !item_price.getText().toString().isEmpty() && !item_description.getText().toString().isEmpty();\n }", "public boolean check(){\n for(TextField texts:textFields){\n if(texts.getText().isEmpty()){\n return false;\n }\n }\n return true;\n }", "private void verifyInput(){\n String firstName = mFirstNameField.getText().toString();\n String lastName = mLastNameField.getText().toString();\n\n mNameFieldsFilled = !TextUtils.isEmpty(firstName) && !TextUtils.isEmpty(lastName);\n\n }", "private boolean checkfields() {\n try {\n Integer.parseInt(checknum.getText().toString());\n Integer.parseInt(banknum.getText().toString());\n Integer.parseInt(branchnum.getText().toString());\n Integer.parseInt(accountnum.getText().toString()); //was commented\n\n } catch (NumberFormatException e) { // at least one of these numbers is not Integer\n return false;\n }\n\n if (checknum.getText().toString().equals(null) || banknum.getText().toString().equals(null) ||branchnum.getText().toString().equals(null)|| accountnum.getText().toString().equals(null))\n return false; // At least one of the fields is empty\n\n return true;\n }", "public boolean is_empty() {\n\t\treturn false;\n\t}", "private boolean checkInputValidation(){\n if(facility_EDT_value.getText().toString().trim().isEmpty()){\n Toast.makeText(getContext(), \"Please enter search value!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public boolean externalFilled() {\n return firstName != null && !firstName.isEmpty()\n || lastName != null && !lastName.isEmpty()\n || email != null && !email.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return false;\n }", "private boolean fieldsFilled(){\n return !editTextEmail.getText().toString().isEmpty() &&\n !editTextPassword.getText().toString().isEmpty();\n }", "@Override\n public boolean isEmpty() { return true; }", "public boolean isValid() {\n return !TextUtils.isEmpty(getId())\n && !TextUtils.isEmpty(getName())\n && getControlFilter() != null;\n }", "@Override\n public boolean highlightEmptyFields() {\n boolean returnValue = false;\n if (titleField.getText().toString().trim().isEmpty()) {\n titleField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (descriptionField.getText().toString().trim().isEmpty()) {\n descriptionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (questionField.getText().toString().trim().isEmpty()) {\n questionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer1Field.getText().toString().trim().isEmpty()) {\n answer1Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer2Field.getText().toString().trim().isEmpty()) {\n answer2Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer3Field.getText().toString().trim().isEmpty()) {\n answer3Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer4Field.getText().toString().trim().isEmpty()) {\n answer4Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer5Field.getText().toString().trim().isEmpty()) {\n answer5Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n return returnValue;\n }", "private boolean areFieldsNotBlank() {\r\n boolean ok=true;\r\n if (dogNameField.getText() == null) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n } else if (dogNameField.getText().isBlank()) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n }\r\n return ok;\r\n }", "public void CheckEditTextIsEmptyOrNot()\r\n {\r\n ename_holder = name_event.getText().toString();\r\n edesc_holder = desc_event.getText().toString();\r\n eloc_holder = loc_event.getText().toString();\r\n edate_holder = date_event.getText().toString();\r\n etime_holder = time_event.getText().toString();\r\n elat_holder = lat_event.getText().toString();\r\n elong_holder = long_event.getText().toString();\r\n\r\n if(TextUtils.isEmpty(ename_holder) || TextUtils.isEmpty(edesc_holder) || TextUtils.isEmpty(eloc_holder) || TextUtils.isEmpty(edate_holder) || TextUtils.isEmpty(etime_holder) || TextUtils.isEmpty(elat_holder) || TextUtils.isEmpty(elong_holder))\r\n {\r\n CheckEditText = false;\r\n }\r\n else\r\n {\r\n CheckEditText = true;\r\n }\r\n }", "public final boolean empty() {\n return data == null;\n }", "public boolean isEmpty() {\n return data.isEmpty();\n }", "private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "private boolean validarCampos() {\r\n\t\tif (cedula.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || telefono.equals(\"\")) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean fieldsAreFilled(){\r\n boolean filled = true;\r\n if(txtFName.getText().trim().isEmpty() | txtFEmail.getText().trim().isEmpty() | txtFPhone.getText().trim().isEmpty()){\r\n filled = false;\r\n }\r\n return filled;\r\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private boolean isEmpty(EditText etText) {\n return etText.getText().toString().trim().length() <= 0;\n }", "@Override\n public boolean isValid() {\n if((eMultipleAnswerType == null && textAnswerIn.getText().toString().trim().isEmpty()) || (eMultipleAnswerType != null && !compoundButtonController.isChecked())){\n try {\n invalidText = getResources().getString(R.string.output_invalidField_questionAnswering_notAnswered);\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "private boolean checkEpisodeInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"episodeTitle\") != null && request.getParameter(\"episodeTitle\").length() > 0\n && request.getParameter(\"episodeDescription\") != null && request.getParameter(\"episodeDescription\").length() > 0\n && request.getParameter(\"episodeNumber\") != null && request.getParameter(\"episodeNumber\").length() > 0\n && request.getParameter(\"episodeSeason\") != null && request.getParameter(\"episodeSeason\").length() > 0\n && request.getParameter(\"series\") != null && request.getParameter(\"series\").length() > 0;\n }", "protected boolean areIntFieldsBlank(EditText age, EditText mobilenum) {\n if (age.getText().toString().isEmpty() || mobilenum.getText().toString().isEmpty()) {\n Toast.makeText(FreelanceEditProfileActivity.this,\n \"ERROR: You may not leave any of the fields empty.\",\n Toast.LENGTH_SHORT).show();\n return true;\n }\n else\n return false;\n }", "private boolean isInvalid(JTextField campo) {\n return campo.getText().isEmpty();\n }", "private boolean formComplete(){\r\n return NAME_FIELD.getLength()>0 && ADDRESS_1_FIELD.getLength()>0 &&\r\n CITY_FIELD.getLength()>0 && ZIP_FIELD.getLength()>0 && \r\n COUNTRY_FIELD.getLength()>0 && PHONE_FIELD.getLength()>0; \r\n }", "public boolean isEmpty() { return this.filterExpression.length()==0; }", "private void InputTextValidator () {\n isNotNull = !txtCategoryNo.getText().equals(\"\") && !txtCategoryName.getText().equals(\"\");\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isEmpty() {\n return super.isEmpty() && ElementUtil.isEmpty(subsidyCode, programCode, prescriberTypes, notes, cautionaryNotes,\n restriction, commonwealthExManufacturerPrice, manufacturerExManufacturerPrice);\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "public boolean isEmpty(EditText etText){\n return etText.getText().toString().length() == 0;\n }", "private boolean fieldsAreFilled(){\n return !textboxName.isEnabled() && !textboxInitialValue.isEnabled();\n }", "public boolean empty() {\n return data.size() == 0;\n }", "public boolean isEmpty() {\n return (this.text == null);\n }", "public boolean isEmpty() {\n // YOUR CODE HERE\n return true;\n }", "private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}", "public boolean getBlank(){\n return blank;\n }", "public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean checkSeriesInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"seriesName\") != null && request.getParameter(\"seriesName\").length() > 0\n && request.getParameter(\"seriesYear\") != null && request.getParameter(\"seriesYear\").length() > 0\n && request.getParameter(\"seriesDescription\") != null && request.getParameter(\"seriesDescription\").length() > 0\n && request.getParameter(\"seriesImageURL\") != null && request.getParameter(\"seriesImageURL\").length() > 0\n && request.getParameter(\"state\") != null && request.getParameter(\"state\").length() > 0;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public boolean isEmpty() {\n\t\treturn memberNo == 0 && (name == null || name.isEmpty()) && minTotalPrice == 0 && maxTotalPrice == 0\n\t\t && getBeginOrderDate() == null && getEndOrderDate() == null;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn super.isEmpty() || getFluid() == Fluids.EMPTY;\n\t}", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }" ]
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.65614015", "0.6561197", "0.6557458", "0.65566516", "0.65559155", "0.6550873", "0.6550554", "0.6494519", "0.643224", "0.6411604", "0.6402695", "0.6385545", "0.63736856", "0.6369345", "0.6366376", "0.6363486", "0.63296837", "0.6326861", "0.6317433", "0.6303087", "0.6298332", "0.62938976", "0.62907946", "0.62898076", "0.6287838", "0.62831295", "0.62791336", "0.6278554", "0.62752944", "0.62722343", "0.62681264", "0.62547594", "0.62534815", "0.6253226", "0.6251766", "0.6249174", "0.623162", "0.62304854", "0.6228732", "0.6222629", "0.62158734", "0.6203041", "0.619997", "0.61807084", "0.61770165", "0.61770165", "0.6172683", "0.6167884", "0.61548984", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6140368", "0.6140331", "0.61361694", "0.6129578", "0.6126557", "0.61224866", "0.6117711", "0.61148864", "0.6101233", "0.6089232", "0.6083371", "0.60792977", "0.6079042", "0.60778743", "0.6076239", "0.6067723", "0.6067616", "0.6063715", "0.60579497", "0.60570353", "0.6053881", "0.6053881", "0.6053881", "0.6053881", "0.6053881" ]
0.0
-1
Check for empty data in the form
public void onClick(View view) { Log.d("Parti","participants"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n || source.equals(\"\") || references.equals(\"\") || description.equals(\"\")) {\n throw new EmptyTextFieldException();\n }\n }", "private boolean isFormEmpty(){\n if(pickupLocationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(destinationInput.getText().toString().length() != 0){\n return false;\n }\n\n if(notesInput.getText().toString().length() != 0){\n return false;\n }\n\n return true;\n }", "private boolean noFieldsEmpty() {\n if ( nameField.getText().isEmpty()\n || addressField.getText().isEmpty()\n || cityField.getText().isEmpty()\n || countryComboBox.getSelectionModel().getSelectedItem() == null\n || divisionComboBox.getSelectionModel().getSelectedItem() == null\n || postalField.getText().isEmpty()\n || phoneField.getText().isEmpty() ) {\n errorLabel.setText(rb.getString(\"fieldBlank\"));\n return false;\n }\n return true;\n }", "private boolean isAnyEmpty(){\n //get everything\n return (fname.getText().toString().trim().length() == 0)\n || (lname.getText().toString().trim().length() == 0)\n || (email.getText().toString().trim().length() == 0)\n || (password.getText().toString().trim().length() == 0);\n }", "public boolean verifyData()\n {\n if(jTextFieldName.getText().equals(\"\") && jTextFieldNumber.getText().equals(\"\") \n || jTextFieldSupplier.getText().equals(\"\") || jTextArea1.getText().equals(\"\") || jTextFieldModel.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null, \"One or More Fields Are Empty\");\n return false;\n }\n \n else\n {\n return true;\n }\n \n }", "private void validateEmptyElements()\n {\n // Check if something is missing\n if (_dietTreatment.getName().length() < 1)\n {\n getErrors().add(\"Kein Name angegeben.\");\n }\n\n // TODO: check that at least one user is TREATING!\n if (_dietTreatment.getSystemUsers().isEmpty())\n {\n getErrors().add(\"Kein verantwortlicher User angegeben.\");\n }\n\n if (_dietTreatment.getPatientStates().isEmpty())\n {\n getErrors().add(\"Keine Zuweisungsdiagnose angegeben.\");\n }\n }", "private void checkFieldsForEmptyValues() {\n String s1 = edtEmail.getText().toString();\n String s2 = edtDisplayName.getText().toString();\n String s3 = edtPaswd.getText().toString();\n\n if (s1.equals(\"\") || s2.equals(\"\") || s3.equals(\"\")) { //disables the button\n btnRegister.setEnabled(false);\n } else { //enables the button\n btnRegister.setEnabled(true);\n }\n }", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "private boolean isEmptyField (EditText editText){\n boolean result = editText.getText().toString().length() <= 0;\n if (result)\n Toast.makeText(UserSignUp.this, \"Fill all fields!\", Toast.LENGTH_SHORT).show();\n return result;\n }", "private boolean emptyBoxes() {\n return (FirstName.getText().toString().isEmpty() || LastName.getText().toString().isEmpty() ||\n ID.getText().toString().isEmpty() || PhoneNumber.getText().toString().isEmpty() ||\n EmailAddress.getText().toString().isEmpty() || CreditCard.getText().toString().isEmpty() ||\n Password.getText().toString().isEmpty());\n }", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "private boolean hayCamposVacios() {\r\n\t\tif(nomTextField.getText().isEmpty()\r\n\t\t\t|| claveTextField.getText().isEmpty()\r\n\t\t\t\t|| reingresoTextField.getText().isEmpty()\r\n\t\t\t\t\t|| preguntaTextField.getText().isEmpty()\r\n\t\t\t\t\t\t|| respuestaTextField.getText().isEmpty())\r\n\t\t\treturn true;\t\t\r\n\t\treturn false;\r\n\t}", "private Boolean isFieldEmpty(EditText field) {\n return field.getText().toString().trim().equals(\"\");\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@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 testCannotBeEmpty()\n {\n form.setVerificationCode(\"\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }", "public boolean isEmpty() {\n return labeledFieldEmptyOrHidden;\n }", "protected boolean isFieldEmpty(EditText text) {\n if (text.getText().toString().trim().length() == 0) {\n text.setError(getString(R.string.empty_field));\n text.requestFocus();\n return true;\n }\n return false;\n }", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "private void checkAndSave(){\n if (haveEmptyField()){\n JOptionPane.showMessageDialog(dialog,\n \"Some field are empty!\",\n \"Not valid\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n saveStudent();\n }\n }", "protected boolean isAllRequiredTxtFieldsFilled() {\r\n JTextField[] txtFields = {\r\n txtFieldFirstName, txtFieldLastName,\r\n txtFieldDateOfBirth, txtFieldIBAN,\r\n txtFieldState, txtFieldHouseNumber,\r\n txtFieldPostcode, txtFieldLocation,\r\n txtFieldCountry, txtFieldState\r\n };\r\n\r\n for (JTextField txtField : txtFields) {\r\n if (txtField.getText().equals(\"\")) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "@Test(priority=1)\n\tpublic void testWhenFieldsAreEmpty() {\n\t\tsignup.clearAllFields();\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\n\t\t// when all fields are empty errors list is greater than 2\n\t\t// the best way to do it is to have a list of all expected values and compare it with the actual received strings\n\t\tAssert.assertTrue(3<errors.size());\n\t}", "private boolean isComboBoxEmpty(String entry){\n return entry == null || entry.isBlank();\n }", "public boolean checkInput(){\n if(spelerIDField.getText().equals(\"\") || typeField.getText().equals(\"\") || codeField.getText().equals(\"\") || heeftBetaaldField.getText().equals(\"\")){\n return true;\n } else { return false; }\n }", "public void setNotEmpty(){\n this.empty = false;\n }", "public abstract boolean isBlank() throws Exception;", "public boolean isEmpty()\n {return data == null;}", "public boolean validarCampos(){\n String nome = campoNome.getText().toString();\n String descricao = campoDescricao.getText().toString();\n String valor = String.valueOf(campoValor.getRawValue());\n\n\n if(!nome.isEmpty()){\n if(!descricao.isEmpty()){\n if(!valor.isEmpty() && !valor.equals(\"0\")){\n return true;\n }else{\n exibirToast(\"Preencha o valor do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha a descrição do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha o nome do seu serviço\");\n return false;\n }\n }", "public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }", "private boolean checkInputField(String price) {\n if (productName.isEmpty() || price.isEmpty()) {\n final AlertDialog alertDialog = new AlertDialog.Builder(EditProductActivity.this).create();\n alertDialog.setTitle(\"Not all fields filled in\");\n alertDialog.setCancelable(true);\n alertDialog.setMessage(\"Please fill in all fields first\");\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, \"ok\", (dialog, which) -> alertDialog.dismiss());\n alertDialog.show();\n return false;\n }\n return true;\n }", "public boolean dataComplete() {\n return !item_category.getText().toString().isEmpty() && !item_name.getText().toString().isEmpty()\n && !item_price.getText().toString().isEmpty() && !item_description.getText().toString().isEmpty();\n }", "public boolean check(){\n for(TextField texts:textFields){\n if(texts.getText().isEmpty()){\n return false;\n }\n }\n return true;\n }", "private void verifyInput(){\n String firstName = mFirstNameField.getText().toString();\n String lastName = mLastNameField.getText().toString();\n\n mNameFieldsFilled = !TextUtils.isEmpty(firstName) && !TextUtils.isEmpty(lastName);\n\n }", "private boolean checkfields() {\n try {\n Integer.parseInt(checknum.getText().toString());\n Integer.parseInt(banknum.getText().toString());\n Integer.parseInt(branchnum.getText().toString());\n Integer.parseInt(accountnum.getText().toString()); //was commented\n\n } catch (NumberFormatException e) { // at least one of these numbers is not Integer\n return false;\n }\n\n if (checknum.getText().toString().equals(null) || banknum.getText().toString().equals(null) ||branchnum.getText().toString().equals(null)|| accountnum.getText().toString().equals(null))\n return false; // At least one of the fields is empty\n\n return true;\n }", "public boolean is_empty() {\n\t\treturn false;\n\t}", "private boolean checkInputValidation(){\n if(facility_EDT_value.getText().toString().trim().isEmpty()){\n Toast.makeText(getContext(), \"Please enter search value!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public boolean externalFilled() {\n return firstName != null && !firstName.isEmpty()\n || lastName != null && !lastName.isEmpty()\n || email != null && !email.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return false;\n }", "private boolean fieldsFilled(){\n return !editTextEmail.getText().toString().isEmpty() &&\n !editTextPassword.getText().toString().isEmpty();\n }", "@Override\n public boolean isEmpty() { return true; }", "public boolean isValid() {\n return !TextUtils.isEmpty(getId())\n && !TextUtils.isEmpty(getName())\n && getControlFilter() != null;\n }", "@Override\n public boolean highlightEmptyFields() {\n boolean returnValue = false;\n if (titleField.getText().toString().trim().isEmpty()) {\n titleField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (descriptionField.getText().toString().trim().isEmpty()) {\n descriptionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (questionField.getText().toString().trim().isEmpty()) {\n questionField.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer1Field.getText().toString().trim().isEmpty()) {\n answer1Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer2Field.getText().toString().trim().isEmpty()) {\n answer2Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer3Field.getText().toString().trim().isEmpty()) {\n answer3Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer4Field.getText().toString().trim().isEmpty()) {\n answer4Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n if (answer5Field.getText().toString().trim().isEmpty()) {\n answer5Field.setError(\"This field cannot be empty\");\n returnValue = true;\n }\n\n return returnValue;\n }", "private boolean areFieldsNotBlank() {\r\n boolean ok=true;\r\n if (dogNameField.getText() == null) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n } else if (dogNameField.getText().isBlank()) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n }\r\n return ok;\r\n }", "public void CheckEditTextIsEmptyOrNot()\r\n {\r\n ename_holder = name_event.getText().toString();\r\n edesc_holder = desc_event.getText().toString();\r\n eloc_holder = loc_event.getText().toString();\r\n edate_holder = date_event.getText().toString();\r\n etime_holder = time_event.getText().toString();\r\n elat_holder = lat_event.getText().toString();\r\n elong_holder = long_event.getText().toString();\r\n\r\n if(TextUtils.isEmpty(ename_holder) || TextUtils.isEmpty(edesc_holder) || TextUtils.isEmpty(eloc_holder) || TextUtils.isEmpty(edate_holder) || TextUtils.isEmpty(etime_holder) || TextUtils.isEmpty(elat_holder) || TextUtils.isEmpty(elong_holder))\r\n {\r\n CheckEditText = false;\r\n }\r\n else\r\n {\r\n CheckEditText = true;\r\n }\r\n }", "public final boolean empty() {\n return data == null;\n }", "public boolean isEmpty() {\n return data.isEmpty();\n }", "private void checkValidation() {\n String getInstituteName = NameofInstitute.getText().toString();\n String getDegreename = SpinnerDegree.getSelectedItem().toString();\n\n\n // Check if all strings are null or not\n if (getInstituteName.equals(\"\") || getInstituteName.length() == 0 || getDegreename.equals(\"\") || getDegreename.length() == 0)\n new CustomToast().Show_Toast(getActivity(), getView(),\"All fields are required.\");\n // Else do signup or do your stuff\n else {\n //Toast.makeText(getActivity(), \"All Ok till Now\", Toast.LENGTH_SHORT).show();\n AddQualifications(getDegreename,getInstituteName);\n }\n\n }", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "private boolean validarCampos() {\r\n\t\tif (cedula.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || telefono.equals(\"\")) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean fieldsAreFilled(){\r\n boolean filled = true;\r\n if(txtFName.getText().trim().isEmpty() | txtFEmail.getText().trim().isEmpty() | txtFPhone.getText().trim().isEmpty()){\r\n filled = false;\r\n }\r\n return filled;\r\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private boolean isEmpty(EditText etText) {\n return etText.getText().toString().trim().length() <= 0;\n }", "@Override\n public boolean isValid() {\n if((eMultipleAnswerType == null && textAnswerIn.getText().toString().trim().isEmpty()) || (eMultipleAnswerType != null && !compoundButtonController.isChecked())){\n try {\n invalidText = getResources().getString(R.string.output_invalidField_questionAnswering_notAnswered);\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "private boolean checkEpisodeInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"episodeTitle\") != null && request.getParameter(\"episodeTitle\").length() > 0\n && request.getParameter(\"episodeDescription\") != null && request.getParameter(\"episodeDescription\").length() > 0\n && request.getParameter(\"episodeNumber\") != null && request.getParameter(\"episodeNumber\").length() > 0\n && request.getParameter(\"episodeSeason\") != null && request.getParameter(\"episodeSeason\").length() > 0\n && request.getParameter(\"series\") != null && request.getParameter(\"series\").length() > 0;\n }", "protected boolean areIntFieldsBlank(EditText age, EditText mobilenum) {\n if (age.getText().toString().isEmpty() || mobilenum.getText().toString().isEmpty()) {\n Toast.makeText(FreelanceEditProfileActivity.this,\n \"ERROR: You may not leave any of the fields empty.\",\n Toast.LENGTH_SHORT).show();\n return true;\n }\n else\n return false;\n }", "private boolean isInvalid(JTextField campo) {\n return campo.getText().isEmpty();\n }", "private boolean formComplete(){\r\n return NAME_FIELD.getLength()>0 && ADDRESS_1_FIELD.getLength()>0 &&\r\n CITY_FIELD.getLength()>0 && ZIP_FIELD.getLength()>0 && \r\n COUNTRY_FIELD.getLength()>0 && PHONE_FIELD.getLength()>0; \r\n }", "public boolean isEmpty() { return this.filterExpression.length()==0; }", "private void InputTextValidator () {\n isNotNull = !txtCategoryNo.getText().equals(\"\") && !txtCategoryName.getText().equals(\"\");\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isEmpty() {\n return super.isEmpty() && ElementUtil.isEmpty(subsidyCode, programCode, prescriberTypes, notes, cautionaryNotes,\n restriction, commonwealthExManufacturerPrice, manufacturerExManufacturerPrice);\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n public boolean IsEmpty() {\n if (tamano == 0) {\n return true;\n } else {\n return false;\n }//FIn del else\n }", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "public boolean isEmpty(EditText etText){\n return etText.getText().toString().length() == 0;\n }", "private boolean fieldsAreFilled(){\n return !textboxName.isEnabled() && !textboxInitialValue.isEnabled();\n }", "public boolean empty() {\n return data.size() == 0;\n }", "public boolean isEmpty() {\n return (this.text == null);\n }", "public boolean isEmpty() {\n // YOUR CODE HERE\n return true;\n }", "private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}", "public boolean getBlank(){\n return blank;\n }", "public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean checkSeriesInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"seriesName\") != null && request.getParameter(\"seriesName\").length() > 0\n && request.getParameter(\"seriesYear\") != null && request.getParameter(\"seriesYear\").length() > 0\n && request.getParameter(\"seriesDescription\") != null && request.getParameter(\"seriesDescription\").length() > 0\n && request.getParameter(\"seriesImageURL\") != null && request.getParameter(\"seriesImageURL\").length() > 0\n && request.getParameter(\"state\") != null && request.getParameter(\"state\").length() > 0;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public boolean isEmpty() {\n\t\treturn memberNo == 0 && (name == null || name.isEmpty()) && minTotalPrice == 0 && maxTotalPrice == 0\n\t\t && getBeginOrderDate() == null && getEndOrderDate() == null;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn super.isEmpty() || getFluid() == Fluids.EMPTY;\n\t}", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }" ]
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.65614015", "0.6561197", "0.6557458", "0.65566516", "0.65559155", "0.6550873", "0.6550554", "0.6494519", "0.643224", "0.6411604", "0.6402695", "0.6385545", "0.63736856", "0.6369345", "0.6366376", "0.6363486", "0.63296837", "0.6326861", "0.6317433", "0.6303087", "0.6298332", "0.62938976", "0.62907946", "0.62898076", "0.6287838", "0.62831295", "0.62791336", "0.6278554", "0.62752944", "0.62722343", "0.62681264", "0.62547594", "0.62534815", "0.6253226", "0.6251766", "0.6249174", "0.623162", "0.62304854", "0.6228732", "0.6222629", "0.62158734", "0.6203041", "0.619997", "0.61807084", "0.61770165", "0.61770165", "0.6172683", "0.6167884", "0.61548984", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6147395", "0.6140368", "0.6140331", "0.61361694", "0.6129578", "0.6126557", "0.61224866", "0.6117711", "0.61148864", "0.6101233", "0.6089232", "0.6083371", "0.60792977", "0.6079042", "0.60778743", "0.6076239", "0.6067723", "0.6067616", "0.6063715", "0.60579497", "0.60570353", "0.6053881", "0.6053881", "0.6053881", "0.6053881", "0.6053881" ]
0.0
-1
Creates new form frmSecoes
public frmSecoes(int cod) { initComponents(); bd = new BD(); secaodao = new SecaoDAO(); secoes = secaodao.Abrir(cod); secoesapagar = new LinkedList<>(); adicionasecaotable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }", "public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvinciasTra();\n ManejadorCliente objCli = new ManejadorCliente();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }", "public Form_soal() {\n initComponents();\n tampil_soal();\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public FormInserir() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "public frmAfiliado() {\n initComponents();\n \n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }", "private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public frmAddIncidencias() {\n initComponents();\n }", "public CatProveedores() {\n initComponents();\n cargartabla();\n }", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "public FormularioCliente() {\n initComponents();\n }", "public ServerskaForma() {\n initComponents();\n \n \n \n }", "public Ventaform() {\n initComponents();\n }", "public frmSecundarioInterno() {\n initComponents();\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "@FXML\r\n public void cliente(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Clientes/FormClientes.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "@FXML\r\n public void proveedores(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Proveedores/FormProveedores.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n envio = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n nombreEmpleado = new javax.swing.JTextField();\n jLabel19 = new javax.swing.JLabel();\n cedulaEmpleado = new javax.swing.JTextField();\n nombre1 = new javax.swing.JTextField();\n jPanel4 = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n tipoBusquedaCliente = new javax.swing.JComboBox();\n txtIngresoDatoCliente = new javax.swing.JTextField();\n buscar = new javax.swing.JButton();\n newCliente = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n nombreCliente = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n cedulaCliente = new javax.swing.JTextField();\n jLabel17 = new javax.swing.JLabel();\n telefonoCliente = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n apellidoCliente = new javax.swing.JTextField();\n celularCliente = new javax.swing.JTextField();\n jPanel5 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtIngresoDatosPro = new javax.swing.JTextField();\n buscar1 = new javax.swing.JButton();\n tipoBusquedaProducto = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n cantidadCompraPro = new javax.swing.JTextField();\n jLabel22 = new javax.swing.JLabel();\n nombrePro = new javax.swing.JTextField();\n jLabel23 = new javax.swing.JLabel();\n precioUnitarioPro = new javax.swing.JTextField();\n jLabel24 = new javax.swing.JLabel();\n ivaPro = new javax.swing.JTextField();\n jLabel25 = new javax.swing.JLabel();\n stockPro = new javax.swing.JTextField();\n jLabel26 = new javax.swing.JLabel();\n codBarrasPro = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n pct_descuentoPro = new javax.swing.JTextField();\n jLabel28 = new javax.swing.JLabel();\n uniCompraPro = new javax.swing.JTextField();\n jLabel29 = new javax.swing.JLabel();\n uniVentaPro = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n tablaDetalles = new javax.swing.JTable();\n jPanel7 = new javax.swing.JPanel();\n btnQuitar = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n subtotalTotal = new javax.swing.JTextField();\n descuentoTotal = new javax.swing.JTextField();\n totalFac = new javax.swing.JTextField();\n jPanel9 = new javax.swing.JPanel();\n rbtnSi = new javax.swing.JRadioButton();\n jLabel14 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n direccionEnvio = new javax.swing.JButton();\n rtbnNo = new javax.swing.JRadioButton();\n jPanel8 = new javax.swing.JPanel();\n jLabel15 = new javax.swing.JLabel();\n txttotalPagar = new javax.swing.JTextField();\n btnRecetaMedica = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton6 = new javax.swing.JButton();\n\n setClosable(true);\n setMaximizable(true);\n setResizable(true);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Datos de la Factura\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 0, 13), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Datos de Factura\"));\n\n jLabel2.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Número de Factura\");\n\n jTextField2.setEditable(false);\n jTextField2.setBackground(new java.awt.Color(255, 255, 255));\n jTextField2.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jTextField2.setForeground(new java.awt.Color(51, 51, 51));\n jTextField2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n jTextField2.setEnabled(false);\n\n jLabel3.setBackground(new java.awt.Color(255, 255, 255));\n jLabel3.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Fecha de Venta\");\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setText(\"Nombre del Empleado: \");\n\n nombreEmpleado.setEditable(false);\n nombreEmpleado.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombreEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombreEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombreEmpleado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombreEmpleadoActionPerformed(evt);\n }\n });\n\n jLabel19.setBackground(new java.awt.Color(0, 102, 204));\n jLabel19.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel19.setText(\"Cedula del Empleado:\");\n\n cedulaEmpleado.setEditable(false);\n cedulaEmpleado.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n cedulaEmpleado.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cedulaEmpleado.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n nombre1.setEditable(false);\n nombre1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombre1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombre1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombre1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombre1ActionPerformed(evt);\n }\n });\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 .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(37, 37, 37)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2)\n .addComponent(nombreEmpleado)\n .addComponent(cedulaEmpleado)\n .addComponent(nombre1))\n .addGap(18, 18, 18))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(nombre1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombreEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cedulaEmpleado, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 255));\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Cliente\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"Buscar por: \");\n\n tipoBusquedaCliente.setForeground(new java.awt.Color(0, 102, 204));\n tipoBusquedaCliente.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Cedula\", \"Nombre\" }));\n tipoBusquedaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n tipoBusquedaCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tipoBusquedaClienteActionPerformed(evt);\n }\n });\n\n txtIngresoDatoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txtIngresoDatoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtIngresoDatoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n buscar.setBackground(new java.awt.Color(255, 255, 255));\n buscar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n buscar.setForeground(new java.awt.Color(0, 102, 204));\n buscar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/lupa.png\"))); // NOI18N\n buscar.setText(\"Buscar\");\n buscar.setBorder(null);\n buscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscarActionPerformed(evt);\n }\n });\n\n newCliente.setBackground(new java.awt.Color(255, 255, 255));\n newCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n newCliente.setForeground(new java.awt.Color(0, 102, 204));\n newCliente.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n newCliente.setText(\"¿Desea almacenar un nuevo cliente? click aqui\");\n newCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n newCliente.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n newClienteMouseClicked(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Nombre: \");\n\n nombreCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombreCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombreCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n nombreCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nombreClienteActionPerformed(evt);\n }\n });\n\n jLabel16.setBackground(new java.awt.Color(0, 102, 204));\n jLabel16.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel16.setText(\"Cedula:\");\n\n cedulaCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n cedulaCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cedulaCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel17.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel17.setText(\" Telefono \");\n\n telefonoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n telefonoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n telefonoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel18.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel18.setText(\"Apellido:\");\n\n jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel20.setText(\"Celular:\");\n\n apellidoCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n apellidoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n apellidoCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n celularCliente.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n celularCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n celularCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n celularCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n celularClienteActionPerformed(evt);\n }\n });\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 .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17)\n .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(telefonoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)\n .addComponent(cedulaCliente, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nombreCliente, javax.swing.GroupLayout.Alignment.LEADING))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(newCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(109, 109, 109))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(buscar, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)\n .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(apellidoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addComponent(celularCliente))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtIngresoDatoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tipoBusquedaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buscar))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGap(0, 1, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(apellidoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cedulaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(celularCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(telefonoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(newCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1))\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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanel5.setBackground(new java.awt.Color(255, 255, 255));\n jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Buscar Producto\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 0, 13), new java.awt.Color(102, 102, 102))); // NOI18N\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 0, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 51));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Buscar\");\n\n txtIngresoDatosPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txtIngresoDatosPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtIngresoDatosPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n buscar1.setBackground(new java.awt.Color(255, 255, 255));\n buscar1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n buscar1.setForeground(new java.awt.Color(0, 102, 204));\n buscar1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/lupa.png\"))); // NOI18N\n buscar1.setText(\"Buscar\");\n buscar1.setBorder(null);\n buscar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscar1ActionPerformed(evt);\n }\n });\n\n tipoBusquedaProducto.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n tipoBusquedaProducto.setForeground(new java.awt.Color(0, 102, 204));\n tipoBusquedaProducto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Codigo de Barras\", \"Nombre\" }));\n tipoBusquedaProducto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));\n tipoBusquedaProducto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tipoBusquedaProductoActionPerformed(evt);\n }\n });\n\n jLabel10.setBackground(new java.awt.Color(255, 255, 255));\n jLabel10.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(0, 102, 204));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"Ingresar Cantidad a Comprar\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jButton1.setForeground(new java.awt.Color(0, 102, 204));\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/compra.png\"))); // NOI18N\n jButton1.setText(\"Añadir\");\n jButton1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n cantidadCompraPro.setEditable(false);\n cantidadCompraPro.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n cantidadCompraPro.setForeground(new java.awt.Color(0, 102, 204));\n cantidadCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cantidadCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));\n\n jLabel22.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel22.setText(\"Nombre: \");\n\n nombrePro.setEditable(false);\n nombrePro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n nombrePro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n nombrePro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel23.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel23.setText(\"Código de Barras:\");\n\n precioUnitarioPro.setEditable(false);\n precioUnitarioPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n precioUnitarioPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n precioUnitarioPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel24.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel24.setText(\"IVA: \");\n\n ivaPro.setEditable(false);\n ivaPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n ivaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ivaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel25.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel25.setText(\"Stock:\");\n\n stockPro.setEditable(false);\n stockPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n stockPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n stockPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel26.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel26.setText(\"Precio Unitario:\");\n\n codBarrasPro.setEditable(false);\n codBarrasPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n codBarrasPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n codBarrasPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel27.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel27.setText(\"Porcentaje de Descuento\");\n\n pct_descuentoPro.setEditable(false);\n pct_descuentoPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n pct_descuentoPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pct_descuentoPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n pct_descuentoPro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pct_descuentoProActionPerformed(evt);\n }\n });\n\n jLabel28.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel28.setText(\"Unidad de Compra\");\n\n uniCompraPro.setEditable(false);\n uniCompraPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n uniCompraPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n uniCompraPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel29.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel29.setText(\"Unidad de Venta\");\n\n uniVentaPro.setEditable(false);\n uniVentaPro.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n uniVentaPro.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n uniVentaPro.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\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 .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(7, 7, 7)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ivaPro, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n .addComponent(precioUnitarioPro)\n .addComponent(stockPro))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buscar1, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)))\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)\n .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(codBarrasPro)\n .addComponent(pct_descuentoPro)\n .addComponent(cantidadCompraPro, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))))\n .addGap(22, 22, 22))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(tipoBusquedaProducto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(precioUnitarioPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nombrePro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ivaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(8, 8, 8)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(stockPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel29, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(uniVentaPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtIngresoDatosPro, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buscar1)\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(codBarrasPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pct_descuentoPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cantidadCompraPro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 255));\n jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Detalle de la Factura\"));\n\n jScrollPane3.setBackground(new java.awt.Color(255, 255, 255));\n jScrollPane3.setBorder(null);\n\n tablaDetalles.setBackground(new java.awt.Color(0, 102, 204));\n tablaDetalles.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n tablaDetalles.setForeground(new java.awt.Color(255, 255, 255));\n tablaDetalles.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Cantidad\", \"Producto\", \"Precio Unitario\", \"Subtotal\", \"Descuento por Producto\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, true, true\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tablaDetalles.setRowHeight(25);\n tablaDetalles.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tablaDetallesMouseClicked(evt);\n }\n });\n jScrollPane3.setViewportView(tablaDetalles);\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 845, Short.MAX_VALUE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 845, Short.MAX_VALUE))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 25, Short.MAX_VALUE)))\n );\n\n jPanel7.setBackground(new java.awt.Color(255, 255, 255));\n jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Opciones\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n btnQuitar.setBackground(new java.awt.Color(255, 255, 255));\n btnQuitar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n btnQuitar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/eliminar.png\"))); // NOI18N\n btnQuitar.setText(\"Quitar\");\n btnQuitar.setEnabled(false);\n btnQuitar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnQuitarActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Subtotal:\");\n\n jLabel12.setText(\"Descuento Total:\");\n\n jLabel13.setText(\"Total:\");\n\n subtotalTotal.setEditable(false);\n subtotalTotal.setBackground(new java.awt.Color(255, 255, 255));\n subtotalTotal.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n descuentoTotal.setEditable(false);\n descuentoTotal.setBackground(new java.awt.Color(255, 255, 255));\n descuentoTotal.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n totalFac.setEditable(false);\n totalFac.setBackground(new java.awt.Color(255, 255, 255));\n totalFac.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\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(btnQuitar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descuentoTotal)\n .addComponent(totalFac))))\n .addContainerGap())\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnQuitar, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(subtotalTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descuentoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(totalFac, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 255, 255));\n jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Envio\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 12), new java.awt.Color(51, 51, 51))); // NOI18N\n\n envio.add(rbtnSi);\n rbtnSi.setText(\"Si\");\n rbtnSi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rbtnSiMouseClicked(evt);\n }\n });\n\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/dinero.png\"))); // NOI18N\n jLabel14.setText(\"Precio de envio\");\n\n jTextField7.setEditable(false);\n jTextField7.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField7.setText(\"$ 2.00\");\n\n direccionEnvio.setBackground(new java.awt.Color(255, 255, 255));\n direccionEnvio.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n direccionEnvio.setForeground(new java.awt.Color(0, 102, 204));\n direccionEnvio.setText(\"Añadir direccion de Envio del cliente\");\n direccionEnvio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n direccionEnvio.setEnabled(false);\n direccionEnvio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n direccionEnvioActionPerformed(evt);\n }\n });\n\n envio.add(rtbnNo);\n rtbnNo.setSelected(true);\n rtbnNo.setText(\"No\");\n rtbnNo.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rtbnNoMouseClicked(evt);\n }\n });\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.TRAILING)\n .addComponent(rbtnSi)\n .addComponent(rtbnNo))\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(14, 14, 14)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbtnSi)\n .addComponent(jLabel14)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rtbnNo)\n .addComponent(direccionEnvio, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21))\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 255, 255));\n jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Servicios\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jLabel15.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/cobro.png\"))); // NOI18N\n jLabel15.setText(\"Total a Pagar:\");\n\n txttotalPagar.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n txttotalPagar.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txttotalPagar.setEnabled(false);\n txttotalPagar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txttotalPagarActionPerformed(evt);\n }\n });\n\n btnRecetaMedica.setBackground(new java.awt.Color(255, 255, 255));\n btnRecetaMedica.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n btnRecetaMedica.setForeground(new java.awt.Color(0, 102, 204));\n btnRecetaMedica.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/receta.png\"))); // NOI18N\n btnRecetaMedica.setText(\"Agregar Receta Medica\");\n btnRecetaMedica.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRecetaMedicaActionPerformed(evt);\n }\n });\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 .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(txttotalPagar)\n .addGap(23, 23, 23))\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(btnRecetaMedica, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txttotalPagar, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRecetaMedica, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(21, 21, 21))\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 255, 255));\n jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)), \"Generar Factura\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Calibri\", 0, 14), new java.awt.Color(51, 51, 51))); // NOI18N\n\n jButton6.setBackground(new java.awt.Color(255, 255, 255));\n jButton6.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n jButton6.setForeground(new java.awt.Color(0, 102, 204));\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/impresora.png\"))); // NOI18N\n jButton6.setText(\"Imprimir Factura\");\n jButton6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton6MouseClicked(evt);\n }\n });\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 .addGap(23, 23, 23)\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(23, 23, 23))\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 .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17))\n );\n jPanel1Layout.setVerticalGroup(\n 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(jPanel5, javax.swing.GroupLayout.DEFAULT_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, false)\n .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 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(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.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\tif(e.getActionCommand().equalsIgnoreCase(\"Inserimento insegnamento\"))\n\t\t{\n\t\t\tInserimentoInsegnamento inserisci =new InserimentoInsegnamento(this);\n\t\t\tinserisci.setVisible(true);\n\t\t\tsetVisible(false);\n\t\t}\n\t\t\n\t\tif(e.getActionCommand().equalsIgnoreCase(\"Elenco insegnamenti\"))\n\t\t{\n\t\t\tVisualizzaElencoInsegnamenti elenco=new VisualizzaElencoInsegnamenti();\n\t\t\telenco.setVisible(true);\n\t\t}\n\t\t\n\t\tif(e.getActionCommand().equalsIgnoreCase(\"Associa docente\"))\n\t\t{\n\t\t\tAssociaDocente associa = new AssociaDocente();\n\t\t\tassocia.setVisible(true);\n\t\t}\n\t\t\n\t\tif(e.getActionCommand().equalsIgnoreCase(\"Torna al Menu\"))\n\t\t{\n\t\t\tsetVisible(false);\n\t\t\tf1.setVisible(true);\n\t\t}\n\t\t\n\t\tif(e.getActionCommand().equalsIgnoreCase(\"Inserimento Corso Laurea\"))\n\t\t{\n\t\t\t\n\t\t\t\tString selection= JOptionPane.showInputDialog(getParent(),\"Inserisci il nome del corso di laurea:\",\"INSERIMENTO CORSO DI LAUREA\",JOptionPane.OK_CANCEL_OPTION);\n\t\t\t\tif(selection != null )\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.err.println(\"Errore nel caricamento del Driver\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tConnection conn=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/schedule_dib\",\"root\",\"\");\n\t\t\t\t\t\tconn.setAutoCommit(false);\n\t\t\t\t\t\tStatement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\t\tString query;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquery=\"Insert into `corsi` (`Corso_laurea`)values('\"+selection+\"')\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tint righe=stmt.executeUpdate(query);\n\t\t\t\t\t\tif(righe != 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Errore aggiornamento database\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconn.commit();\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Operazione avvenuta con successo\");\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}\n\t\t\t\t\t\n\t\t\t\t\tcatch(Exception exc)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Errore aggiornamento database\"+exc.getMessage());\n\t\t\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Nessun corso di laurea inserito\");\n\t\t\t\t}\n\t\t\n\t\t\n\t}\n\t\t\n\t\t\n\t}", "public JFrameFormularioProducto() {\n initComponents();\n }", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }", "public CrearPedidos() {\n initComponents();\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 initialize() {\n setFrame(new JFrame());\n getFrame().setBounds(100, 100, 310, 270);\n getFrame().setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n getFrame().getContentPane().setLayout(null);\n\n JLabel lblTitle = new JLabel(\"Crear nuevo profesor\");\n lblTitle.setFont(new Font(\"Arial\", Font.BOLD | Font.ITALIC, 13));\n lblTitle.setBounds(10, 11, 264, 16);\n getFrame().getContentPane().add(lblTitle);\n\n JLabel lblNombre = new JLabel(\"Nombre\");\n lblNombre.setBounds(10, 36, 46, 14);\n getFrame().getContentPane().add(lblNombre);\n\n textNombre = new JTextField();\n textNombre.setBounds(66, 33, 86, 20);\n getFrame().getContentPane().add(textNombre);\n textNombre.setColumns(10);\n\n JLabel lbDni = new JLabel(\"DNI\");\n lbDni.setBounds(10, 61, 46, 14);\n getFrame().getContentPane().add(lbDni);\n\n textDni = new JTextField();\n textDni.setBounds(66, 58, 86, 20);\n getFrame().getContentPane().add(textDni);\n textDni.setColumns(10);\n\n JLabel lblEdad = new JLabel(\"Edad\");\n lblEdad.setBounds(10, 86, 46, 14);\n getFrame().getContentPane().add(lblEdad);\n\n textEdad = new JTextField();\n textEdad.setBounds(66, 83, 86, 20);\n getFrame().getContentPane().add(textEdad);\n textEdad.setColumns(10);\n\n JLabel lbCurso = new JLabel(\"Curso\");\n lbCurso.setBounds(10, 111, 46, 14);\n getFrame().getContentPane().add(lbCurso);\n\n textCurso = new JTextField();\n textCurso.setBounds(66, 108, 86, 20);\n getFrame().getContentPane().add(textCurso);\n textCurso.setColumns(10);\n\n JLabel lblSueldo = new JLabel(\"Sueldo\");\n lblSueldo.setBounds(10, 136, 46, 14);\n getFrame().getContentPane().add(lblSueldo);\n\n textSueldo = new JTextField();\n textSueldo.setBounds(66, 133, 86, 20);\n getFrame().getContentPane().add(textSueldo);\n textSueldo.setColumns(10);\n\n JLabel lblNewLabel = new JLabel(\"Todos los campos son obligatorios\");\n lblNewLabel.setForeground(Color.RED);\n lblNewLabel.setFont(new Font(\"Arial\", Font.BOLD | Font.ITALIC, 11));\n lblNewLabel.setBounds(10, 161, 264, 14);\n getFrame().getContentPane().add(lblNewLabel);\n\n JButton btnCrear = new JButton(\"Crear profesor\");\n btnCrear.setForeground(Color.WHITE);\n btnCrear.setBackground(Color.DARK_GRAY);\n btnCrear.setFont(new Font(\"Arial\", Font.BOLD, 12));\n btnCrear.addActionListener(new ActionListener() {\n\n /**\n * Al presionar el boton 'btnCrear' este crea un objeto de tipo Profesor y\n * accede la informacion dentreo de cada JTextField() asignanco al objeto creado\n * estos valores obtenidos.\n *\n * @param e el evento.\n * @see #Ficheros.\n */\n public void actionPerformed(ActionEvent e) {\n Profesor p = new Profesor();\n p.setNombre(textNombre.getText().toUpperCase());\n p.setDni(textDni.getText().toUpperCase());\n p.setEdad(Integer.parseInt(textEdad.getText()));\n p.setCurso(Integer.parseInt(textCurso.getText()));\n p.setSueldo(Integer.parseInt(textSueldo.getText()));\n try {\n Ficheros.guardar(p, Ficheros.D_PROFESORES);\n } catch (IOException e2) {\n System.out.println(\"Fichero no encontrado - guardarAlumno()\");\n }\n }\n });\n btnCrear.setBounds(10, 186, 119, 33);\n getFrame().getContentPane().add(btnCrear);\n\n JButton btnMostrar = new JButton(\"Mostrar profesores\");\n btnMostrar.setForeground(Color.WHITE);\n btnMostrar.setBackground(Color.DARK_GRAY);\n btnMostrar.setFont(new Font(\"Arial\", Font.BOLD, 12));\n btnMostrar.setBounds(139, 186, 145, 33);\n btnMostrar.addActionListener(new ActionListener() {\n /**\n * Muestra los profesores almacenados en los ficheros desde Class Ficheros.\n *\n * @param e el evento.\n * @see #Ficheros.\n */\n public void actionPerformed(ActionEvent e) {\n Profesor p = null;\n System.out.println(\"---- Profesores ----\");\n Ficheros.leerFicheros(p, Ficheros.D_PROFESORES);\n }\n });\n getFrame().getContentPane().add(btnMostrar);\n }", "public frmVenda() {\n initComponents();\n }", "public frmPessoa() {\n initComponents();\n }", "public frmPesquisaServico() {\n initComponents();\n listarServicos();\n }", "public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }", "public FrmNuevoProveedor() {\n initComponents();\n }", "private void btnEntrarActionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n Alumno.Aula = jcbAula.getSelectedItem().toString();\n Alumno.Materia = \"\";\n Info_Computo a1 = new Info_Computo();\n a1.setVisible(true);\n }", "private FenetreCreation() {\n\t\tsuper(\"Machine de Turing - Creation\");\n\t\tsetSize(1000, 450);\n\t\tsetLocation(100, 100);\n\t\tsetResizable(false);\n\t\t//Pas possible de fermer par le bouton fermer de fenetre\n\t\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\t\n\t\t//Initialisation de toutes les composantes\n\t\tlabelEtat = new JLabel(\"Etats :\");\n\t\tlabelSym = new JLabel(\"Symboles :\");\n\t\tlabelConsigne = new JLabel(\"<html>Le premier etat ajoute sera l'etat initial.<br>\"\n\t\t\t\t+ \"# signifie des cases vides.<br>\"\n\t\t\t\t+ \"Pas d'espace pour des symboles et etats.</html>\");\n\n\t\tok = new JButton(\"OK\");\n\t\tannuler = new JButton(\"Annuler\");\n\t\tajoutEtat = new JButton(\"+\");\n\t\tsuppEtat = new JButton(\"-\");\n\t\tajoutSym = new JButton(\"+\");\n\t\tsuppSym = new JButton(\"-\");\n\n\t\ttextEtat = new JTextField();\n\t\ttextSym = new JTextField();\n\n\t\tmodelEtat = new DefaultListModel<String>();\n\t\tetats = new JList<String>(modelEtat);\n\t\tetats.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tetats.setVisibleRowCount(10);\n\t\tscrollEtat = new JScrollPane(etats);\n\n\t\tmodelSym = new DefaultListModel<String>();\n\t\tsymboles = new JList<String>(modelSym);\n\t\tsymboles.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tsymboles.setVisibleRowCount(10);\n\t\tscrollSym = new JScrollPane(symboles);\n\n\t\tselSym = new JComboBox<String>();\n\t\tselEtat = new JComboBox<String>();\n\t\tselDeplace = new JComboBox<String>();\n\t\t//ajouter l'etat finale et symbole speciale pour simuler ruban infini\n\t\tselEtat.addItem(\"eFinale\");\n\t\tselSym.addItem(\"#\");\n\t\t//etiquettes de deplacement\n\t\tselDeplace.addItem(\"Gauche\");\n\t\tselDeplace.addItem(\"Droite\");\n\t\tselDeplace.addItem(\"Statique\");\n\n\t\ttabModel = new HashMap<String, DefaultTableModel>();\n\t\tString[] colId = {\"Etat\", \"Vue\", \"Changer à\", \"Prochain Etat\", \"Deplacement\"};\n\t\temptyMod = new DefaultTableModel(0, 5);\n\t\temptyMod.setColumnIdentifiers(colId);\n\t\ttab = new JTable(emptyMod);\n\t\tscrollTab = new JScrollPane(tab);\n\n\t\ttabSym = new ArrayList<String>();\n\t\ttabEtat = new ArrayList<String>();\n\t\t\n\t\t//rendre visible symbole speciale a l'initialisation\n\t\ttabSym.add(\"#\");\n\t\tmodelSym.addElement(\"#\");\n\t\t\n\t\t//ajout de fonctionnement des boutons\n\t\tajoutEtat.addActionListener(e -> {\n\t\t\tString data = textEtat.getText();\n\t\t\tif (!modelEtat.contains(data) && !data.isEmpty() && !data.contains(\" \") && !data.equals(\"eFinale\")) {\n\t\t\t\tmodelEtat.addElement(data);\n\t\t\t\ttabEtat.add(data);\n\t\t\t\ttabModel.put(data, new DefaultTableModel(0, 4) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\t\t\treturn !(column == 0 || column == 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttabModel.get(data).setColumnIdentifiers(colId);\n\t\t\t\ttabModel.get(data).addRow(new Object[]{data, \"\", \"\", \"\", \"\"});\n\t\t\t\tfor (int i = 0; i < modelSym.size(); i++) {\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\ttabModel.get(data).setValueAt(modelSym.get(i), i, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttabModel.get(data).addRow(new Object[]{\"\", modelSym.get(i), \"\", \"\", \"\"});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tselEtat.addItem(data);\n\t\t\t}\n\t\t\ttextEtat.setText(null);\n\t\t});\n\n\t\tsuppEtat.addActionListener(e -> {\n\t\t\tint index = etats.getSelectedIndex();\n\t\t\tif (index != -1) {\n\t\t\t\tString data = etats.getSelectedValue();\n\t\t\t\tmodelEtat.remove(index);\n\t\t\t\ttabEtat.remove(index);\n\t\t\t\ttabModel.remove(data);\n\t\t\t\tselEtat.removeItem(data);\n\t\t\t}\n\t\t});\n\n\t\tajoutSym.addActionListener(e -> {\n\t\t\tString data = textSym.getText();\n\t\t\tif (!modelSym.contains(data) && !data.isEmpty() && !data.contains(\" \") && !data.equals(\"#\")) {\n\t\t\t\tmodelSym.addElement(data);\n\t\t\t\ttabSym.add(data);\n\t\t\t\tif (modelSym.size() == 1) {\n\t\t\t\t\tfor (String s : tabModel.keySet()) {\n\t\t\t\t\t\ttabModel.get(s).setValueAt(data, 0, 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (String s : tabModel.keySet()) {\n\t\t\t\t\t\ttabModel.get(s).addRow(new Object[]{\"\", data, \"\", \"\", \"\"});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tselSym.addItem(data);\n\t\t\t}\n\t\t\ttextSym.setText(null);\n\t\t});\n\n\t\tsuppSym.addActionListener(e -> {\n\t\t\tint index = symboles.getSelectedIndex();\n\t\t\tif (index != -1 && !modelSym.getElementAt(index).equals(\"#\")) {\n\t\t\t\tselSym.removeItem(modelSym.getElementAt(index));\n\t\t\t\ttabSym.remove(index);\n\t\t\t\tmodelSym.remove(index);\n\t\t\t\tfor (DefaultTableModel d : tabModel.values()) {\n\t\t\t\t\td.removeRow(index);\n\t\t\t\t\tif (index == 0 && d.getRowCount() == 0) {\n\t\t\t\t\t\td.addRow(new Object[]{etats.getSelectedValue(), \"\", \"\", \"\", \"\"});\n\t\t\t\t\t} else if (index == 0) {\n\t\t\t\t\t\td.setValueAt(etats.getSelectedValue(), 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t//seul moyen de fermer la fenetre\n\t\tannuler.addActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tbarrier.await();\n\t\t\t} catch (Exception ex) {\n\t\t\t}\n\t\t\tthis.dispose();\n\t\t});\n\t\t\n\t\t//finaliser les parametres d'entree pour la creation\n\t\t//verification qu'aucun champ n'est null, sinon erreur\n\t\tok.addActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tif (tabEtat.isEmpty() || tabSym.isEmpty()) {\n\t\t\t\t\tthrow new Exception();\n\t\t\t\t} else {\n\t\t\t\t\ttabAct = new int[tabEtat.size()][tabSym.size()][3];\n\t\t\t\t\tfor (int i = 0; i < tabAct.length; i++) {\n\t\t\t\t\t\tString etat = tabEtat.get(i);\n\t\t\t\t\t\tfor (int j = 0; j < tabAct[i].length; j++) {\n\t\t\t\t\t\t\tString newSym = (String) tabModel.get(etat).getValueAt(j, 2);\n\t\t\t\t\t\t\tString newEtat = (String) tabModel.get(etat).getValueAt(j, 3);\n\t\t\t\t\t\t\tString dep = (String) tabModel.get(etat).getValueAt(j, 4);\n\n\t\t\t\t\t\t\tif (newSym == \"\" || newEtat == \"\" || dep == \"\") {\n\t\t\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttabAct[i][j][0] = tabSym.indexOf(newSym);\n\n\t\t\t\t\t\t\tif (newEtat.equals(\"eFinale\")) {\n\t\t\t\t\t\t\t\ttabAct[i][j][1] = -1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttabAct[i][j][1] = tabEtat.indexOf(newEtat);\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\tif (dep.equals(\"Gauche\")) {\n\t\t\t\t\t\t\t\ttabAct[i][j][2] = Ruban.GAUCHE;\n\t\t\t\t\t\t\t} else if (dep.equals(\"Droite\")) {\n\t\t\t\t\t\t\t\ttabAct[i][j][2] = Ruban.DROITE;\n\t\t\t\t\t\t\t} else if (dep.equals(\"Statique\")) {\n\t\t\t\t\t\t\t\ttabAct[i][j][2] = Ruban.RESTER;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.dispose();\n\t\t\t\t\tmachine = new Turing_Machine(tabAct, tabEtat, tabSym);\n\t\t\t\t\tbarrier.await();\n\t\t\t\t}\n\t\t\t} catch (Exception n) {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Veuillez remplir tous les champs de saisie!\", \"\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//changement de tableau par selection d'etat\n\t\tetats.addListSelectionListener(new ListSelectionListener() {\n\t\t\tpublic void valueChanged(ListSelectionEvent evt) {\n\t\t\t\tif (!evt.getValueIsAdjusting()) {\n\t\t\t\t\tif (!modelEtat.isEmpty() && etats.getSelectedIndex() != -1) {\n\t\t\t\t\t\ttab.setModel(tabModel.get(etats.getSelectedValue()));\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttab.setModel(emptyMod);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttab.getColumnModel().getColumn(2).setCellEditor(new DefaultCellEditor(selSym));\n\t\t\t\ttab.getColumnModel().getColumn(3).setCellEditor(new DefaultCellEditor(selEtat));\n\t\t\t\ttab.getColumnModel().getColumn(4).setCellEditor(new DefaultCellEditor(selDeplace));\n\t\t\t}\n\t\t});\n\t\t\n\t\t//positionnement des composantes\n\t\tentryPanel = new JPanel(new GridBagLayout());\n\t\tmainPanel = new JPanel(new BorderLayout());\n\t\tboutonVal = new JPanel(new GridLayout(1, 2, 0, 0));\n\t\tboutonEtat = new JPanel(new GridLayout(1, 2, 10, 0));\n\t\tboutonSym = new JPanel(new GridLayout(1, 2, 10, 0));\n\n\t\tboutonEtat.add(ajoutEtat);\n\t\tboutonEtat.add(suppEtat);\n\t\tboutonSym.add(ajoutSym);\n\t\tboutonSym.add(suppSym);\n\n\t\tc = new GridBagConstraints();\n\t\tc.gridheight = 1;\n\t\tc.gridwidth = 1;\n\t\tc.insets = new Insets(5, 10, 5, 10);\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\t\n\t\tentryPanel.add(labelConsigne, c);\n\t\t\n\t\tc.gridx = 0;\n\t\tc.gridy = 2;\n\t\tc.gridwidth = 1;\n\t\tentryPanel.add(labelEtat, c);\n\n\t\tc.gridx = 2;\n\t\tentryPanel.add(labelSym, c);\n\n\t\tc.gridy = 3;\n\t\tc.gridx = 0;\n\t\tc.gridwidth = 2;\n\t\tentryPanel.add(boutonEtat, c);\n\n\t\tc.gridx = 2;\n\t\tentryPanel.add(boutonSym, c);\n\n\t\tc.gridy = 4;\n\t\tc.gridx = 0;\n\t\tentryPanel.add(textEtat, c);\n\n\t\tc.gridy = 5;\n\t\tentryPanel.add(scrollEtat, c);\n\n\t\tc.gridx = 2;\n\t\tc.gridy = 4;\n\t\tentryPanel.add(textSym, c);\n\n\t\tc.gridy = 5;\n\t\tentryPanel.add(scrollSym, c);\n\n\t\tboutonVal.add(ok);\n\t\tboutonVal.add(annuler);\n\t\tmainPanel.add(entryPanel, BorderLayout.WEST);\n\t\tmainPanel.add(scrollTab, BorderLayout.EAST);\n\t\tmainPanel.add(boutonVal, BorderLayout.SOUTH);\n\t\tsetContentPane(mainPanel);\n\t\tpack();\n\t\tsetVisible(true);\n\t}", "@GetMapping(\"/add\")\n public String showSocioForm(Model model, Persona persona) {\n List<Cargo> cargos = cargoService.getCargos();\n model.addAttribute(\"cargos\", cargos);\n return \"/backoffice/socioForm\";\n }", "@FXML\r\n public void compras(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Compras/FormCompras.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroProdutoEstoque cadastroprodutoestoque;\n\t\t\t\ttry {\n\t\t\t\t\tcadastroprodutoestoque = new CadastroProdutoEstoque();\n\t\t\t\t\tcadastroprodutoestoque.setLocationRelativeTo(null);\n\t\t\t\t\tcadastroprodutoestoque.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastroprodutoestoque.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroProdutoEstoque cadastroprodutoestoque;\n\t\t\t\ttry {\n\t\t\t\t\tcadastroprodutoestoque = new CadastroProdutoEstoque();\n\t\t\t\t\tcadastroprodutoestoque.setLocationRelativeTo(null);\n\t\t\t\t\tcadastroprodutoestoque.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastroprodutoestoque.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "public FormHorarioSSE() {\n initComponents();\n }", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@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 RazonSocialjTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n DireccionjTextField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n EmailjTextField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n CodPostjTextField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n TelefonojTextField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n CUITjTextField = new javax.swing.JTextField();\n CancelarjButton = new javax.swing.JButton();\n GuardarjButton = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n ProvinciasjComboBox = new javax.swing.JComboBox<>();\n jLabel10 = new javax.swing.JLabel();\n LocalidadesjComboBox = new javax.swing.JComboBox<>();\n NombreFantasiajTextField = new javax.swing.JTextField();\n ProveedorIDjTextField = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Agregar nuevo proveedor - OSG\");\n\n jLabel1.setText(\"Razon social\");\n\n jLabel2.setText(\"Dirección\");\n\n jLabel3.setText(\"Email\");\n\n jLabel4.setText(\"Código postal\");\n\n CodPostjTextField.setEditable(false);\n CodPostjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n CodPostjTextFieldKeyTyped(evt);\n }\n });\n\n jLabel5.setText(\"Telefono\");\n\n TelefonojTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n TelefonojTextFieldKeyTyped(evt);\n }\n });\n\n jLabel6.setText(\"CUIT\");\n\n CUITjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n CUITjTextFieldKeyTyped(evt);\n }\n });\n\n CancelarjButton.setText(\"Cancelar\");\n CancelarjButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CancelarjButtonActionPerformed(evt);\n }\n });\n\n GuardarjButton.setText(\"Guardar\");\n GuardarjButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GuardarjButtonActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Nombre de fantasia\");\n\n jLabel7.setText(\"Provincia\");\n\n ProvinciasjComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ProvinciasjComboBoxItemStateChanged(evt);\n }\n });\n\n jLabel10.setText(\"Localidad\");\n\n LocalidadesjComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n LocalidadesjComboBoxItemStateChanged(evt);\n }\n });\n\n ProveedorIDjTextField.setVisible(false);\n ProveedorIDjTextField.setEditable(false);\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(56, 56, 56)\n .addComponent(TelefonojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(56, 56, 56)\n .addComponent(EmailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)\n .addGap(56, 56, 56)\n .addComponent(CodPostjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(56, 56, 56)\n .addComponent(ProvinciasjComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(56, 56, 56)\n .addComponent(LocalidadesjComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(CUITjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(RazonSocialjTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE)\n .addComponent(NombreFantasiajTextField)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(DireccionjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(ProveedorIDjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(GuardarjButton)\n .addGap(18, 18, 18)\n .addComponent(CancelarjButton)))\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(jLabel6)\n .addComponent(CUITjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(RazonSocialjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(NombreFantasiajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(ProvinciasjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(LocalidadesjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(CodPostjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(DireccionjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(EmailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(TelefonojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(CancelarjButton)\n .addComponent(GuardarjButton)\n .addComponent(ProveedorIDjTextField, 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 pack();\n }", "public frmMain() {\n initComponents();\n pnlMemoria.setBackground(Color.GRAY);\n g = pnlMemoria.getGraphics();\n pnlMemoria.paintComponents(g);\n txtTablaProcesos.setEditable(false);\n listProcesos.setModel(procesos_en_disco);\n Proceso proceso = new Proceso(\"Sistema Operativo\");\n proceso.start();\n }", "public frm_tutor_subida_prueba() {\n }", "public FormGestionarProducto(java.awt.Frame parent) {\n super(parent, true);\n initComponents();\n crearTabla();\n }", "public CARGOS_REGISTRO() {\n initComponents();\n InputMap map2 = txtNombre.getInputMap(JTextField.WHEN_FOCUSED); \n map2.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap maps = TxtSue.getInputMap(JTextField.WHEN_FOCUSED); \n maps.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap map3 = txtFun.getInputMap(JTextField.WHEN_FOCUSED); \n map3.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n this.setLocationRelativeTo(null);\n this.txtFun.setLineWrap(true);\n this.lblId.setText(Funciones.extraerIdMax());\n\t\tsexo.addItem(\"Administrativo\");\n\t\tsexo.addItem(\"Operativo\");\n sexo.addItem(\"Tecnico\");\n sexo.addItem(\"Servicios\");\n \n }", "public frmCadastrarProduto() {\n initComponents();\n\n this.cmbCategoria.setEnabled(false);\n this.cmbFornecedor.setEnabled(false);\n this.txtNome.setEnabled(false);\n this.txtDescricao.setEnabled(false);\n this.txtEstoque.setEnabled(false);\n this.txtId.setEnabled(false);\n this.txtPreco.setEnabled(false);\n this.txtPrecoCusto.setEnabled(false);\n this.txtCodBarras.setEnabled(false);\n\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public ConsultarVeiculo() {\n initComponents();\n }", "private void colocar(){\n setLayout(s);\n eleccion = new BarraEleccion(imagenes,textos);\n eleccion.setLayout(new GridLayout(4,4));\n eleccion.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createBevelBorder(5), \"SELECCIONA EL MAGUEY\",\n TitledBorder.CENTER, TitledBorder.TOP,new Font(\"Helvetica\",Font.BOLD,15),Color.WHITE));\n eleccion.setFondoImagen(imgFond);\n etqAlcohol = new JLabel(\"SELECCIONA EL GRADO DE ALCOHOL\");\n etqAlcohol.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqAlcohol.setForeground(Color.WHITE);\n alcohol = new JComboBox<>();\n etqTipo = new JLabel(\"SELECCIONA EL TIPO DE MEZCAL\");\n etqTipo.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqTipo.setForeground(Color.WHITE);\n tipo = new JComboBox<>();\n btnRegistrar = new JButton();\n btnRegistrar.setFont(new Font(\"Sylfaen\", Font.BOLD, 17));\n btnRegistrar.setText(\"Registrar\");\n btnRegistrar.setHorizontalAlignment(SwingConstants.CENTER);\n btnRegistrar.setActionCommand(\"registrar\");\n add(eleccion);\n add(etqAlcohol);\n add(alcohol);\n add(etqTipo);\n add(tipo);\n add(btnRegistrar);\n iniciarVistas();\n }", "Secuencia createSecuencia();", "private void initialize(DadosDaBateria bateria) {\n\t\tfrmCadastrarBateria = new JFrame();\n\t\tfrmCadastrarBateria.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Erich\\\\Faculdade\\\\APS\\\\2\\u00BA Semestre\\\\Imagens\\\\Bateria.jpg\"));\n\t\tfrmCadastrarBateria.setTitle(\"Cadastrar Bateria\");\n\t\tfrmCadastrarBateria.setBounds(100, 100, 320, 201);\n\t\tfrmCadastrarBateria.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCadastrarBateria.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Fabricante da bateria:\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel.setBounds(10, 11, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblModeloDaBateria = new JLabel(\"Modelo da bateria:\");\n\t\tlblModeloDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblModeloDaBateria.setBounds(10, 36, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblModeloDaBateria);\n\t\t\n\t\tJLabel lblTensoDaBateria = new JLabel(\"Tens\\u00E3o da bateria:\");\n\t\tlblTensoDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblTensoDaBateria.setBounds(10, 61, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblTensoDaBateria);\n\t\t\n\t\ttextFieldFabricanteBateria = new JTextField();\n\t\ttextFieldFabricanteBateria.setBounds(148, 8, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldFabricanteBateria);\n\t\ttextFieldFabricanteBateria.setColumns(10);\n\t\t\n\t\ttextFieldNomeBateria = new JTextField();\n\t\ttextFieldNomeBateria.setColumns(10);\n\t\ttextFieldNomeBateria.setBounds(148, 33, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldNomeBateria);\n\t\t\n\t\ttextFieldTensaoBateria = new JTextField();\n\t\ttextFieldTensaoBateria.setColumns(10);\n\t\ttextFieldTensaoBateria.setBounds(148, 58, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldTensaoBateria);\n\t\t\n\t\tbtnCancelar = new JButton(\"Cancelar\");\n\t\tbtnCancelar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmCadastrarBateria.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnCancelar.setBounds(205, 128, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnCancelar);\n\t\t\n\t\tbtnOk = new JButton(\"Ok\");\n\t\tbtnOk.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbateria.setFabricanteBateria(textFieldFabricanteBateria.getText());\n\t\t\t\tbateria.setNomeBateria(textFieldNomeBateria.getText());\n\t\t\t\tbateria.setTensaoBateria(Double.parseDouble(textFieldTensaoBateria.getText()));\n\t\t\t\t\n\t\t\t\tfrmCadastrarBateria.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnOk.setBounds(205, 94, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnOk);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jLabel66 = new javax.swing.JLabel();\r\n jPanel1 = new javax.swing.JPanel();\r\n cursosjTabbedPane = new javax.swing.JTabbedPane();\r\n jPanel2 = new javax.swing.JPanel();\r\n jPanel18 = new javax.swing.JPanel();\r\n nomeClientejTextField = new javax.swing.JTextField();\r\n jLabel1 = new javax.swing.JLabel();\r\n jButton1 = new javax.swing.JButton();\r\n jLabel5 = new javax.swing.JLabel();\r\n cidadejTextField = new javax.swing.JTextField();\r\n jLabel4 = new javax.swing.JLabel();\r\n quandoreprovoujTextField2 = new javax.swing.JTextField();\r\n jLabel8 = new javax.swing.JLabel();\r\n jLabel9 = new javax.swing.JLabel();\r\n jLabel10 = new javax.swing.JLabel();\r\n nomeIrmao02jTextField = new javax.swing.JTextField();\r\n jLabel11 = new javax.swing.JLabel();\r\n jLabel30 = new javax.swing.JLabel();\r\n jLabel31 = new javax.swing.JLabel();\r\n seriejTextField = new javax.swing.JTextField();\r\n jLabel32 = new javax.swing.JLabel();\r\n estadojComboBox = new javax.swing.JComboBox();\r\n jLabel51 = new javax.swing.JLabel();\r\n reprovadojComboBox = new javax.swing.JComboBox();\r\n jLabel69 = new javax.swing.JLabel();\r\n nomeIrmao03jTextField = new javax.swing.JTextField();\r\n escolajTextField = new javax.swing.JTextField();\r\n dnIrmao02jDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\n dnIrmao03jDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\njLabel12 = new javax.swing.JLabel();\r\ndnIrmao01jDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\n nomeIrmao01jTextField = new javax.swing.JTextField();\r\n jLabel13 = new javax.swing.JLabel();\r\n jLabel14 = new javax.swing.JLabel();\r\n jLabel15 = new javax.swing.JLabel();\r\n cpfPaijFormattedTextField = new javax.swing.JFormattedTextField();\r\n rgPaijTextField = new javax.swing.JTextField();\r\n dataNascimentoPaijDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\njLabel16 = new javax.swing.JLabel();\r\ncpfMaejFormattedTextField = new javax.swing.JFormattedTextField();\r\nrgMaejTextField = new javax.swing.JTextField();\r\njLabel17 = new javax.swing.JLabel();\r\ndataNascimentoMaejDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\n jLabel18 = new javax.swing.JLabel();\r\n jPanel3 = new javax.swing.JPanel();\r\n jPanel20 = new javax.swing.JPanel();\r\n jLabel71 = new javax.swing.JLabel();\r\n idioma01jTextField = new javax.swing.JTextField();\r\n jLabel84 = new javax.swing.JLabel();\r\n idioma02jTextField = new javax.swing.JTextField();\r\n jLabel85 = new javax.swing.JLabel();\r\n idioma03jTextField = new javax.swing.JTextField();\r\n escolaidioma03jTextField = new javax.swing.JTextField();\r\n jLabel86 = new javax.swing.JLabel();\r\n escolaidioma02jTextField = new javax.swing.JTextField();\r\n jLabel87 = new javax.swing.JLabel();\r\n escolaidioma01jTextField = new javax.swing.JTextField();\r\n jLabel88 = new javax.swing.JLabel();\r\n jLabel89 = new javax.swing.JLabel();\r\n tempoidioma01jTextField = new javax.swing.JTextField();\r\n jLabel90 = new javax.swing.JLabel();\r\n tempoidioma02jTextField = new javax.swing.JTextField();\r\n jLabel91 = new javax.swing.JLabel();\r\n tempoidioma03jTextField = new javax.swing.JTextField();\r\n nivelidioma03jComboBox = new javax.swing.JComboBox();\r\n jLabel92 = new javax.swing.JLabel();\r\n nivelidioma02jComboBox = new javax.swing.JComboBox();\r\n jLabel93 = new javax.swing.JLabel();\r\n nivelidioma01jComboBox = new javax.swing.JComboBox();\r\n jLabel94 = new javax.swing.JLabel();\r\n jPanel21 = new javax.swing.JPanel();\r\n jLabel2 = new javax.swing.JLabel();\r\n paisjTextField = new javax.swing.JTextField();\r\n jLabel3 = new javax.swing.JLabel();\r\n programaescolajTextField = new javax.swing.JTextField();\r\n jLabel6 = new javax.swing.JLabel();\r\n duracaojTextField = new javax.swing.JTextField();\r\n iniciojTextField = new javax.swing.JTextField();\r\n jLabel7 = new javax.swing.JLabel();\r\n jButton7 = new javax.swing.JButton();\r\n selecionarValorHighSchooljButton = new javax.swing.JButton();\r\n jPanel23 = new javax.swing.JPanel();\r\n jLabel75 = new javax.swing.JLabel();\r\n nomeContatoEmergenciajTextField2 = new javax.swing.JTextField();\r\n jLabel76 = new javax.swing.JLabel();\r\n emailConatoEmergenciajTextField2 = new javax.swing.JTextField();\r\n jLabel78 = new javax.swing.JLabel();\r\n relacaoEmergenciajTextField2 = new javax.swing.JTextField();\r\n telefoneEmergenciajCheckBox = new javax.swing.JCheckBox();\r\n telefoneEmergenciajTextField = new javax.swing.JTextField();\r\n jPanel12 = new javax.swing.JPanel();\r\n jLabel46 = new javax.swing.JLabel();\r\n produtoOrcaemntojComboBox = new javax.swing.JComboBox();\r\n jLabel47 = new javax.swing.JLabel();\r\n valorProdutosMoedaEstrangeirajTextField = new javax.swing.JTextField();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n produtoOrcamentojTable = new javax.swing.JTable();\r\n jPanel13 = new javax.swing.JPanel();\r\n jButton2 = new javax.swing.JButton();\r\n jButton3 = new javax.swing.JButton();\r\n jPanel14 = new javax.swing.JPanel();\r\n jLabel48 = new javax.swing.JLabel();\r\n jLabel49 = new javax.swing.JLabel();\r\n valorCambiojTextField = new javax.swing.JTextField();\r\n valorTotalOrcamentojTextField = new javax.swing.JTextField();\r\n jLabel52 = new javax.swing.JLabel();\r\n buscaBancojButton3 = new javax.swing.JButton();\r\n moedaCambiojComboBox = new javax.swing.JComboBox();\r\n valorProdutosMoedaRealjTextField = new javax.swing.JTextField();\r\n jLabel55 = new javax.swing.JLabel();\r\n jPanel15 = new javax.swing.JPanel();\r\n jPanel22 = new javax.swing.JPanel();\r\n condicaoPagamentojComboBox = new javax.swing.JComboBox();\r\n jLabel53 = new javax.swing.JLabel();\r\n valorOrcamentoFormajTextField = new javax.swing.JTextField();\r\n jLabel54 = new javax.swing.JLabel();\r\n possuiJurosjComboBox = new javax.swing.JComboBox();\r\n jLabel64 = new javax.swing.JLabel();\r\n valorJurosjTextField = new javax.swing.JTextField();\r\n jLabel56 = new javax.swing.JLabel();\r\n totalPagarjTextField = new javax.swing.JTextField();\r\n jLabel68 = new javax.swing.JLabel();\r\n jLabel33 = new javax.swing.JLabel();\r\n saldoReceberjTextField = new javax.swing.JTextField();\r\n jLabel34 = new javax.swing.JLabel();\r\n saldoParcelarjTextField = new javax.swing.JTextField();\r\n buscaBancojButton4 = new javax.swing.JButton();\r\n jPanel16 = new javax.swing.JPanel();\r\n jLabel61 = new javax.swing.JLabel();\r\n tipoParcelamentojComboBox = new javax.swing.JComboBox();\r\n jLabel62 = new javax.swing.JLabel();\r\n meioPagamentojComboBox = new javax.swing.JComboBox();\r\n jLabel63 = new javax.swing.JLabel();\r\n valorParcelamentojTextField = new javax.swing.JTextField();\r\n jLabel58 = new javax.swing.JLabel();\r\n jLabel59 = new javax.swing.JLabel();\r\n numeroParcelasjComboBox = new javax.swing.JComboBox();\r\n valorParcelajTextField = new javax.swing.JTextField();\r\n jLabel60 = new javax.swing.JLabel();\r\n dataVencimentojDateChooser = new com.toedter.calendar.JDateChooser(null, null, datePattern, new JTextFieldDateEditor(datePattern,\r\n maskPattern, placeHolder));\r\njPanel24 = new javax.swing.JPanel();\r\njButton8 = new javax.swing.JButton();\r\njButton9 = new javax.swing.JButton();\r\njScrollPane2 = new javax.swing.JScrollPane();\r\nparcelamentojTable = new javax.swing.JTable();\r\njPanel4 = new javax.swing.JPanel();\r\njScrollPane3 = new javax.swing.JScrollPane();\r\nobservacoesjTextArea = new javax.swing.JTextArea();\r\njPanel19 = new javax.swing.JPanel();\r\njScrollPane4 = new javax.swing.JScrollPane();\r\nobsTMjTextArea = new javax.swing.JTextArea();\r\njLabel35 = new javax.swing.JLabel();\r\njPanel17 = new javax.swing.JPanel();\r\njButton5 = new javax.swing.JButton();\r\njButton6 = new javax.swing.JButton();\r\n\r\njLabel66.setText(\"jLabel66\");\r\n\r\nsetDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\nsetTitle(\"Ficha de High School\");\r\n\r\njPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\ncursosjTabbedPane.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n cursosjTabbedPaneMouseClicked(evt);\r\n }\r\n });\r\n cursosjTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {\r\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\r\n cursosjTabbedPaneStateChanged(evt);\r\n }\r\n });\r\n\r\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n nomeClientejTextField.setEditable(false);\r\n\r\n jLabel1.setText(\"Selecionar Cliente\");\r\n\r\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/selecionar.png\"))); // NOI18N\r\n jButton1.setText(\"Selecionar\");\r\n jButton1.setToolTipText(\"Selecionar Cliente\");\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel5.setText(\"Cidade\");\r\n\r\n jLabel4.setText(\"Reprovado?\");\r\n\r\n quandoreprovoujTextField2.setEnabled(false);\r\n\r\n jLabel8.setText(\"Nome do Irmão\");\r\n\r\n jLabel9.setText(\"Data Nascimento\");\r\n\r\n jLabel10.setText(\"Nome do Irmão\");\r\n\r\n jLabel11.setText(\"Data Nascimento\");\r\n\r\n jLabel30.setText(\"Nome do Irmão\");\r\n\r\n jLabel31.setText(\"Escola onde estuda\");\r\n\r\n jLabel32.setText(\"Série / Grau\");\r\n\r\n estadojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"AL\", \"AM\", \"AP\", \"BA\", \"CE\", \"DF\", \"ES\", \"GO\", \"MA\", \"MG\", \"MS\", \"MT\", \"PA\", \"PB\", \"PE\", \"PI\", \"PR\", \"RJ\", \"RN\", \"RO\", \"RR\", \"RS\", \"SC\", \"SE\", \"SP\", \"TO\" }));\r\n\r\n jLabel51.setText(\"Estado\");\r\n\r\n reprovadojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Não\", \"Sim\" }));\r\n reprovadojComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n reprovadojComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n jLabel69.setText(\"Se \\\"Sim\\\", quando ?\");\r\n\r\n dnIrmao02jDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dnIrmao02jDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n dnIrmao03jDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dnIrmao03jDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n jLabel12.setText(\"Data Nascimento\");\r\n\r\n dnIrmao01jDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dnIrmao01jDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n jLabel13.setText(\"Nº CPF Pai\");\r\n\r\n jLabel14.setText(\"Nº RG Pai\");\r\n\r\n jLabel15.setText(\"Data Nascimento Pai\");\r\n\r\n dataNascimentoPaijDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dataNascimentoPaijDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n jLabel16.setText(\"Nº CPF Mãe\");\r\n\r\n jLabel17.setText(\"Nº RG Mãe\");\r\n\r\n dataNascimentoMaejDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dataNascimentoMaejDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n jLabel18.setText(\"Data Nascimento Mãe\");\r\n\r\n javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);\r\n jPanel18.setLayout(jPanel18Layout);\r\n jPanel18Layout.setHorizontalGroup(\r\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()\r\n .addGap(10, 10, 10)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel1)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(nomeClientejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(28, 28, 28)\r\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(nomeIrmao01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(28, 28, 28)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel9)\r\n .addGap(0, 0, Short.MAX_VALUE))\r\n .addComponent(dnIrmao01jDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(escolajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 380, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(nomeIrmao02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 380, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(nomeIrmao03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 380, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(26, 26, 26)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel32, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(1, 17, Short.MAX_VALUE))\r\n .addComponent(dnIrmao02jDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(dnIrmao03jDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(seriejTextField)))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel31)\r\n .addGap(372, 372, 372))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(cidadejTextField)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel51)\r\n .addComponent(estadojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(reprovadojComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGap(4, 4, 4)\r\n .addComponent(jLabel4)))\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGap(56, 56, 56)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel69, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jLabel14)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGap(6, 6, 6)\r\n .addComponent(jLabel17))\r\n .addComponent(rgPaijTextField)\r\n .addComponent(rgMaejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(60, 60, 60)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel18)\r\n .addComponent(dataNascimentoMaejDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel15)\r\n .addComponent(dataNascimentoPaijDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))))))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(quandoreprovoujTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)))))))\r\n .addContainerGap())\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel16)\r\n .addComponent(jLabel13)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(cpfMaejFormattedTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)\r\n .addComponent(cpfPaijFormattedTextField, javax.swing.GroupLayout.Alignment.LEADING)))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n jPanel18Layout.setVerticalGroup(\r\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGap(11, 11, 11)\r\n .addComponent(jLabel1)\r\n .addGap(5, 5, 5)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGap(3, 3, 3)\r\n .addComponent(nomeClientejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(jButton1))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel8)\r\n .addComponent(jLabel9))\r\n .addGap(1, 1, 1)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(dnIrmao01jDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(nomeIrmao01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel10)\r\n .addComponent(jLabel11))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(nomeIrmao02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel30)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(nomeIrmao03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(dnIrmao02jDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel12)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(dnIrmao03jDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel32)\r\n .addComponent(jLabel31))\r\n .addGap(6, 6, 6)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(seriejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(escolajTextField))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel51)\r\n .addComponent(jLabel5))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(cidadejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(estadojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel13)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(cpfPaijFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel15)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(dataNascimentoPaijDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel16)\r\n .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(cpfMaejFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(dataNascimentoMaejDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel4))\r\n .addGroup(jPanel18Layout.createSequentialGroup()\r\n .addComponent(jLabel14)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(rgPaijTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel17)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(rgMaejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel69)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(reprovadojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(quandoreprovoujTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(44, 44, 44))\r\n );\r\n\r\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\r\n jPanel2.setLayout(jPanel2Layout);\r\n jPanel2Layout.setHorizontalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n jPanel2Layout.setVerticalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Informações Estudante\", jPanel2);\r\n\r\n jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Idioma\"));\r\n\r\n jLabel71.setText(\"Idioma\");\r\n\r\n jLabel84.setText(\"Idioma\");\r\n\r\n jLabel85.setText(\"Idioma\");\r\n\r\n jLabel86.setText(\"Escola\");\r\n\r\n jLabel87.setText(\"Escola\");\r\n\r\n jLabel88.setText(\"Escola\");\r\n\r\n jLabel89.setText(\"Tempo\");\r\n\r\n jLabel90.setText(\"Tempo\");\r\n\r\n jLabel91.setText(\"Tempo\");\r\n\r\n nivelidioma03jComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Ótimo\", \"Bom\", \"Regular\", \"Ruim\" }));\r\n\r\n jLabel92.setText(\"Nível\");\r\n\r\n nivelidioma02jComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Ótimo\", \"Bom\", \"Regular\", \"Ruim\" }));\r\n\r\n jLabel93.setText(\"Nível\");\r\n\r\n nivelidioma01jComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Ótimo\", \"Bom\", \"Regular\", \"Ruim\" }));\r\n\r\n jLabel94.setText(\"Nível\");\r\n\r\n javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);\r\n jPanel20.setLayout(jPanel20Layout);\r\n jPanel20Layout.setHorizontalGroup(\r\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(idioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel84, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel85)))\r\n .addComponent(jLabel71)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(idioma02jTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)\r\n .addComponent(idioma01jTextField, javax.swing.GroupLayout.Alignment.LEADING)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel87)\r\n .addComponent(escolaidioma02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(jLabel88)\r\n .addComponent(escolaidioma01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel86)\r\n .addComponent(escolaidioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jLabel90)\r\n .addComponent(tempoidioma02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(jLabel89)\r\n .addComponent(tempoidioma01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel91)\r\n .addComponent(tempoidioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel94)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel93, javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel92, javax.swing.GroupLayout.Alignment.TRAILING))\r\n .addGap(97, 97, 97))\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(nivelidioma03jComboBox, javax.swing.GroupLayout.Alignment.LEADING, 0, 110, Short.MAX_VALUE)\r\n .addComponent(nivelidioma02jComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(nivelidioma01jComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n jPanel20Layout.setVerticalGroup(\r\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(nivelidioma01jComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel94)\r\n .addGap(26, 26, 26)))\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel93)\r\n .addGap(26, 26, 26))\r\n .addComponent(nivelidioma02jComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel92)\r\n .addGap(26, 26, 26))\r\n .addComponent(nivelidioma03jComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(tempoidioma01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel89)\r\n .addGap(26, 26, 26)))\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel90)\r\n .addGap(26, 26, 26))\r\n .addComponent(tempoidioma02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel91)\r\n .addGap(26, 26, 26))\r\n .addComponent(tempoidioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel84)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(idioma02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel85))\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(escolaidioma01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(idioma01jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel88)\r\n .addComponent(jLabel71))\r\n .addGap(26, 26, 26)))\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel20Layout.createSequentialGroup()\r\n .addComponent(jLabel87)\r\n .addGap(26, 26, 26))\r\n .addComponent(escolaidioma02jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel86)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(escolaidioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(idioma03jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Programa\"));\r\n\r\n jLabel2.setText(\"País\");\r\n\r\n paisjTextField.setEditable(false);\r\n\r\n jLabel3.setText(\"Programa/Escola\");\r\n\r\n programaescolajTextField.setEditable(false);\r\n\r\n jLabel6.setText(\"Duração\");\r\n\r\n duracaojTextField.setEditable(false);\r\n\r\n iniciojTextField.setEditable(false);\r\n\r\n jLabel7.setText(\"Início\");\r\n\r\n jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/selecionar.png\"))); // NOI18N\r\n jButton7.setText(\"Selecionar\");\r\n jButton7.setToolTipText(\"Selecionar Escola\");\r\n jButton7.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton7ActionPerformed(evt);\r\n }\r\n });\r\n\r\n selecionarValorHighSchooljButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/selecionar.png\"))); // NOI18N\r\n selecionarValorHighSchooljButton.setText(\"Selecionar\");\r\n selecionarValorHighSchooljButton.setToolTipText(\"Selecionar Valores\");\r\n selecionarValorHighSchooljButton.setEnabled(false);\r\n selecionarValorHighSchooljButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n selecionarValorHighSchooljButtonActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);\r\n jPanel21.setLayout(jPanel21Layout);\r\n jPanel21Layout.setHorizontalGroup(\r\n jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel6)\r\n .addComponent(duracaojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(0, 0, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(paisjTextField)\r\n .addComponent(iniciojTextField))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(selecionarValorHighSchooljButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)))))\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addComponent(jLabel3)\r\n .addGap(172, 172, 172)\r\n .addComponent(jLabel2))\r\n .addComponent(programaescolajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addContainerGap())\r\n );\r\n jPanel21Layout.setVerticalGroup(\r\n jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel21Layout.createSequentialGroup()\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel2))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(programaescolajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton7)\r\n .addComponent(paisjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel6)\r\n .addComponent(jLabel7))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(duracaojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(iniciojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(selecionarValorHighSchooljButton))\r\n .addGap(23, 23, 23))\r\n );\r\n\r\n jPanel23.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Contato de Emergência no Brasil\"));\r\n\r\n jLabel75.setText(\"Nome\");\r\n\r\n jLabel76.setText(\"E-mail\");\r\n\r\n jLabel78.setText(\"Relação\");\r\n\r\n telefoneEmergenciajCheckBox.setText(\"9-Telefone\");\r\n telefoneEmergenciajCheckBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n telefoneEmergenciajCheckBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n telefoneEmergenciajTextField.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusLost(java.awt.event.FocusEvent evt) {\r\n telefoneEmergenciajTextFieldFocusLost(evt);\r\n }\r\n });\r\n telefoneEmergenciajTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyPressed(java.awt.event.KeyEvent evt) {\r\n telefoneEmergenciajTextFieldKeyPressed(evt);\r\n }\r\n public void keyReleased(java.awt.event.KeyEvent evt) {\r\n telefoneEmergenciajTextFieldKeyReleased(evt);\r\n }\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n telefoneEmergenciajTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);\r\n jPanel23.setLayout(jPanel23Layout);\r\n jPanel23Layout.setHorizontalGroup(\r\n jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addComponent(emailConatoEmergenciajTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(18, 18, 18)\r\n .addComponent(relacaoEmergenciajTextField2))\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(nomeContatoEmergenciajTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel76)\r\n .addComponent(jLabel75))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(telefoneEmergenciajTextField)\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel78)\r\n .addComponent(telefoneEmergenciajCheckBox))\r\n .addGap(0, 104, Short.MAX_VALUE)))))\r\n .addContainerGap())\r\n );\r\n jPanel23Layout.setVerticalGroup(\r\n jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addComponent(jLabel75)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(nomeContatoEmergenciajTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel23Layout.createSequentialGroup()\r\n .addComponent(telefoneEmergenciajCheckBox)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(telefoneEmergenciajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel76)\r\n .addComponent(jLabel78))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(emailConatoEmergenciajTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(relacaoEmergenciajTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addContainerGap(38, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\r\n jPanel3.setLayout(jPanel3Layout);\r\n jPanel3Layout.setHorizontalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel21, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n jPanel3Layout.setVerticalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Informações Complentares\", jPanel3);\r\n\r\n jLabel46.setText(\"Produtos\");\r\n\r\n jLabel47.setText(\"Valor (Moeda Estrangeira)\");\r\n\r\n valorProdutosMoedaEstrangeirajTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorProdutosMoedaEstrangeirajTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorProdutosMoedaEstrangeirajTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n produtoOrcamentojTable.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null},\r\n {null, null, null}\r\n },\r\n new String [] {\r\n \"Produtos Orçamento\", \"Moeda Estrangeira\", \"Valor R$\"\r\n }\r\n ) {\r\n boolean[] canEdit = new boolean [] {\r\n false, false, false\r\n };\r\n\r\n public boolean isCellEditable(int rowIndex, int columnIndex) {\r\n return canEdit [columnIndex];\r\n }\r\n });\r\n jScrollPane1.setViewportView(produtoOrcamentojTable);\r\n if (produtoOrcamentojTable.getColumnModel().getColumnCount() > 0) {\r\n produtoOrcamentojTable.getColumnModel().getColumn(0).setResizable(false);\r\n produtoOrcamentojTable.getColumnModel().getColumn(0).setPreferredWidth(290);\r\n produtoOrcamentojTable.getColumnModel().getColumn(1).setResizable(false);\r\n produtoOrcamentojTable.getColumnModel().getColumn(1).setPreferredWidth(80);\r\n produtoOrcamentojTable.getColumnModel().getColumn(2).setResizable(false);\r\n produtoOrcamentojTable.getColumnModel().getColumn(2).setPreferredWidth(50);\r\n }\r\n\r\n jPanel13.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/adicionar.png\"))); // NOI18N\r\n jButton2.setText(\"Adicionar\");\r\n jButton2.setToolTipText(\"Adicionar novo produtos no orçamento\");\r\n jButton2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton2ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/excluir.png\"))); // NOI18N\r\n jButton3.setText(\"Excluir\");\r\n jButton3.setToolTipText(\"Excluir produto no orçamento\");\r\n jButton3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton3ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);\r\n jPanel13.setLayout(jPanel13Layout);\r\n jPanel13Layout.setHorizontalGroup(\r\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(127, 127, 127))\r\n );\r\n jPanel13Layout.setVerticalGroup(\r\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel13Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jButton2)\r\n .addComponent(jButton3))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n jPanel14.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n jLabel48.setText(\"Moeda\");\r\n\r\n jLabel49.setText(\"Valor Câmbio\");\r\n\r\n valorCambiojTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorCambiojTextField.setEnabled(false);\r\n\r\n valorTotalOrcamentojTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorTotalOrcamentojTextField.setEnabled(false);\r\n\r\n jLabel52.setText(\"Valor Total R$\");\r\n\r\n buscaBancojButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/icones/cambio.png\"))); // NOI18N\r\n buscaBancojButton3.setToolTipText(\"Alterar Câmbio\");\r\n buscaBancojButton3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n buscaBancojButton3ActionPerformed(evt);\r\n }\r\n });\r\n\r\n moedaCambiojComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n moedaCambiojComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\r\n jPanel14.setLayout(jPanel14Layout);\r\n jPanel14Layout.setHorizontalGroup(\r\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel14Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel48)\r\n .addComponent(moedaCambiojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel49)\r\n .addGroup(jPanel14Layout.createSequentialGroup()\r\n .addComponent(valorCambiojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(buscaBancojButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(valorTotalOrcamentojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel52))\r\n .addContainerGap())\r\n );\r\n jPanel14Layout.setVerticalGroup(\r\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel14Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel48)\r\n .addComponent(jLabel49)\r\n .addComponent(jLabel52))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(valorTotalOrcamentojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorCambiojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(moedaCambiojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(buscaBancojButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addContainerGap())\r\n );\r\n\r\n valorProdutosMoedaRealjTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorProdutosMoedaRealjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorProdutosMoedaRealjTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n jLabel55.setText(\"Valor R$\");\r\n\r\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\r\n jPanel12.setLayout(jPanel12Layout);\r\n jPanel12Layout.setHorizontalGroup(\r\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel12Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE)\r\n .addGroup(jPanel12Layout.createSequentialGroup()\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel12Layout.createSequentialGroup()\r\n .addComponent(jLabel46)\r\n .addGap(0, 0, Short.MAX_VALUE))\r\n .addComponent(produtoOrcaemntojComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(valorProdutosMoedaEstrangeirajTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel47, javax.swing.GroupLayout.Alignment.TRAILING))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel55)\r\n .addComponent(valorProdutosMoedaRealjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap())\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(170, 170, 170))\r\n );\r\n jPanel12Layout.setVerticalGroup(\r\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel12Layout.createSequentialGroup()\r\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel46)\r\n .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel55))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(produtoOrcaemntojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorProdutosMoedaEstrangeirajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorProdutosMoedaRealjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Produtos\", jPanel12);\r\n\r\n jPanel22.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n condicaoPagamentojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"À Vista\", \"Parcelado\" }));\r\n condicaoPagamentojComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n condicaoPagamentojComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n jLabel53.setText(\"Forma de Pagamento\");\r\n\r\n valorOrcamentoFormajTextField.setEditable(false);\r\n valorOrcamentoFormajTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorOrcamentoFormajTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorOrcamentoFormajTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n jLabel54.setText(\"Valor Orçamento\");\r\n\r\n possuiJurosjComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Não\", \"Sim\" }));\r\n possuiJurosjComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n possuiJurosjComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n jLabel64.setText(\"Acrescentar Juros\");\r\n\r\n valorJurosjTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorJurosjTextField.setEnabled(false);\r\n valorJurosjTextField.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusLost(java.awt.event.FocusEvent evt) {\r\n valorJurosjTextFieldFocusLost(evt);\r\n }\r\n });\r\n valorJurosjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyReleased(java.awt.event.KeyEvent evt) {\r\n valorJurosjTextFieldKeyReleased(evt);\r\n }\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorJurosjTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n jLabel56.setText(\"Valor Juros\");\r\n\r\n totalPagarjTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n totalPagarjTextField.setEnabled(false);\r\n\r\n jLabel68.setText(\"Total a Pagar\");\r\n\r\n jLabel33.setText(\"Saldo a Receber\");\r\n\r\n saldoReceberjTextField.setEditable(false);\r\n saldoReceberjTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n saldoReceberjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n saldoReceberjTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n jLabel34.setText(\"Saldo a Parcelar\");\r\n\r\n saldoParcelarjTextField.setEditable(false);\r\n saldoParcelarjTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n saldoParcelarjTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n saldoParcelarjTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n buscaBancojButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/icones/cambio.png\"))); // NOI18N\r\n buscaBancojButton4.setToolTipText(\"Calculo de Juros\");\r\n buscaBancojButton4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n buscaBancojButton4ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);\r\n jPanel22.setLayout(jPanel22Layout);\r\n jPanel22Layout.setHorizontalGroup(\r\n jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(condicaoPagamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel53))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(valorOrcamentoFormajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel54))\r\n .addGap(18, 18, 18)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(possuiJurosjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel64))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addComponent(valorJurosjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(buscaBancojButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(jLabel56))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(totalPagarjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel68)))\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel33)\r\n .addComponent(saldoReceberjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(saldoParcelarjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel34))))\r\n .addContainerGap())\r\n );\r\n jPanel22Layout.setVerticalGroup(\r\n jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel53)\r\n .addComponent(jLabel54)\r\n .addComponent(jLabel56)\r\n .addComponent(jLabel64)\r\n .addComponent(jLabel68))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(condicaoPagamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorOrcamentoFormajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(possuiJurosjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorJurosjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(totalPagarjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(buscaBancojButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addComponent(jLabel34)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(saldoParcelarjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel22Layout.createSequentialGroup()\r\n .addComponent(jLabel33)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(saldoReceberjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n jPanel16.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n jLabel61.setText(\"Tipo de Parcelamento\");\r\n\r\n tipoParcelamentojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Matriz\", \"Loja\", \"Fornecedor\" }));\r\n\r\n jLabel62.setText(\"Forma de Pagamento\");\r\n\r\n meioPagamentojComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Selecione\", \"Dinheiro\", \"Boleto\", \"Cartão de crédito\", \"Cartão de crédito autorizado\", \"Cartão débito\", \"Cheque\", \"Déposito\", \"Financiamento banco\" }));\r\n meioPagamentojComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n meioPagamentojComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n jLabel63.setText(\"Data Primeiro Vencimento\");\r\n\r\n valorParcelamentojTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorParcelamentojTextField.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusLost(java.awt.event.FocusEvent evt) {\r\n valorParcelamentojTextFieldFocusLost(evt);\r\n }\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n valorParcelamentojTextFieldFocusGained(evt);\r\n }\r\n });\r\n valorParcelamentojTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorParcelamentojTextFieldKeyTyped(evt);\r\n }\r\n });\r\n\r\n jLabel58.setText(\"Valor a Parcelar \");\r\n\r\n jLabel59.setText(\"Nº Parcelas\");\r\n\r\n numeroParcelasjComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\", \"21\", \"22\", \"23\", \"24\" }));\r\n numeroParcelasjComboBox.addItemListener(new java.awt.event.ItemListener() {\r\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\r\n numeroParcelasjComboBoxItemStateChanged(evt);\r\n }\r\n });\r\n\r\n valorParcelajTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\r\n valorParcelajTextField.setEnabled(false);\r\n valorParcelajTextField.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n valorParcelajTextFieldFocusGained(evt);\r\n }\r\n });\r\n valorParcelajTextField.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyPressed(java.awt.event.KeyEvent evt) {\r\n valorParcelajTextFieldKeyPressed(evt);\r\n }\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n valorParcelajTextFieldKeyTyped(evt);\r\n }\r\n public void keyReleased(java.awt.event.KeyEvent evt) {\r\n valorParcelajTextFieldKeyReleased(evt);\r\n }\r\n });\r\n\r\n jLabel60.setText(\"Valor Parcela\");\r\n\r\n dataVencimentojDateChooser.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n dataVencimentojDateChooserFocusGained(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);\r\n jPanel16.setLayout(jPanel16Layout);\r\n jPanel16Layout.setHorizontalGroup(\r\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel62)\r\n .addComponent(meioPagamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addGap(52, 52, 52)\r\n .addComponent(jLabel61)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(tipoParcelamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jLabel63, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(dataVencimentojDateChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel58)\r\n .addComponent(valorParcelamentojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(109, 109, 109)\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel59)\r\n .addComponent(numeroParcelasjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(valorParcelajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel60, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))\r\n .addContainerGap())\r\n );\r\n jPanel16Layout.setVerticalGroup(\r\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel62)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(meioPagamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(tipoParcelamentojComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel63)\r\n .addComponent(jLabel61))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(dataVencimentojDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addComponent(jLabel59)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(numeroParcelasjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel16Layout.createSequentialGroup()\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jLabel58)\r\n .addComponent(jLabel60))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(valorParcelajTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(valorParcelamentojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\r\n .addContainerGap())\r\n );\r\n\r\n jPanel24.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/adicionar.png\"))); // NOI18N\r\n jButton8.setText(\"Adicionar\");\r\n jButton8.setToolTipText(\"Adicionar forma de pagamento\");\r\n jButton8.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton8ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/excluir.png\"))); // NOI18N\r\n jButton9.setText(\"Excluir\");\r\n jButton9.setToolTipText(\"Excluir forma de pagamento\");\r\n jButton9.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton9ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);\r\n jPanel24.setLayout(jPanel24Layout);\r\n jPanel24Layout.setHorizontalGroup(\r\n jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel24Layout.createSequentialGroup()\r\n .addGap(24, 24, 24)\r\n .addComponent(jButton8)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)\r\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(22, 22, 22))\r\n );\r\n jPanel24Layout.setVerticalGroup(\r\n jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel24Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jButton8)\r\n .addComponent(jButton9))\r\n .addContainerGap())\r\n );\r\n\r\n parcelamentojTable.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null},\r\n {null, null, null, null, null}\r\n },\r\n new String [] {\r\n \"Forma Pagamento\", \"Tipo Parcelmaneto\", \"Valor a Parcelar\", \"Nº Parcelas\", \"Valor Parcela\"\r\n }\r\n ) {\r\n boolean[] canEdit = new boolean [] {\r\n false, false, false, false, false\r\n };\r\n\r\n public boolean isCellEditable(int rowIndex, int columnIndex) {\r\n return canEdit [columnIndex];\r\n }\r\n });\r\n jScrollPane2.setViewportView(parcelamentojTable);\r\n\r\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\r\n jPanel15.setLayout(jPanel15Layout);\r\n jPanel15Layout.setHorizontalGroup(\r\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel15Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jPanel16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addContainerGap())\r\n .addGroup(jPanel15Layout.createSequentialGroup()\r\n .addGap(140, 140, 140)\r\n .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n jPanel15Layout.setVerticalGroup(\r\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel15Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(306, 306, 306))\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Forma Pagto\", jPanel15);\r\n\r\n observacoesjTextArea.setColumns(20);\r\n observacoesjTextArea.setRows(5);\r\n jScrollPane3.setViewportView(observacoesjTextArea);\r\n\r\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\r\n jPanel4.setLayout(jPanel4Layout);\r\n jPanel4Layout.setHorizontalGroup(\r\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel4Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n jPanel4Layout.setVerticalGroup(\r\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel4Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 460, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Obs\", jPanel4);\r\n\r\n obsTMjTextArea.setColumns(20);\r\n obsTMjTextArea.setRows(5);\r\n jScrollPane4.setViewportView(obsTMjTextArea);\r\n\r\n jLabel35.setText(\"Observações que serão enviadas ao Departamento Responsável e ao Departamento Financeiro da TravelMate\");\r\n\r\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\r\n jPanel19.setLayout(jPanel19Layout);\r\n jPanel19Layout.setHorizontalGroup(\r\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel19Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jScrollPane4)\r\n .addGroup(jPanel19Layout.createSequentialGroup()\r\n .addComponent(jLabel35)\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addContainerGap())\r\n );\r\n jPanel19Layout.setVerticalGroup(\r\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel35)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n cursosjTabbedPane.addTab(\"Obs TM\", jPanel19);\r\n\r\n jPanel17.setBorder(javax.swing.BorderFactory.createEtchedBorder());\r\n\r\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/confirmar.png\"))); // NOI18N\r\n jButton5.setText(\"Confirmar\");\r\n jButton5.setToolTipText(\"Confirma Cadastro da Ficha de High School\");\r\n jButton5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton5ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagens/botozinhos/cancel.png\"))); // NOI18N\r\n jButton6.setText(\"Cancelar\");\r\n jButton6.setToolTipText(\"Cancela Ficha de Curso\");\r\n jButton6.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton6ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\r\n jPanel17.setLayout(jPanel17Layout);\r\n jPanel17Layout.setHorizontalGroup(\r\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel17Layout.createSequentialGroup()\r\n .addContainerGap(85, Short.MAX_VALUE)\r\n .addComponent(jButton5)\r\n .addGap(37, 37, 37)\r\n .addComponent(jButton6)\r\n .addGap(86, 86, 86))\r\n );\r\n jPanel17Layout.setVerticalGroup(\r\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel17Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jButton5)\r\n .addComponent(jButton6))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(99, 99, 99))\r\n .addComponent(cursosjTabbedPane)\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(cursosjTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 510, Short.MAX_VALUE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }", "public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }", "public ViewProveedores() {\n initComponents();\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 jLabel2 = new javax.swing.JLabel();\n jTextFieldOro = new javax.swing.JTextField();\n jTextFieldElixir = new javax.swing.JTextField();\n jButtonCrearEdificio = new javax.swing.JButton();\n jButtonCrearTropa = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButtonMejorarEdificio = new javax.swing.JButton();\n jButtonRecogerRecursos = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\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 jTextFieldChoza = new javax.swing.JTextField();\n jTextFieldMina = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jTextFieldRecolector = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jTextFieldCampamento = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jTextFieldCañon = new javax.swing.JTextField();\n jTextFieldMortero = new javax.swing.JTextField();\n jTextFieldTorre = new javax.swing.JTextField();\n jTextFieldCuartel = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jTextFieldBarbaro = new javax.swing.JTextField();\n jTextFieldArquera = new javax.swing.JTextField();\n jTextFieldGigante = new javax.swing.JTextField();\n jTextFieldDuende = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jTextField15 = new javax.swing.JTextField();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jTextFieldAyuntamiento = new javax.swing.JTextField();\n jTextFieldOroMina = new javax.swing.JTextField();\n jTextFieldElixRec = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Oro\");\n\n jLabel2.setText(\"Elixir\");\n\n jTextFieldOro.setEnabled(false);\n\n jTextFieldElixir.setToolTipText(\"\");\n jTextFieldElixir.setEnabled(false);\n\n jButtonCrearEdificio.setText(\"Crear Edificio\");\n jButtonCrearEdificio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCrearEdificioActionPerformed(evt);\n }\n });\n\n jButtonCrearTropa.setText(\"Crear Tropa\");\n jButtonCrearTropa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCrearTropaActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Realizar Ataque\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButtonMejorarEdificio.setText(\"Mejorar Edificio\");\n jButtonMejorarEdificio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonMejorarEdificioActionPerformed(evt);\n }\n });\n\n jButtonRecogerRecursos.setText(\"Recoger Recursos\");\n jButtonRecogerRecursos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRecogerRecursosActionPerformed(evt);\n }\n });\n\n jButton9.setText(\"Recibir Ataque\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 18));\n jLabel4.setForeground(new java.awt.Color(0, 0, 102));\n jLabel4.setText(\"Mi Aldea\");\n\n jTextFieldChoza.setEnabled(false);\n\n jTextFieldMina.setEnabled(false);\n\n jTextFieldRecolector.setEnabled(false);\n\n jTextFieldCampamento.setEnabled(false);\n\n jTextFieldCañon.setEnabled(false);\n\n jTextFieldMortero.setEnabled(false);\n\n jTextFieldTorre.setEnabled(false);\n\n jTextFieldCuartel.setEnabled(false);\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 1, 11));\n jLabel13.setText(\"Tropas\");\n\n jTextFieldBarbaro.setEnabled(false);\n\n jTextFieldArquera.setEnabled(false);\n\n jTextFieldGigante.setEnabled(false);\n\n jTextFieldDuende.setEnabled(false);\n\n jLabel18.setFont(new java.awt.Font(\"Tahoma\", 1, 11));\n jLabel18.setText(\"Tropas\");\n\n jLabel19.setFont(new java.awt.Font(\"Tahoma\", 1, 11));\n jLabel19.setText(\"Tiempo\");\n\n jTextField15.setEnabled(false);\n\n jLabel21.setText(\"jLabel21\");\n\n jLabel22.setText(\"jLabel22\");\n\n jLabel23.setText(\"jLabel23\");\n\n jLabel24.setText(\"AYUNTAMIENTO\");\n\n jTextFieldAyuntamiento.setEnabled(false);\n\n jTextFieldOroMina.setEnabled(false);\n jTextFieldOroMina.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldOroMinaActionPerformed(evt);\n }\n });\n\n jTextFieldElixRec.setEnabled(false);\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextFieldElixRec, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldOroMina, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE))))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextFieldRecolector, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldMina, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldChoza, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldCampamento, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextFieldMortero, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jLabel12))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldCuartel)\n .addComponent(jTextFieldTorre, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addGap(34, 34, 34)\n .addComponent(jTextFieldCañon, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(73, 73, 73)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel14)\n .addComponent(jLabel15)\n .addComponent(jLabel16)\n .addComponent(jLabel17))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldBarbaro)\n .addComponent(jTextFieldGigante)\n .addComponent(jTextFieldDuende)\n .addComponent(jTextFieldArquera, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 251, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 319, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(44, 44, 44))\n .addGroup(layout.createSequentialGroup()\n .addGap(122, 122, 122)\n .addComponent(jLabel24)\n .addGap(18, 18, 18)\n .addComponent(jTextFieldAyuntamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 173, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextFieldOro, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldElixir, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(143, 143, 143)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButtonCrearEdificio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonCrearTropa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonMejorarEdificio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonRecogerRecursos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 821, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addComponent(jLabel18)\n .addGap(229, 229, 229)\n .addComponent(jLabel19)\n .addGap(18, 18, 18)\n .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel22)\n .addComponent(jLabel21)\n .addComponent(jLabel23))))\n .addContainerGap(320, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\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 .addComponent(jLabel3)\n .addGap(62, 62, 62)\n .addComponent(jButtonCrearEdificio)\n .addGap(4, 4, 4)\n .addComponent(jButtonCrearTropa)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonMejorarEdificio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonRecogerRecursos)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton9))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextFieldOro, 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(jTextFieldElixir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addComponent(jLabel13))\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel24)\n .addComponent(jTextFieldAyuntamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextFieldChoza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(jTextFieldCañon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(jTextFieldBarbaro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jTextFieldMina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jTextFieldMortero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel15)\n .addComponent(jTextFieldArquera, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldOroMina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jTextFieldRecolector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11)\n .addComponent(jTextFieldTorre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel16)\n .addComponent(jTextFieldGigante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldElixRec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextFieldCampamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12)\n .addComponent(jTextFieldCuartel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel17)\n .addComponent(jTextFieldDuende, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jLabel19)\n .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(43, 43, 43)\n .addComponent(jLabel21)\n .addGap(32, 32, 32)\n .addComponent(jLabel22)\n .addGap(35, 35, 35)\n .addComponent(jLabel23)\n .addContainerGap(224, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public CrearProductos() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }", "public FrCDs() {\n initComponents();\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n \n Genero_dao g = new Genero_dao();\n Artista_dao a = new Artista_dao();\n CDs_dao c = new CDs_dao();\n \n for(TabelaGeneroBean ge: g.findAll()){\n g_box.addItem(ge);\n }\n for(TabelaArtistaBean ar: a.findAll()){\n g_box2.addItem(ar);\n }\n \n painel1.setVisible(false);\n btn_edit.setEnabled(false);\n btn_excluir.setEnabled(false);\n btn_cad.setEnabled(true);\n }", "public frmPrincipal() {\n initComponents(); \n inicializar();\n \n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tEnviosRechazados verventana = new EnviosRechazados();\n\t\t\t\t\tverventana.show();\n\t\t\t\t}", "public TorneoForm() {\n initComponents();\n }", "@FXML\r\n public void ventas(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Ventas/FormVentas.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "public ingresar_Sistema() {\n initComponents();\n }", "public CadastroEscola() {\n initComponents();\n }", "private void initialize() {\r\n\t\tfrmTelaCadastro = new JFrame();\r\n\t\tfrmTelaCadastro.getContentPane().setBackground(Color.WHITE);\r\n\t\tfrmTelaCadastro.getContentPane().setLayout(null);\r\n\r\n\t\tconsultaagua = new CadastroAguaDAO();\r\n\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(80, 24, 832, 94);\r\n\t\tpanel.setLayout(null);\r\n\t\tfrmTelaCadastro.getContentPane().add(panel);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField.setColumns(10);\r\n\t\ttextField.setBounds(64, 37, 242, 20);\r\n\t\tpanel.add(textField);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(414, 34, 347, 20);\r\n\t\tpanel.add(textField_1);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_4.setColumns(10);\r\n\t\ttextField_4.setBounds(105, 60, 112, 20);\r\n\t\tpanel.add(textField_4);\r\n\r\n\t\tlblNome = new JLabel(\"Nome:\");\r\n\t\tlblNome.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNome.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblNome.setBounds(10, 32, 65, 28);\r\n\t\tpanel.add(lblNome);\r\n\r\n\t\tlblEndereco = new JLabel(\"Endereco:\");\r\n\t\tlblEndereco.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblEndereco.setBounds(356, 29, 65, 28);\r\n\t\tpanel.add(lblEndereco);\r\n\r\n\t\tlblhidrometro = new JLabel(\"Hidr\\u00F4metro:\");\r\n\t\tlblhidrometro.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblhidrometro.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblhidrometro.setBounds(20, 55, 75, 28);\r\n\t\tpanel.add(lblhidrometro);\r\n\r\n\t\tJButton btnNewButton = new JButton(\"Consultar\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tList<CadastroAgua> cadagua = new ArrayList<CadastroAgua>();\r\n\r\n\t\t\t\tCadastroAgua c = new CadastroAgua();\r\n\t\t\t\tcadagua = consultaagua.getCadastroAgua(\"8\");\r\n\t\t\t\tfor (int i = 0; i < cadagua.size(); i++)\r\n\r\n\t\t\t\t{\r\n\t\t\t\t\tc = (CadastroAgua) cadagua.get(i);\r\n\r\n\t\t\t\t\ttextRGI.setText(c.getContaAguaRGI());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextNConta.setText(c.getContaAguaNConta());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextMesRef.setText(c.getContaAguaMesRef());\r\n\t\t\t\t\ttextTipoLig.setText(c.getContaAguaTipoLigacao());\r\n\t\t\t\t\ttextTipoFat.setText(c.getContaAguaTipoFaturamento());\r\n\t\t\t\t\ttextConsumo.setText(c.getContaAguaConsumo());\r\n\t\t\t\t\ttextDataAtual.setText(c.getContaAguaDataLeituraAtual());\r\n\t\t\t\t\ttextLeituraAtual.setText(c.getContaAguaLeituraAtual());\r\n\t\t\t\t\ttextDataAnterior.setText(c.getContaAguaDataLeituraAnterior());\r\n\t\t\t\t\ttextLeituraAnterior.setText(c.getContaAguaLeituraAnterior());\r\n\t\t\t\t\ttextObs.setText(c.getContaAguaObservacao());\r\n\t\t\t\t\ttxtValorAgua.setText(c.getContaAguaValorAgua());\r\n\t\t\t\t\ttxtValorEsgoto.setText(c.getContaAguaValorEsgoto());\r\n\t\t\t\t\ttextValorTotal.setText(c.getContaAguaValorTotal());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(414, 65, 89, 23);\r\n\t\tpanel.add(btnNewButton);\r\n\r\n\t\ttabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\ttabbedPane.setBounds(80, 144, 832, 425);\r\n\t\tfrmTelaCadastro.getContentPane().add(tabbedPane);\r\n\r\n\t\tpanel1 = new JPanel();\r\n\t\ttabbedPane.addTab(\"Dados Conta\", null, panel1, null);\r\n\t\tpanel1.setLayout(null);\r\n\r\n\t\ttextNConta = new JTextField();\r\n\t\ttextNConta.setBounds(193, 54, 155, 20);\r\n\t\ttextNConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextNConta.setColumns(10);\r\n\t\tpanel1.add(textNConta);\r\n\r\n\t\tlblNDaConta = new JLabel(\"N\\u00BA da Conta:\");\r\n\t\tlblNDaConta.setBounds(215, 26, 97, 28);\r\n\t\tlblNDaConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNDaConta.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblNDaConta);\r\n\r\n\t\tlblGrupo = new JLabel(\"Grupo:\");\r\n\t\tlblGrupo.setBounds(358, 26, 97, 28);\r\n\t\tlblGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblGrupo.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblGrupo);\r\n\r\n\t\ttextGrupo = new JTextField();\r\n\t\ttextGrupo.setBounds(384, 54, 45, 20);\r\n\t\ttextGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextGrupo.setColumns(10);\r\n\t\tpanel1.add(textGrupo);\r\n\r\n\t\tlblCodIdentificador_3 = new JLabel(\"RGI:\");\r\n\t\tlblCodIdentificador_3.setBounds(52, 26, 97, 28);\r\n\t\tlblCodIdentificador_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_3);\r\n\r\n\t\ttextRGI = new JTextField();\r\n\t\ttextRGI.setBounds(30, 54, 155, 20);\r\n\t\ttextRGI.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextRGI.setColumns(10);\r\n\t\tpanel1.add(textRGI);\r\n\r\n\t\tlblMesRef = new JLabel(\"M\\u00EAs Refer\\u00EAncia:\");\r\n\t\tlblMesRef.setBounds(484, 26, 97, 28);\r\n\t\tlblMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblMesRef.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblMesRef);\r\n\r\n\t\ttextMesRef = new JTextField();\r\n\t\ttextMesRef.setBounds(455, 54, 155, 20);\r\n\t\ttextMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextMesRef.setColumns(10);\r\n\t\tpanel1.add(textMesRef);\r\n\r\n\t\tlblCodIdentificador_1 = new JLabel(\"Tipo de Liga\\u00E7\\u00E3o:\");\r\n\t\tlblCodIdentificador_1.setBounds(658, 26, 97, 28);\r\n\t\tlblCodIdentificador_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_1);\r\n\r\n\t\ttextTipoLig = new JTextField();\r\n\t\ttextTipoLig.setBounds(636, 54, 155, 20);\r\n\t\ttextTipoLig.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoLig.setColumns(10);\r\n\t\tpanel1.add(textTipoLig);\r\n\r\n\t\tlblTipFat = new JLabel(\"Tipo de Faturamento:\");\r\n\t\tlblTipFat.setBounds(215, 100, 120, 28);\r\n\t\tlblTipFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTipFat.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblTipFat);\r\n\r\n\t\ttextTipoFat = new JTextField();\r\n\t\ttextTipoFat.setBounds(198, 128, 155, 20);\r\n\t\ttextTipoFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoFat.setColumns(10);\r\n\t\tpanel1.add(textTipoFat);\r\n\r\n\t\ttextConsumo = new JTextField();\r\n\t\ttextConsumo.setBounds(455, 128, 155, 20);\r\n\t\ttextConsumo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextConsumo.setColumns(10);\r\n\t\tpanel1.add(textConsumo);\r\n\r\n\t\tlblConsumoM = new JLabel(\"Consumo m\\u00B3:\");\r\n\t\tlblConsumoM.setBounds(472, 100, 120, 28);\r\n\t\tlblConsumoM.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblConsumoM.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblConsumoM);\r\n\r\n\t\tlblLeitAtual = new JLabel(\"Leitura Atual:\");\r\n\t\tlblLeitAtual.setBounds(203, 223, 120, 28);\r\n\t\tlblLeitAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitAtual.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitAtual);\r\n\r\n\t\ttextDataAtual = new JTextField();\r\n\t\ttextDataAtual.setBounds(312, 227, 120, 20);\r\n\t\ttextDataAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAtual.setColumns(10);\r\n\t\tpanel1.add(textDataAtual);\r\n\r\n\t\tJLabel lblData = new JLabel(\"Data\");\r\n\t\tlblData.setBounds(314, 185, 120, 28);\r\n\t\tlblData.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblData.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblData);\r\n\r\n\t\tJLabel lblApresentao = new JLabel(\"Apresenta\\u00E7\\u00E3o\");\r\n\t\tlblApresentao.setBounds(205, 185, 120, 28);\r\n\t\tlblApresentao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblApresentao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblApresentao);\r\n\r\n\t\tJSeparator separator = new JSeparator();\r\n\t\tseparator.setBounds(130, 202, 0, 35);\r\n\t\tpanel1.add(separator);\r\n\r\n\t\tJSeparator separator_1 = new JSeparator();\r\n\t\tseparator_1.setBounds(232, 214, 355, 2);\r\n\t\tpanel1.add(separator_1);\r\n\r\n\t\tJLabel lblLeitura = new JLabel(\"Leitura\");\r\n\t\tlblLeitura.setBounds(461, 185, 120, 28);\r\n\t\tlblLeitura.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitura.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitura);\r\n\r\n\t\tJLabel lblLeituraAnterior = new JLabel(\"Leitura Anterior:\");\r\n\t\tlblLeituraAnterior.setBounds(203, 250, 120, 28);\r\n\t\tlblLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeituraAnterior.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeituraAnterior);\r\n\r\n\t\ttextDataAnterior = new JTextField();\r\n\t\ttextDataAnterior.setBounds(312, 254, 120, 20);\r\n\t\ttextDataAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAnterior.setColumns(10);\r\n\t\tpanel1.add(textDataAnterior);\r\n\r\n\t\ttextLeituraAnterior = new JTextField();\r\n\t\ttextLeituraAnterior.setBounds(461, 254, 120, 20);\r\n\t\ttextLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAnterior.setColumns(10);\r\n\t\tpanel1.add(textLeituraAnterior);\r\n\r\n\t\ttextLeituraAtual = new JTextField();\r\n\t\ttextLeituraAtual.setBounds(461, 227, 120, 20);\r\n\t\ttextLeituraAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAtual.setColumns(10);\r\n\t\tpanel1.add(textLeituraAtual);\r\n\r\n\t\tlblObservacao = new JLabel(\"Observa\\u00E7\\u00E3o:\");\r\n\t\tlblObservacao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblObservacao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblObservacao.setBounds(358, 288, 120, 28);\r\n\t\tpanel1.add(lblObservacao);\r\n\r\n\t\ttextObs = new JTextField();\r\n\t\ttextObs.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextObs.setColumns(10);\r\n\t\ttextObs.setBounds(35, 314, 767, 20);\r\n\t\tpanel1.add(textObs);\r\n\r\n\t\tJSeparator separator_2 = new JSeparator();\r\n\t\tseparator_2.setBounds(444, 211, 0, 78);\r\n\t\tpanel1.add(separator_2);\r\n\t\tJLabel lblValorAgua = new JLabel(\"Valor \\u00C1gua\");\r\n\t\tlblValorAgua.setBounds(130, 345, 149, 28);\r\n\t\tpanel1.add(lblValorAgua);\r\n\t\tlblValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorAgua.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\ttxtValorAgua = new JTextField();\r\n\t\ttxtValorAgua.setBounds(151, 366, 106, 20);\r\n\t\tpanel1.add(txtValorAgua);\r\n\t\ttxtValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorAgua.setColumns(10);\r\n\t\ttxtValorEsgoto = new JTextField();\r\n\t\ttxtValorEsgoto.setBounds(352, 366, 106, 20);\r\n\t\tpanel1.add(txtValorEsgoto);\r\n\t\ttxtValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorEsgoto.setColumns(10);\r\n\t\tJLabel lblValorEsgoto = new JLabel(\"Valor Esgoto\");\r\n\t\tlblValorEsgoto.setBounds(331, 345, 149, 28);\r\n\t\tpanel1.add(lblValorEsgoto);\r\n\t\tlblValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorEsgoto.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tJLabel lblValorTotal = new JLabel(\"Valor Total\");\r\n\t\tlblValorTotal.setBounds(524, 345, 149, 28);\r\n\t\tpanel1.add(lblValorTotal);\r\n\t\tlblValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorTotal.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\r\n\t\ttextValorTotal = new JTextField();\r\n\t\ttextValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextValorTotal.setColumns(10);\r\n\t\ttextValorTotal.setBounds(547, 366, 106, 20);\r\n\t\tpanel1.add(textValorTotal);\r\n\r\n\t\tJButton btnCadastro = new JButton(\"Cadastro\");\r\n\t\tbtnCadastro.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tCadastroAgua cadaguadao = new CadastroAgua();\r\n\r\n\t\t\t\tcadaguadao.setContaAguaRGI(textRGI.getText());\r\n\t\t\t\tcadaguadao.setContaAguaNConta(textNConta.getText());\r\n\t\t\t\tcadaguadao.setContaAguaGrupo(textGrupo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaMesRef(textMesRef.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoLigacao(textTipoLig.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoFaturamento(textTipoFat.getText());\r\n\t\t\t\tcadaguadao.setContaAguaConsumo(textConsumo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAtual(textDataAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAtual(textLeituraAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAnterior(textDataAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAnterior(textLeituraAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaObservacao(textObs.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorAgua(txtValorAgua.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorEsgoto(txtValorEsgoto.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorTotal(textValorTotal.getText());\r\n\r\n\t\t\t\tif ((textRGI.getText().isEmpty()) || (textNConta.getText().isEmpty()) || (textGrupo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textMesRef.getText().isEmpty()) || (textTipoLig.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textTipoFat.getText().isEmpty()) || (textConsumo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAtual.getText().isEmpty()) || (textLeituraAtual.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAnterior.getText().isEmpty()) || (textLeituraAnterior.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textObs.getText().isEmpty()) || (txtValorAgua.getText().isEmpty())\r\n\t\t\t\t\t\t|| (txtValorEsgoto.getText().isEmpty()) || (textValorTotal.getText().isEmpty())) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Os campos não podem estar vazios\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tCadastroAguaDAO cadagua = new CadastroAguaDAO();\r\n\t\t\t\t\tcadagua.adiciona(cadaguadao);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Conta registrada com sucesso! \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttextRGI.setText(\"\");\r\n\t\t\t\ttextNConta.setText(\"\");\r\n\t\t\t\ttextGrupo.setText(\"\");\r\n\t\t\t\ttextMesRef.setText(\"\");\r\n\t\t\t\ttextTipoLig.setText(\"\");\r\n\t\t\t\ttextTipoFat.setText(\"\");\r\n\t\t\t\ttextConsumo.setText(\"\");\r\n\t\t\t\ttextDataAtual.setText(\"\");\r\n\t\t\t\ttextLeituraAtual.setText(\"\");\r\n\t\t\t\ttextDataAnterior.setText(\"\");\r\n\t\t\t\ttextLeituraAnterior.setText(\"\");\r\n\t\t\t\ttextObs.setText(\"\");\r\n\t\t\t\ttxtValorAgua.setText(\"\");\r\n\t\t\t\ttxtValorEsgoto.setText(\"\");\r\n\t\t\t\ttextValorTotal.setText(\"\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnCadastro.setBounds(423, 623, 107, 23);\r\n\t\tfrmTelaCadastro.getContentPane().add(btnCadastro);\r\n\r\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_1_1.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconAgua.png\"));\r\n\t\tlblNewLabel_1_1.setBounds(10, 11, 30, 30);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_1_1);\r\n\r\n\t\tJButton lblNewLabel_3 = new JButton(\"New label\");\r\n\t\tlblNewLabel_3.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMenuEnergia window = new MenuEnergia();\r\n\t\t\t\twindow.frmMenuEnergia.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconReturn.png\"));\r\n\t\tlblNewLabel_3.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBackground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBounds(31, 611, 60, 54);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_3);\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(292, 702, 106, 20);\r\n\t\tfrmTelaCadastro.getContentPane().add(textField_5);\r\n\t\tfrmTelaCadastro.setResizable(false);\r\n\t\tfrmTelaCadastro.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmTelaCadastro.setForeground(Color.WHITE);\r\n\t\tfrmTelaCadastro.setTitle(\"TELA CADASTRO \\u00C1GUA\");\r\n\t\tfrmTelaCadastro.setBounds(100, 100, 960, 720);\r\n\t\tfrmTelaCadastro.setLocationRelativeTo(null);\r\n\r\n\t\timageIcon = new ImageIcon(\"img/IconAgua.png\");\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n btnVolver = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n cmbRegiones = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n txtInfectados = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtFecha = new javax.swing.JTextField();\n btnAddIncidencia = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n txtFallecidos = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtAlta = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Añadir Incidencias\");\n setSize(new java.awt.Dimension(761, 516));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n\n btnVolver.setText(\"Volver\");\n btnVolver.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnVolverActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Region\");\n\n jLabel2.setText(\"Infectados\");\n\n jLabel3.setText(\"Fecha de infección\");\n\n txtFecha.setToolTipText(\"yyyy-mm-dd\");\n\n btnAddIncidencia.setText(\"Añadir incidencia\");\n btnAddIncidencia.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddIncidenciaActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Fallecidos\");\n\n jLabel5.setText(\"Dados de alta\");\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 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(332, 332, 332)\n .addComponent(btnVolver))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(301, 301, 301)\n .addComponent(btnAddIncidencia)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cmbRegiones, 0, 175, Short.MAX_VALUE)\n .addComponent(txtFecha))\n .addGap(61, 61, 61)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(txtAlta, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(txtFallecidos, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(txtInfectados, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(29, 29, 29))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtInfectados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtFallecidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtAlta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cmbRegiones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(78, 78, 78)\n .addComponent(btnAddIncidencia)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnVolver)\n .addContainerGap(24, 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(jPanel2, 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(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public frmCliente() {\r\n \r\n initComponents();\r\n // Botao do Note_ON brusco que foi retirado ...\r\n //jButton9.setVisible(false);\r\n \r\n // Inicializa o display de desenho\r\n //ImageIcon image=new ImageIcon(\"Hapax4.PNG\");\r\n //setIconImage(image.getImage());\r\n \r\n iniciaDesenho();\r\n // Lista de Dispositivos MIDI\r\n PegaMIDI();\r\n \r\n }", "public newsuspect() {\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 420);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\t\r\n\t\tJLabel lblAddNewSuspect = new JLabel(\"Add New Suspect\");\r\n\t\tlblAddNewSuspect.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\t\r\n\t\tJLabel lblPoliceDepartment = new JLabel(\"Police Department\");\r\n\t\t\r\n\t\tJLabel lblSex = new JLabel(\"Sex\");\r\n\t\t\r\n\t\tJLabel lblHairColour = new JLabel(\"Hair Colour\");\r\n\t\t\r\n\t\tJLabel lblHairType = new JLabel(\"Hair Type\");\r\n\t\t\r\n\t\tJLabel lblFacialHair = new JLabel(\"Facial Hair\");\r\n\t\t\r\n\t\tJLabel lblSkinColour = new JLabel(\"Skin Colour\");\r\n\t\t\r\n\t\tJLabel lblHeight = new JLabel(\"Height\");\r\n\t\t\r\n\t\tJLabel lblCrime = new JLabel(\"Crime\");\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setColumns(10);\r\n\t\t\r\n\t\ttextField_2 = new JTextField();\r\n\t\ttextField_2.setColumns(10);\r\n\t\t\r\n\t\ttextField_3 = new JTextField();\r\n\t\ttextField_3.setColumns(10);\r\n\t\t\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setColumns(10);\r\n\t\t\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setColumns(10);\r\n\t\t\r\n\t\ttextField_6 = new JTextField();\r\n\t\ttextField_6.setColumns(10);\r\n\t\t\r\n\t\ttextField_7 = new JTextField();\r\n\t\ttextField_7.setColumns(10);\r\n\t\t\r\n\t\ttextField_8 = new JTextField();\r\n\t\ttextField_8.setColumns(10);\r\n\t\t\r\n\t\tJButton btnOk = new JButton(\"Ok\");\r\n\t\tbtnOk.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t java.sql.Connection conn;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tconn = DriverManager.getConnection (Main.url,\"clint\",\"passkey1\");\r\n\t\t\t\t\t\t\tint row = admin_suspectpanel.model.getRowCount();\r\n//\t\t\t\t\t\t\trow+=1;\r\n\t\t\t\t\t\t java.sql.PreparedStatement pst=conn.prepareStatement(\"Insert into suspects values(?,?,?,?,?,?,?,?,?)\");\r\n\t\t\t\t\t\t pst.setString(1,String.valueOf(row));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t pst.setString(2, textField_1.getText());\r\n\t\t\t\t\t\t pst.setString(3, textField_2.getText());\r\n\t\t\t\t\t\t pst.setString(4, textField_3.getText());\r\n\t\t\t\t\t\t pst.setString(5, textField_4.getText());\r\n\t\t\t\t\t\t pst.setString(6, textField_5.getText());\r\n\t\t\t\t\t\t pst.setString(7, textField_6.getText());\r\n\t\t\t\t\t\t pst.setString(8, textField_7.getText());\r\n\t\t\t\t\t\t pst.setString(9, textField_8.getText());\r\n\t\t\t\t pst.executeUpdate();\r\n\t\t\t\t conn.close();\r\n\t\t\t\t\t\t admin_suspectpanel.refresh();\r\n\t\t\t\t\t\t setVisible(false);\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton btnCancel = new JButton(\"Cancel\");\r\n\t\tbtnCancel.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroupLayout gl_contentPane = new GroupLayout(contentPane);\r\n\t\tgl_contentPane.setHorizontalGroup(\r\n\t\t\tgl_contentPane.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(lblPoliceDepartment)\r\n\t\t\t\t\t\t.addComponent(lblSex)\r\n\t\t\t\t\t\t.addComponent(lblHairColour)\r\n\t\t\t\t\t\t.addComponent(lblHairType)\r\n\t\t\t\t\t\t.addComponent(lblFacialHair)\r\n\t\t\t\t\t\t.addComponent(lblSkinColour)\r\n\t\t\t\t\t\t.addComponent(lblHeight)\r\n\t\t\t\t\t\t.addComponent(lblCrime))\r\n\t\t\t\t\t.addGap(55)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(textField_8, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_7, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, 219, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblAddNewSuspect))\r\n\t\t\t\t\t.addContainerGap(53, Short.MAX_VALUE))\r\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(286, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(btnCancel)\r\n\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t.addComponent(btnOk)\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_contentPane.setVerticalGroup(\r\n\t\t\tgl_contentPane.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addComponent(lblAddNewSuspect)\r\n\t\t\t\t\t.addGap(62)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblPoliceDepartment)\r\n\t\t\t\t\t\t.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblSex)\r\n\t\t\t\t\t\t.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblHairColour)\r\n\t\t\t\t\t\t.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblHairType)\r\n\t\t\t\t\t\t.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblFacialHair)\r\n\t\t\t\t\t\t.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblSkinColour)\r\n\t\t\t\t\t\t.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblHeight)\r\n\t\t\t\t\t\t.addComponent(textField_7, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblCrime)\r\n\t\t\t\t\t\t.addComponent(textField_8, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(btnOk)\r\n\t\t\t\t\t\t.addComponent(btnCancel))\r\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tcontentPane.setLayout(gl_contentPane);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n panelConsultarVeiculo = new javax.swing.JPanel();\n txtPlaca = new javax.swing.JTextField();\n labelTipo = new javax.swing.JLabel();\n txtNdeIdentificacao = new javax.swing.JTextField();\n labelMarca = new javax.swing.JLabel();\n txtModelo = new javax.swing.JTextField();\n labelModelo = new javax.swing.JLabel();\n txtMarca = new javax.swing.JTextField();\n labelPlaca = new javax.swing.JLabel();\n labelNdeInscricao = new javax.swing.JLabel();\n labelCor = new javax.swing.JLabel();\n txtTipo = new javax.swing.JTextField();\n txtCor = new javax.swing.JTextField();\n jPanelBGConsultarVeiculo1 = new javax.swing.JPanel();\n btnAlterarVeiculo = new javax.swing.JButton();\n btnExcluirVeiculo = new javax.swing.JButton();\n jPanelBGConsultarVeiculo2 = new javax.swing.JPanel();\n btnConsultarVeiculo = new javax.swing.JButton();\n btnNovaConsultarVeiculo = new javax.swing.JButton();\n\n setClosable(true);\n setResizable(true);\n setTitle(\"Consultar Veículo\");\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n panelConsultarVeiculo.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n panelConsultarVeiculo.add(txtPlaca, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 220, 632, 30));\n\n labelTipo.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelTipo.setForeground(new java.awt.Color(72, 61, 139));\n labelTipo.setText(\"Tipo\");\n panelConsultarVeiculo.add(labelTipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 330, -1, -1));\n panelConsultarVeiculo.add(txtNdeIdentificacao, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 320, 250, 30));\n\n labelMarca.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelMarca.setForeground(new java.awt.Color(72, 61, 139));\n labelMarca.setText(\"Marca\");\n panelConsultarVeiculo.add(labelMarca, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 280, -1, -1));\n panelConsultarVeiculo.add(txtModelo, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 120, 632, 30));\n\n labelModelo.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelModelo.setForeground(new java.awt.Color(72, 61, 139));\n labelModelo.setText(\"Modelo\");\n panelConsultarVeiculo.add(labelModelo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 130, -1, -1));\n panelConsultarVeiculo.add(txtMarca, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 270, 632, 30));\n\n labelPlaca.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelPlaca.setForeground(new java.awt.Color(72, 61, 139));\n labelPlaca.setText(\"Placa\");\n panelConsultarVeiculo.add(labelPlaca, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, -1, -1));\n\n labelNdeInscricao.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelNdeInscricao.setForeground(new java.awt.Color(72, 61, 139));\n labelNdeInscricao.setText(\"N° de Identificação\");\n panelConsultarVeiculo.add(labelNdeInscricao, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 330, -1, -1));\n\n labelCor.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelCor.setForeground(new java.awt.Color(72, 61, 139));\n labelCor.setText(\"Cor\");\n panelConsultarVeiculo.add(labelCor, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 180, -1, -1));\n panelConsultarVeiculo.add(txtTipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 320, 250, 30));\n panelConsultarVeiculo.add(txtCor, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 170, 632, 30));\n\n jPanelBGConsultarVeiculo1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(72, 61, 139), 1, true));\n jPanelBGConsultarVeiculo1.setForeground(new java.awt.Color(72, 61, 139));\n\n btnAlterarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnAlterarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnAlterarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnAlterarVeiculo.setText(\"Alterar\");\n\n btnExcluirVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnExcluirVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnExcluirVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnExcluirVeiculo.setText(\"Excluir\");\n\n javax.swing.GroupLayout jPanelBGConsultarVeiculo1Layout = new javax.swing.GroupLayout(jPanelBGConsultarVeiculo1);\n jPanelBGConsultarVeiculo1.setLayout(jPanelBGConsultarVeiculo1Layout);\n jPanelBGConsultarVeiculo1Layout.setHorizontalGroup(\n jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBGConsultarVeiculo1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAlterarVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnExcluirVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n jPanelBGConsultarVeiculo1Layout.setVerticalGroup(\n jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelBGConsultarVeiculo1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnAlterarVeiculo)\n .addGap(17, 17, 17)\n .addComponent(btnExcluirVeiculo)\n .addContainerGap(14, Short.MAX_VALUE))\n );\n\n panelConsultarVeiculo.add(jPanelBGConsultarVeiculo1, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 370, 140, 90));\n\n jPanelBGConsultarVeiculo2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(72, 61, 139), 1, true));\n jPanelBGConsultarVeiculo2.setForeground(new java.awt.Color(72, 61, 139));\n\n btnConsultarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnConsultarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnConsultarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnConsultarVeiculo.setText(\"Consultar\");\n\n btnNovaConsultarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnNovaConsultarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnNovaConsultarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnNovaConsultarVeiculo.setText(\"Nova Consulta\");\n\n javax.swing.GroupLayout jPanelBGConsultarVeiculo2Layout = new javax.swing.GroupLayout(jPanelBGConsultarVeiculo2);\n jPanelBGConsultarVeiculo2.setLayout(jPanelBGConsultarVeiculo2Layout);\n jPanelBGConsultarVeiculo2Layout.setHorizontalGroup(\n jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBGConsultarVeiculo2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnConsultarVeiculo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNovaConsultarVeiculo, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n jPanelBGConsultarVeiculo2Layout.setVerticalGroup(\n jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelBGConsultarVeiculo2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnConsultarVeiculo)\n .addGap(18, 18, 18)\n .addComponent(btnNovaConsultarVeiculo)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n panelConsultarVeiculo.add(jPanelBGConsultarVeiculo2, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 370, -1, 90));\n\n jPanel1.add(panelConsultarVeiculo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -2, 1050, 590));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblPesquisa = new javax.swing.JLabel();\n cbSexo = new javax.swing.JComboBox();\n txtPesquisa = new javax.swing.JTextField();\n txtNasc = new javax.swing.JTextField();\n lblCel = new javax.swing.JLabel();\n txtCPF = new javax.swing.JTextField();\n txtCel = new javax.swing.JTextField();\n lblSexo = new javax.swing.JLabel();\n btnPrimeiro = new javax.swing.JButton();\n lblRG = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n txtRG = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n lblNome = new javax.swing.JLabel();\n btnPesquisa = new javax.swing.JButton();\n txtNome = new javax.swing.JTextField();\n lblNascimento = new javax.swing.JLabel();\n lblEnd = new javax.swing.JLabel();\n txtCodigo = new javax.swing.JTextField();\n lblCodigo = new javax.swing.JLabel();\n txtTel = new javax.swing.JTextField();\n lblTel = new javax.swing.JLabel();\n btnExcluir = new javax.swing.JButton();\n lblEst = new javax.swing.JLabel();\n btnAlterar = new javax.swing.JButton();\n txtEstado = new javax.swing.JTextField();\n btnNovo = new javax.swing.JButton();\n btnSalvar = new javax.swing.JButton();\n lblCPF = new javax.swing.JLabel();\n lblNum = new javax.swing.JLabel();\n txtNumero = new javax.swing.JTextField();\n lblCidade = new javax.swing.JLabel();\n txtCidade = new javax.swing.JTextField();\n txtRua = new javax.swing.JTextField();\n btnAnterior = new javax.swing.JButton();\n btnUltimo = new javax.swing.JButton();\n btnProximo = new javax.swing.JButton();\n lblCRO = new javax.swing.JLabel();\n txtCRO = new javax.swing.JTextField();\n lblCaregarFoto = new javax.swing.JButton();\n jPanelFoto = new javax.swing.JPanel();\n lblFoto = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Dentistas\");\n setName(\"CadastroFuncionario\"); // NOI18N\n setResizable(false);\n\n lblPesquisa.setText(\"Pesquisa :\");\n\n cbSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Masculino\", \"Feminino\" }));\n\n lblCel.setText(\"Celular:\");\n\n lblSexo.setText(\"* Sexo:\");\n\n btnPrimeiro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Primeiro_16x16.png\"))); // NOI18N\n btnPrimeiro.setText(\"Primeiro\");\n btnPrimeiro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPrimeiroActionPerformed(evt);\n }\n });\n\n lblRG.setText(\"* RG:\");\n\n lblNome.setText(\"* Nome:\");\n\n btnPesquisa.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Dentist Search.png\"))); // NOI18N\n btnPesquisa.setText(\"Pesquisar\");\n btnPesquisa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPesquisaActionPerformed(evt);\n }\n });\n\n lblNascimento.setText(\"* Data de Nascimento:\");\n\n lblEnd.setText(\"Endereço:\");\n\n txtCodigo.setEditable(false);\n\n lblCodigo.setText(\"Código:\");\n\n lblTel.setText(\"* Telefone:\");\n\n btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Dentist Delete.png\"))); // NOI18N\n btnExcluir.setText(\"Excluir\");\n btnExcluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExcluirActionPerformed(evt);\n }\n });\n\n lblEst.setText(\"Estado:\");\n\n btnAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Dentist Edit 2.png\"))); // NOI18N\n btnAlterar.setText(\"Alterar\");\n btnAlterar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAlterarActionPerformed(evt);\n }\n });\n\n btnNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Dentist Add.png\"))); // NOI18N\n btnNovo.setText(\"Novo\");\n btnNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNovoActionPerformed(evt);\n }\n });\n\n btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Dentist Check.png\"))); // NOI18N\n btnSalvar.setText(\"Salvar\");\n btnSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarActionPerformed(evt);\n }\n });\n\n lblCPF.setText(\"* CPF:\");\n\n lblNum.setText(\"Nº :\");\n\n lblCidade.setText(\"Cidade:\");\n\n btnAnterior.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Anterior_16x16.png\"))); // NOI18N\n btnAnterior.setText(\"Anterior\");\n btnAnterior.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAnteriorActionPerformed(evt);\n }\n });\n\n btnUltimo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Ultimo_16x16.png\"))); // NOI18N\n btnUltimo.setText(\"Último\");\n btnUltimo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUltimoActionPerformed(evt);\n }\n });\n\n btnProximo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/mr_tooth/icones/Proximo_16x16.png\"))); // NOI18N\n btnProximo.setText(\"Próximo\");\n btnProximo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnProximoActionPerformed(evt);\n }\n });\n\n lblCRO.setText(\"* CRO:\");\n\n lblCaregarFoto.setText(\"Foto ...\");\n lblCaregarFoto.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lblCaregarFotoMouseClicked(evt);\n }\n });\n lblCaregarFoto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n lblCaregarFotoActionPerformed(evt);\n }\n });\n\n jPanelFoto.setBackground(java.awt.Color.lightGray);\n jPanelFoto.setPreferredSize(new java.awt.Dimension(125, 160));\n\n javax.swing.GroupLayout jPanelFotoLayout = new javax.swing.GroupLayout(jPanelFoto);\n jPanelFoto.setLayout(jPanelFotoLayout);\n jPanelFotoLayout.setHorizontalGroup(\n jPanelFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)\n );\n jPanelFotoLayout.setVerticalGroup(\n jPanelFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblFoto, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\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()\n .addComponent(lblPesquisa)\n .addGap(18, 18, 18)\n .addComponent(txtPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnPesquisa, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)\n .addGap(199, 199, 199))\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnPrimeiro, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(btnSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnNovo, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)\n .addComponent(btnAnterior, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAlterar, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)\n .addComponent(btnProximo, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnUltimo, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)\n .addComponent(btnExcluir, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))\n .addGap(185, 185, 185))\n .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblTel)\n .addGap(18, 18, 18)\n .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblCel))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblCidade)\n .addGap(33, 33, 33)\n .addComponent(txtCidade, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtCel, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblEst)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtNumero, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n .addComponent(txtEstado, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n .addComponent(txtNasc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(lblCodigo)\n .addGap(588, 588, 588))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblRG)\n .addComponent(lblNome)\n .addComponent(lblCRO)\n .addComponent(lblEnd)\n .addComponent(lblSexo))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(txtRua, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)\n .addGap(34, 34, 34)\n .addComponent(lblNum))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(cbSexo, 0, 217, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblNascimento)))\n .addGap(179, 179, 179))\n .addComponent(txtCRO, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblCPF)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCPF, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE))\n .addComponent(txtNome, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)\n .addComponent(txtCodigo, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lblCaregarFoto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanelFoto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPesquisa)\n .addComponent(txtPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPesquisa))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblCodigo)\n .addComponent(txtCodigo, 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(lblNome)\n .addComponent(txtNome, 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(lblRG)\n .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblCPF)\n .addComponent(txtCPF, 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(txtCRO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblCRO))\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblSexo)\n .addComponent(cbSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblNascimento)\n .addComponent(txtNasc, 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(lblEnd)\n .addComponent(txtRua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblNum))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblCidade)\n .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblEst)\n .addComponent(txtCidade, 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(lblTel)\n .addComponent(lblCel)\n .addComponent(txtCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanelFoto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lblCaregarFoto)))\n .addGap(27, 27, 27)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnPrimeiro, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addComponent(btnUltimo, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addComponent(btnAnterior, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)\n .addComponent(btnProximo, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSalvar, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)\n .addComponent(btnExcluir, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNovo, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)\n .addComponent(btnAlterar, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE))\n .addGap(69, 69, 69))\n );\n\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n setBounds((screenSize.width-818)/2, (screenSize.height-576)/2, 818, 576);\n }", "public NovaContaFisica() {\n initComponents();\n }", "private void srediFormu() {\n List<PoslovniPartner> lpp = new ArrayList<>();\n try {\n lpp = Kontroler.vratiInstancu().vratiPoslovnePartnere();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n List<NačinPlaćanja> lnp = new ArrayList<>();\n try {\n lnp = Kontroler.vratiInstancu().vratiNačinePlaćanja();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n List<Proizvod> lp = new ArrayList<>();\n try {\n lp = Kontroler.vratiInstancu().vratiProizvode();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n }\n\n jcbPartner.setModel(new DefaultComboBoxModel(lpp.toArray()));\n jcbNačinPlaćanja.setModel(new DefaultComboBoxModel(lnp.toArray()));\n\n Faktura izabranaFaktura = (Faktura) Util.vratiInstancu().vrati(\"izabrana_faktura\");\n if (izabranaFaktura != null) {\n jcbPartner.setSelectedItem(izabranaFaktura.getPoslovniPartner());\n jcbNačinPlaćanja.setSelectedItem(izabranaFaktura.getNačinPlaćanja());\n jtxtNapomena.setText(izabranaFaktura.getNapomena());\n if (izabranaFaktura.getDatumFakturisanja() != null) {\n jtxtDatumFakturisanja.setText(df.format(izabranaFaktura.getDatumFakturisanja()));\n }\n if (izabranaFaktura.getRok() != null) {\n jtxtRok.setText(df.format(izabranaFaktura.getRok()));\n }\n jlbKompletirana.setText(izabranaFaktura.getKompletirana() ? \"(KOMPLETIRANA)\" : \"(DRAFT)\");\n jlblBrojFakture1.setText(izabranaFaktura.getBrojFakture());\n jtblStavkeFakture.setModel(new StavkaFaktureTableModel((izabranaFaktura)));\n Double netoIznos = 0d;\n for (StavkaFakture stavkaFakture : izabranaFaktura.getStavke()) {\n netoIznos += stavkaFakture.getJediničnaCena() * stavkaFakture.getKoličina();\n }\n jtxtNetoVrednost.setText(String.valueOf(Math.round(netoIznos * 1000.0) / 1000.0));\n jbtnKreirajNovuFakturu.setVisible(false);\n jbtnSačuvajFakturu.setText(\"Izmeni fakturu\");\n if (izabranaFaktura.getKompletirana()) {\n enableAllComponents(false);\n jtxtUkupnaVrednost.setText(String.valueOf((double) Math.round(izabranaFaktura.getUkupanIznos() * 1000) / 1000));\n jtxtPDV.setText(String.valueOf((double) Math.round(izabranaFaktura.getUkupanPorez() * 1000) / 1000));\n jtxtFakturisao.setText(slavko.baze2.procesnabavke.gui.util.Util.vratiInstancu().vrati(\"prijavljeni_korisnik\").toString());\n }\n Util.vratiInstancu().obriši(\"izabrana_faktura\");\n\n } else {\n jlblBrojFakture1.setText(\"\");\n jlbKompletirana.setVisible(false);\n jcbPartner.setSelectedItem(null);\n jcbNačinPlaćanja.setSelectedItem(null);\n jtblStavkeFakture.setModel(new StavkaFaktureTableModel(new Faktura()));\n jtxtNetoVrednost.setText(\"0.0\");\n enableAllComponents(false);\n }\n\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "private void initialize(String id) {\n\t\tfrmGestionDesEnseignants = new JFrame();\n\t\tfrmGestionDesEnseignants.getContentPane().setBackground(Color.WHITE);\n\t\tfrmGestionDesEnseignants.setTitle(\"Gestion des enseignants\");\n\t\tfrmGestionDesEnseignants.setBounds(100, 100, 800, 480);\n\t\tfrmGestionDesEnseignants.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmGestionDesEnseignants.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblEnseignant = new JLabel(\"Enseignant\");\n\t\tlblEnseignant.setFont(new Font(\"Arial\", Font.PLAIN, 36));\n\t\tlblEnseignant.setBounds(14, 13, 185, 43);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblEnseignant);\n\t\t\n\t\tJLabel lblNom = new JLabel(\"Nom\");\n\t\tlblNom.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblNom.setBounds(44, 80, 58, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblNom);\n\t\t\n\t\tJLabel lblNombreDheuresSupplmentaires = new JLabel(\"Nombre d'heures suppl\\u00E9mentaires (les 5 derni\\u00E8res ann\\u00E9es)\");\n\t\tlblNombreDheuresSupplmentaires.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblNombreDheuresSupplmentaires.setBounds(44, 248, 642, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblNombreDheuresSupplmentaires);\n\t\t\n\t\tJLabel lblListesDesUes = new JLabel(\"Listes des UEs dont l'enseignant est responsable\");\n\t\tlblListesDesUes.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblListesDesUes.setBounds(44, 175, 654, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblListesDesUes);\n\t\t\n\t\tJLabel lblInfoNom = new JLabel(\"\");\n\t\tlblInfoNom.setForeground(Color.BLUE);\n\t\tlblInfoNom.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblInfoNom.setBounds(152, 80, 179, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblInfoNom);\n\t\t\n\t\tJLabel lblPrnom = new JLabel(\"Pr\\u00E9nom\");\n\t\tlblPrnom.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblPrnom.setBounds(398, 80, 84, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblPrnom);\n\t\t\n\t\tJLabel labelInfoPrenom = new JLabel(\"\");\n\t\tlabelInfoPrenom.setForeground(Color.BLUE);\n\t\tlabelInfoPrenom.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlabelInfoPrenom.setBounds(536, 80, 179, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(labelInfoPrenom);\n\t\t\n\t\tJLabel lblTypesDeLenseignant = new JLabel(\"Types de l'enseignant\");\n\t\tlblTypesDeLenseignant.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblTypesDeLenseignant.setBounds(44, 126, 271, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblTypesDeLenseignant);\n\t\t\n\t\tJLabel labelInfoTypes = new JLabel(\"\");\n\t\tlabelInfoTypes.setForeground(Color.BLUE);\n\t\tlabelInfoTypes.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlabelInfoTypes.setBounds(330, 126, 396, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(labelInfoTypes);\n\t\t\n\t\tJLabel labelListeUE = new JLabel(\"\");\n\t\tlabelListeUE.setForeground(Color.BLUE);\n\t\tlabelListeUE.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlabelListeUE.setBounds(44, 206, 654, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(labelListeUE);\n\t\t\n\t\tJLabel labelHeure = new JLabel(\"\");\n\t\tlabelHeure.setForeground(Color.BLUE);\n\t\tlabelHeure.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlabelHeure.setBounds(44, 280, 70, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(labelHeure);\n\t\t\n\t\tJLabel lblDateDentreDans = new JLabel(\"Date d'entr\\u00E9e dans le d\\u00E9partement\");\n\t\tlblDateDentreDans.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlblDateDentreDans.setBounds(44, 322, 388, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblDateDentreDans);\n\t\t\n\t\tJLabel labelDateEntree = new JLabel(\"\");\n\t\tlabelDateEntree.setForeground(Color.BLUE);\n\t\tlabelDateEntree.setFont(new Font(\"Arial\", Font.PLAIN, 24));\n\t\tlabelDateEntree.setBounds(44, 354, 232, 29);\n\t\tfrmGestionDesEnseignants.getContentPane().add(labelDateEntree);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\");\n\t\tlblNewLabel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSearchTeacher.openSearchTeacher();\n\t\t\t\tfrmGestionDesEnseignants.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tlblNewLabel.setBounds(707, 13, 61, 61);\n\t\tImageHelper.addBackArrowInLabel(lblNewLabel);\n\t\tfrmGestionDesEnseignants.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJButton btnModifier = new JButton(\"Modifier\");\n\t\tbtnModifier.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tModifyTeacher.openModifyTeacher(getTeacher().getId());\n\t\t\t\tfrmGestionDesEnseignants.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tbtnModifier.setBounds(454, 373, 113, 27);\n\t\tfrmGestionDesEnseignants.getContentPane().add(btnModifier);\n\t\t\n\t\tJButton btnSupprimer = new JButton(\"Supprimer\");\n\t\tbtnSupprimer.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tObject[] options = { \"Oui\", \"Non\"};\n\t\t\t\tint n = JOptionPane.showOptionDialog(frmGestionDesEnseignants, \"Voulez-vous vraiment supprimer l'enseignant?\",\n\t\t\t\t\t\t\"Warning\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,\n\t\t\t\t\t\toptions, options[1]);\n\t\t\t\tif(n == 0) {\n\t\t\t\t\tMenu.openMenu();\n\t\t\t\t\tfrmGestionDesEnseignants.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnSupprimer.setBounds(613, 373, 113, 27);\n\t\tfrmGestionDesEnseignants.getContentPane().add(btnSupprimer);\n\t\t\n\t\tfor (Teacher teacher : GlobalObjects.teachers) {\n\t\t\tif(teacher.getId().equals(id)) {\n\t\t\t\tthis.teacher = teacher;\n\t\t\t\tlblInfoNom.setText(teacher.getNom());\n\t\t\t\tlabelInfoPrenom.setText(teacher.getPrenom());\n\t\t\t\tlabelInfoTypes.setText(teacher.getTypesString());\n\t\t\t\tlabelListeUE.setText(teacher.getUEsString());\n\t\t\t\tlabelHeure.setText(teacher.getHour());\n\t\t\t\tlabelDateEntree.setText(teacher.getDate());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n ps = new javax.swing.JTextField();\n punishment = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n ipcno = new javax.swing.JTextField();\n policename = new javax.swing.JTextField();\n bust_time = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n cname = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n victimpanel = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n vicname = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n vicage = new javax.swing.JTextField();\n sexspinner = new javax.swing.JSpinner();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n casualty = new javax.swing.JTextArea();\n finaldata = new javax.swing.JButton();\n addcrimerec = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n vicname1 = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Add Criminal Record\");\n jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n jLabel1.setAlignmentX(0.5F);\n jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel9.setText(\"Bust Time : \");\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel10.setText(\"IPC : \");\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel11.setText(\"Busted by : \");\n\n jLabel12.setText(\"(Officer name)\");\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel13.setText(\"Police Station : \");\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel14.setText(\"Punishment : \");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"Criminal Name : \");\n\n cname.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cnameActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"Add Victim Details\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Victim name : \");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"Age : \");\n\n vicage.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vicageActionPerformed(evt);\n }\n });\n\n sexspinner.setModel(new javax.swing.SpinnerListModel(new String[] {\"M\", \"F\", \"U\"}));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setText(\"Sex : \");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setText(\"Casualty : \");\n\n casualty.setColumns(20);\n casualty.setRows(5);\n jScrollPane1.setViewportView(casualty);\n\n finaldata.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n finaldata.setText(\"Add Victim and Crime Data\");\n finaldata.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n finaldataActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout victimpanelLayout = new javax.swing.GroupLayout(victimpanel);\n victimpanel.setLayout(victimpanelLayout);\n victimpanelLayout.setHorizontalGroup(\n victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(victimpanelLayout.createSequentialGroup()\n .addGap(342, 342, 342)\n .addComponent(jLabel2)\n .addContainerGap(371, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, victimpanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(finaldata)\n .addGap(52, 52, 52))\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(victimpanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(vicname, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sexspinner, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(vicage, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(333, Short.MAX_VALUE)))\n );\n victimpanelLayout.setVerticalGroup(\n victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(victimpanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(55, 55, 55)\n .addComponent(finaldata, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(65, Short.MAX_VALUE))\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(victimpanelLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(vicname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(vicage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(victimpanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sexspinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(jLabel7)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n\n addcrimerec.setText(\"Add Crime Record\");\n addcrimerec.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addcrimerecActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel8.setText(\"Victim name : \");\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(826, 826, 826)\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 18, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel10)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ipcno, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(policename, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bust_time, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel13)\n .addGap(17, 17, 17))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jLabel14))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(punishment, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(2, 2, 2))\n .addComponent(ps, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(345, 345, 345)\n .addComponent(addcrimerec, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(63, 63, 63)\n .addComponent(jLabel8)\n .addGap(18, 18, 18)\n .addComponent(vicname1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(177, 177, 177)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(victimpanel, 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 layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(bust_time, 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.TRAILING)\n .addComponent(ipcno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(policename, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel12))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(vicname1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(14, 14, 14)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(punishment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(addcrimerec, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(victimpanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42))\n );\n\n pack();\n }", "public FrmClienteEsc() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\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 botonCancelarProveedor = new javax.swing.JButton();\n bGuardar = new javax.swing.JButton();\n jLabel14 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n campoId = new javax.swing.JTextField();\n campoMarca = new javax.swing.JTextField();\n campoNombre = new javax.swing.JTextField();\n campoApellidos = new javax.swing.JTextField();\n campoTelefono = new javax.swing.JTextField();\n campoDireccion = new javax.swing.JTextField();\n campoEmail = new javax.swing.JTextField();\n campoIdZapato = new javax.swing.JTextField();\n campoCantidad = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"ANDREA S.A. DE C.V.\");\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setMaximumSize(new java.awt.Dimension(421, 437));\n jPanel1.setPreferredSize(new java.awt.Dimension(421, 437));\n\n jLabel1.setBackground(new java.awt.Color(255, 0, 0));\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel1.setText(\"AGREGAR PROVEEDOR\");\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 0, 0));\n jLabel2.setText(\"ID:\");\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 0, 0));\n jLabel3.setText(\"NOMBRE (S):\");\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 0, 0));\n jLabel4.setText(\"MARCA:\");\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 0, 0));\n jLabel5.setText(\"APELLIDOS:\");\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 0, 0));\n jLabel6.setText(\"TELEFONO FIJO:\");\n\n botonCancelarProveedor.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n botonCancelarProveedor.setForeground(new java.awt.Color(255, 0, 0));\n botonCancelarProveedor.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/zapateria/vista/tachee.png\"))); // NOI18N\n botonCancelarProveedor.setText(\"CANCELAR\");\n botonCancelarProveedor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonCancelarProveedorActionPerformed(evt);\n }\n });\n\n bGuardar.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n bGuardar.setForeground(new java.awt.Color(255, 0, 0));\n bGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/zapateria/vista/iconoGuardar.png\"))); // NOI18N\n bGuardar.setText(\"GUARDAR\");\n bGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bGuardarActionPerformed(evt);\n }\n });\n\n jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/zapateria/vista/iconoAgregar.png\"))); // NOI18N\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(255, 0, 0));\n jLabel8.setText(\"DIRECCION:\");\n\n jLabel9.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 0, 0));\n jLabel9.setText(\"E-MAIL:\");\n\n jLabel10.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 0, 0));\n jLabel10.setText(\"ID ZAPATO:\");\n\n jLabel11.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(255, 0, 0));\n jLabel11.setText(\"CANTIDAD:\");\n\n campoId.setBackground(java.awt.Color.white);\n campoId.setEditable(false);\n campoId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoIdActionPerformed(evt);\n }\n });\n\n campoMarca.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoMarcaKeyTyped(evt);\n }\n });\n\n campoNombre.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoNombreKeyTyped(evt);\n }\n });\n\n campoApellidos.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoApellidosKeyTyped(evt);\n }\n });\n\n campoTelefono.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoTelefonoKeyTyped(evt);\n }\n });\n\n campoIdZapato.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoIdZapatoKeyTyped(evt);\n }\n });\n\n campoCantidad.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n campoCantidadKeyTyped(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 .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addGap(18, 18, 18)\n .addComponent(campoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoTelefono)\n .addGap(205, 205, 205))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoIdZapato, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(63, 63, 63)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoMarca, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoNombre))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addComponent(jLabel1)\n .addGap(38, 38, 38)\n .addComponent(jLabel14)\n .addContainerGap(37, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(botonCancelarProveedor)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(bGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoMarca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel14)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoIdZapato, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(botonCancelarProveedor)\n .addComponent(bGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34))\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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\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\n pack();\n }", "public CrearGrupos() throws SQLException {\n initComponents();\n setTitle(\"Crear Grupos\");\n setSize(643, 450);\n setLocationRelativeTo(this);\n cargarModelo();\n }", "public VentaForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }", "private void jBtn_AjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_AjouterActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n Formulaire_Client creaClient = new Formulaire_Client();\n creaClient.setVisible(true);\n this.setVisible(false);\n \n }\n else{\n Formulaire_Prospect creaProspect = new Formulaire_Prospect();\n creaProspect.setVisible(true);\n this.setVisible(false);\n } \n }", "public VistaCrearEmpleado() {\n\t\tsetClosable(true);\n\t\tsetFrameIcon(new ImageIcon(VistaCrearEmpleado.class.getResource(\"/com/mordor/mordorLloguer/recursos/account_circle24dp.png\")));\n\t\tsetBounds(100, 100, 467, 435);\n\t\tgetContentPane().setLayout(new MigLayout(\"\", \"[152px][235px]\", \"[19px][19px][19px][19px][19px][19px][45px][24px][19px][25px]\"));\n\t\t\n\t\tJLabel lblDni = new JLabel(\"DNI: \");\n\t\tgetContentPane().add(lblDni, \"cell 0 0,growx,aligny center\");\n\t\t\n\t\ttxtDNI = new JTextField();\n\t\tgetContentPane().add(txtDNI, \"cell 1 0,growx,aligny top\");\n\t\ttxtDNI.setColumns(10);\n\t\t\n\t\tJLabel lblNombre = new JLabel(\"Nombre: \");\n\t\tgetContentPane().add(lblNombre, \"cell 0 1,growx,aligny center\");\n\t\t\n\t\ttxtNombre = new JTextField();\n\t\tgetContentPane().add(txtNombre, \"cell 1 1,growx,aligny top\");\n\t\ttxtNombre.setColumns(10);\n\t\t\n\t\tJLabel lblApellidos = new JLabel(\"Apellidos: \");\n\t\tgetContentPane().add(lblApellidos, \"cell 0 2,growx,aligny center\");\n\t\t\n\t\ttxtApellidos = new JTextField();\n\t\tgetContentPane().add(txtApellidos, \"cell 1 2,growx,aligny top\");\n\t\ttxtApellidos.setColumns(10);\n\t\t\n\t\tJLabel lblDomicilio = new JLabel(\"Domicilio:\");\n\t\tgetContentPane().add(lblDomicilio, \"cell 0 3,growx,aligny center\");\n\t\t\n\t\ttxtDomicilio = new JTextField();\n\t\tgetContentPane().add(txtDomicilio, \"cell 1 3,growx,aligny top\");\n\t\ttxtDomicilio.setColumns(10);\n\t\t\n\t\tJLabel lblCp = new JLabel(\"CP:\");\n\t\tgetContentPane().add(lblCp, \"cell 0 4,growx,aligny center\");\n\t\t\n\t\ttxtCp = new JTextField();\n\t\tgetContentPane().add(txtCp, \"cell 1 4,growx,aligny top\");\n\t\ttxtCp.setColumns(10);\n\t\t\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\n\t\tgetContentPane().add(lblEmail, \"cell 0 5,growx,aligny center\");\n\t\t\n\t\ttxtEmail = new JTextField();\n\t\tgetContentPane().add(txtEmail, \"cell 1 5,growx,aligny top\");\n\t\ttxtEmail.setColumns(10);\n\t\t\n\t\tJLabel lblFechaDeNacimiento = new JLabel(\"Fecha de Nacimiento:\");\n\t\tgetContentPane().add(lblFechaDeNacimiento, \"cell 0 6,alignx left,aligny center\");\n\t\t\n\t\ttxtDate = new WebDateField();\n\t\tgetContentPane().add(txtDate, \"cell 1 6,growx,aligny top\");\n\t\t\n\t\tJLabel lblCargo = new JLabel(\"Cargo:\");\n\t\tgetContentPane().add(lblCargo, \"cell 0 7,growx,aligny center\");\n\t\t\n\t\tcomboBoxCargo= new JComboBox<String> ();\n\t\tgetContentPane().add(comboBoxCargo, \"cell 1 7,growx,aligny top\");\n\t\t\n\t\tJLabel lblContrasea = new JLabel(\"Contraseña:\");\n\t\tgetContentPane().add(lblContrasea, \"cell 0 8,growx,aligny center\");\n\t\t\n\t\tpasswordField = new JPasswordField();\n\t\tgetContentPane().add(passwordField, \"cell 1 8,growx,aligny top\");\n\t\t\n\t\tbtnAdd = new JButton(\"Add\");\n\t\tgetContentPane().add(btnAdd, \"cell 0 9,growx,aligny top\");\n\t\t\n\t\tbtnCancel = new JButton(\"Cancel\");\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tgetContentPane().add(btnCancel, \"cell 1 9,growx,aligny top\");\n\n\t}", "public void sauvegardeActionPerformed(java.awt.event.ActionEvent evt) throws IOException{ \n Games.get(0).saveGame();\n JOptionPane.showMessageDialog(this,\"Partie sauvegardée !\");\n this.requestFocusInWindow();\n }", "private void initialize() {\n frmInfoCursa = new JFrame();\n frmInfoCursa.setTitle(\"informatii cursa\");\n frmInfoCursa.getContentPane().setBackground(new Color(127, 255, 212));\n frmInfoCursa.setBounds(100, 100, 450, 300);\n frmInfoCursa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frmInfoCursa.getContentPane().setLayout(null);\n frmInfoCursa.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n int result = JOptionPane.showConfirmDialog(frmInfoCursa,\"Leave\" +\n \" ?\",\"Confirmare iesire :\", JOptionPane.YES_NO_OPTION);\n if (result == JOptionPane.YES_OPTION)\n frmInfoCursa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n else\n frmInfoCursa.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }\n });\n\n btnNewButton = new JButton(\"Inapoi\");\n btnNewButton.setBounds(152, 184, 115, 29);\n btnNewButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n flag = true;\n DriverPage.afiseaza();\n frmInfoCursa.setVisible(false);\n }\n });\n frmInfoCursa.getContentPane().add(btnNewButton);\n\n JLabel lblNewLabel = new JLabel(\"Durata cursa:\");\n lblNewLabel.setFont(new Font(\"Showcard Gothic\", Font.BOLD, 16));\n lblNewLabel.setBounds(82, 48, 136, 26);\n frmInfoCursa.getContentPane().add(lblNewLabel);\n\n JLabel lblNewLabel_1 = new JLabel(\"\\tPret cursa:\");\n lblNewLabel_1.setFont(new Font(\"Showcard Gothic\", Font.PLAIN, 16));\n lblNewLabel_1.setBounds(82, 132, 136, 26);\n frmInfoCursa.getContentPane().add(lblNewLabel_1);\n\n JLabel lblNewLabel_2 = new JLabel(\"\" + distanta * 3 + \" lei\");\n lblNewLabel_2.setBounds(261, 50, 69, 20);\n frmInfoCursa.getContentPane().add(lblNewLabel_2);\n\n JLabel lblNewLabel_3 = new JLabel(distanta * 2 + \" minute\");\n lblNewLabel_3.setBounds(261, 134, 69, 20);\n frmInfoCursa.getContentPane().add(lblNewLabel_3);\n }", "private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed\n \n camino=null;\n \n int status = fileChooser.showOpenDialog (null);\n if (status == JFileChooser.APPROVE_OPTION){\n File selectedFile = fileChooser.getSelectedFile();\n camino = selectedFile.getAbsolutePath();\n }\n else{ \n if (status == JFileChooser.CANCEL_OPTION){\n System.out.println(\"CANCELAR\");\n }\n \n }\n try {\n cancion.agregarCancion(camino);\n } catch (IOException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedTagException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDataException ex) {\n Logger.getLogger(biblioteca.class.getName()).log(Level.SEVERE, null, ex);\n }\n String[] test = cancion.mostrarCancion(i);\n lista.addElement(\" \"+test[0]);\n libCancion.setModel(lista);\n i++;\n }", "public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n lblTit = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n sexo = new javax.swing.JComboBox<String>();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtNombre = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n TxtSue = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtFun = new javax.swing.JTextArea();\n btnGuardar = new javax.swing.JButton();\n lblId = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setText(\"L\");\n jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 130, 20, -1));\n\n lblTit.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n lblTit.setText(\"REGISTRO CARGO\");\n jPanel1.add(lblTit, new org.netbeans.lib.awtextra.AbsoluteConstraints(128, 4, -1, -1));\n\n jLabel2.setText(\"Tipo Cargo\");\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 62, -1, -1));\n\n sexo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sexoActionPerformed(evt);\n }\n });\n jPanel1.add(sexo, new org.netbeans.lib.awtextra.AbsoluteConstraints(175, 59, 231, -1));\n\n jLabel1.setText(\"Nombre Cargo\");\n jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 93, -1, -1));\n\n jLabel3.setText(\"Sueldo Cargo\");\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 131, -1, -1));\n\n txtNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNombreActionPerformed(evt);\n }\n });\n txtNombre.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtNombreKeyTyped(evt);\n }\n });\n jPanel1.add(txtNombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(175, 90, 231, -1));\n\n jLabel4.setText(\"Funciones\");\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 166, -1, -1));\n\n TxtSue.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n TxtSue.setMinimumSize(new java.awt.Dimension(1, 20));\n TxtSue.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n TxtSueKeyTyped(evt);\n }\n });\n jPanel1.add(TxtSue, new org.netbeans.lib.awtextra.AbsoluteConstraints(175, 128, 231, -1));\n\n txtFun.setColumns(20);\n txtFun.setRows(5);\n txtFun.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtFunKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtFunKeyTyped(evt);\n }\n });\n jScrollPane1.setViewportView(txtFun);\n\n jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(175, 166, 231, -1));\n\n btnGuardar.setText(\"GUARDAR\");\n btnGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGuardarActionPerformed(evt);\n }\n });\n jPanel1.add(btnGuardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 290, 100, 34));\n\n lblId.setText(\"1\");\n jPanel1.add(lblId, new org.netbeans.lib.awtextra.AbsoluteConstraints(175, 34, 81, -1));\n\n jLabel5.setText(\"Id\");\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 34, -1, -1));\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/fondo2.jpg\"))); // NOI18N\n jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 430, 340));\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "public NewJFrame() {\n initComponents();\n \n \n //combo box\n comboCompet.addItem(\"Séléction officielle\");\n comboCompet.addItem(\"Un certain regard\");\n comboCompet.addItem(\"Cannes Courts métrages\");\n comboCompet.addItem(\"Hors compétitions\");\n comboCompet.addItem(\"Cannes Classics\");\n \n \n //redimension\n this.setResizable(false);\n \n planning = new Planning();\n \n \n }", "public CadastrarProduto() {\n initComponents();\n }", "public void confirmerButtonHandler(ActionEvent actionEvent) throws Exception {\n if(tableOffres.getSelectionModel().getSelectedItem()!=null){\n Offre selectedOffre=new Offre();\n selectedOffre=(Offre)tableOffres.getSelectionModel().getSelectedItem();\n System.out.println(selectedOffre);\n if(selectedOffre.getDisponible().equals(\"non\")){\n showAlert(\"L'offre doit etre disponible !\");\n }else {\n //Now we navigate to the form page\n\n //Getting a reference to the primary stage\n\n Stage primaryStage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\n System.out.println(primaryStage);\n //Navigating by switching the scene\n //Loading the scene\n FXMLLoader loader = new FXMLLoader(\n getClass().getResource(\n \"FormScene.fxml\"\n ));\n //Hiding the stage temporarily to configurate the scene\n primaryStage.hide();\n primaryStage.setScene(new Scene(loader.load(), 800, 600));\n FormController formController = loader.<FormController>getController();\n System.out.println(formController);\n formController.initData(selectedOffre);\n // Here where the scene changes and the form screen shows\n primaryStage.show();\n }\n }else{\n showAlert(\"Offre non sélectionnée\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n campoId = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n campoNome = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n campoRG = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n campoTel = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n btSalvar = new javax.swing.JButton();\n campoSexo = new javax.swing.JComboBox<>();\n btNovo = new javax.swing.JButton();\n btExcuir = new javax.swing.JButton();\n btSair = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n campoPesquisar = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setText(\"Cliente\");\n\n jLabel2.setText(\"ID\");\n\n campoId.setEditable(false);\n\n jLabel3.setText(\"Nome\");\n\n jLabel4.setText(\"RG\");\n\n jLabel5.setText(\"Telefone\");\n\n jLabel6.setText(\"Sexo\");\n\n btSalvar.setText(\"Salvar\");\n btSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSalvarActionPerformed(evt);\n }\n });\n\n campoSexo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Feminino\", \"Masculino\" }));\n\n btNovo.setText(\"Novo\");\n btNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btNovoActionPerformed(evt);\n }\n });\n\n btExcuir.setText(\"Excluir\");\n btExcuir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btExcuirActionPerformed(evt);\n }\n });\n\n btSair.setText(\"Sair\");\n btSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSairActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Buscar Cliente\");\n\n jButton1.setText(\"Buscar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(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 .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jLabel1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(campoSexo, 0, 106, Short.MAX_VALUE))\n .addComponent(campoTel, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoRG, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoNome, javax.swing.GroupLayout.Alignment.LEADING))))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btNovo)\n .addGap(39, 39, 39)\n .addComponent(btSalvar)\n .addGap(46, 46, 46)\n .addComponent(btExcuir)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)\n .addComponent(btSair))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(189, 189, 189)\n .addComponent(campoPesquisar))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)))))\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(70, 70, 70))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel3))\n .addComponent(jButton1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(campoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(campoRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(campoSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btSalvar)\n .addComponent(btNovo)\n .addComponent(btExcuir)\n .addComponent(btSair))\n .addGap(37, 37, 37))\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.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }" ]
[ "0.6238402", "0.61784", "0.61110514", "0.60792893", "0.6031616", "0.60188884", "0.5954459", "0.59466785", "0.5922898", "0.590882", "0.58809394", "0.58668", "0.5864636", "0.58399904", "0.5839257", "0.58265257", "0.5823138", "0.5816003", "0.58120054", "0.5803741", "0.57970554", "0.57811326", "0.5776625", "0.577129", "0.5761414", "0.57551074", "0.5747556", "0.574556", "0.5744334", "0.5743295", "0.5742813", "0.5735038", "0.5733572", "0.5731661", "0.57304704", "0.57214963", "0.57211846", "0.57101244", "0.56879795", "0.56872994", "0.5676228", "0.56720877", "0.5670405", "0.56620884", "0.56586725", "0.565085", "0.5643949", "0.56312007", "0.5630436", "0.5624763", "0.56160057", "0.5615061", "0.5614636", "0.5613571", "0.56116956", "0.56098205", "0.5595644", "0.55932945", "0.55842453", "0.55840695", "0.5582245", "0.5581486", "0.5573302", "0.55728257", "0.55725896", "0.55689543", "0.55685073", "0.5564619", "0.5563459", "0.55624676", "0.55618", "0.55533034", "0.5552417", "0.55412346", "0.55409616", "0.5536476", "0.5535964", "0.5535253", "0.5527238", "0.5526014", "0.5522759", "0.5518211", "0.55154365", "0.5508049", "0.5505438", "0.54996544", "0.54982877", "0.5497509", "0.54940915", "0.54938924", "0.54852986", "0.5484938", "0.5476036", "0.54727143", "0.54721785", "0.54721576", "0.54719067", "0.54696757", "0.54650855", "0.5464526" ]
0.67471176
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); tblSecoes = new javax.swing.JTable(); btnRemover = new javax.swing.JButton(); btnAtualizar = new javax.swing.JButton(); btnCancelar = new javax.swing.JButton(); setClosable(true); setTitle("Seções"); tblSecoes.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(tblSecoes); btnRemover.setBackground(new java.awt.Color(98, 155, 88)); btnRemover.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnRemover.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_remove.fw.png"))); // NOI18N btnRemover.setText(" Remover"); btnRemover.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoverActionPerformed(evt); } }); btnAtualizar.setBackground(new java.awt.Color(98, 155, 88)); btnAtualizar.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnAtualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_confirm.fw.png"))); // NOI18N btnAtualizar.setText(" Atualizar"); btnAtualizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAtualizarActionPerformed(evt); } }); btnCancelar.setBackground(new java.awt.Color(183, 70, 53)); btnCancelar.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_cancel.fw.png"))); // NOI18N btnCancelar.setText(" Cancelar"); btnCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelarActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 856, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(btnAtualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(76, 76, 76) .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(210, 210, 210)))) .addGroup(layout.createSequentialGroup() .addGap(380, 380, 380) .addComponent(btnRemover) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(24, 24, 24) .addComponent(btnRemover, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(41, 41, 41) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnAtualizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.6945632", "0.6943359", "0.69363457", "0.6931661", "0.6927987", "0.6925778", "0.6925381", "0.69117576", "0.6911631", "0.68930036", "0.6892348", "0.6890817", "0.68904495", "0.6889411", "0.68838716", "0.6881747", "0.6881229", "0.68778914", "0.6876094", "0.6874808", "0.68713", "0.6859444", "0.6856188", "0.68556464", "0.6855074", "0.68549985", "0.6853093", "0.6853093", "0.68530816", "0.6843091", "0.6837124", "0.6836549", "0.6828579", "0.68282986", "0.68268806", "0.682426", "0.6823653", "0.6817904", "0.68167645", "0.68102163", "0.6808751", "0.680847", "0.68083245", "0.6807882", "0.6802814", "0.6795573", "0.6794048", "0.6792466", "0.67904556", "0.67893785", "0.6789265", "0.6788365", "0.67824304", "0.6766916", "0.6765524", "0.6765339", "0.67571205", "0.6755559", "0.6751974", "0.67510027", "0.67433685", "0.67390305", "0.6737053", "0.673608", "0.6733373", "0.67271507", "0.67262334", "0.67205364", "0.6716807", "0.67148036", "0.6714143", "0.67090863", "0.67077154", "0.67046666", "0.6701339", "0.67006236", "0.6699842", "0.66981244", "0.6694887", "0.6691074", "0.66904294" ]
0.0
-1
GENFIRST:event_btnRemoverActionPerformed TODO add your handling code here:
private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) { if (tblSecoes.getSelectedRow() >= 0){ if (JOptionPane.showConfirmDialog(RootPane, "Deseja Remover esta Seção?") == 0){ Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0); if (secoes.contains(secaoselect)){ secoes.remove(secaoselect); secoesapagar.add(secaoselect); } JOptionPane.showMessageDialog(RootPane, "Seção Removida com Sucesso!"); adicionasecaotable(); } } else { JOptionPane.showMessageDialog(RootPane, "Selecione uma Seção Por Favor!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeJButtonActionPerformed\n //remove current index from name and temp then redo edge and graph\n //check enabled\n int index = cityJList.getSelectedIndex();\n //determine if user still wants to delte employee\n int result = JOptionPane.showConfirmDialog(null, \"Are you sure you want\"\n + \" to delete city: \"\n + namesArray.get(index) + \" (\" + tempArray.get(index).get(0) \n + \", \" + tempArray.get(index).get(1) +\")?\",\n \"Delete City\", JOptionPane.YES_NO_OPTION);\n\n if(result == JOptionPane.YES_OPTION)\n {\n namesArray.remove(index);\n tempArray.remove(index);\n //make list of edges\n makeEdgeList(namesArray, tempArray);\n //make weighted graph object\n graph = new WeightedGraph(namesArray, edgeArray);\n loadJList();\n checkEnabled();\n clearStats();\n calculateJButton.doClick();\n }\n }", "private void removeStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n removeStudent();\n }", "public void actionPerformed(ActionEvent e)\n\t{\n\t\tview.removeButton();\n\t}", "public void buttonRemoveItem(ActionEvent actionEvent) {\n }", "private void removeJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeJMenuItemActionPerformed\n removeJButton.doClick();\n }", "private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_deleteButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n removeRow(rowIndex);\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tfileRemove1(DeviceNum1);\r\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\tdodelete();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "private void jButton_CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_CancelActionPerformed\n // TODO add your handling code here:\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdelete();\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tdelete();\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t Database.RemoveItem(Integer.toString(Database.IDs[table.getSelectedRow()]));\t\n\t\t\t\t Login.Refresh();\n\t\t\t }", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "@FXML\n\tvoid RemoveVisitor_Button_Clicked(ActionEvent event) {\n\t\tint index = listViewVisitors.getSelectionModel().getSelectedIndex();\n\t\tif (index == -1 || index == 0) {\n\t\t\tPopUp.showInformation(\"Visitor remove\", \"Visitor remove\", \"Please select one of the additional visitor\");\n\t\t\treturn;\n\t\t}\n\t\tif (listViewVisitors.getItems().size() == 2) {\n\t\t\tPlaceOrder_Button.setDisable(true);\n\t\t\tRemoveVisitor_Button.setDisable(true);\n\t\t}\n\t\tstringList.remove(listViewVisitors.getSelectionModel().getSelectedItem());\n\t\tvisitorsIDArray.remove(index);\n\t\tvisitorsCounter--;\n\t}", "private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }", "public void buttonRemoveTab(ActionEvent actionEvent) {\n }", "private void btnclearActionPerformed(java.awt.event.ActionEvent evt) {\n try\n {\n clearForm();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }", "private void clearBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearBtnMouseClicked\n clearFields();\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n }", "private void removeButtonClicked(View view) {\n\n }", "protected void removeButtonActionPerformed() {\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t// Initialize controller\n\t\tMenuController mc = new MenuControllerAdapter();\n\n\t\t// Get selected supply type\n\t\tSupply supply = null;\n\t\ttry {\n\t\t\tsupply = item.getSupply(supplyList.getSelectedIndex());\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\t\t}\n\t\t\n\t\t// Remove from item\n\t\ttry {\n\t\t\tmc.removeIngredient(item, supply);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\t\n\t\trefreshData();\n\t\t\n\t}", "private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }", "private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void removeFinalBtn()\n {\n if (finalListModel.size() <= 0)\n JOptionPane.showMessageDialog(null, \"Cannot remove more buttons\");\n else\n if(finalListModel.size() <= order.getSelectedIndex())\n JOptionPane.showMessageDialog(null, \"Sorry, try to pick the previous buttons first \");\n else\n finalListModel.remove(order.getSelectedIndex());\n }", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "private void btnCancelaActionPerformed(java.awt.event.ActionEvent evt) {\n this.dispose();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString RemoveOrder=\"Delete from UserFace1 where (ID=?)\";\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst=con.prepareStatement(RemoveOrder);\r\n\t\t\t\t\tst.setInt(1,Integer.parseInt(idField.getText()));\r\n\t\t\t\t\tint i = st.executeUpdate();\r\n //Executing MySQL Update Query\t\t\t\t\t\t+++++++++++++++++++++++\r\n if(i==1){\r\n JOptionPane.showMessageDialog(panel,\"Successfully Removed\");\r\n }\r\n \r\n refreshTable();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public static void deleteButtonActionPerformed(ActionEvent evt){\r\n yearField.setEditable(true);\r\n semesterChoice.setEnabled(true);\r\n mylist.empty();\r\n subjectCodes = new ArrayList<>();\r\n timeLabels = new ArrayList<>();\r\n schedulePanel.removeAll();\r\n schedulePanel.repaint();\r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel); \r\n }", "@FXML void Removebtnpushed1(ActionEvent event8) throws FileNotFoundException, IOException {\n\t try {\n\t Pane annunci[] = { Annuncio1, Annuncio2, Annuncio3};\n\t offerService.deleteOffer(TitleLabel.getText().toString(), eoEmail.getText().toString());\n\t annunci[0].setVisible(false);\n\t } catch (Exception e) {\n\t e.printStackTrace(); }\n\t}", "private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed\n\n AttlistTableModel tm = (AttlistTableModel) attrTable.getModel();\n \n int sel = attrTable.getSelectedRow();\n if (sel > -1) {\n tm.removeRow(sel);\n if (numRows() > 0) {\n if (sel <= numRows() - 1)\n attrTable.getSelectionModel().setSelectionInterval(sel,sel);\n else\n attrTable.getSelectionModel().setSelectionInterval(sel - 1, sel - 1);\n } else removeButton.setEnabled(false);\n }\n }", "private void deleteButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "private void jBtn_SupprimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_SupprimerActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Clients.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Client \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeClient.get(rowIndex).Suppression();\n try {\n tableClient();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n // Onglet Prospect\n else{\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Prospects.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Prospect \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeProspeect.get(rowIndex).Suppression();\n try {\n tableProspect();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n hideButton();\n }", "private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }", "public void Remove_button() {\n\t\tProduct product = (Product) lsvProduct.getSelectionModel().getSelectedItem();\n\t\tif (product!=null) {\n\t\t\tint ind = lsvProduct.getSelectionModel().getSelectedIndex();\n\t\t\tcart.removeProduct(product);\n\t\t\tcart.removePrice(ind);\n\t\t\tcart.removeUnit(ind);\n\t\t}\n\t\tthis.defaultSetup();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tremoveRowsIsSelected();\r\n\t\t\t\t\told_Num_Total=0;\r\n\t\t\t\t\tdeleteJButton.setEnabled(false);\r\n\t\t\t\t}", "private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n this.dispose();\n }", "public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\tinstr.setText(\"Previous content is removed.\");\r\n\t\t\tcanvas.arr = new int[8];\r\n\t\t\tcanvas.annotations.clear();\r\n\t\t\tcanvas.repaint();\r\n\t\t}", "private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed\n e=libCancion.getSelectedIndex();\n System.out.println(e);\n lista.remove(e); \n libCancion.setModel(lista);\n \n cancion.eliminarCancion(e);// TODO add your handling code here:\n i--;\n System.out.println(cancion.getSize());\n }", "private void deleteButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 1).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "public void removeEntry(ActionEvent event) {\n\t\tnewReport2.removeSample(table.getSelectionModel().getSelectedItem());\n\t\ttable.getItems().removeAll(table.getSelectionModel().getSelectedItem());\n\t\tif(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) {\n\t\t\tconclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t}", "@Override\r\n\tprotected ActionListener deleteBtnAction() {\n\t\treturn null;\r\n\t}", "private void delete_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_btnActionPerformed\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n if (remindersTable.getSelectedRow() == -1) {\n if (remindersTable.getRowCount() == 0) {\n dm.messageEmptyTable();\n } else {\n dm.messageSelectLine();\n }\n } else {\n int input = JOptionPane.showConfirmDialog(frame, \"Do you want to Delete!\");\n // 0 = yes, 1 = no, 2 = cancel\n if (input == 0) {\n model.removeRow(remindersTable.getSelectedRow());\n dm.messageReminderDeleted();// user message;\n saveDataToFile();// Save changes to file\n getSum(); // Update projected balance\n } else {\n // delete canceled\n }\n }\n }", "private void deleteJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteJMenuItemActionPerformed\n // TODO add your handling code here:\n int index = employeeJComboBox.getSelectedIndex();\n employeeJComboBox.removeItemAt(index);\n employees.remove(index);\n saveEmployee();\n clearAll();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}", "public void eliminarManoObra(ActionEvent actionEvent) {\r\n manoobraDao manobraDao = new manoobraDaoImpl();\r\n String msg;\r\n if (manobraDao.eliminarManoObra(this.manoobra.getCodigoManob())) {\r\n msg = \"Mano de Obra eliminada correctamente\";\r\n FacesMessage message1 = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message1);\r\n } else {\r\n msg = \"No se elimino la Mano de Obra\";\r\n FacesMessage message2 = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message2);\r\n }\r\n \r\n }", "public void removeBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tbtnRemove.addActionListener(listener);\r\n\t}", "public void actionPerformed(ActionEvent ae) {\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere eliminar esta cantidad de productos?\");\r\n if (i == 0) {\r\n eliminaBD();\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if(button.getText().equals(removeButton.getText()))\n {\n if(textItemName.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemName(textItemName.getText());\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,item.getId(),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() != 0 && textItemId.getText().length() != 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n if(item.getName().equals(textItemName.getText()))\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.MODIFY);\n dep.NotifyRemove(notification);\n noCorespondence.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n else\n {\n noCorespondence.setVisible(true);\n }\n }\n }\n\n }\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tfor(int i = 0; i <deleteButtons.size(); i++) {\n\t\t\t\t\t\tif(e.getSource() == deleteButtons.get(i)) {\n\t\t\t\t\t\t\tdutchList.remove(i + 1);\n\t\t\t\t\t\t\tdutchList.revalidate();\n\t\t\t\t\t\t\tsetSize(getSize().width, getSize().height - 40);\n\t\t\t\t\t\t\tdeleteButtons.remove(i);\n\t\t\t\t\t\t\tlist.remove(i + 1);\n\t\t\t\t\t\t\tSystem.out.println(deleteButtons.size());\n\t\t\t\t\t\t\tSystem.out.println(list.size());\n\t\t\t\t\t\t\tcalculateDutch();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "private void deleteButton6ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 5).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "public void setBtnRemove(JButton btnRemove) {\r\n\t\tthis.btnRemove = btnRemove;\r\n\t}", "private void deleteButton4ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 3).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void removeDialog(ArrayList<Order> listOrder) {\n\t\tJLabel rmLabelOrder = new JLabel(\"Order's id\");\n\t\trmLabelOrder.setSize(80,40);\n\t\trmLabelOrder.setLocation(100, 50);\n\t\tJTextField rmTextOrder = new JTextField();\n\t\trmTextOrder.setSize(250,40);\n\t\trmTextOrder.setLocation(250, 50);\n\t\tadd(rmLabelOrder);\n\t\tadd(rmTextOrder);\n\t\t\n\t\t// setup field Item for remove dialog\n\t\tJLabel rmLabelItem = new JLabel(\"Item's id\");\n\t\trmLabelItem.setSize(80,40);\n\t\trmLabelItem.setLocation(100, 120);\n\t\tJTextField rmTextItem = new JTextField();\n\t\trmTextItem.setSize(250,40);\n\t\trmTextItem.setLocation(250, 120);\n\t\tadd(rmLabelItem);\n\t\tadd(rmTextItem);\n\t\t\n\t\tokJButton.setSize(100,30);\n\t\tokJButton.setLocation(250,330);\n\t\tokJButton.setFocusPainted(false);\n\t\tadd(okJButton);\n\t\tokJButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsetVisible(false);\n\t\t\t\tif(rmLabelOrder.getText() == null || rmLabelItem == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Ban chua nhap thong tin\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tString strIdOrder = rmTextOrder.getText();\n\t\t\t\t\tString strIdItem = rmTextItem.getText();\n\t\t\t\t\tcheckTypeForRemove(strIdOrder, strIdItem);\n\t\t\t\t\t\n\t\t\t\t\tint idOrder = Integer.parseInt(rmTextOrder.getText());\n\t\t\t\t\tint idItem = Integer.parseInt(rmTextItem.getText());\n\t\t\t\t\t\n\t\t\t\t\tcheckIdOrderForRemove(idOrder, listOrder);\n\t\t\t\t\tcheckIdMediaForRemove(idItem, listOrder.get(idOrder -1));\n\t\t\t\t\t\n\t\t\t\t\tlistOrder.get(idOrder -1).removeMedia(idItem);\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Remove Item complete!\", \"Remove Item\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage(), \"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetVisible(true);\n\t}", "private void quitJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitJButtonActionPerformed\n // TODO add your handling code here:\n System.exit(0);\n }", "private void btnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalirActionPerformed\n this.dispose();\n }", "private void btnLimparActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void cancelButtonActionPerformed(ActionEvent e) {\n }", "private void deleteButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 4).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "public void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint a=JOptionPane.showConfirmDialog(null,\"Are you sure you want to delete this Complaint?\",\"Delete this Record?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n\t\t\t if(a==JOptionPane.YES_OPTION)\n\t\t\t {\n\t\t\t \ttry \n\t\t\t\t\t{\n\t\t\t\t\tString sql2=\"DELETE FROM ComplaintsData WHERE Customer_Name=?\";\t\n\t\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\t\tps=con.prepareStatement(sql2);\n\t\t\t\t\tps.setString(1,txtCustomerName.getText());\n\t\t\t\t\tps.executeUpdate();\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Complaint deleted successfully!\");\n\n\t\t\t\t\tclear();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e1) {}\n\t\t\t }\n\t\t\t\tshowData();\n\t\t\t}", "void remove(Control control);", "private void undoPopItemActionPerformed(java.awt.event.ActionEvent evt) {\n undoredo.undo();\n }", "private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonLimpiarActionPerformed\n txtMensaje.setText(\"\");\n letras();\n }", "private void deleteButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n PlanBuffer.setBuffer(\"\");\n PlanBuffer.setBuffer(this.list.get(this.page*6 + 2).getPlanID());\n String planID = PlanBuffer.getBuffer();\n PlanFunction.DeletePlanByPlanID(planID);\n this.dispose();\n PlanHomeCoach.run();\n }", "private void deleteButtonActionPerformed() {//GEN-FIRST:event_deleteButtonActionPerformed\r\n if (this.fileList.getSelectedIndex() >= 0) {\r\n this.controller.OnDeletePhoto(listFiles.get(fileList.getSelectedIndex()));\r\n } else {\r\n this.ShowErrorMessage(\"No file selected to delete\");\r\n }\r\n }", "private JButton getJBRemove()\n\t{\n\t\tif ( jBRemover == null )\n\t\t{\n\t\t\tjBRemover = new JButton(\"-\");\n\t\t\tjBRemover.setBounds(new Rectangle(166, 83, 50, 18));\n\n\t\t\tjBRemover.addActionListener(new ActionListener()\n\t\t\t{\n\t\t\t\tpublic void actionPerformed(final ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\t// Remove o registro selecionado\n\t\t\t\t\tfinal int index = jLstQtdRegistroBD.getSelectedIndex();\n\n\t\t\t\t\tif ( index >= 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlmResumo.remove(index);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jBRemover;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cbElPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tString eliminar=((String) cbElPuesto.getSelectedItem());\n\t\t\t\t\tSystem.out.println(eliminar);\n\t\t\t\t\tdata.setQuery(\"DELETE FROM TipoPuesto WHERE puesto='\"+eliminar+\"'\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tJOptionPane.showMessageDialog(btnEliminar,\"Eliminación exitosa\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}", "private void btnCancelActionPerformed(ActionEvent e) {\n processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n removebtn = new javax.swing.JLabel();\n addbtn = new javax.swing.JLabel();\n update = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(204, 204, 204));\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n removebtn.setBackground(new java.awt.Color(0, 51, 51));\n removebtn.setForeground(new java.awt.Color(153, 153, 153));\n removebtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n removebtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/emmas/car/lot/icons/icons8_denied_25px_1.png\"))); // NOI18N\n removebtn.setText(\"Remove\");\n removebtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n removebtn.setOpaque(true);\n removebtn.setPreferredSize(new java.awt.Dimension(19, 14));\n removebtn.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n removebtnMouseMoved(evt);\n }\n });\n removebtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n removebtnMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n removebtnMouseExited(evt);\n }\n });\n getContentPane().add(removebtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 30, 100, 30));\n\n addbtn.setBackground(new java.awt.Color(0, 51, 51));\n addbtn.setForeground(new java.awt.Color(153, 153, 153));\n addbtn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n addbtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/emmas/car/lot/icons/icons8_add_user_group_man_man_25px.png\"))); // NOI18N\n addbtn.setText(\"Add\");\n addbtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n addbtn.setOpaque(true);\n addbtn.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n addbtnMouseMoved(evt);\n }\n });\n addbtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n addbtnMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n addbtnMouseExited(evt);\n }\n });\n getContentPane().add(addbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 30, 100, 30));\n\n update.setBackground(new java.awt.Color(0, 51, 51));\n update.setForeground(new java.awt.Color(153, 153, 153));\n update.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n update.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/emmas/car/lot/icons/icons8_update_user_25px.png\"))); // NOI18N\n update.setText(\"Update\");\n update.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n update.setOpaque(true);\n update.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n updateMouseMoved(evt);\n }\n });\n update.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n updateMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n updateMouseExited(evt);\n }\n });\n getContentPane().add(update, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 30, 100, 30));\n\n jTable1.setAutoCreateRowSorter(true);\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Name \", \"Make\", \"Model\", \"Year\", \"Colour\", \"Plate no.\", \"Lincence no.\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false, false, true\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jTable1.setDoubleBuffered(true);\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 850, 400));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Select an Item to Delete\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 270, -1));\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/emmas/car/lot/icons/icons8_refresh_25px.png\"))); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 30, 50, 30));\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-6, -6, 630, 420));\n\n pack();\n setLocationRelativeTo(null);\n }", "private removeRow(){\n setTitle(\"Remove E-Book\");\n setSize(1920,1080);\n setLayout(new FlowLayout());\n setVisible(true);\n\n addWindowListener(new WindowAdapter() {\n public void windowClosing(WindowEvent windowEvent){\n dispose();\n } \n });\n\n //Fills the ComboBox with all of the E-Books. \n display = new Panel();\n Ebook = new Label(\"Pick a E-Book to remove:\");\n EBook[] listOfEBook = new EBook[books.getSpaceOccupied()];\n for(int i = 0; i < books.getSpaceOccupied(); i++) {\n listOfEBook[i] = (EBook)books.get(i);\n }\n listOfEBooks = new JComboBox<EBook>(listOfEBook);\n \n //Creates the Button to remove a E-Book.\n removeEBook = new Button(\"Remove\");\n removeEBook.addActionListener(new ActionListener(){ \n public void actionPerformed(ActionEvent e){\n try{\n if(listOfEBooks.getSelectedItem() == null)\n new errorWindow(\"No E-Book was selected\");\n else {\n //Removes E-book from the JTable and the Database.\n inputedEBook = (EBook)listOfEBooks.getSelectedItem();\n books.remove(inputedEBook);\n redemptionCodes.remove(inputedEBook.getRedemptionCode()+\",\");\n if(inputedEBook.getRedemptionStatus() == false)\n unredeemedEBooks.remove(inputedEBook);\n DefaultTableModel table = (DefaultTableModel)database.getModel();\n table.removeRow(inputedEBook.getRowLocation() - numberOfRowsRemoved);\n numberOfRowsRemoved++;\n dispose();\n }\n }catch(IOException ex){\n ex.printStackTrace();\n }\n }\n });\n\n display.add(Ebook);\n display.add(listOfEBooks);\n display.add(removeEBook);\n add(display);\n display.setVisible(true);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\tCleanScr();\n\t\t}", "public void buttonClick(ClickEvent event) {\n (subwindow.getParent()).removeWindow(subwindow);\n }", "private void btn_ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ExitActionPerformed\n System.exit(0);\n }", "private void btnDelete1ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {// GEN-FIRST:event_btnDelete1ActionPerformed\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tif (i >= 0) {\n\t\t\tint option = JOptionPane.showConfirmDialog(rootPane, \"Are you sure you want to Delete?\",\n\t\t\t\t\t\"Delete confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (option == 0) {\n\t\t\t\tTableModel model = tblBollard.getModel();\n\n\t\t\t\tString id = model.getValueAt(i, 0).toString();\n\t\t\t\tif (tblBollard.getSelectedRows().length == 1) {\n\t\t\t\t\t\n\t\t\t\t\tdelete(id,client);\n\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model1 = (DefaultTableModel) tblBollard.getModel();\n\t\t\t\t\tmodel1.setRowCount(0);\n\t\t\t\t\tfetch(client);\n\t\t\t\t\t//client.stopConnection();\n\t\t\t\t\tclear();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please select a row to delete\");\n\t\t}\n\t}", "public void actionPerformed(ActionEvent arg){\n\t\t\t\tif(editSuppIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tfor(Supplier supplier: suppliers){\n\t\t\t\t\t\tif(supplier.getId() == Integer.parseInt(editSuppIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\tlistOfSuppliers.removeElement(editSuppIdCombo.getSelectedItem().toString());\n\t\t\t\t\t\t\tsuppIdCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tsuppNameCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\teditSuppIdCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tsuppliers.remove(supplier);\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Supplier Deleted\");\n\t\t\t\t\t\t\teditSuppIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\teditSupplierName.setText(\"\");\n\t\t\t\t\t\t\teditSupplierAddress.setText(\"\");\n\t\t\t\t\t\t\teditSupplierEmail.setText(\"\");\n\t\t\t\t\t\t\teditSupplierPhone.setText(\"\");\n\t\t\t\t\t\t\teditSupplierDelivery.setText(\"\");\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}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Supplier.\");\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(final ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tfinal int index = jLstQtdRegistroBD.getSelectedIndex();\n\n\t\t\t\t\tif ( index >= 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tlmResumo.remove(index);\n\t\t\t\t\t}\n\n\t\t\t\t}", "private void exitJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitJButtonActionPerformed\n System.exit(0);\n }", "@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tint removeIndex = listdir.indexOf(rowb);\n\t\t\t\t\tlistdir.remove(removeIndex);\n\t\t\t\t\tgetView().getDireccion().removeRow(removeIndex + 1);\n\t\t\t\t}", "private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n dispose();\n }", "private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_exitButtonActionPerformed\n\tSystem.exit(0);\n }", "private void jbtn_deleteActionPerformed(ActionEvent evt) {\n\t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n\t\tint Selectedrow=jTable1.getSelectedRow();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n\t\t\tdeleteItem=JOptionPane.showConfirmDialog(this,\"Confirm if you want to delete the record\",\"Warning\",JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(deleteItem==JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tconn cc=new conn();\n\t\t\t\tpst=cc.c.prepareStatement(\"delete from medicine where medicine_name=?\");\n\t\t\t pst.setString(1,id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Record Updated\");\n\t\t\t\tupDateDB();\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}", "public void removeSimulasi(ActionEvent event) {\n SimulasiBean smb = (SimulasiBean) event.getComponent().getAttributes().get(\"itemDelete\");\n //setIdList((String)event.getComponent().getAttributes().get(\"itemDelete\"));\n System.out.println(smb.toString());\n listSImulasi.remove(smb);\n BigDecimal t = BigDecimal.ZERO;\n for (SimulasiBean o : listSImulasi) {\n t = t.add((BigDecimal) (o.charge));\n //t = t + (Integer) o.charge;\n }\n setTotal(t);\n }", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void removeRcmButtonHandler() {\n\t\tTitledBorder border = new TitledBorder(\" REMOVE RCM\");\n\t\tborder.setTitleFont(new Font(\"TimesNewRoman\", Font.BOLD, 12));\n\t\tdisplayPanel.setBorder(border);\n\t\t\n\t\tdisplayPanel.removeAll();\n\t\tdisplayPanel.add(new RemoveRcmPanel(rmos, rmosManager, statusManager));\n\t\tdisplayPanel.revalidate();\n\t\tdisplayPanel.repaint();\n\t}", "private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n }", "private void onRemoveClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\tif(!chart.removeStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"This student was not found.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\r\n\t}", "private void removeListener() {\n buttonPanel.getRemoveTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")) {\n toDoList.removeTask(i);\n }\n }\n refresh();\n }\n });\n }", "private void deleteBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseClicked\n\n String id = searchidTxt.getText();\n try {\n\n String Query = \"DELETE from stock where Product_ID =?\";\n\n pstm = con.prepareStatement(Query);\n pstm.setInt(1, Integer.parseInt(id));\n pstm.executeUpdate();\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ID Not Found \");\n }\n //Refresh Table\n refTable();\n\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n //Clear all Fields\n clearFields();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jTextField1 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Eliminar Incidencies\");\n setResizable(false);\n addWindowFocusListener(new java.awt.event.WindowFocusListener() {\n public void windowGainedFocus(java.awt.event.WindowEvent evt) {\n formWindowGainedFocus(evt);\n }\n public void windowLostFocus(java.awt.event.WindowEvent evt) {\n }\n });\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Titol\", \"Descripcio\", \"Zona\", \"User\", \"Data\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jLabel1.setText(\"Segur que vols eliminar?\");\n\n jButton4.setText(\"Sí\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Cercar\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Eliminar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Enrere\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(90, 90, 90)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(18, 18, 18)))\n .addGap(16, 16, 16))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 12, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jButton4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2)\n .addComponent(jButton1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton3)\n .addContainerGap())))\n );\n\n pack();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}", "private void rSButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n int p=JOptionPane.showConfirmDialog(null,\"Are You Sure\",\"Delete\",JOptionPane.YES_NO_OPTION);\n if(p==0){\n String sql=\"delete from book where book_id=?\";\n try{\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.setString(1,jtext8.getText());\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Deleted\");\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }update();\n refresh2();\n }", "private JButton createRemoveResourceButton() {\n\n removeResourceBtn = new JButton(\"Remove\");\n removeResourceBtn.setEnabled(false);\n removeResourceBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n try {\n\n int index = resourcesJList.getSelectedIndex();\n\n if (controller.removeResource(index)) {\n updateResourcesList();\n String successMessage = \"Resource removed successfully!\";\n String successTitle = \"Resource removed.\";\n\n JOptionPane.showMessageDialog(rootPane, successMessage, successTitle, JOptionPane.INFORMATION_MESSAGE);\n } else {\n\n throw new IllegalArgumentException();\n }\n } catch (Exception ex) {\n\n String warningMessage = \"Something wen't wrong please try again.\";\n String warningTitle = \"ERROR 404\";\n\n JOptionPane.showMessageDialog(rootPane, warningMessage, warningTitle, JOptionPane.WARNING_MESSAGE);\n }\n\n removeResourceBtn.setEnabled(!resourcesJList.isSelectionEmpty());\n }\n });\n return removeResourceBtn;\n }", "private void Button_PlusMinusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_PlusMinusActionPerformed\n // TODO add your handling code here:\n }", "private void resetBtn1ActionPerformed(java.awt.event.ActionEvent evt) {\n resetBtnActionPerformed();\n }", "public void handleRemoveItem(ActionEvent actionEvent) {\n\t\tString id = txtDisID.getText();\n\n\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t\talert.setTitle(\"Confirmation Dialog\");\n\t\talert.setHeaderText(\"Are you sure, you want to remove this item?\");\n\t\talert.setContentText(\"this item will remove permanently from the database.\");\n\n\t\tif(!id.isEmpty() && id != null){\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK){\n\t\t\t\ttry {\n\t\t\t\t\tItemDAO.deleteItemById(id);\n\t\t\t\t\trefreshTable();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tExp.displayException(e);\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\tExp.displayException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Error\");\n\t\t\talert.setHeaderText(\"There is no selected item to Remove\");\n\t\t\talert.setContentText(\"Please select the item before remove !\");\n\n\t\t\talert.showAndWait();\n\t\t}\n\t}", "public abstract void removedFromWidgetTree();", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }" ]
[ "0.7400088", "0.73932374", "0.7340655", "0.71342355", "0.7099498", "0.69693196", "0.6968223", "0.6874113", "0.6747596", "0.6747596", "0.67355907", "0.67339146", "0.67267305", "0.67156255", "0.6700432", "0.6665", "0.66259015", "0.6621719", "0.6608114", "0.65946996", "0.6590357", "0.6588859", "0.6576083", "0.6565592", "0.65639704", "0.6558019", "0.654349", "0.65310496", "0.6529728", "0.6525001", "0.65232176", "0.65048563", "0.64976853", "0.6471976", "0.64566845", "0.6455596", "0.64388204", "0.64291006", "0.6414142", "0.639428", "0.63852304", "0.6384689", "0.6384401", "0.6375746", "0.6374972", "0.6358386", "0.6353727", "0.63428706", "0.6337166", "0.6328312", "0.631746", "0.6297599", "0.6289366", "0.62870055", "0.62788653", "0.62671345", "0.6260312", "0.625661", "0.6256281", "0.62490547", "0.6244905", "0.6227493", "0.6224942", "0.6222194", "0.6214924", "0.6208226", "0.62059623", "0.6205826", "0.62028724", "0.619843", "0.6197714", "0.6195998", "0.6186084", "0.61652356", "0.61538035", "0.614818", "0.61348283", "0.6132514", "0.61280274", "0.61259717", "0.61253625", "0.61222935", "0.6117762", "0.6109228", "0.6104829", "0.6103928", "0.61029637", "0.6101046", "0.6099026", "0.6096751", "0.6096463", "0.60877186", "0.6087205", "0.6081633", "0.60795474", "0.6079235", "0.60783523", "0.60761803", "0.6074775", "0.607212" ]
0.7253109
3
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_commonone, menu); MenuItem item3 = menu.findItem(R.id.messager); MenuItem item4 = menu.findItem(R.id.search); item3.setIcon(R.drawable.openmessage); item4.setIcon(R.drawable.search); try{ if (loggedIn.equals("noValue")) { item3.setVisible(false); } else { item3.setVisible(true); }} catch (Exception e){ } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, 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 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\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 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}", "@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 }", "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\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\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\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 boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\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 boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }" ]
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644464", "0.68644464", "0.68644464", "0.6855815", "0.68494046", "0.68220186", "0.68183845", "0.68154365", "0.6815009", "0.6815009", "0.68082577", "0.6802161", "0.68002385", "0.67936224", "0.67918605", "0.679087", "0.67849934", "0.6760954", "0.67599845", "0.67507833", "0.67461413", "0.67461413", "0.67431796", "0.67413616", "0.6728648", "0.672732", "0.67251813", "0.67251813", "0.67232496", "0.67152804", "0.67092025", "0.67071015", "0.6702423", "0.6701286", "0.66991764", "0.66969806", "0.66888016", "0.66863585", "0.6686101", "0.6686101", "0.66828436", "0.6681769", "0.6679519", "0.6671908", "0.66700244", "0.6665301", "0.66587126", "0.66587126", "0.66587126", "0.6658098", "0.66570866", "0.66570866", "0.66570866", "0.665458", "0.66533303", "0.66528934", "0.66513336", "0.66495234", "0.66490155", "0.6648172", "0.6648159", "0.6647816", "0.6647625", "0.6645882", "0.66453695", "0.66441536", "0.66413796", "0.66374624", "0.66360414", "0.6635178", "0.66346484", "0.66346484", "0.66346484", "0.6632149", "0.66308904", "0.66287386", "0.66283447", "0.6627003", "0.6624185", "0.6621111", "0.662078" ]
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.messager) { if (loggedIn.equals("noValue")) { Toast.makeText(this, "Please log in to continue.", Toast.LENGTH_SHORT).show(); } else { Notifications not = new Notifications(); Log.d("value", "bookname1"); Intent in = new Intent(getBaseContext(), Notifications.class); startActivity(in); } } if (id == R.id.search) { Intent intent = new Intent(this, SearchAllData.class); startActivity(intent); } //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } switch (item.getItemId()) { case android.R.id.home: onBackPressed(); 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 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 // 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 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\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7905288", "0.7806507", "0.7767581", "0.7728288", "0.76327986", "0.7622734", "0.75856835", "0.7531844", "0.74890584", "0.74584335", "0.74584335", "0.7439769", "0.7422939", "0.7404292", "0.7392902", "0.7388083", "0.73805684", "0.7371689", "0.7363277", "0.73572534", "0.7346885", "0.7342883", "0.73314273", "0.73297995", "0.73268855", "0.73201936", "0.73177755", "0.73149055", "0.73053724", "0.73053724", "0.730291", "0.7299442", "0.7294618", "0.72880965", "0.7284496", "0.728212", "0.72798574", "0.72611254", "0.72611254", "0.72611254", "0.7260998", "0.7260716", "0.72512007", "0.72250247", "0.7220824", "0.721851", "0.72057116", "0.7201987", "0.72011137", "0.7194394", "0.7186605", "0.7178953", "0.7169934", "0.71687484", "0.71550834", "0.7154791", "0.7137151", "0.71361125", "0.71361125", "0.7130695", "0.7130134", "0.7125464", "0.71246445", "0.7124545", "0.7123362", "0.71184117", "0.71183425", "0.71183425", "0.71183425", "0.71183425", "0.71182", "0.7117654", "0.7116174", "0.71136016", "0.71110356", "0.71100533", "0.71068156", "0.7101081", "0.7099488", "0.7096844", "0.7094867", "0.7094867", "0.708774", "0.70838696", "0.7082184", "0.7081503", "0.7074928", "0.7069543", "0.70631075", "0.7061777", "0.70614165", "0.7052532", "0.70387715", "0.70387715", "0.703725", "0.70366216", "0.70366216", "0.7033842", "0.703188", "0.7030853", "0.70202804" ]
0.0
-1
Sends a toast to the user stating that the request has been redirected, likely due to an issue with their internet connection requiring login, and that they should check that as well.
public static void sendRedirectionToast(final Context context) { Toast.makeText(context, R.string.redirected, Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onFailureRedirection(String errorMessage);", "@Override\n public void onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending upon internet connectivity was a reason for failure or something else..\n if(ConstantsDefined.isOnline(ForgotPassword.this)){\n Toast.makeText(ForgotPassword.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(ForgotPassword.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "@Override\r\n public void onFailureRedirection(String errorMessage) {\r\n try {\r\n mUtility.stopLoader();\r\n mUtility.showSnackBarAlert(findViewById(R.id.container), errorMessage, false);\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "@Override\n\t\t\t\t\tpublic boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "private void ShowNoInternetConnection(){\n StopWhaitSpinner();\n //There was an error show error message\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.recconnecting_request)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n }", "@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }", "@Override\n public void onErrorResponse(VolleyError arg0) {\n\n Log.d(\"Error\", \"------------\" + arg0);\n\n closeProgress();\n\n showToast(getString(R.string.need_log_in));\n\n// showAlertDialog(getString(R.string.error));\n }", "@Override\n public void onErrorResponse(VolleyError arg0) {\n\n Log.d(\"Error\", \"------------\" + arg0);\n\n closeProgress();\n\n showToast(getString(R.string.need_log_in));\n\n// showAlertDialog(getString(R.string.error));\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exeption)\n\t\t\tthrows IOException, ServletException {\n\t\t\n\t\tgetRedirectStrategy().sendRedirect(request, response, getDefaultTargetUrl() );\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void handleDownloadFailure(){\n Toast.makeText(this,\n \"Could not establish connection to service.\\n\" +\n \"Please check your internet connection and \\n\" +\n \"make sure internet permissions are granted.\",\n Toast.LENGTH_LONG\n ).show();\n }", "@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error){\n Toast.makeText(getApplicationContext(), \"Your Internet Connection May not be active Or \" + error , Toast.LENGTH_LONG).show();\n\n }", "void showForbiddenErrorSnackbar();", "void sendRedirect(HttpServletResponse response, String location) throws AccessControlException, IOException;", "void onSuccessRedirection(Response object, int taskID);", "public final void checkNetworkConnection() {\n if (InternetUtil.INSTANCE.isInternetOn()) {\n login();\n return;\n }\n String string = getResources().getString(C2723R.string.bdt_lbl_msg_prd_network_error);\n Intrinsics.checkExpressionValueIsNotNull(string, \"resources.getString(R.st…bl_msg_prd_network_error)\");\n Context_ExtensionKt.showToast(this, string);\n InternetUtil.INSTANCE.observe(this, new OldBDTLoginActivity$checkNetworkConnection$1(this));\n }", "@Override\n public void onFailure(Call call, IOException e) {\n TemoignageActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(TemoignageActivity.this, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }", "void onFailureRedirection(ErrorModel errorModel);", "@Override\n public void onFailure(Call<ChallengeResponse> call, Throwable t) {\n Toast.makeText(getBaseContext(), \"Please check your connection!\", Toast.LENGTH_LONG).show();\n finish();\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(LoginActivity.this, R.string.wangluo, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\tpublic boolean isRedirect() {\n\t\treturn false;\r\n\t}", "@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "private void promptInternetConnect() {\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n builder.setTitle(R.string.title_alert_no_intenet);\n builder.setMessage(R.string.msg_alert_no_internet);\n String positiveText = getString(R.string.btn_label_refresh);\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n //Block the Application Execution until user grants the permissions\n if (startStep2(dialog)) {\n //Now make sure about location permission.\n if (checkPermissions()) {\n //Step 2: Start the Location Monitor Service\n //Everything is there to start the service.\n startStep3();\n } else if (!checkPermissions()) {\n requestPermissions();\n }\n }\n }\n });\n android.support.v7.app.AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void redirectToAccessDeniedPage()\n throws IllegalArgumentException, IOException {\n HttpServletRequest request = JSFUtils.getRequest();\n HttpServletResponse response = JSFUtils.getResponse();\n String relativePath = BaseBean.MARKETPLACE_ACCESS_DENY_PAGE;\n JSFUtils.sendRedirect(response,\n request.getContextPath() + relativePath);\n }", "@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\t\tToast.makeText(GetPersonalInfoActivity.this, \"网络连接异常!\",\n\t\t\t\t\t\t\t\t1000).show();\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n if (response.equalsIgnoreCase(\"success\")) {\n //dismissing the progressbar\n //pDialog.dismiss();\n //Starting a new activity\n startActivity(new Intent(SignUpNewActivity.this, LoginActivity.class));\n\n } if (response.equalsIgnoreCase(\"failed\")){\n //Displaying a toast if the otp entered is wrong\n Toast.makeText(SignUpNewActivity.this, \"Wrong Code Please Try Again\", Toast.LENGTH_LONG).show();\n\n }\n }", "@Override\r\n\tpublic void onOffline() {\n\t\tShowToast(\"您的账号已在其他设备上登录!\");\r\n\t\tstartActivity(new Intent(this, Login.class));\r\n\t\tfinish();\r\n\t}", "@Override\n public void onFailure(int statusCode , Header[] headers , String responseString , Throwable throwable)\n {\n if (!TextUtils.isEmpty(responseString))\n {\n YARToast.showDefault(MainApplication.getInstance(), responseString);\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Context context = getApplicationContext();\n CharSequence text = \"Erreur lors de la connexion ! Veuillez recommencer\";\n\n Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG);\n toast.show();\n }", "private void showErrorPage() {\n setContentView(R.layout.main);\n\n // The specified network connection is not available. Displays error message.\n WebView myWebView = (WebView) findViewById(R.id.webview);\n myWebView.loadData(getResources().getString(R.string.connection_error),\n \"text/html\", null);\n }", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "@Override\n public void failure(RetrofitError retrofitError) {\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }", "public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}", "public void onError(Context context,Response<T> response,String originSource){\n if (response.getException() instanceof SocketTimeoutException){\n Toast.makeText(context, originSource+\"连接超时\", Toast.LENGTH_SHORT).show();\n }\n String location = \"\";\n if (response.getRawResponse() != null){\n location = response.getRawResponse().header(\"Location\");\n }\n //Auto login\n if (response.code() == 302 && list.contains(location)){\n Toast.makeText(context, \"请登录!\", Toast.LENGTH_SHORT).show();\n context.startActivity(new Intent(context, LoginActivity.class));\n }else if (response.getException() instanceof ProtocolException || response.getException() instanceof IndexOutOfBoundsException){\n if (response.getRawResponse() == null || response.getRawResponse().request().url().toString().equals(\"http://sc.sit.edu.cn/private/menu/menu.action\")){\n Toast.makeText(context, \"请登录!\", Toast.LENGTH_SHORT).show();\n context.startActivity(new Intent(context, LoginActivity.class));\n }\n }\n\n //Throw netresult\n NetResult netResult = null;\n if (response.body() == null){\n netResult = new NetResult<String>(null,response.code());\n netResult.setMsg(\"请求返回空值\");\n }else {\n netResult = (NetResult) response.body();\n netResult.setCode(response.code());\n netResult.setMsg(response.message());\n }\n\n onError(netResult);\n }", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"INTERNET\", error.toString());\n\n toastIt(\"Internet Failure: \" + error.toString());\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"INTERNET\", error.toString());\n\n toastIt(\"Internet Failure: \" + error.toString());\n }", "void onSuccessRedirection(int taskID);", "public void networkError() {\n Context context = getActivity();\n if (context == null) {\n return;\n }\n\n showToast(context.getString(R.string.status_network_error), Toast.LENGTH_LONG);\n }", "@Override\n public void onFailure(Auth0Exception error) {\n showNextActivity();\n }", "private static void returnNotMove(HttpServletResponse response, String url) throws IOException {\n try {\n response.sendRedirect(url);\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "private boolean processRedirectResponse(HttpConnection conn) {\n\n if (!getFollowRedirects()) {\n LOG.info(\"Redirect requested but followRedirects is \"\n + \"disabled\");\n return false;\n }\n\n //get the location header to find out where to redirect to\n Header locationHeader = getResponseHeader(\"location\");\n if (locationHeader == null) {\n // got a redirect response, but no location header\n LOG.error(\"Received redirect response \" + getStatusCode()\n + \" but no location header\");\n return false;\n }\n String location = locationHeader.getValue();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirect requested to location '\" + location\n + \"'\");\n }\n\n //rfc2616 demands the location value be a complete URI\n //Location = \"Location\" \":\" absoluteURI\n URI redirectUri = null;\n URI currentUri = null;\n\n try {\n currentUri = new URI(\n conn.getProtocol().getScheme(),\n null,\n conn.getHost(), \n conn.getPort(), \n this.getPath()\n );\n redirectUri = new URI(location.toCharArray());\n if (redirectUri.isRelativeURI()) {\n if (isStrictMode()) {\n LOG.warn(\"Redirected location '\" + location \n + \"' is not acceptable in strict mode\");\n return false;\n } else { \n //location is incomplete, use current values for defaults\n LOG.debug(\"Redirect URI is not absolute - parsing as relative\");\n redirectUri = new URI(currentUri, redirectUri);\n }\n }\n } catch (URIException e) {\n LOG.warn(\"Redirected location '\" + location + \"' is malformed\");\n return false;\n }\n\n //check for redirect to a different protocol, host or port\n try {\n checkValidRedirect(currentUri, redirectUri);\n } catch (HttpException ex) {\n //LOG the error and let the client handle the redirect\n LOG.warn(ex.getMessage());\n return false;\n }\n\n //invalidate the list of authentication attempts\n this.realms.clear();\n //remove exisitng authentication headers\n removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP); \n //update the current location with the redirect location.\n //avoiding use of URL.getPath() and URL.getQuery() to keep\n //jdk1.2 comliance.\n setPath(redirectUri.getEscapedPath());\n setQueryString(redirectUri.getEscapedQuery());\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirecting from '\" + currentUri.getEscapedURI()\n + \"' to '\" + redirectUri.getEscapedURI());\n }\n\n return true;\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n\n Log.i(TAG,\"An error occurred\" +e.getMessage());\n String exception=e.getMessage();\n int index=exception.indexOf(\":\");\n String data=exception.substring(index+1).trim();\n showMessage(\"Error\",data,R.drawable.ic_error_dialog);\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n progressBar.setVisibility(View.GONE);\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }", "@Test(expected = java.io.IOException.class)\n\tpublic void testSendRedirect_3()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = true;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}", "@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tif(progressDialog!=null)progressDialog.dismiss();\n\t\t\t\tshowShortToast(\"获取失败,请检查网络连接\");\n\t\t\t}", "@Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n Logger.write(t.getMessage());\n MyUtils.showConnectionErrorToast(getActivity());\n DialogUtils.closeProgress();\n }", "@Override\n public void onFailure(Auth0Exception error) {\n showNextActivity();\n }", "@Override\n public void sendRedirect(String arg0) throws IOException {\n\n }", "@Override\n public void onFailure(Throwable caught) {\n Window.alert(\"ERROR from SERVER !!!\");\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '400'\n if(statusCode == 400){\n Toast.makeText(getApplicationContext(), \"Error Creating Donation!!\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 400, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }", "@Override\n\t\t\tpublic void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) {\n\t\t\t\t\n\t\t\t\tnew Handler().postDelayed(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t//\t\t\t\tIntent intent = new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),LoginActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tdissmissDilog();\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}, 3000);\n\t\t\t}", "@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void doWhenNetworkCame() {\n doLogin();\n }", "protected void _showFallbackOtp() {\n finish();\n AuthenticationActivityGroup group = (AuthenticationActivityGroup)getParent();\n Intent fallbackIntent = new Intent(this, AuthenticationFallbackActivity.class);\n group.startChildActivity(\"AuthenticationFallbackActivity\", fallbackIntent);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), \"Server not connected\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t\t}", "@Override\n public void failure(RetrofitError error) {\n\n Toast.makeText(getApplicationContext(),\"PLEASE CHECK INTERNET\",Toast.LENGTH_LONG).show();\n }", "public void sendRedirect(String url) throws IOException{\r\n\t\tif(containsHeader(\"_grouper_loggedOut\") && url.indexOf(\"service=\") > -1) {\r\n\t\t\turl = url + \"&renew=true\";\r\n\t\t\t//url = url.replaceAll(\"&renew=false\",\"renew=true\");\r\n\t\t}\r\n\t\tsuper.sendRedirect(url);\r\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast.makeText(Commissioner.this, getString(R.string.servernotconnect) + \"->\" + error.getMessage().toString(), Toast.LENGTH_LONG).show();\n\n }", "@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "protected void redirectToLogin(HttpServletRequest req, HttpServletResponse res) throws IOException\n {\n// RequestDispatcher lRd = getServletContext().getRequestDispatcher(\"/servlet/common.SvtLogoutHandler\");\n// try \n// {\n//\t req.setAttribute(\"EXTRANET_METHOD\", \"GET\");\n//\t lRd.forward(req, res);\n// } \n// catch(Throwable e) \n// {\n//\t throw new ServletException(getClass().toString() + \".doGet(): Could not forward to target URL.\\n\" + e);\n// }\n //issue # 2191 this method throws an IllegalStateException if we use \n //a forward\n res.sendRedirect(req.getScheme()+\"://\"+req.getServerName()+\":\"+req.getServerPort()+\"/servlet/common.SvtLogoutHandler\");\n }", "public static void redirect(HttpServletRequest req,\n HttpServletResponse resp, String redirectUrl) throws IOException {\n String isAJAXRequest = req.getParameter(\"AJAXRequest\"); // parameter\n if (isAJAXRequest == null) {\n resp.sendRedirect(redirectUrl);\n } else {\n resp.sendError(FOUR_O_ONE,\n \"Not Authorized to view the requested component\");\n }\n }", "@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.No_Internet_Connection, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}", "private boolean sendHTTPRedirectMessage(String location,\n String gapCookie, String locationCookie)\n {\n HTTPRespHdr resp = _httpRespHdr;\n\n /*\n * Create a reply with a 307 (HTTP/1.1) or 302 reply code.\n */\n if (_req.requestHdr.getVersionNumber() == 1.0) {\n _req.responseStatus = 302;\n\n resp.init( \"HTTP/1.0\", 302, \"Moved Temporarily\" );\n resp.addHeader( \"Location\", location );\n resp.addHeader( \"Content-Type\", \"text/html\" );\n }\n else {\n _req.responseStatus = 307;\n\n resp.init( \"HTTP/1.1\", 307, \"Temporary Redirect\" );\n\t \n /*\n * Put Location: right after status line so hopefully the stupid\n * Mozilla 0.6 will read it correctly (apparently it can't deal\n * with a response that is not delivered to it in a single\n * read() on the TCP socket).\n */\n resp.addHeader( \"Location\", location );\n\n resp.addHeader(\"Server\", GlobeRedirector.SERVER_NAME);\n setCurrentDate(_date);\n resp.addHeader(\"Date\", _httpDateFormatter.format(_date));\n resp.addHeader( \"Content-Type\", \"text/html\" );\n\n /*\n * 307 responses are not cachable by default, so we add an Expires:\n * header to have it cached for a while.\n */\n setExpiresDate(_date, 1000 * _config.getHTTPExpires());\n resp.addHeader(\"Expires\", _httpDateFormatter.format(_date));\n\n // Netscape Enterprise puts location here\n // resp.addHeader( \"Location\", location );\n\n resp.addHeader( \"Connection\", \"close\" );\n }\n\n if (gapCookie != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"writing GAP cookie: \" + gapCookie);\n }\n resp.addHeader(\"Set-Cookie\", gapCookie);\n }\n\n if (locationCookie != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"writing location cookie: \" + locationCookie);\n }\n resp.addHeader(\"Set-Cookie\", locationCookie);\n }\n\n // both 1.0 and 1.1 want a little message just in case\n String body = null;\n if (!_req.requestHdr.getMethod().toUpperCase().equals( \"HEAD\" )) {\n // message for ancient browsers\n\n // reset string buffer\n _strBuf.setLength(0);\n _strBuf.append(\"<HEAD><TITLE>Temporary Redirect</TITLE></HEAD>\\n\"\n + \"<BODY><H1> Temporary Redirect </H1>\\n\"\n + \"You are being redirected to <A HREF=\\\"\");\n _strBuf.append(location);\n _strBuf.append(\"\\\">\");\n _strBuf.append(location);\n _strBuf.append(\"</A>.</BODY>\");\n body = _strBuf.toString();\n }\n\n try {\n DataOutputStream cliOut = _req.connection.getOutputStream();\n\n resp.write(cliOut);\n if (body != null) {\n cliOut.write( body.getBytes() );\n _req.bytesSent = body.length();\n }\n else {\n _req.bytesSent = 0;\n }\n cliOut.flush();\n return true;\n }\n catch( IOException e ) {\n logError(\"Cannot send HTTP redirect message\" + getExceptionMessage(e));\n return false;\n }\n }", "@Override\n\tpublic void sendRedirect(String location) throws IOException {\n\t}", "@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if (statusCode == 404) {\n Toast.makeText(getApplicationContext(),\n \"Requested resource not found\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n Toast.makeText(getApplicationContext(),\n \"Something went wrong at server end\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else {\n Toast.makeText(\n getApplicationContext(),\n \"Error Occured n Most Common Error: n1. Device not connected to Internetn2. Web App is not deployed in App servern3. App server is not runningn HTTP Status code : \"\n + statusCode, Toast.LENGTH_LONG)\n .show();\n }\n }", "public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n\n // Showing error message if something goes wrong.\n Snackbar snackbar = Snackbar\n .make(coordinatorLayout, \"No internet connection!\", Snackbar.LENGTH_LONG)\n .setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(Color.RED);\n\n // Changing action button text color\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n\n snackbar.show();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onError(Exception e) {\n\t\t\t\t\t\t\t\tToast.makeText(mActivity, \"登录失败\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tPlatformJinliLoginAndPay.getInstance().isLogined = false;\n\t\t\t\t\t\t\t}", "@Override\n public void onFailure(HttpException arg0, String arg1) {\n mProgressDialog.setMessage(\"下载失败\");\n mProgressDialog.dismiss();\n enterHome();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.v(\"tag\", \"request fail\");\n error.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Login Request Fail\", Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onHTTPerror(String tag) {\n progressDialog.cancel();\n CharSequence text = \"C'è stato un problema, riprova!\";\n Toast toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\r\n public void onErrorResponse(VolleyError error) {\r\n Toast.makeText(RegistrationLogin.this, \"A problem occurred\", Toast.LENGTH_SHORT).show();\r\n }", "void redirect();", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "private void authFailed() {\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onPermissionGranted() {\n Timer t = new Timer();\n boolean checkConnection = new ApplicationUtility().checkConnection(SplashActivity.this);\n if (checkConnection) {\n t.schedule(new splash(), 3000);\n Toast.makeText(SplashActivity.this,\n \"Internet permission granted\", 3000).show();\n } else {\n Toast.makeText(SplashActivity.this,\n \"connection not found...plz check connection\", 3000).show();\n t.schedule(new splash(), 3000);\n }\n }", "@Override\n public void onFailure(int code, String msg) {\n Toast.makeText(RegisterActivity.this,\"登录失败:\"+msg,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), Settings.getword(getActivity(),\"server_not_connected\"), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onFailure(Throwable caught) {\n Window.alert(\"ERROR from SERVER\");\n }", "public void loginClicked(View view) {\r\n final String username = ((EditText) findViewById(R.id.login_username)).getText().toString();\r\n final String password = ((EditText) findViewById(R.id.login_password)).getText().toString();\r\n //show some progress dialog when getting the information from the internet\r\n //done in an AsyncTask to avoid blocking the UI thread\r\n new AsyncTask<Void, Void, Void>() {\r\n ProgressDialog progressDialog;\r\n Data.NetworkRequest result = Data.NetworkRequest.Failure;\r\n\r\n @Override\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n progressDialog = new ProgressDialog(LoginActivity.this);\r\n progressDialog.setIndeterminate(true);\r\n progressDialog.setTitle(\"Logging in\");\r\n progressDialog.setMessage(\"Please wait while we log you in\");\r\n progressDialog.setCancelable(false);\r\n progressDialog.show();\r\n }\r\n\r\n @Override\r\n protected Void doInBackground(Void... params) {\r\n result = Data.validateLogin(username, password);\r\n return null;\r\n }\r\n\r\n @Override\r\n protected void onPostExecute(Void aVoid) {\r\n super.onPostExecute(aVoid);\r\n progressDialog.dismiss();\r\n if(result == Data.NetworkRequest.Failure) {\r\n new AlertDialog.Builder(LoginActivity.this)\r\n .setTitle(\"Invalid username or password\")\r\n .setMessage(\"Please check your username and password\")\r\n .setCancelable(false)\r\n .setPositiveButton(\"OK\", null)\r\n .create()\r\n .show();\r\n }\r\n else if(result == Data.NetworkRequest.UnableToConnect) {\r\n new AlertDialog.Builder(LoginActivity.this)\r\n .setTitle(\"Unable to connect\")\r\n .setMessage(\"Unable to connect to the internet. Please check your internet connection and try again\")\r\n .setCancelable(false)\r\n .setPositiveButton(\"OK\", null)\r\n .create()\r\n .show();\r\n }\r\n else if(result == Data.NetworkRequest.Success) {\r\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\r\n startActivity(intent);\r\n }\r\n }\r\n }.execute();\r\n }", "@Override\n\tprotected boolean onLoginFailure(AuthenticationToken token,\n\t\t\tAuthenticationException ae, ServletRequest request,\n\t\t\tServletResponse response) {\n\t\t// is user authenticated or in remember me mode ?\n\t\tSubject subject = getSubject(request, response);\n\t\tif (subject.isAuthenticated() || subject.isRemembered()) {\n\t\t\ttry {\n\t\t\t\tissueSuccessRedirect(request, response);\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"Cannot redirect to the default success url\", e);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tWebUtils.issueRedirect(request, response, failureUrl);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.error(\"Cannot redirect to failure url : {}\", failureUrl,\n\t\t\t\t\t\te);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.65593886", "0.6278014", "0.614524", "0.6142653", "0.6095078", "0.60688585", "0.58350265", "0.5800186", "0.5774887", "0.57418805", "0.57418805", "0.57290846", "0.57290846", "0.56884", "0.56475335", "0.56405044", "0.5630546", "0.5624369", "0.56193936", "0.5615833", "0.5606096", "0.5603079", "0.5585722", "0.55750245", "0.55728066", "0.55728066", "0.5571289", "0.5539313", "0.5528108", "0.5524998", "0.5520759", "0.55185413", "0.55122066", "0.5504465", "0.55002886", "0.5480725", "0.54674995", "0.54673517", "0.54572463", "0.5456856", "0.54528356", "0.54350996", "0.5427192", "0.54225934", "0.54213107", "0.5416587", "0.54116184", "0.54116184", "0.5410191", "0.54096925", "0.54019403", "0.5400116", "0.53938174", "0.5384688", "0.5383152", "0.5383072", "0.5381547", "0.53807384", "0.53783655", "0.537784", "0.5371724", "0.5369081", "0.5359785", "0.53523344", "0.5350752", "0.5350465", "0.53498834", "0.5348227", "0.53474224", "0.534664", "0.5336401", "0.5335329", "0.53333265", "0.53315264", "0.53315264", "0.5315006", "0.5309321", "0.53045356", "0.5303399", "0.53028435", "0.5297147", "0.52965206", "0.52944773", "0.52940345", "0.5291136", "0.52900714", "0.528981", "0.528719", "0.5286615", "0.5284774", "0.52786857", "0.5276593", "0.5276593", "0.52752495", "0.5273842", "0.52693427", "0.5260715", "0.5259299", "0.5257779", "0.52497923" ]
0.6412974
1
Resets just the dates to the default, today and today + 1.
public static void resetDates() { arrivalDate = LocalDate.now(); departureDate = arrivalDate.plusDays(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}", "public void reset(){\r\n maxDate = null;\r\n minDate = null;\r\n }", "public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateField.setText(dateFormat.format(todaysDate.getTime()));\n }", "private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}", "public void reset() {\n setValuesInternal(new Date(clock.getTime()), false, true);\n }", "public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }", "public void resetToDefaults() {\r\n setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n setDateFormatSymbols(new DateFormatSymbols());\r\n setShowControls(true);\r\n setControlsPosition(JCalendar.TOP);\r\n setControlsStep(10);\r\n setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n setWeekDayDisplayType(JCalendar.ONE);\r\n setShowHorizontalLines(false);\r\n setShowVerticalLines(false);\r\n setChangingFirstDayOfWeekAllowed(true);\r\n setTooltipDateFormat(new SimpleDateFormat(\"MMMM dd, yyyy\"));\r\n }", "public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }", "public void goToToday() {\n goToDate(today());\n }", "Dates() {\n clear();\n }", "public void resetRepositoryDefaultData() {\n\t\trepository.deleteAll();\n\t\tList<Temper> tempers = new ArrayList<Temper>();\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-01T11:30:00\"), 25.4F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T04:13:00\"), 9.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-07-31T09:09:00\"), 16.8F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-03T05:15:00\"), 5.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-04T08:00:00\"), 15.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:00\"), 25.0F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-13T12:00:01\"), 25.01F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-15T13:20:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-25T12:00:00\"), 17F));\n\t\ttempers.add(new Temper(LocalDateTime.parse(\"2021-08-27T11:30:00\"), 35F));\n\t\trepository.saveAll(tempers);\n\t}", "public void resetSelectedDate() {\r\n selectedDate = null;\r\n }", "private void setDefaultExpiryDate() {\n int twoWeeks = 14;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.DAY_OF_YEAR, twoWeeks);\n this.expiryDate = calendar.getTime();\n }", "protected void updateTodaysDate() {\n\t\tthis.todaysDate = new Date();\n\t}", "private void setCurrentDay() {\n Calendar c = Calendar.getInstance();\n\n year = c.get(Calendar.YEAR);\n month = c.get(Calendar.MONTH);\n day = c.get(Calendar.DAY_OF_MONTH);\n hour = c.get(Calendar.HOUR_OF_DAY);\n minute = c.get(Calendar.MINUTE);\n }", "public void SetCurrentDate(CalendarWidget kCal) {\n\t\tfor(int i = 0; i < 42; ++i)\n\t\t{\n\t\t\tif(kCal.cell[i].date.getText().toString().length() == 0)\n\t\t\t\tcontinue;\n\t\t\tkCal.checkForCurrentData(kCal.cell[i]);\n\t\t}\n\t}", "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}", "@Override\n\tprotected void setNextSiegeDate()\n\t{\n\t\tif(_siegeDate.getTimeInMillis() < Calendar.getInstance().getTimeInMillis())\n\t\t{\n\t\t\t_siegeDate = Calendar.getInstance();\n\t\t\t// Осада не чаще, чем каждые 4 часа + 1 час на подготовку.\n\t\t\tif(Calendar.getInstance().getTimeInMillis() - getSiegeUnit().getLastSiegeDate() * 1000L > 14400000)\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 1);\n\t\t\telse\n\t\t\t{\n\t\t\t\t_siegeDate.setTimeInMillis(getSiegeUnit().getLastSiegeDate() * 1000L);\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 5);\n\t\t\t}\n\t\t\t_database.saveSiegeDate();\n\t\t}\n\t}", "public Date getNextCheckDate(Date now)\r\n\t{\r\n\t\tsetTime(now);\r\n\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MINUTE:\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MINUTE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_HOUR:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.HALF_DAY:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tint hour = get(Calendar.HOUR_OF_DAY);\r\n\t\t\tif (hour < 12)\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 12);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\t\tadd(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_DAY:\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.DATE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_WEEK:\r\n\t\t\tset(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.WEEK_OF_YEAR, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MONTH:\r\n\t\t\tset(Calendar.DATE, 1);\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MONTH, 1);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalStateException(\"Unknown periodicity type.\");\r\n\t\t}\r\n\t\treturn getTime();\r\n\t}", "private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }", "public int getToday() {\n \treturn 0;\n }", "public void incrementDay(){\n //Step 1\n this.currentDate.incrementDay();\n //step2\n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementDay();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementDay();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementDay();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementDay();\n //step 3\n if (this.getDate().getDay() == 1) {\n \n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementMonth();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementMonth();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementMonth();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementMonth();\n }\n \n }", "public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }", "@Override\n public void clear() {\n date1 = Long.MIN_VALUE;\n date2 = Long.MIN_VALUE;\n }", "static public int resetAllCalsToDefault() {\r\n for (Calibration cal : registeredCals) {\r\n cal.reset();\r\n }\r\n return 0;\r\n }", "public void setFromDates() {\n\t\tif (loDate == null || loDate.getValue() == null || hiDate == null || hiDate.getValue() == null)\n\t\t\treturn;\n\n\t\tsetSliderMaxDays();\n\t\tsetSliderMinDays();\n\t\t\n\t\tint days = CalendarUtil.getDaysBetween(loDate.getValue(), hiDate.getValue());\n\t\tif (days < slider.getSlider().getMinValue())\n\t\t\tdays = slider.getSlider().getMinValue();\n\t\tslider.setValue(days);\n\t}", "public void clearDateALR() {\r\n\t\t//System.out.println(\"Clear= \" + counter);\r\n\t\twhile (historyDate.size() != counter) {\r\n\t\t\thistoryDate.removeLast();\r\n\t\t\thistoryAL.removeLast();\r\n\t\t}\r\n\t}", "abstract Date getDefault();", "public void clear() {\n this.dates = new HashSet<>();\n }", "public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}", "public void setDate(Calendar currentDate) {\r\n this.currentDate = currentDate;\r\n }", "public void setCurrentDate(Date currentDate)\r\n {\r\n m_currentDate = currentDate;\r\n }", "public Builder clearStartDate() {\n \n startDate_ = 0L;\n onChanged();\n return this;\n }", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}", "public void dayStartNew() {\n dateOfLastEdit = currentDate;\n sumOfExpenses = 0;\n challengeDaysRunning++;\n\n expensesRefresh();\n carry = moneyLeft;\n\n currentStateSaveToSharedPref();\n expensesUpdateWaterfallChart();\n }", "public void nextDay() {\r\n int daysMax = daysInMonth();\r\n \r\n if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1\r\n setDate(1, 1);\r\n } else if (day == daysMax) { // If last day of month, set to first day of next month\r\n setDate(month + 1, 1);\r\n } else { // Otherwise, simply increment this day\r\n day++;\r\n }\r\n }", "public void setDate(Date date) {\n setDate(date, null);\n }", "private void setDay() {\n Boolean result = false;\n for (int i = 0; i < 7; ++i) {\n if(mAlarmDetails.getRepeatingDay(i))\n result = true;\n mAlarmDetails.setRepeatingDay(i, mAlarmDetails.getRepeatingDay(i));\n }\n if(!result)\n mAlarmDetails.setRepeatingDay((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1), true);\n }", "public void removeAllDate() {\r\n\t\tBase.removeAll(this.model, this.getResource(), DATE);\r\n\t}", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "public void setDateEnd_CouponsTab_Marketing() {\r\n\t\tthis.dateEnd_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.DATE, 1);\r\n\t\tString tomorrow = (String) (formattedDate.format(c.getTime()));\r\n\t\tSystem.out.println(\"tomorrows date is \"+tomorrow);\r\n\t\tthis.dateEnd_CouponsTab_Marketing.sendKeys(tomorrow);\r\n\t}", "private Date setDateBefore(int days) {\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, -1 * days);\n cal.set(Calendar.HOUR_OF_DAY, 0); //anything 0 - 23\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n return cal.getTime();\n }", "@Before\n public void reset() {\n DateTimeZone.setDefault(DateTimeZone.UTC);\n DateTimeUtils.setCurrentMillisFixed(1L);\n suppressAllWarnings = true;\n }", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "public void setDate() {\n this.date = new Date();\n }", "public void setMinimalDay(DateTime rentDate) {\r\n\t\tString startDay;\r\n\t\tstartDay = rentDate.getNameOfDay();\r\n\r\n\t\tif (startDay.equals(\"Sunday\") || startDay.equals(\"Monday\") || startDay.equals(\"Thursday\")) {\r\n\t\t\tminimalDay = 2;\r\n\t\t} else if (startDay.equals(\"Friday\") || startDay.equals(\"Saturday\")) {\r\n\t\t\tminimalDay = 3;\r\n\t\t} else {\r\n\t\t\tminimalDay = 1;\r\n\t\t}\r\n\t}", "private void scanCurrentDay(){\n month.getMyCalendar().setDate(dp.getYear(), dp.getMonth(), dp.getDayOfMonth());\n month.setSelectDay(dp.getDayOfMonth());\n month.invalidate();\n this.dismiss();\n }", "void unsetFoundingDate();", "@Override\n public Date set(final int index, final Date value) {\n final long date = value.getTime();\n final Date previous = get(index);\n switch (index) {\n case 0: date1 = date; break;\n case 1: date2 = date; break;\n }\n modCount++;\n return previous;\n }", "@TargetApi(Build.VERSION_CODES.O)\n public LocalDate getTodayDate() {\n LocalDate date;\n date = LocalDate.now();\n return date;\n }", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "public void setCurrentDate(String currentDate) {\n this.currentDate = currentDate;\n }", "public Builder clearDay() {\n \n day_ = 0;\n onChanged();\n return this;\n }", "public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }", "public void setCurrentDate(CurrentDate pCurrentDate) { \n mCurrentDate = pCurrentDate; \n }", "void unsetDate();", "public void setDate(int dt) {\n date = dt;\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Calendar calendar = new GregorianCalendar();\n //calendar.set(Calendar.MILLISECOND, 0);\n calendar.set(year, month, dayOfMonth, 0, 0, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n //Set the milliseconds to 0 because java.util.Date is not accurate on milliseconds\n mDate = calendar.getTime();\n updateDateText();\n updateText();\n }", "public void setDays(){\n\n CalendarDay Day=DropDownCalendar.getSelectedDate();\n Date selectedDate=Day.getDate();\n String LongDate=\"\"+selectedDate;\n String DayOfWeek=LongDate.substring(0,3);\n Calendar calendar=Calendar.getInstance();\n calendar.setTime(selectedDate);\n int compare=Integer.parseInt(CurrenDate.substring(6,8).trim());\n int comparemonth=Integer.parseInt(CurrenDate.substring(4,6));\n int startNumber=Integer.parseInt(CheckedDate.substring(6,8).trim())-Offset(DayOfWeek);\n int max=calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n GregorianCalendar date= (GregorianCalendar) GregorianCalendar.getInstance();\n date.set(selectedDate.getYear(),1,1);\n\n boolean Feb=false;\n int priormax=30;\n\n if(max==30){\n priormax=31;\n }\n else if( max==31){\n priormax=30;\n }\n\n if(selectedDate.getMonth()==2){\n if(date.isLeapYear(selectedDate.getYear())){\n priormax=29;\n }\n\n else{\n priormax=28;\n }\n Feb=true;\n }\n for(int i=0;i<WeekDays.length;++i){\n String line=WeekDays[i].getText().toString().substring(0,3);\n\n if(startNumber<=max){\n if(startNumber==compare && comparemonth==Day.getMonth()+1){\n WeekDays[i].setTextColor(Color.BLUE);\n }\n else{\n WeekDays[i].setTextColor(Color.BLACK);\n }\n if(startNumber<=0){\n int val=startNumber+priormax;\n if(Feb){\n if(val==priormax){\n startNumber=max;\n }\n }\n\n WeekDays[i].setText(line+\"\\n\"+val);}\n\n else{\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n }\n else{\n startNumber=1;\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n MaskWeekdays[i].setText(line+\"\\n\"+startNumber);\n ++startNumber;\n }\n DropDownCalendar.setDateSelected(Calendar.getInstance().getTime(), true);\n }", "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 setCurrentDate(String d) {\n currentDate = d;\n }", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "public static Date resetTime(Date date) {\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\r\n\t\treturn resetTime(date, cal);\r\n\t}", "private void eraseDateLabel()\n\t{\n\t\tdayDateLabel.setText(\"\");\n\t}", "public static Date setDateTo0000(Date date) {\n\t\tif (date == null)\n\t\t\treturn null;\n\t\tDate result = (Date) date.clone();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(result);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 00);\n\t\tcal.set(Calendar.MINUTE, 00);\n\t\tcal.set(Calendar.SECOND, 00);\n\t\tcal.set(Calendar.MILLISECOND, 000);\n\t\tresult.setTime(cal.getTime().getTime());\n\t\treturn result;\n\t}", "public void unsetDay()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DAY$0, 0);\n }\n }", "public void resetForm(){\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate currentDate = new Date();\n\t\tsetNxSelect(\"r1\");\n\t\tresetFormB4135 = \"\";\n\t\tthoigian_thang=String.valueOf(currentDate.getMonth() +1); \n\t\tthoigian_nam=String.valueOf(currentDate.getYear()+1900);\n\t\ttungay = sdf.format(currentDate);\n\t\tdenngay = sdf.format(currentDate);\n\t\tmathang_maso=null;\n\t\thangSX_maso=null;\n\t\tnuocSX_maso=null;\n\t\tnct_maso=null;\n\t\tnkp_maso=null;\n\t\tmathang_ma=null;\n\t\tdmtTen = \"\";\n\t\thangSX_ma=\"\";\n\t\tnuocSX_ma=\"\";\n\t\tnct_ma=\"\";\n\t\tnkp_ma=\"\";\n\t\tlthuoc_ma=\"\";\n\t\tplthuoc_ma=\"\";\n\t\tdonvi_ma=\"\";\n\t\trefreshDmLoaiThuoc();\n\t\trefreshDmPhanLoaiThuoc();\n\t\trefreshDmThuoc();\n\t}", "@Override\n\tpublic void setInitialDate(Calendar initialDate) {\n\n\t}", "public void setDate(DateInfo dates) {\r\n\t\tsuper.setDate(dates);\r\n\t\t//maturityDate = new DateInfo(dates);\r\n\t}", "private void clearReminderForm() {\n income_Rad.isSelected();\n dueDate_date.setDate(null);\n ToFrom_Txt.setText(\"\");\n Amount_Txt.setText(\"\");\n category_comb.setSelectedItem(\"other\");\n frequency_comb.setSelectedItem(\"one time\");\n endBy_date.setDate(null);\n }", "private void incrementeDate() {\n dateSimulation++;\n }", "public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void goToDate(@NonNull Calendar date) {\n Calendar modifiedDate = (Calendar) date.clone();\n\n // If a minimum or maximum date is set, don't allow to go beyond them.\n if (config.minDate != null && modifiedDate.before(config.minDate)) {\n modifiedDate = (Calendar) config.minDate.clone();\n } else if (config.maxDate != null && modifiedDate.after(config.maxDate)) {\n modifiedDate = (Calendar) config.maxDate.clone();\n modifiedDate.add(Calendar.DAY_OF_YEAR, 1 - config.numberOfVisibleDays);\n } else if (config.numberOfVisibleDays >= 7 && config.showFirstDayOfWeekFirst) {\n final int diff = config.drawingConfig.computeDifferenceWithFirstDayOfWeek(config, date);\n modifiedDate.add(Calendar.DAY_OF_YEAR, (-1) * diff);\n }\n\n gestureHandler.forceScrollFinished();\n\n if (viewState.areDimensionsInvalid) {\n viewState.setScrollToDay(modifiedDate);\n return;\n }\n\n viewState.setShouldRefreshEvents(true);\n\n int diff = DateUtils.getDaysUntilDate(modifiedDate);\n\n config.drawingConfig.currentOrigin.x = diff * (-1) * config.getTotalDayWidth();\n viewState.requiresPostInvalidateOnAnimation = true;\n invalidate();\n }", "@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}", "public static Date todayStart() {\n return dayStart(new Date());\n }", "public void reset() {\n\t\tsuper.reset(); // reset the Reportable, too.\n\n\t\tif (_interArrivalTimeActivated && _interArrivalTally != null)\n\t\t\t_interArrivalTally.reset();\n\t\t\n\t\t// really reset the counter value?\n\t\tif (!this.isResetResistant) {\n\t\t\tthis._value = 0;\n \t this._min = this._max = 0;\n\t\t}\n\t}", "public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }", "public int MagicDate(){\n return month = day = year = 1;\n \n }", "public Builder clearStartDateYYYYMMDD() {\n \n startDateYYYYMMDD_ = getDefaultInstance().getStartDateYYYYMMDD();\n onChanged();\n return this;\n }", "public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }", "private void changeNextDay(){\n\t\tplanet.getClimate().nextDay();\n\t}", "public static Date setToBeginningOfDay(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\n\t cal.set(Calendar.MINUTE, 0);\n\t cal.set(Calendar.SECOND, 0);\n\t cal.set(Calendar.MILLISECOND, 0);\n\t return cal.getTime();\n\t}", "public void setDefaultStartTime(Date defaultStartTime)\r\n {\r\n m_defaultStartTime = defaultStartTime;\r\n }", "private void disablePastDates() {\n dateBox.setValue(LocalDate.now());\n final Callback<DatePicker, DateCell> dayCellFactory =\n new Callback<DatePicker, DateCell>() {\n @Override\n public DateCell call(final DatePicker datePicker) {\n return new DateCell() {\n @Override\n public void updateItem(LocalDate item, boolean empty) {\n super.updateItem(item, empty);\n if (item.isBefore(\n dateBox.getValue().plusDays(1))\n ) {\n setDisable(true);\n setStyle(\"-fx-background-color: #ffc0cb;\");\n }\n }\n };\n }\n };\n dateBox.setDayCellFactory(dayCellFactory);\n }", "private LocalDate nowLocalDate() {\n\t\tInstant instantNow = Instant.ofEpochMilli( System.currentTimeMillis() );\n\t\tLocalDate nowLocalDate = instantNow.atOffset(ZoneOffset.UTC).toLocalDate();\n\t\treturn nowLocalDate;\n\t}", "void reset(){\n\t\tstatsRB.setSelected(true);\n\t\tcustTypeCB.setSelectedIndex(0);\n\t\tcustIdTF.setText(\"\");\n\t\toutputTA.setText(\"\");\n\t\t\n\t\tLong currentTime = System.currentTimeMillis();\n\t\t\n\t\t//THE TIME IN TIME SPINNERS ARE SET TO THE MAX POSSIBLE TIME WINDOW THAT IS \n\t\t//FROM THE TIME THAT THE SHOP STARTED TO THE CURRENT TIME.\n\t\t\n\t\t//THE STARTING DATE AND TIME OF SHOP OS CONSIDERED AS -- 1 JAN 2010 00:00\n\t\tstartDateS.setModel(new SpinnerDateModel(new Date(1262284200000L), new Date(1262284200000L), new Date(currentTime), Calendar.DAY_OF_MONTH));\n\t\t//AND END DATE AND TIME WILL THE THE CURRENT SYSTEM DATE AND TIME.\n\t\tendDateS.setModel(new SpinnerDateModel(new Date(currentTime), new Date(1262284200000L), new Date(currentTime), Calendar.DAY_OF_MONTH));\n\t\n\t}", "public GregorianCalendar getSelectedDate(){\n int day = Integer.parseInt(this.date_day.getSelectedItem().toString());\n int month = Integer.parseInt(this.date_month.getSelectedItem().toString());\n int year = Integer.parseInt(this.date_year.getSelectedItem().toString());\n\n GregorianCalendar date = new GregorianCalendar();\n date.setTimeInMillis(0);\n \n date.set(Calendar.DAY_OF_MONTH, day);\n date.set(Calendar.MONTH, month -1);\n date.set(Calendar.YEAR, year);\n\n return date;\n }", "public Builder clearEndDate() {\n \n endDate_ = 0L;\n onChanged();\n return this;\n }", "public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public Builder clearFromDayNull() {\n \n fromDayNull_ = false;\n onChanged();\n return this;\n }", "private void nextDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tlong hourMills = this.nextHourMills;\r\n\t\tint day;\r\n\t\t\r\n\t\tcalendar.setTimeInMillis(this.nextHourMills);\r\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\r\n\t\tthis.nextHourMills = calendar.getTimeInMillis();\r\n\t\t\r\n\t\tday = calendar.get(Calendar.DATE);\r\n\t\tif (day != this.day) {\r\n\t\t\t// 날짜가 바뀌었으면 calendar.set(Calendar.HOUR_OF_DAY, 0) 는 불필요. 단지 최종 날짜만 바꾸어준다.\r\n\t\t\tthis.day = day;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// 바뀌지 않았으면\r\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile dir = new File(this.root, Long.toString(calendar.getTimeInMillis()));\r\n\t\t\tFile file = new File(dir, Long.toString(hourMills));\r\n\t\t\t\r\n\t\t\tthis.data = JSONFile.getJSONObject(file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthis.data = null;\r\n\t\t\t\r\n\t\t\tthis.date.setTimeInMillis(this.nextHourMills);\r\n\t\t}\r\n\t}", "private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }", "protected void setToDefault(){\n\n\t}", "public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }", "private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }", "protected abstract void calcNextDate();" ]
[ "0.7793106", "0.68948305", "0.68915355", "0.68183744", "0.6653867", "0.6586131", "0.6570233", "0.64882666", "0.6422526", "0.6412492", "0.63056433", "0.63009584", "0.6294728", "0.6284936", "0.6254395", "0.61471444", "0.6129954", "0.61172956", "0.6096859", "0.6040015", "0.6038382", "0.59816736", "0.59541297", "0.59378046", "0.59336054", "0.5922603", "0.5912884", "0.5902692", "0.58759207", "0.57596505", "0.5734507", "0.56923765", "0.56737083", "0.5612682", "0.5612029", "0.55990577", "0.55836856", "0.5565446", "0.556386", "0.5561817", "0.55587524", "0.5550166", "0.55499214", "0.5548483", "0.55433583", "0.5533409", "0.5529559", "0.552635", "0.5514709", "0.55073017", "0.5496512", "0.5490965", "0.5479127", "0.54731387", "0.54698575", "0.5467874", "0.54575765", "0.5453288", "0.5434383", "0.5420139", "0.5399034", "0.53979087", "0.537712", "0.53759986", "0.5371726", "0.53631604", "0.5362986", "0.5361709", "0.5360868", "0.53531486", "0.5351276", "0.5340955", "0.5340305", "0.53400284", "0.5329067", "0.5326804", "0.53262794", "0.532346", "0.5308696", "0.53086954", "0.53043544", "0.52977353", "0.5297212", "0.5285275", "0.52760834", "0.52747405", "0.5258889", "0.5254143", "0.52534276", "0.5253158", "0.5252269", "0.5245867", "0.52431464", "0.5242872", "0.52403355", "0.5239987", "0.523794", "0.5230766", "0.5223442", "0.5223017" ]
0.74166423
1
Completely clears the search and sets the fields filled by a search to their defaults.
public static void clearSearch() { searchQuery = null; numberOfAdults = 0; childAges = null; resetDates(); FOUND_HOTELS.clear(); selectedHotel = null; selectedRoom = null; EXTENDED_INFOS.clear(); HOTEL_ROOMS.clear(); IMAGE_DRAWABLES.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearSearch() {\n searchParam = \"\";\n lazyModel = null;\n listRemotoFake = null;\n first = 0;\n rows = 10;\n }", "private void clearFields() {\r\n keywords = \"\";\r\n searchBy = \"\";\r\n }", "public void clearSearch(){\n search.clear();\n }", "public void resetSearchFilters() {\n this.searchFilters.resetToDefaults();\n }", "private void resetSearchValues() {\n this.IDOrNameText.setText(\"\");\n this.accordIDButton.setSelected(true);\n this.accordNameButton.setSelected(false);\n type = this.accordIDButton.getText();\n }", "private void clearSearchingOptionValues() {\n noticeSerialNo = null;\n pinOrNic = null;\n searchStartDate = null;\n searchEndDate = null;\n }", "private void emptySearchFields() {\n view.setMinPrice(-1);\n view.setMaxPrice(-1);\n view.setMinSQM(-1);\n view.setMaxSQM(-1);\n view.setBedrooms(-1);\n view.setBathrooms(-1);\n view.setFloor(-1);\n view.setHeating(false); //Is supposed to be a checkbox so even unchecked it is false not empty\n view.setLocation(\"Athens\"); //Is supposed to get a string from a dropdown so it wil never be empty\n }", "public Builder clearSearch() {\n if (searchBuilder_ == null) {\n if (inputSourceCase_ == 10) {\n inputSourceCase_ = 0;\n inputSource_ = null;\n onChanged();\n }\n } else {\n if (inputSourceCase_ == 10) {\n inputSourceCase_ = 0;\n inputSource_ = null;\n }\n searchBuilder_.clear();\n }\n return this;\n }", "public Builder clearSearchValueNull() {\n \n searchValueNull_ = false;\n onChanged();\n return this;\n }", "public void clearSearchInput() {\n if (filterable != null && JQMCommon.isFilterableReady(filterable)) {\n clearInput(filterable);\n }\n }", "public static void clearCustomerSearch()\n\t{\n\t\tcustomerSearch.clear();\n\t}", "abstract void clearSearchResults();", "public Builder clearSearchValue() {\n if (searchValueBuilder_ == null) {\n searchValue_ = null;\n onChanged();\n } else {\n searchValue_ = null;\n searchValueBuilder_ = null;\n }\n\n return this;\n }", "public Builder clearSearchRequest() {\n if (searchRequestBuilder_ == null) {\n searchRequest_ = null;\n onChanged();\n } else {\n searchRequest_ = null;\n searchRequestBuilder_ = null;\n }\n\n return this;\n }", "public void ClearSearch(){\n \n SearchTF.setText(\"\");\n jComboBox1.setSelectedIndex(0);\n }", "public void resetChildSearchParameters() {\n\n\t\tsetRegio(null);\n\t\tsetKnooppuntNummer(null);\n\t\tsetTrajectNaam(null);\n\t\tsetProbleemType(null);\n\n\t\t// Probleem ook mee resetten\n\t\tif (probleem != null) {\n\t\t\tprobleem = null;\n\t\t\tobject.setProbleem(null);\n\t\t}\n\t}", "public void clearFields(View view){\n searchTermField.setText(\"\");\n urlField.setText(\"\");\n }", "public void reset(QueryDescriptor queryDescriptor)\n {\n DemoPageDef.SavedSearchDef savedSearchDef = \n ((DemoQueryDescriptor)queryDescriptor).getSavedSearchDef();\n List<DemoPageDef.SearchFieldDef> origSearchFieldList = savedSearchDef.getSearchFields();\n List<DemoPageDef.SearchFieldDef> removableFields = \n new ArrayList<DemoPageDef.SearchFieldDef>();\n for(DemoPageDef.SearchFieldDef searchField : savedSearchDef.getSearchFields())\n {\n if (searchField.isRemovable())\n {\n removableFields.add(searchField);\n }\n else\n {\n searchField.resetValue();\n searchField.setOperator(searchField.getDefaultOperator()); \n }\n }\n origSearchFieldList.removeAll(removableFields);\n \n // Conjunction\n savedSearchDef.setSelectedConjunction(savedSearchDef.getDefaultConjunction());\n DemoQueryDescriptor demoDescriptor = (DemoQueryDescriptor)queryDescriptor;\n demoDescriptor.setConjunctionCriterion(new DemoConjunctionCriterion(savedSearchDef));\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n this.forUpdate=false;\n }", "public void resetSearchSelection() {\n this.quantSearchSelection = null;\n SelectionChanged(\"reset_quant_searching\");\n }", "public void clear() {\n\t\toredCriteria.clear();\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n }", "private void clearFind() {\n\t\tthis.currentFindResultPage = null;\n\t\tthis.currentFindResultNumber = null;\n \tthis.pagesView.setFindMode(false);\n\t\tthis.findButtonsLayout.setVisibility(View.GONE);\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void clear() {\r\n oredCriteria.clear();\r\n }", "public void clear() {\n oredCriteria.clear();\n }", "public void reset() {\r\n availableOptionsModel.getObject().clear();\r\n selectedOptionsModel.getObject().clear();\r\n paletteForm.visitChildren(FormComponent.class, new IVisitor<Component>() {\r\n @Override\r\n public Object component(Component component) {\r\n ((FormComponent<?>) component).clearInput();\r\n return Component.IVisitor.CONTINUE_TRAVERSAL;\r\n }\r\n });\r\n paletteForm.getModelObject().setSearchString(\"\");\r\n }", "private void resetIdsToFind()\r\n\t{\r\n\t\t/*\r\n\t\t * Reset all lists of given search items to empty lists, indicating full\r\n\t\t * search without filtering, if no search items are added.\r\n\t\t */\r\n\t\tsetSpectrumIdsTarget(new ArrayList<String>());\r\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\n\t\toredCriteria.clear();\n\t\torderByClause = null;\n\t\tdistinct = false;\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}", "public void clear() {\r\n\t\toredCriteria.clear();\r\n\t\torderByClause = null;\r\n\t\tdistinct = false;\r\n\t}", "public void resetFilter() {\n searchList.clear();\n mediaCategoryList.clear();\n\n searchList.addAll(viewModel.getMediaList());\n mediaCategoryList.addAll(viewModel.getMediaList());\n }", "private void clearFields(){\n\t\tmiMatriculaLabel.setText(\"-\");\n\t\tmatriculaSearch.setText(\"\");\n\t\tmarcaText.setText(\"\");\n\t\tmodeloText.setText(\"\");\n\t\tanioText.setText(\"\");\n\t\titvText.setText(\"\");\n\t\tvehiculoSelected = null;\n\t\tchangeFieldsState(false);\n\t}", "private void resetSearchAheadList() {\n if (!searchResultsData.isEmpty()) {\n searchResultsData.clear();\n searchAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void onSearchCleared() {\n }", "public void setDefaultSettings(Search search) {\r\n\t\tsetPreferences(search);\r\n\t\tsetNotification(search);\r\n\t}", "public void reset() {\n\n\t\trbNone.setSelected(true);\n\t\tquizIDField.clear();\n\t\tfilter();\n\t\t\n\t}", "public Builder clearLocalSearchRequest() {\n if (localSearchRequestBuilder_ == null) {\n localSearchRequest_ = null;\n onChanged();\n } else {\n localSearchRequest_ = null;\n localSearchRequestBuilder_ = null;\n }\n\n return this;\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void clear() {\r\n oredCriteria.clear();\r\n orderByClause = null;\r\n distinct = false;\r\n }", "public void reset() {\n this.searchDone = false;\n this.taskForResize = null;\n }", "public void clearResultEntries() {\n sp_searchEntries.removeAll();\n }", "private void fillSearchFields() {\n view.setMinPrice(1);\n view.setMaxPrice(10000);\n view.setMinSQM(1);\n view.setMaxSQM(10000);\n view.setBedrooms(1);\n view.setBathrooms(1);\n view.setFloor(1);\n view.setHeating(false);\n view.setLocation(\"Athens\");\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }", "public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n }" ]
[ "0.79450816", "0.78933847", "0.76371646", "0.7496634", "0.74553186", "0.7400108", "0.7306756", "0.7198282", "0.69495785", "0.69354403", "0.6889268", "0.6865244", "0.68491566", "0.6777681", "0.67488664", "0.6692233", "0.6557228", "0.65520483", "0.6545203", "0.65363824", "0.6503178", "0.6503178", "0.64964706", "0.64964706", "0.64964706", "0.64964706", "0.6478534", "0.6478534", "0.6478534", "0.6478534", "0.6478534", "0.6478534", "0.6474654", "0.6473134", "0.6460966", "0.6460966", "0.6460966", "0.6460966", "0.6460966", "0.6460966", "0.64394355", "0.6416437", "0.64119595", "0.6407006", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.64063996", "0.6393716", "0.6393716", "0.6393716", "0.6393716", "0.6393716", "0.6391862", "0.6360078", "0.63575137", "0.6357279", "0.6349097", "0.6343354", "0.6343085", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.62940717", "0.6290661", "0.6286199", "0.6279074", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995", "0.62719995" ]
0.7436723
5
Adds a reservation object to an applicationpersistent, inmemory cache of reservations, sorted by date.
public static void addReservationToCache(final Reservation reservation) { RESERVATIONS.add(reservation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addReservation(Reservation reservation) {\n reservations.add(reservation);\n }", "private SiteReservation save(SiteReservation reservation){\n try {\n reservation = repo.save(reservation);\n }\n catch (RuntimeException e){\n throw new DayReservedException();\n }\n return reservation;\n }", "@Override\n public Reservation createReservation(String reservationID, Reservation newReservation) {\n Reservation reservation = new Reservation(getHostName(), getHostAddress(), getUID(), generateNextNumber());\n\n //Plan: Add new reservation into the list, then update it on firebase\n reservationList.add(reservation);\n\n //Get reference to reservation\n DatabaseReference userSpaceRef = FirebaseDatabase.getInstance().getReference().child(\"Host/\" + UID);\n return null;\n }", "void addReservation(ReservationDto reservationDto) ;", "@Override\n\tpublic void updateEntries(Reservation reservation) {\n\t\tresTable.save(reservation);\n\t\t\n\t}", "@Override\r\n public void add(IMObject object) {\r\n cache.add(object);\r\n }", "void storeReservation(Reservation reservation) throws DataAccessException;", "Reservation loadReservation(int id) throws DataAccessException;", "@Transactional(isolation = Isolation.SERIALIZABLE, propagation = Propagation.REQUIRES_NEW)\n public void save(Reservations r) {\n Session session = sessionFactory.getCurrentSession();\n session.save(r);\n }", "@TargetApi(Build.VERSION_CODES.KITKAT)\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void createReservation() {\n Time timeObj = null;\n DateFormat formatter= new SimpleDateFormat(\"kk:mm\");\n try {\n timeObj = new Time(formatter.parse(time).getTime());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Bitmap generatedQR = generateQR();\n //Create reservation & save to Repository\n Reservation reservation = new Reservation(film, timeObj, listPlaces, generatedQR);\n Repository.addReservation(reservation);\n }", "CurrentReservation createCurrentReservation();", "public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }", "Reservation createReservation();", "public void addItem(Item item) {\n this.reservationItems.add(new ReservationItem(item, this));\n }", "public Reservation addResv(String roomNo, String roomType,int gID, int aNo, int kNo, LocalDate dIn, LocalDate dOut,\n\t\t\t\t\t\t\t\t String rStatus, LocalTime time) {\n\n\t\tint newResvNo =0;\n\t\tReservation newResv = null;\n\t\tif (checkGap() == false) { //no gap, add resv at back\n\t\t\tnewResvNo = numOfReservation + 1;\n\t\t}\n\t\telse { //add resv in between\n\t\t\tfor (int i = 0; i < rList.size(); i++) {\n\t\t\t\tif (rList.get(i).getResvNo() != (i+1)) {\n\t\t\t\t\tnewResvNo = i+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tnewResv = new Reservation(newResvNo, roomNo, roomType, gID, aNo, kNo, dIn, dOut, rStatus, time);\n\t\t\trList.add(newResv);\n\t\t\tnumOfReservation++;\n\t\t\tSystem.out.println(\"Total number of reservations: \" + numOfReservation);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newResv;\n\t}", "@RequestMapping(value=\"/add\", method = RequestMethod.POST)\r\n public void addAction(@RequestBody Reservation reservation){\n reservationService.create(reservation);\r\n }", "public void loadReserva() {\r\n\t\tif(listaReservas.size() != 0) {\r\n\r\n\t\t}else {\r\n\t\t\tfor(int i = 0; i < 8; i++) {\r\n\t\t\t\tReservaDAO aux = new ReservaDAO();\r\n\t\t\t\taux.load_reserva(i+1);\r\n\t\t\t\tif(aux.getTitulo() != null) {\r\n\t\t\t\t\tlistaReservas.add(aux);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "public final synchronized void addElement(Object paramObject1, Object paramObject2)\r\n/* 21: */ {\r\n/* 22:111 */ Object localObject = this._table.get(paramObject1);\r\n/* 23:113 */ if (localObject != null)\r\n/* 24: */ {\r\n/* 25:118 */ GenericCacheEntry localGenericCacheEntry = (GenericCacheEntry)localObject;\r\n/* 26:119 */ localGenericCacheEntry._value = paramObject2;\r\n/* 27:120 */ localGenericCacheEntry._key = paramObject1; return;\r\n/* 28: */ }\r\n/* 29: */ int i;\r\n/* 30:126 */ if (!isFull())\r\n/* 31: */ {\r\n/* 32:127 */ i = this._numEntries;\r\n/* 33:128 */ this._numEntries += 1;\r\n/* 34: */ }\r\n/* 35: */ else\r\n/* 36: */ {\r\n/* 37:132 */ i = this.__curent;\r\n/* 38:134 */ if (++this.__curent >= this._cache.length) {\r\n/* 39:135 */ this.__curent = 0;\r\n/* 40: */ }\r\n/* 41:137 */ this._table.remove(this._cache[i]._key);\r\n/* 42: */ }\r\n/* 43:140 */ this._cache[i]._value = paramObject2;\r\n/* 44:141 */ this._cache[i]._key = paramObject1;\r\n/* 45:142 */ this._table.put(paramObject1, this._cache[i]);\r\n/* 46: */ }", "public void update() {\n\t\trl = DBManager.getReservationList();\n\t}", "@Schedule(hour = \"2\")\n public void allocateCurrentDayReservation() {\n \n Calendar c = Calendar.getInstance();\n Date dateTime = c.getTime();\n \n reservationSessionBeanLocal.allocateCarsToReservations(dateTime);\n }", "private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }", "@Override\n\tpublic void addToCache(T obj) {\n\t\tcache.add(obj);\n\t}", "Collection<Reservation> getReservations() throws DataAccessException;", "@Override\n public Reservation call() throws ReservationNotCreatedException {\n return reservationService.create(reservation);\n }", "public boolean reserve(int reservation) {\n int index = reservation - this.loRange;\n if (this.freeSet.get(index)) { // FREE\n this.freeSet.clear(index);\n return true;\n } else {\n return false;\n }\n }", "public interface ReservationsService {\n\n /**\n * Lists reservations 'conflicting' with the given time range. This means that the method will list\n * all reservations conflicting with the specified start date and/or end date, plus all\n * reservations contained within the specified range.\n * <p>\n * If no length is provided for the time range (numberOfDays = null), the default will be used.\n *\n * @param startDate start date (Instant) of time range for which campsite availability is requested\n * @param numberOfDays length of time range for which campsite availability is requested (in days).\n * Defaults to the {@code campsite.reservation.list.default} config parameter.\n * @return reservations 'conflicting' with the given time range.\n */\n List<Reservation> listReservationsWithinTimeRange(Instant startDate, Integer numberOfDays);\n\n /**\n * Creates a reservation for the provided {@link User} between two\n * given dates. The length of the reservation cannot exceed the amount\n * of days specified by the {@code campsite.reservation.length.maximum}\n * configuration property.\n *\n * @param userData information about the user that will own the reservation\n * @param startDate date (Instant) in which the reservation starts\n * @param endDate date (Instant) in which the reservation ends\n * @return the reservation between the requested dates for the specified user, containing an\n * automatically generated booking id\n * @throws IllegalArgumentException if:\n * - length of stay exceeds {@code campsite.reservation.length.maximum} or\n * - reservation start date comes before {@code campsite.reservation.days-ahead.minimum} or\n * - reservation start date comes after {@code campsite.reservation.days-ahead.maximum}\n */\n Reservation createReservation(User userData, Instant startDate, Instant endDate);\n\n /**\n * Updates a given {@link Reservation}, uniquely identified by its {@code id}.\n * This operation uses optimistic locking for preventing silent updates.\n *\n * @param reservation contains the information for the reservation that is to be updated,\n * uniquely identified by its {@code id}\n * @return the updated reservation information\n * @throws ObjectOptimisticLockingFailureException if a stale copy of the reservation attempts\n * to be updated\n */\n Reservation updateReservation(Reservation reservation);\n\n /**\n * Deletes a given {@link Reservation}, uniquely identified by its {@code id}.\n * This operation uses optimistic locking for preventing silent deletes.\n *\n * @param reservation contains the information for the reservation that is to be deleted,\n * uniquely identified by its {@code id}\n * @throws ObjectOptimisticLockingFailureException if a stale copy of the reservation attempts\n * to be deleted\n */\n void deleteReservation(Reservation reservation);\n\n}", "@Override\r\n\tpublic int addReservationDetails(ReservationDetails reservationDetails) {\n\t\treturn 0;\r\n\t}", "boolean addBillToReservation(long billId, long reservationId);", "public void cacheResult(com.Hotel.model.Hotel hotel);", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "public Collection<ReservationHistoryDTO> getReservationsHistory() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightReservationId(flightReservation.getId());\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\treservationDTO.setRoomReservationId(roomReservation.getId());\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t\t//Long hotelId videcemo kako\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\treservationDTO.setVehicleReservationId(vehicleReservation.getId());\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "private void saveAfterLock(Reservation reservation) throws InterruptedException {\n log.error(\"Error saving reservation, waiting to retry.\");\n Thread.sleep(1000);\n if (!isOverlapping(reservation)) {\n reservationRepository.save(reservation);\n } else {\n throwConcurrentModificationException();\n }\n }", "@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}", "public interface ReservationDao {\n Reservation getReservation(int reservationId);\n void updateReservation(Reservation reservation);\n void deleteReservation(Reservation reservation);\n void insertReservation(Reservation reservation);\n}", "public Reservation makeReservation(Reservation trailRes){\n //Using a for each loop to chekc to see if a reservation can be made or not\n if(trailRes.getName().equals(\"\")) {\n System.out.println(\"Not a valid name\");\n return null;\n }\n \n \n for(Reservation r: listR){\n if(trailRes.getReservationTime() == r.getReservationTime()){\n System.out.println(\"Could not make the Reservation\");\n System.out.println(\"Reservation has already been made by someone else\");\n return null;\n }\n }\n\n //if the time slot is greater than 10 or less than 0, the reservation cannot be made\n if(trailRes.getReservationTime() > 10 || trailRes.getReservationTime() < 0){\n System.out.println(\"Time slot not available\");\n return null;\n }\n\n //check to see if the reservable list is empty or not\n if(listI.isEmpty())\n {\n System.out.println(\"No reservation available\");\n return null;\n }\n\n //find the item and fitnessValue that will most fit our reservation\n Reservable item = listI.get(0);\n int fitnessValue = item.findFitnessValue(trailRes);\n\n //loop through the table list and find the best fit for our reservation\n for(int i = 0; i < listI.size() ; i++){\n if(listI.get(i).findFitnessValue(trailRes) > fitnessValue){\n item = listI.get(i);\n fitnessValue = item.findFitnessValue(trailRes);\n }\n }\n //if we have found a table that works, then we can make our reservation\n if(fitnessValue > 0){\n //add reservation to our internal list\n //point our reservable to the appropriate reservation\n //set the reservable \n //print out the message here not using the iterator\n listR.add(trailRes);\n item.addRes(trailRes);\n trailRes.setMyReservable(item);\n System.out.println(\"Reservation made for \" + trailRes.getName() + \" at time \" + trailRes.getReservationTime() + \", \" + item.getId());\n return trailRes;\n }\n System.out.println(\"No reservation available, number of people in party may be too large\");\n return null; \n }", "public int getReservationId() { return reservationId; }", "public Reservation getReservation(final String routeName, final LocalDate date, final UUID reservationId) {\n ReservationModel reservationModel = reservationRepository\n .findByRouteNameAndDateAndReservationId(routeName, date, reservationId).orElseThrow(() ->\n new NotFoundException(\"Reservation Not Found\"));\n\n return routeMapper.toReservation(reservationModel);\n }", "public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(!reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }", "PastReservation createPastReservation();", "public ReservationMgr(ArrayList reservationList) {\n\t\tif (reservationList == null) { // Initialize\n\t\t\tthis.rList = new ArrayList<>();\n\t\t\tnumOfReservation = 0;\n\t\t} else {\n\t\t\tthis.rList = new ArrayList<>(reservationList);\n\t\t\tnumOfReservation = this.rList.size();\n\t\t}\n\t\tSystem.out.println(numOfReservation + \" Reservations loaded!\");\n\t}", "List<Reservation> findReservationsByUserBookId (Long userId);", "@Override\r\n\tpublic ErrorCode reserveRoom(\r\n\t\t\tString guestID, String hotelName, RoomType roomType, SimpleDate checkInDate, SimpleDate checkOutDate,\r\n\t\t\tlong resID) {\n\t\tErrorAndLogMsg m = clientProxy.reserveHotel(\r\n\t\t\t\tguestID, hotelName, roomType, checkInDate, checkOutDate, \r\n\t\t\t\t(int)resID);\r\n\t\t\r\n\t\tSystem.out.print(\"RESERVE INFO:\");\r\n\t\tm.print(System.out);\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\treturn m.errorCode();\r\n\t}", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic Reservation loadReservation(@PathVariable Integer reservation_reservationId) {\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation_reservationId);\n\t}", "public void setReservationId(int i) { reservationId = i; }", "public interface ReservationDao extends Dao<Reservation> {\n\n void addReservation(Reservation reservation);\n\n void removeReservation(Reservation reservation);\n\n Reservation getReservation(int userId, int bookId);\n}", "@RequestMapping(value = \"/Reservation\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic Reservation saveReservation(@RequestBody Reservation reservation) {\n\t\treservationService.saveReservation(reservation);\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation.getReservationId());\n\t}", "public CacheEntry checkOrAddToCache(InetAddress clientId, int xid) {\n ClientRequest req = new ClientRequest(clientId, xid);\n CacheEntry e;\n synchronized(map) {\n e = map.get(req);\n if (e == null) {\n // Add an inprogress cache entry\n map.put(req, new CacheEntry());\n }\n }\n return e;\n }", "public abstract CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime);", "@Override\n\tpublic ArrayList<Reservation> getReservationsByDate(Date date, int duration) {\n\t\treturn null;\n\t}", "public Reservation reserveNext() {\n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n while (true) {\n if (++m_lastReservable >= m_reservables.size()) {\n m_lastReservable = 0;\n }\n \n final Reservable reservable =\n (Reservable)m_reservables.get(m_lastReservable);\n \n if (reservable.reserve()) {\n return reservable;\n }\n }\n }\n }", "Sporthall() {\n reservationsList = new ArrayList<>();\n }", "@RequestMapping(value = \"/Reservation\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Reservation newReservation(@RequestBody Reservation reservation) {\n\t\treservationService.saveReservation(reservation);\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation.getReservationId());\n\t}", "public void EstaticCache(){\n LinkedHashMap<String, String> ParticionAux = new LinkedHashMap <String,String>();\n Cache.add(ParticionAux);\n for (int i = 0; i < Estatico.length; i++) {\n \n Cache.get(0).put(Estatico[i], ResEstatico[i]);\n // System.out.println(\"===== Particion de Cache N°\"+ParticionAux.values()+\" =====\");\n \n }\n //this.Cache.add(ParticionAux); // carga el hashMap en una particion del cache\n //System.out.println(\"===== Particion de Cache AQUIAQUI\"+Cache.get(0).values()+\" =====\");\n // ParticionAux.clear(); // limpia el Hashmap aux\n }", "public Object createEntry(Object key) throws Exception {\n\r\n\t\t\r\n\t\t\r\n\t\tConnection connect = null;\r\n\t Statement st = null;\r\n\t ResultSet rs = null;\r\n\t String url = \"jdbc:mysql://localhost:3306/\";\r\n\t String db = \"ehcache\";\r\n\t String driver = \"com.mysql.jdbc.Driver\";\r\n\t String user = \"ehcache\";\r\n\t String pass = \"terracotta\";\r\n\t customer mc = new customer();\r\n\t \r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass.forName(driver);\r\n\t\t\tconnect = DriverManager\r\n\t\t\t .getConnection(url + db, user, pass);\r\n\t\t\t\r\n\t\t\tst = connect.createStatement();\r\n\t\t rs = st.executeQuery(\"select * from customers where ID='\" + key + \"'\");\r\n\t\t // rs = st.executeQuery(\"select * from customers where ID='1'\");\r\n\t\t \r\n\t\t System.out.println(\"(dbReadThrough) Retrieving customer \" + key + \" from DB ... \");\r\n\t\t \r\n\t\t while (rs.next()) {\r\n\t\t \t\r\n\t\t \t\r\n\t\t \tint ID = rs.getInt(\"ID\");\r\n\t\t \tString FIRSTNAME = rs.getString(\"FIRSTNAME\");\r\n\t\t \tString LASTNAME = rs.getString(\"LASTNAME\");\r\n\t\t \tString REGION = rs.getString(\"REGION\");\r\n\t\t \tString ADDRESS = rs.getString(\"ADDRESS\");\r\n\t\t \r\n\t\t \tSystem.out.println(\"(dbReadThrough) Found customer: \" + ID + \" -- \" + FIRSTNAME + \" \" + LASTNAME + \" \" + REGION + \" \" + ADDRESS);\r\n\t\t \t\t\t \t\r\n\t \t\tmc.setID(ID);\r\n\t \t\tmc.setFIRSTNAME(FIRSTNAME);\r\n\t \t\tmc.setLASTNAME(LASTNAME);\r\n\t \t\tmc.setREGION(REGION);\r\n\t \t\tmc.setADDRESS(ADDRESS); \t\r\n\t\t \t\t\t \t\r\n\t\t }\r\n\t\t \r\n\t\t System.out.println(\"(dbReadThrough) Writing object for customer \" + key + \" to the cache ... \");\r\n\t return mc;\r\n\t\t\r\n\t\t} finally {\r\n\t\t\tconnect.close();\r\n\t\t}\r\n\r\n\t}", "public interface ReservationDao extends JpaRepository<Reservation, Long> {\n\n /**\n * Find reservations by user book id list.\n *\n * @param userId the user id\n * @return the list\n */\n List<Reservation> findReservationsByUserBookId (Long userId);\n\n /**\n *\n * @param id\n * @return\n */\n Optional<Reservation> findById(Long id);\n\n /**\n *\n * @param reservation\n * @return\n */\n Reservation save(Reservation reservation);\n\n /**\n *\n * @param reservation\n */\n void delete(Reservation reservation);\n\n /**\n * Find by end borrowing after list.\n *\n * @param endBorrowing the end borrowing\n * @return the list\n */\n @Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);\n\n /**\n *\n * @param bookId\n * @return\n */\n List<Reservation> findAllByBookIdOrderByEndBorrowingAsc(Long bookId);\n}", "public void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);", "BookReservationDao getBookReservationDao();", "@Transactional(readOnly = true)\n public Reservations getById(int id) {\n Session session = sessionFactory.getCurrentSession();\n return (Reservations) session.get(Reservations.class, id);\n }", "public static int makeReservation(String name, String time) {\n ArrayList<Reservation> reservationsAtTime = allReservations.get(time);\n\n // Check if it is possible to make a reservation\n if (reservationsAtTime.size() < numberOfTables) {\n Reservation newReservation = new Reservation();\n newReservation.reservationOwner = name;\n newReservation.reservationTime = time;\n\n int tableNumber = getFreeTable(time);\n if (tableNumber == -1) {\n return -1;\n }\n\n newReservation.reservedTableNumber = tableNumber;\n\n reservationsAtTime.add(newReservation);\n allReservations.put(time, reservationsAtTime);\n\n return newReservation.reservedTableNumber;\n\n } else {\n return -1;\n }\n }", "public HashMap findMap(int date, int route){\n HashMap x = new HashMap<>();\n try {\n if (route==1) {\n switch (date){\n case 1:\n x = (HashMap) reservedseats1;\n break;\n case 2:\n x = (HashMap) reservedseats2;\n break;\n case 3:\n x = (HashMap) reservedseats3;\n break;\n case 4:\n x = (HashMap) reservedseats4;\n break;\n case 5:\n x = (HashMap) reservedseats5;\n break;\n }\n\n } else if (route==2) {\n switch (date){\n case 1:\n x = (HashMap) reservedseats6;\n break;\n case 2:\n x = (HashMap) reservedseats7;\n break;\n case 3:\n x = (HashMap) reservedseats8;\n break;\n case 4:\n x = (HashMap) reservedseats9;\n break;\n case 5:\n x = (HashMap) reservedseats10;\n break;\n }\n } else {\n System.out.println(\"error!\");;\n }\n\n } catch (Exception e) {\n System.out.println(\"Error!\");\n\n }\n return x; //Returns hashmap to SeatReservation Class\n }", "StoreResponse add(CACHE_ELEMENT e);", "void addPermanent(Permanent permanent, int createOrder);", "public JSONResponse offline(HashMap<String, String> parameters) {\n\t\tString pos = parameters.get(\"pos\"); \t\t\t\t\t// the point of sale code.\n\t\tString id = parameters.get(\"id\"); \t\t\t\t\t\t// the number of the reservation\n\t\tString quote = parameters.get(\"quote\"); \t\t\t\t// the quoted price of the reservation\n\t\tString cost = parameters.get(\"cost\"); \t\t\t\t\t// the STO cost of the reservation\n\t\tString deposit = parameters.get(\"deposit\"); \t\t\t// the deposit % to confirm the reservation\n\t\tString termsaccepted = parameters.get(\"termsaccepted\"); // true if the reservation is accepted\n\t\tString notes = parameters.get(\"notes\"); \t\t\t\t// the reservation notes\n\n\t\tif (id == null || id.isEmpty() || id.length() > 10) {throw new ServiceException(Error.reservation_id, id);}\n\n\t\tSqlSession sqlSession = RazorServer.openSession();\n\t\tReservationWidgetItem result = new ReservationWidgetItem();\n\t\ttry {\n\t\t\tParty organization = JSONService.getParty(sqlSession, pos);\n\t\t\tReservation reservation = new Reservation();\n\t\t\treservation.setOrganizationid(organization.getId());\n\t\t\treservation.setId(id);\n\t\t\treservation = sqlSession.getMapper(ReservationMapper.class).readbyorganization(reservation);\n\t\t\tif (reservation == null || !organization.hasId(reservation.getOrganizationid())) {throw new ServiceException(Error.reservation_bad, id);}\n\t\t\t//if (reservation == null) {throw new ServiceException(Error.reservation_id, id);}\n\t\t\treservation.setQuote(Double.valueOf(quote));\n\t\t\treservation.setCost(Double.valueOf(cost));\n\t\t\treservation.setDeposit(Double.valueOf(deposit));\n\t\t\treservation.setNotes(notes);\n\t\t\treservation.setState(Boolean.valueOf(termsaccepted) ? Reservation.State.Confirmed.name() : Reservation.State.Final.name());\n\t\t\tReservationService.offline(sqlSession, reservation, Boolean.valueOf(termsaccepted));\n\t\t\tresult.setOrganizationid(organization.getId());\n\t\t\tresult.setId(id);\n\t\t\tresult.setState(reservation.getState()); //TODO handle in offline.js\n\t\t}\n\t\tcatch (Throwable x) {result.setMessage(x.getMessage());}\n\t\treturn result;\n\t}", "@Override\n\tpublic int update(Reservation objet) {\n\t\treturn 0;\n\t}", "public RentalResponse createReservation(Reservation argRequest) {\r\n\t\t\r\n\t\tRentalResponse response = service.processRequest(argRequest);\r\n\t\t\r\n\t\treturn response;\r\n\t\t\r\n\t}", "private synchronized void addTableLockObject(AbsoluteTableIdentifier absoluteTableIdentifier) {\n // add the instance to lock map if it is not present\n if (null == tableLockMap.get(absoluteTableIdentifier)) {\n tableLockMap.put(absoluteTableIdentifier, new Object());\n }\n }", "public ArrayList<Reservation> getReservation() {\n return reservations;\n }", "public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }", "public List<Prenotazione> getAllReservations(QueryParamsMap queryParamsMap) {\n final String sql = \"SELECT id, data_p , ora_inizio, ora_fine, clienti, ufficio_id, utente_id FROM prenotazioni\";\n\n List<Prenotazione> reservations = new LinkedList<>();\n\n try {\n Connection conn = DBConnect.getInstance().getConnection();\n PreparedStatement st = conn.prepareStatement(sql);\n\n ResultSet rs = st.executeQuery();\n\n Prenotazione old = null;\n while(rs.next()) {\n if(old == null){\n old = new Prenotazione(rs.getInt(\"id\"), rs.getString(\"data_p\"), rs.getInt(\"ora_inizio\"), rs.getInt(\"ora_fine\"), rs.getInt(\"clienti\"), rs.getInt(\"ufficio_id\"), rs.getString(\"utente_id\"));\n }\n else if(old.getFinalHour() == rs.getInt(\"ora_fine\") && old.getDate().equals(rs.getString(\"data_p\")) && old.getOfficeId() == rs.getInt(\"ufficio_id\") && old.getUserId() == rs.getString(\"utente_id\"))\n old = new Prenotazione(old.getId(), old.getDate(), old.getStartHour(), rs.getInt(\"ora_fine\"), old.getClients() + rs.getInt(\"clienti\"), old.getOfficeId(), old.getUserId());\n else {\n reservations.add(old);\n Prenotazione t = new Prenotazione(rs.getInt(\"id\"), rs.getString(\"data_p\"), rs.getInt(\"ora_inizio\"), rs.getInt(\"ora_fine\"), rs.getInt(\"clienti\"), rs.getInt(\"ufficio_id\"), rs.getString(\"utente_id\"));\n reservations.add(t);\n }\n }\n\n conn.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return reservations;\n }", "public int addToBasket (Airport one, Airport two) {\n\t\tFlightReservation r3 = new FlightReservation(name, one, two);\n\t\tcustomerResos.add(r3);\n\t\treturn customerResos.getNumOfReservations();\n\t}", "public List<Reservation> findByClass(Class<?> reservationClass){\n\t\tLinkedList<Reservation> result = new LinkedList<Reservation>();\n\t\tfor (Reservation reservation : reservationRepository.findAll()){\n\t\t\tif (reservationClass.isInstance(reservation)) {\n\t\t\t\tresult.add(reservation);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static void setAllocateInventry(String startDate, String endDate, String codeListstr, List<ForcastInventoryObj> forcastInventoryObjList){ \n\t \tString hashedKeyPart = StringUtil.getHashedValue(startDate+endDate+codeListstr);\n\t \tString key=ALL_ALLOCATE_INVENTORY_KEY+\"_\"+hashedKeyPart;\n\t\t\tlog.info(\"setAllocateInventry : memcache key:\"+key);\t\t\t\n\t\t\tif(memcache !=null && memcache.contains(key)){\n\t \t\tmemcache.delete(key);\n\t \t}\n\t \tmemcache.put(key, forcastInventoryObjList, Expiration.byDeltaSeconds(expireInDay));\n\t\t}", "@Override\n\tpublic Reservation getById(Long id) {\n\t\treturn reservationRepository.findById(id).get();\n\t}", "List<Reservation> findByMovie(Movie movie);", "@Transactional(isolation=Isolation.REPEATABLE_READ)\r\n public boolean reserveSeats(Seats seats, String screenName){\r\n String rowName;\r\n ArrayList<Seat> listOfSeatsToReserve = new ArrayList<>();\r\n for(Map.Entry<String,ArrayList<Integer>> row : seats.getSeats().entrySet()){\r\n rowName = row.getKey();\r\n for(Integer seatNumber : row.getValue()){\r\n Optional<Seat> optionalSeat = seatsRepository.findByScreenNameAndRowNameAndSeatNumberAndReserved(screenName, rowName, seatNumber, false);\r\n if(optionalSeat.isPresent())\r\n listOfSeatsToReserve.add(optionalSeat.get());\r\n else\r\n return false;\r\n }\r\n }\r\n for(Seat seat : listOfSeatsToReserve){\r\n seat.setReserved(true);\r\n seatsRepository.save(seat);\r\n }\r\n return true;\r\n }", "@Override\n\tpublic Reservation findById(Integer id) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void testGetReservation() throws ReservationNotFoundException {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tReservation res2 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\n\t\tassertNotNull(res1.getId());\n\t\tassertNotNull(res2.getId());\n\n\t\t// Check if second reservation is returned\n\t\tReservation res2Result = bookingManagement.getReservation(res2.getId());\n\t\tassertNotNull(res2Result);\n\t\tassertEquals(res2, res2Result);\n\t}", "public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }", "public void addReservation(Prenotazione newReservation) {\n final String sql = \"INSERT INTO prenotazioni (data_p, ora_inizio, ora_fine, clienti, ufficio_id, utente_id) VALUES (?,?,?,?,?,?)\";\n\n try {\n Connection conn = DBConnect.getInstance().getConnection();\n PreparedStatement st = conn.prepareStatement(sql);\n st.setString(1, newReservation.getDate());\n st.setInt(2, newReservation.getStartHour());\n st.setInt(3, newReservation.getFinalHour());\n st.setInt(4, newReservation.getClients());\n st.setInt(5, newReservation.getOfficeId());\n st.setString(6, newReservation.getUserId());\n\n st.executeUpdate();\n\n conn.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Reservation(String userId, Show show, ArrayList<String> reservation) {\r\n this.userId = userId;\r\n this.show = show;\r\n this.seats = reservation;\r\n calculatePrice();\r\n }", "@Override\n\tpublic Reserve getReserveById(int rid) {\n\t\treturn reserveDao.getReserveById(rid);\n\t}", "public static void putRDOToCache(String id, ResDesObject rdo) {\n\t\tResourceObject ro = getROFromCache(id);\r\n\t\ttry {\r\n\t\t\tif (ro == null) // not found, get from db\r\n\t\t\t\tro = DataEngine.getROById(id, true);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.error(\"get ro failed, id=\" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (ro == null) // ro no exist any more\r\n\t\t{\r\n\t\t\tLog.error(\"get ro failed, id=\" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// add rdo\r\n\t\tro.addResDesObject(rdo);\r\n\r\n\t\t// update cache\r\n\t\tMemCachedClient mc = new MemCachedClient(MEMCACHED_POOL_NAME);\r\n\t\t//mc.setPoolName(MEMCACHED_POOL_NAME);\r\n\t\tif (!mc.set(id, ro))\r\n\t\t\tLog.error(\"put resource object \" + id + \" to caceh failed\");\r\n\r\n\t}", "public void setReservationTime(String reservationTime) {\n this.reservationTime = reservationTime;\n }", "@Override\n public void addCache(String cacheName) {\n scanList.add(cacheName);\n }", "private static AvailEntry getAvailEntry(String key) {\n AvailEntry ae = null;\n Map lcache = null;\n if (GET_AVAILABLE_CACHE != null) {\n lcache = (Map) GET_AVAILABLE_CACHE.get();\n if (lcache != null) {\n ae = (AvailEntry) lcache.get(key);\n }\n }\n\n if (ae == null) {\n ae = new AvailEntry(key);\n if (lcache == null) {\n lcache = new HashMap();\n lcache.put(key, ae);\n GET_AVAILABLE_CACHE = new SoftReference(lcache);\n } else {\n lcache.put(key, ae);\n }\n }\n\n return ae;\n }", "public CalendarioFecha obtenerPorEvento(Reservacion reservacion) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.createCriteria(CalendarioFecha.class).add(Restrictions.eq(\"reservacion\", reservacion))\n\t\t \t\t.add(Restrictions.eq(\"activo\", true)).uniqueResult(); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}", "@Override\n\tpublic List<ReservationDetails> getMyReservations(User user) {\n\t\t\n\t\t\n\t\treturn rdDAO.getMyReservations(user);\n\t}", "public List<Boardreservation> getBoardReservations(int boardID);", "@RequestMapping(value = \"/Reservation\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<Reservation> listReservations() {\n\t\treturn new java.util.ArrayList<Reservation>(reservationService.loadReservations());\n\t}", "public void loadReserva(String User) {\r\n\t\tif(listaReservas.size() != 0) {\r\n\r\n\t\t}else {\r\n\t\t\tfor(int i = 0; i < 8; i++) {\r\n\t\t\t\tReservaDAO aux = new ReservaDAO();\r\n\t\t\t\taux.load_reserva(User, i+1);\r\n\t\t\t\tif(aux.getTitulo() != null) {\r\n\t\t\t\t\tlistaReservas.add(aux);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}", "protected void addTileToCache(ElevationTile tile, BufferWrapper elevations)\n {\n if (tile.getLevelNumber() == 0)\n this.levelZeroTiles.put(tile.getTileKey(), tile);\n else\n this.getMemoryCache().add(tile.getTileKey(), tile, elevations.getSizeInBytes());\n }", "private void ensureRatingCache() {\n if (cache == null) {\n synchronized (this) {\n if (cache == null) {\n cache = new EventCollectionDAO(Cursors.makeList(csvDao.streamEvents()));\n }\n }\n }\n }", "public void setReservationId(int reservationId) {\n\t\tthis.reservationId = reservationId;\n\t}", "public void addAvailability(Availability a) {\n\t\tif(availability == null) {\n\t\t\tavailability = new HashSet<>();\n\t\t}\n\t\tthis.availability.add(a);\n\t}", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "public List<Reservation> findByReservationUser_Id(@Param(\"id\") int id);", "@SuppressWarnings(\"unchecked\")\n @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)\n public List<Reservations> getAll() {\n Session s = sessionFactory.getCurrentSession();\n Query hql = s.createQuery(\"From Reservations\");\n return hql.list();\n }" ]
[ "0.6474108", "0.58406377", "0.57780075", "0.5706776", "0.5688845", "0.56382966", "0.5580661", "0.5528651", "0.5517893", "0.54950637", "0.5470839", "0.5448547", "0.54453593", "0.5420819", "0.53910327", "0.5361245", "0.5356339", "0.5302475", "0.522004", "0.52134174", "0.5208307", "0.52033013", "0.5152087", "0.51339734", "0.50901806", "0.5088685", "0.5072461", "0.503846", "0.50186497", "0.50147516", "0.5002931", "0.4998585", "0.4955014", "0.49536973", "0.49461886", "0.4941829", "0.49266478", "0.4926304", "0.49181798", "0.49008012", "0.48863652", "0.48724243", "0.48712292", "0.4866599", "0.4846567", "0.484029", "0.48292032", "0.4828011", "0.4825487", "0.4810722", "0.47946358", "0.4785872", "0.47846332", "0.47774553", "0.47562397", "0.47542256", "0.475129", "0.47449926", "0.47365135", "0.4730304", "0.4728352", "0.4705773", "0.47038838", "0.46992517", "0.46918258", "0.46805412", "0.46769428", "0.4661173", "0.46468696", "0.46432036", "0.4629179", "0.462276", "0.46179524", "0.4614424", "0.46034113", "0.45883805", "0.45861617", "0.45838875", "0.45740315", "0.45718238", "0.4570713", "0.45704213", "0.45671862", "0.45635456", "0.45613953", "0.4545698", "0.45452264", "0.45385122", "0.4538416", "0.45352307", "0.4526237", "0.4524707", "0.4520317", "0.45174137", "0.45122162", "0.4506431", "0.4502", "0.44922298", "0.44912237", "0.44906572" ]
0.7482333
0
Gets the most recent reservation from the collection containing them.
public static Reservation getLatestReservation() { return RESERVATIONS.size() == 0 ? null : RESERVATIONS.iterator().next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public V getLatest() {\n return lastItemOfList(versions);\n }", "Book getLatestBook();", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(!reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public OccurrenceInfo getLastOccurrence() throws ServiceLocalException {\n\t\treturn (OccurrenceInfo) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(\n\t\t\t\t\t\tAppointmentSchema.FirstOccurrence);\n\t}", "public Room getLastRoom(){return this.aLastRooms.pop();}", "public Collection<ReservationHistoryDTO> getReservationsHistory() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightReservationId(flightReservation.getId());\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\treservationDTO.setRoomReservationId(roomReservation.getId());\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t\t//Long hotelId videcemo kako\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\treservationDTO.setVehicleReservationId(vehicleReservation.getId());\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public Seat bestAvailableSeat() {\r\n\t\tfor (Seat s : seats) {\r\n\t\t\tif (!s.reserved) {\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if no seats available return null\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Users findLatest() {\n\t\treturn (Users) sessionFactory.getCurrentSession().createQuery(\"from Users order by id DESC\").setMaxResults(1).uniqueResult();\r\n\t}", "public ArrayList<Reservation> getReservation() {\n return reservations;\n }", "public Room getLastRoom() // from my understanding this pops the last entry and replaces it with the one before\n { // might need a if test to prevent a null return and say there are no rooms previous.\n Room room = roomHistory.pop();\n return room;\n }", "public T last() throws EmptyCollectionException;", "public Object peek() {return collection.get(collection.size() - 1);}", "List<Expenses> latestExpenses();", "Article findLatestArticle();", "public Reservation reserveNext() {\n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n while (true) {\n if (++m_lastReservable >= m_reservables.size()) {\n m_lastReservable = 0;\n }\n \n final Reservable reservable =\n (Reservable)m_reservables.get(m_lastReservable);\n \n if (reservable.reserve()) {\n return reservable;\n }\n }\n }\n }", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public Scholl last() {\n String sql = \"SELECT * FROM \" + Value.TABLE_SCHOLLS + \" ORDER BY \" + Value.COLUMN_NODE + \" DESC LIMIT 1\";\n\n Cursor c = db.rawQuery(sql, null);\n\n if (c != null)\n c.moveToFirst();\n\n Scholl scholl = new Scholl();\n scholl.setUid((c.getString(c.getColumnIndex(Value.COLUMN_UID))));\n scholl.setNode(c.getString(c.getColumnIndex(Value.COLUMN_NODE)));\n scholl.setCaption(c.getString(c.getColumnIndex(Value.COLUMN_CAPTION)));\n scholl.setImage(c.getString(c.getColumnIndex(Value.COLUMN_IMAGE)));\n scholl.setCreated(c.getString(c.getColumnIndex(Value.COLUMN_CREATED)));\n scholl.setStatus(c.getString(c.getColumnIndex(Value.COLUMN_STATUS)));\n scholl.setRead(c.getString(c.getColumnIndex(Value.COLUMN_READ)));\n\n c.close();\n\n return scholl;\n }", "public RaceSituation getLatestByStage(Stage stage);", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public Order readLatest() {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT o.customer_id, oi.order_id, \"\r\n\t\t\t\t\t\t+ \"GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items \"\r\n\t\t\t\t\t\t+ \"FROM orders o \"\r\n\t\t\t\t\t\t+ \"INNER JOIN orders_items oi \"\r\n\t\t\t\t\t\t+ \"ON o.order_id = oi.order_id \"\r\n\t\t\t\t\t\t+ \"INNER JOIN items i \"\r\n\t\t\t\t\t\t+ \"ON oi.item_id = i.item_id \"\r\n\t\t\t\t\t\t+ \"GROUP BY oi.order_id \"\r\n\t\t\t\t\t\t+ \"ORDER BY o.order_id DESC LIMIT 1\");) {\r\n\t\t\tresultSet.next();\r\n\t\t\treturn modelFromResultSet(resultSet);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Election getElectionDay() {\t\t\r\n\t\tOptional<Election> election = null;\r\n\t\tList<Election> electionList = DataDAO.getElectionList();\r\n\t\telection = electionList.stream().filter(e -> e.getElectionDate().equals(DateUtil.asDate(LocalDate.now()))).findFirst();\r\n\t\tif (election.isPresent()) {\r\n\t\t\treturn election.get();\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}", "T latest();", "public RaceSituation getLatestByStage(Stage stage, Long limit);", "public Item getLast();", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public Date getDate() {\n/* 150 */ Date[] dates = getDates();\n/* 151 */ if (dates != null) {\n/* 152 */ Date latest = null;\n/* 153 */ for (int i = 0, c = dates.length; i < c; i++) {\n/* 154 */ if (latest == null || dates[i].getTime() > latest.getTime()) {\n/* 155 */ latest = dates[i];\n/* */ }\n/* */ } \n/* 158 */ return latest;\n/* */ } \n/* 160 */ return null;\n/* */ }", "@Override\n\tpublic Reserve getReserveById(int rid) {\n\t\treturn reserveDao.getReserveById(rid);\n\t}", "public LiveData<PersonEntity> getLatestEntry() {\n return latestPersonEntry;\n }", "public List<Integer> getMostRecentResourceId() {\n\t\treturn jtemp.queryForList(\"select max(resource_id) from resources\", Integer.class);\n\t\t//Note: Should probably be changed to use queryForObject.\n\t}", "public Date getLastSelectionDate()\n/* */ {\n/* 193 */ return isSelectionEmpty() ? null : (Date)this.selectedDates.last();\n/* */ }", "public List<ReservationModel> getLatestReservationByPatientId(Integer patientId, Integer limit) {\n\t\tList<ReservationModel> result = new ArrayList<ReservationModel>();\n\t\tList<Reservation> reservations = reservationRepository.findByPatientId(patientId, limit);\n\t\tif (reservations != null) {\n\t\t\tfor (Reservation reservation : reservations) {\n\t\t\t\tresult.add(reservation.toModel(mapper));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Cursor fetchLatestBooks() {\n \tSQLiteDatabase db = dbHelper.getReadableDatabase();\n \tCursor c = db.query(TABLE_NAME, BOOK_COLUMNS, null, null, null, null, KEY_LAST_MODIFIED + \" DESC\");\n \tLog.i(TAG, c.getCount() + \"books loaded from db.\");\n \treturn c;\n\t}", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public Object last()throws ListExeption;", "public jakarta.mail.Message GetLatestMail()\n {\n try {\n Folder inbox = store.getFolder(\"Inbox\");\n inbox.open(Folder.READ_WRITE);\n\n Message[] mails = inbox.getMessages();\n ArrayUtils.reverse(mails);\n\n logEmail(mails[0]);\n\n return mails[0];\n } catch (Exception e) {\n e.printStackTrace();\n\n failStep(e.getMessage());\n }\n\n return null;\n }", "public static Items findLastRow() {\r\n Items item = dao().findLastRow();\r\n return item;\r\n }", "public Date getLatestDate() {\r\n\t\tCriteriaBuilder cb = em.getCriteriaBuilder();\r\n\t\tCriteriaQuery<TestLinkMetricMeasurement> query = cb.createQuery(TestLinkMetricMeasurement.class);\r\n\t\tRoot<TestLinkMetricMeasurement> root = query.from(TestLinkMetricMeasurement.class);\r\n\t\tquery.select(root);\r\n\t\tquery.orderBy(cb.desc(root.get(TestLinkMetricMeasurement_.timeStamp)));\r\n\t\tDate latest;\r\n\t\ttry {\r\n\t\t\tTestLinkMetricMeasurement m = em.createQuery(query).setMaxResults(1).getSingleResult();\r\n\t\t\tlatest = m.getTimeStamp();\t\t\t\r\n\t\t} catch (NoResultException nre) {\r\n\t\t\tlatest = null;\r\n\t\t}\r\n\t\treturn latest;\r\n\t}", "public frameTableElement findVictimLRU(){\n int smallestLastReferenceTime = Integer.MAX_VALUE;\n frameTableElement correspondingElement = null;\n\n for(int i=0; i< frameTable.getSize(); i++){\n frameTableElement currElement = frameTable.getElement(i);\n if(currElement.getLastTimeReferenced() < smallestLastReferenceTime){\n smallestLastReferenceTime = currElement.getLastTimeReferenced();\n correspondingElement = currElement;\n }\n }\n\n return correspondingElement;\n }", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public List<Item> readLatestOrderItem() {\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t+ \"ORDER BY id DESC LIMIT 1;\";\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\tresultSet.next();\n\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\torderItemList.add(item);\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "EvaluationRecent selectByPrimaryKey(String id);", "private Restaurant findHighestRevenueRestaurant(){\r\n Restaurant tempRestaurant = new Restaurant(\"dummy\", OrderType.BOTH);\r\n for(Restaurant restaurant : restaurantMap.getRestaurantMap().values()){\r\n if(restaurant.getRevenue() > tempRestaurant.getRevenue()){\r\n tempRestaurant = restaurant;\r\n }\r\n }\r\n return tempRestaurant;\r\n }", "private Date getLastReviewForApp(String appName) {\n\t\tQuery<Review> query = this.datastore.createQuery(Review.class);\n\t\tquery.criteria(\"appName\").equal(appName);\n\t\tquery.order(\"-reviewDate\").get();\n\t\tList<Review> reviews = query.asList();\n\t\tif (reviews.isEmpty() || reviews == null)\n\t\t\treturn null;\n\t\tReview lastReview = reviews.get(0);\n\t\treturn lastReview.getReviewDate();\n\t}", "@Override\r\n\tpublic List<Reservation> rechercherReservation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n \tpublic synchronized MessageReference getLatestMessage() throws NoSuchMessageException {\n \t// TODO: We can probably cache the latest message date in this SubscribedBoard object.\n \t\n final Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this);\n q.descend(\"mMessageDate\").orderDescending();\n ObjectSet<MessageReference> allMessages = q.execute();\n \n // Do not use a constrain() because the case where the latest message has no message object should not happen very often.\n for(MessageReference ref : allMessages) {\n \ttry {\n \t\tref.initializeTransient(mFreetalk);\n \t\tref.getMessage(); // Check whether the message was downloaded\n \t\treturn ref;\n \t}\n \tcatch(MessageNotFetchedException e) {\n \t\t// Continue to next MessageReference\n \t}\n }\n \n throw new NoSuchMessageException();\n }", "public T getLast(){\n\treturn _end.getCargo();\n }", "CurrentReservation createCurrentReservation();", "public CarAndTime getFirstCarAndTime() {\n\t\tif (this.mVehicles.size() > 0) {\n\t\t\treturn mVehicles.getFirst();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Reservation getById(Long id) {\n\t\treturn reservationRepository.findById(id).get();\n\t}", "public Reserve getReserve() {\n return reserve;\n }", "public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }", "Collection<Reservation> getReservations() throws DataAccessException;", "public Reservation getTheObject(){\n return this;\n }", "private int getLastIDRisposte() {\n\n\t\tArrayList<Integer> risposteIdList = new ArrayList<>();\n\t\trisposteIdList.add(0);\n\t\tDB db = getDB();\t\t\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\t\n\t\tfor(Map.Entry<Long, Risposta> risposta : risposte.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta)\n\t\t\t\trisposteIdList.add(risposta.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(risposteIdList);\n\t\treturn id;\n\t}", "public E pollLast();", "public Movimiento buscarUltimoMovimiento(ArrayList<Movimiento> listaMovimientosAnteriores) {\n\t\tMovimiento ultimoMovimiento = listaMovimientosAnteriores.get(0);\n\t\tfor (Movimiento movimiento : listaMovimientosAnteriores) {\n\t\t\tif (movimiento.getFecha().after(ultimoMovimiento.getFecha())) {\n\t\t\t\tultimoMovimiento = movimiento;\n\t\t\t}\n\t\t}\n\t\treturn ultimoMovimiento;\n\t}", "public Place tail(){\n return places.get(places.size()-1);\n }", "@Override\n public Earthquake getLatestEarthquake() {\n return this.earthquakeRepository.findFirstByOrderByHappenedOnDesc();\n }", "Employee getOldestEmployee() {\n\t}", "public Page getLastPageObject() {\n return getPageObject(pages.length - 1);\n }", "Date getForLastUpdate();", "public int getReservationId() { return reservationId; }", "@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "public interface BaseTimeSlotJpaRepository extends JpaRepository<BaseTimeSlots, Long> {\n\n List<BaseTimeSlots> findByClassDateAndTeachingTypeAndClientType(Date classDate, Integer teachingType, Integer clientType);\n\n @Query(value = \"select max(e.classDate) from BaseTimeSlots e\")\n Date findMaxDate();\n}", "public Hotel bestHotel() {\r\n \tArrayList<Hotel> hotels = hotelDAO.getHotelList();\r\n \tHotel bestHotel=hotels.get(0);\r\n \tfor (int i=0; i<hotels.size();i++) {\r\n \t\tif(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) {\r\n \t\t\tbestHotel=hotels.get(i);\r\n \t\t}\r\n \t}\r\n \treturn bestHotel;\r\n }", "private SiteReservation findById(Integer id){\n SiteReservation reservation;\n try {\n reservation = repo.findById(id).get();\n } catch (NoSuchElementException e){\n throw new ReservationNotFoundException(id);\n }\n return reservation;\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 O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "public List<ReservationFlightInfo> getPreviousReservationsRest(String email) {\n\n System.out.println(\"Email \" + email);\n\n Customer customer = customerRepository.findByEmail(email);\n\n if (customer == null) {\n return null;\n }\n\n\n List<Reservation> reservations = reservationRepository.findByCustomerid(customer.getCustomerid());\n\n System.out.println(\"reservation list size \" + reservations.size());\n\n List<ReservationFlightInfo> reservationInfo= new ArrayList<ReservationFlightInfo>();\n\n for (int i = 0; i < reservations.size(); i++) {\n Reservation r = reservations.get(i);\n Flight previousFlight = flightRepository.findByFlightid(r.getDepartureflightid());\n System.out.println(\"Flight Departure Airport (Flight) \" + previousFlight.getDepartureairport());\n\n\n ReservationFlightInfo tempInfo = new ReservationFlightInfo(r.getReservationid(), previousFlight.getFlightid(), previousFlight.getDepartureairport(), previousFlight.getArrivalairport(), previousFlight.getDeparturedate(), previousFlight.getStatus(), r.getBookingStatus(), r.getReservationorigin());\n String testStatus = tempInfo.getBookingStatus();\n String testOrigin = tempInfo.getReservationOrigin();\n System.out.println(\"test status = \" + testStatus);\n System.out.println(\"test origin = \" + testOrigin);\n\n if (testStatus.equals(\"confirmed\") && testOrigin.equals(\"planner\")) {\n reservationInfo.add(tempInfo);\n System.out.println(\"Flight Departure Airport (FlightInfo) \" + tempInfo.getDepartureAirport());\n System.out.println(\"Reservation ID: \" + tempInfo.getReservationId());\n } else {\n System.out.println(\"Not confirmed or planner\");\n }\n }\n\n System.out.println(\"Reservation Info List Contents:\" + reservationInfo);\n return reservationInfo;\n }", "long getLastBonusTicketDate();", "public GetLatestMovieResponse getLatestMovie() {\n return getLatestMovie(null);\n }", "public List<ReservationFlightInfo> getPreviousReservations(String email) {\n\n System.out.println(\"Email \" + email);\n\n Customer customer = customerRepository.findByEmail(email);\n\n if (customer == null) {\n return null;\n }\n\n List<Reservation> reservations = reservationRepository.findByCustomerid(customer.getCustomerid());\n\n System.out.println(\"reservation list size \" + reservations.size());\n\n List<ReservationFlightInfo> reservationInfo= new ArrayList<ReservationFlightInfo>();\n\n for (int i = 0; i < reservations.size(); i++) {\n Reservation r = reservations.get(i);\n Flight previousFlight = flightRepository.findByFlightid(r.getDepartureflightid());\n System.out.println(\"Flight Departure Airport (Flight) \" + previousFlight.getDepartureairport());\n\n\n ReservationFlightInfo tempInfo = new ReservationFlightInfo(r.getReservationid(), previousFlight.getFlightid(), previousFlight.getDepartureairport(), previousFlight.getArrivalairport(), previousFlight.getDeparturedate(), previousFlight.getStatus(), r.getBookingStatus(), r.getReservationorigin());\n String testStatus = tempInfo.getBookingStatus();\n String testOrigin = tempInfo.getReservationOrigin();\n System.out.println(\"test status = \" + testStatus);\n System.out.println(\"test origin = \" + testOrigin);\n\n if (testStatus.equals(\"confirmed\") && testOrigin.equals(\"kana\")) {\n reservationInfo.add(tempInfo);\n System.out.println(\"Flight Departure Airport (FlightInfo) \" + tempInfo.getDepartureAirport());\n System.out.println(\"Reservation ID: \" + tempInfo.getReservationId());\n }\n }\n\n System.out.println(\"Reservation Info List Contents:\" + reservationInfo);\n return reservationInfo;\n }", "public Booking getBooking(int bookingNr)\r\n {\r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getBookingNr() == bookingNr)\r\n {\r\n return booking;\r\n }\r\n }\r\n \r\n return null;\r\n }", "public Page getLastPageObject() {\n return getPageObject(pages.length - 1);\n }", "public SubLocationHandler getLatestSubLocation (){\n\t\tString selectQuery = \"SELECT * FROM \" + table_subLocation + \" ORDER BY \" \n\t\t\t\t+ key_date_entry + \" DESC \" + \" LIMIT 1 \" ;\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif(cursor.getCount() == 0)\n\t\t\treturn null;\n\t\tcursor.moveToFirst();\n\t\tSubLocationHandler subLocationHandlerArray = new SubLocationHandler(\n\t\t\t\tcursor.getInt(0), \n\t\t\t\tcursor.getInt(1), \n\t\t\t\tcursor.getString(2), \n\t\t\t\tcursor.getString(3), \n\t\t\t\tcursor.getDouble(4), \n\t\t\t\tcursor.getDouble(5), \n\t\t\t\tcursor.getInt(6)\n\t\t\t\t);\n\t\tdb.close();\n\t\treturn subLocationHandlerArray;\n\t}", "public Item getLast() {\n return items[size - 1];\n }", "public List<Boardreservation> getBoardReservations(int boardID);", "public T getLast();", "public T getLast();", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public Dog findOldest() {\r\n\t\tif (root == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn root.findOldest();\r\n\t}", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public E getLast();", "@JsonSerialize(using=AfJson.CalendarSerializer.class)\n public Long getLastScan()\n {\n return _lastScan;\n }", "public Reservation searchReservation(int resvNo) {\n\t\tReservation resv;\n\t\tfor (int i = 0; i < rList.size(); i++) {\n\t\t\tif (rList.get(i).getResvNo() == resvNo) {\n\t\t\t\tresv = rList.get(i);\n\t\t\t\treturn resv;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Reservation number does not exist!\");\n\t\treturn null;\n\t}", "public TypeHere getLast() {\n return items[size - 1];\n }", "public Reservation makeReservation(Reservation trailRes){\n //Using a for each loop to chekc to see if a reservation can be made or not\n if(trailRes.getName().equals(\"\")) {\n System.out.println(\"Not a valid name\");\n return null;\n }\n \n \n for(Reservation r: listR){\n if(trailRes.getReservationTime() == r.getReservationTime()){\n System.out.println(\"Could not make the Reservation\");\n System.out.println(\"Reservation has already been made by someone else\");\n return null;\n }\n }\n\n //if the time slot is greater than 10 or less than 0, the reservation cannot be made\n if(trailRes.getReservationTime() > 10 || trailRes.getReservationTime() < 0){\n System.out.println(\"Time slot not available\");\n return null;\n }\n\n //check to see if the reservable list is empty or not\n if(listI.isEmpty())\n {\n System.out.println(\"No reservation available\");\n return null;\n }\n\n //find the item and fitnessValue that will most fit our reservation\n Reservable item = listI.get(0);\n int fitnessValue = item.findFitnessValue(trailRes);\n\n //loop through the table list and find the best fit for our reservation\n for(int i = 0; i < listI.size() ; i++){\n if(listI.get(i).findFitnessValue(trailRes) > fitnessValue){\n item = listI.get(i);\n fitnessValue = item.findFitnessValue(trailRes);\n }\n }\n //if we have found a table that works, then we can make our reservation\n if(fitnessValue > 0){\n //add reservation to our internal list\n //point our reservable to the appropriate reservation\n //set the reservable \n //print out the message here not using the iterator\n listR.add(trailRes);\n item.addRes(trailRes);\n trailRes.setMyReservable(item);\n System.out.println(\"Reservation made for \" + trailRes.getName() + \" at time \" + trailRes.getReservationTime() + \", \" + item.getId());\n return trailRes;\n }\n System.out.println(\"No reservation available, number of people in party may be too large\");\n return null; \n }", "public static Date getConvoLatestActivity(ConversationBean convo) {\r\n\t\tDBCollection activitiesColl = getCollection(ACTIVITIES_COLLECTION);\r\n\t\t\r\n\t\tDBRef convoRef = createRef(ConversationDAO.CONVERSATIONS_COLLECTION, convo.getId());\r\n\t\tDBObject query = new BasicDBObject(\"convoId\", convoRef);\r\n\t\tDBCursor cursor = \r\n\t\t\tactivitiesColl.find(query, new BasicDBObject(\"time\", 1)).sort(new BasicDBObject(\"time\", -1)).limit(1);\r\n\t\t\r\n\t\tif (cursor.hasNext()) {\r\n\t\t\tDate latestActivityTime = (Date)cursor.next().get(\"time\");\r\n\t\t\treturn latestActivityTime;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "SnippetSet getLatestSet();", "protected Ticket completeTicket()\n\t{\n\t\tif (tickets.size() != 0)\n\t\t{\n\t\t\treturn tickets.pop();\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public EventBean getLastEventBean() {\n synchronized (eventBeans) {\n EventBean lastEventBean = eventBeans.get(eventBeans.size() - 1);\n if (eventBeans.size() > 0) {\n eventBeans.remove(eventBeans.size() - 1);\n }\n System.out.println(\"Last Event Bean getted: \" + lastEventBean + \" current eventBeans: \" + eventBeans);\n return lastEventBean;\n }\n }", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "LastProcessingDate findFirstByDateIsNotNull();", "@JsonIgnore\n\tpublic Date getLatestUpdate()\n\t{\n\t\treturn latestUpdate;\n\t}", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "List<Reservierung> selectAll() throws ReservierungException;" ]
[ "0.61128074", "0.61106026", "0.60392845", "0.59966505", "0.58818597", "0.57360154", "0.5649391", "0.5648818", "0.56367195", "0.55998313", "0.55704385", "0.5547236", "0.55375975", "0.55066586", "0.55062044", "0.54561174", "0.5437116", "0.5432974", "0.5405276", "0.53493655", "0.53360635", "0.53189564", "0.5273589", "0.52072287", "0.51946497", "0.5177668", "0.5153564", "0.5140311", "0.5126272", "0.5098572", "0.50960433", "0.50948226", "0.50783193", "0.5077652", "0.506598", "0.506023", "0.5056372", "0.5055018", "0.5052643", "0.503808", "0.5037701", "0.5034298", "0.50234455", "0.50198865", "0.5012271", "0.500765", "0.49789426", "0.49779496", "0.49583787", "0.49570107", "0.49561375", "0.4947936", "0.49424827", "0.49421695", "0.4935972", "0.49344403", "0.4931145", "0.49163544", "0.4901181", "0.49006498", "0.48984402", "0.48904717", "0.4890026", "0.48863024", "0.488201", "0.4881843", "0.48794016", "0.4872874", "0.48697826", "0.48660576", "0.48657668", "0.48650753", "0.48590866", "0.48528904", "0.48500496", "0.4849577", "0.48412156", "0.48363853", "0.48325178", "0.48306298", "0.48305404", "0.4823157", "0.4823157", "0.4817785", "0.48169625", "0.481331", "0.4804375", "0.48032692", "0.47953072", "0.47933552", "0.47928432", "0.4789301", "0.47864047", "0.47858974", "0.477326", "0.47726813", "0.477151", "0.4762581", "0.47534376", "0.47521403" ]
0.76178586
0
exists due to advice found at HTTP connection reuse which was buggy prefroyo
private void setupHttpConnectionStuff() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) { System.setProperty("http.keepAlive", "false"); } if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) { try { final File httpCacheDir = new File(getCacheDir(), "http"); HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES); } catch (IOException ioe) { Log.e(Constants.LOG_TAG, "Could not install http cache on this device."); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void disableConnectionReuseIfNecessary() {\n\t\t// HTTP connection reuse which was buggy pre-froyo\n\t\tif (hasHttpConnectionBug()) {\n\t\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\t}\n\t}", "private static void disableConnectionReuseIfNecessary() {\n\t if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO) {\n\t System.setProperty(\"http.keepAlive\", \"false\");\n\t }\n\t}", "private static void disableConnectionReuseIfNecessary() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n }", "private static void disableConnectionReuseIfNecessary() {\n if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n }", "public Boolean tcpReuseConn();", "@Override\n public void connectionLost(Throwable cause) {\n }", "@Override\n public void connectionLost() {\n }", "@Override\n \tpublic void reconnectionSuccessful() {\n \t}", "@Override\n public void connectionLost(Throwable cause) {\n\n }", "@Test(timeout=10000)\n public void testHttpOnErrorBeforeSend1stAnd2ndHappyPathKeepAliveReuseConnection() throws Exception {\n \n final HttpTestServer server = createTestServerWithDefaultHandler(false, \"test\");\n\n final TestChannelCreator creator = new TestChannelCreator();\n \n final TestChannelPool pool = new TestChannelPool(1);\n final DefaultHttpClient client = new DefaultHttpClient(creator, pool,\n ENABLE_LOGGING);\n \n try {\n // first \n {\n final TestSubscriber<HttpObject> testSubscriber = new TestSubscriber<HttpObject>();\n final CountDownLatch unsubscribed = new CountDownLatch(1);\n try {\n client.defineInteraction(\n new LocalAddress(\"test\"), \n Observable.<HttpObject>error(new RuntimeException(\"test error\")))\n .compose(RxFunctions.<HttpObject>countDownOnUnsubscribe(unsubscribed))\n .subscribe(testSubscriber);\n unsubscribed.await();\n \n // await for 1 second\n pool.awaitRecycleChannels(1);\n } finally {\n assertEquals(1, testSubscriber.getOnErrorEvents().size());\n assertEquals(RuntimeException.class, \n testSubscriber.getOnErrorEvents().get(0).getClass());\n assertEquals(0, testSubscriber.getCompletions());\n assertEquals(0, testSubscriber.getOnNextEvents().size());\n }\n }\n assertEquals(1, creator.getChannels().size());\n creator.getChannels().get(0).assertNotClose(1);\n // second\n {\n final Iterator<HttpObject> itr = \n client.defineInteraction(\n new LocalAddress(\"test\"), \n Observable.just(fullHttpRequest()))\n .map(RxNettys.<HttpObject>retainer())\n .toBlocking().toIterable().iterator();\n \n final byte[] bytes = RxNettys.httpObjectsAsBytes(itr);\n \n assertTrue(Arrays.equals(bytes, HttpTestServer.CONTENT));\n }\n assertEquals(1, creator.getChannels().size());\n creator.getChannels().get(0).assertNotClose(1);\n } finally {\n client.close();\n// server.unsubscribe();\n server.stop();\n }\n }", "@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }", "@Override\n public void connectionLost(Throwable arg0) {\n\n }", "@Test\r\n\tpublic void test_KeepAlive() throws UnknownHostException, IOException {\n\t\tSocket socket = new Socket(\"localhost\", 8080);\r\n\t\t\r\n\t\t// first request\r\n\t\tRawHttpResponse<?> response = executeRequest(\"GET\", \"/index.html\", \"Connection: keep-alive\", socket);\r\n\t\t// check the response code\r\n\t\tassertEquals(200, response.getStatusCode());\r\n\t\t// check for keep-alive responsse\r\n\t\tOptional<String> connectionHeader = response.getHeaders().getFirst(\"Connection\");\r\n\t\tassertTrue(connectionHeader.isPresent());\r\n\t\tassertEquals(\"keep-alive\", connectionHeader.get());\r\n\r\n\t\t// second request\r\n\t\tresponse = executeRequest(\"GET\", \"/img/main/logo.jpg\", \"\", socket);\r\n\t\t// check the response code\r\n\t\tassertEquals(200, response.getStatusCode());\r\n\t\t// check for keep-alive responsse\r\n\t\tconnectionHeader = response.getHeaders().getFirst(\"Connection\");\r\n\t\tassertFalse(connectionHeader.isPresent());\r\n\t\t\r\n\t\tsocket.close();\r\n\t}", "@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}", "public IdleConnectionHandler() {\n/* 61 */ this.connectionToTimes = new HashMap<HttpConnection, TimeValues>();\n/* */ }", "@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}", "@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}", "@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}", "private void doPing()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_JSON_DATA, \r\n PING_URL,\r\n SN_HOST,\r\n null, \r\n cookieData,\r\n false,\r\n token,\r\n secret ) );\r\n }", "@Override\n\tpublic void reconnect() {\n\n\t}", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "public void recycle() {\n LOG.trace(\"enter HttpMethodBase.recycle()\");\n\n releaseConnection();\n\n path = null;\n followRedirects = false;\n doAuthentication = true;\n realm = null;\n proxyRealm = null;\n queryString = null;\n getRequestHeaderGroup().clear();\n getResponseHeaderGroup().clear();\n getResponseTrailerHeaderGroup().clear();\n statusLine = null;\n used = false;\n http11 = true;\n responseBody = null;\n recoverableExceptionCount = 0;\n inExecute = false;\n doneWithConnection = false;\n }", "public Boolean tcpReuseChannel();", "private void checkResponseHeader(HttpResponse p_checkResponseHeader_1_) {\n/* 277 */ String s = p_checkResponseHeader_1_.getHeader(\"Connection\");\n/* */ \n/* 279 */ if (s != null && !s.toLowerCase().equals(\"keep-alive\"))\n/* */ {\n/* 281 */ terminate(new EOFException(\"Connection not keep-alive\"));\n/* */ }\n/* */ \n/* 284 */ String s1 = p_checkResponseHeader_1_.getHeader(\"Keep-Alive\");\n/* */ \n/* 286 */ if (s1 != null) {\n/* */ \n/* 288 */ String[] astring = Config.tokenize(s1, \",;\");\n/* */ \n/* 290 */ for (int i = 0; i < astring.length; i++) {\n/* */ \n/* 292 */ String s2 = astring[i];\n/* 293 */ String[] astring1 = split(s2, '=');\n/* */ \n/* 295 */ if (astring1.length >= 2) {\n/* */ \n/* 297 */ if (astring1[0].equals(\"timeout\")) {\n/* */ \n/* 299 */ int j = Config.parseInt(astring1[1], -1);\n/* */ \n/* 301 */ if (j > 0)\n/* */ {\n/* 303 */ this.keepaliveTimeoutMs = (j * 1000);\n/* */ }\n/* */ } \n/* */ \n/* 307 */ if (astring1[0].equals(\"max\")) {\n/* */ \n/* 309 */ int k = Config.parseInt(astring1[1], -1);\n/* */ \n/* 311 */ if (k > 0)\n/* */ {\n/* 313 */ this.keepaliveMaxCount = k;\n/* */ }\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "private HttpClient prepareHttpClient() {\n\t\tHttpClientParams htcParams = new HttpClientParams();\n\t\tmHttpClient = new HttpClient();\n\t\thtcParams.setConnectionManagerTimeout(300000);\n\t\thtcParams.setSoTimeout(300000);\n\t\tmHttpClient.setParams(htcParams);\n\t\treturn mHttpClient;\n\t}", "public void releaseConnection(p008cz.msebera.android.httpclient.conn.ManagedClientConnection r8, long r9, java.util.concurrent.TimeUnit r11) {\n /*\n r7 = this;\n boolean r0 = r8 instanceof p008cz.msebera.android.httpclient.impl.conn.ManagedClientConnectionImpl\n java.lang.String r1 = \"Connection class mismatch, connection not obtained from this manager\"\n p008cz.msebera.android.httpclient.util.Args.check(r0, r1)\n r0 = r8\n cz.msebera.android.httpclient.impl.conn.ManagedClientConnectionImpl r0 = (p008cz.msebera.android.httpclient.impl.conn.ManagedClientConnectionImpl) r0\n monitor-enter(r0)\n cz.msebera.android.httpclient.extras.HttpClientAndroidLog r1 = r7.log // Catch:{ all -> 0x00d2 }\n boolean r1 = r1.isDebugEnabled() // Catch:{ all -> 0x00d2 }\n if (r1 == 0) goto L_0x0029\n cz.msebera.android.httpclient.extras.HttpClientAndroidLog r1 = r7.log // Catch:{ all -> 0x00d2 }\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ all -> 0x00d2 }\n r2.<init>() // Catch:{ all -> 0x00d2 }\n java.lang.String r3 = \"Releasing connection \"\n r2.append(r3) // Catch:{ all -> 0x00d2 }\n r2.append(r8) // Catch:{ all -> 0x00d2 }\n java.lang.String r2 = r2.toString() // Catch:{ all -> 0x00d2 }\n r1.debug(r2) // Catch:{ all -> 0x00d2 }\n L_0x0029:\n cz.msebera.android.httpclient.impl.conn.HttpPoolEntry r1 = r0.getPoolEntry() // Catch:{ all -> 0x00d2 }\n if (r1 != 0) goto L_0x0031\n monitor-exit(r0) // Catch:{ all -> 0x00d2 }\n return\n L_0x0031:\n cz.msebera.android.httpclient.conn.ClientConnectionManager r1 = r0.getManager() // Catch:{ all -> 0x00d2 }\n if (r1 != r7) goto L_0x0039\n r2 = 1\n goto L_0x003a\n L_0x0039:\n r2 = 0\n L_0x003a:\n java.lang.String r3 = \"Connection not obtained from this manager\"\n p008cz.msebera.android.httpclient.util.Asserts.check(r2, r3) // Catch:{ all -> 0x00d2 }\n monitor-enter(r7) // Catch:{ all -> 0x00d2 }\n boolean r2 = r7.shutdown // Catch:{ all -> 0x00cf }\n if (r2 == 0) goto L_0x004a\n r7.shutdownConnection(r0) // Catch:{ all -> 0x00cf }\n monitor-exit(r7) // Catch:{ all -> 0x00cf }\n monitor-exit(r0) // Catch:{ all -> 0x00d2 }\n return\n L_0x004a:\n r2 = 0\n boolean r3 = r0.isOpen() // Catch:{ all -> 0x00bd }\n if (r3 == 0) goto L_0x005a\n boolean r3 = r0.isMarkedReusable() // Catch:{ all -> 0x00bd }\n if (r3 != 0) goto L_0x005a\n r7.shutdownConnection(r0) // Catch:{ all -> 0x00bd }\n L_0x005a:\n boolean r3 = r0.isMarkedReusable() // Catch:{ all -> 0x00bd }\n if (r3 == 0) goto L_0x00ab\n cz.msebera.android.httpclient.impl.conn.HttpPoolEntry r3 = r7.poolEntry // Catch:{ all -> 0x00bd }\n if (r11 == 0) goto L_0x0066\n r4 = r11\n goto L_0x0068\n L_0x0066:\n java.util.concurrent.TimeUnit r4 = java.util.concurrent.TimeUnit.MILLISECONDS // Catch:{ all -> 0x00bd }\n L_0x0068:\n r3.updateExpiry(r9, r4) // Catch:{ all -> 0x00bd }\n cz.msebera.android.httpclient.extras.HttpClientAndroidLog r3 = r7.log // Catch:{ all -> 0x00bd }\n boolean r3 = r3.isDebugEnabled() // Catch:{ all -> 0x00bd }\n if (r3 == 0) goto L_0x00ab\n r3 = 0\n int r5 = (r9 > r3 ? 1 : (r9 == r3 ? 0 : -1))\n if (r5 <= 0) goto L_0x0093\n java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch:{ all -> 0x00bd }\n r3.<init>() // Catch:{ all -> 0x00bd }\n java.lang.String r4 = \"for \"\n r3.append(r4) // Catch:{ all -> 0x00bd }\n r3.append(r9) // Catch:{ all -> 0x00bd }\n java.lang.String r4 = \" \"\n r3.append(r4) // Catch:{ all -> 0x00bd }\n r3.append(r11) // Catch:{ all -> 0x00bd }\n java.lang.String r3 = r3.toString() // Catch:{ all -> 0x00bd }\n goto L_0x0095\n L_0x0093:\n java.lang.String r3 = \"indefinitely\"\n L_0x0095:\n cz.msebera.android.httpclient.extras.HttpClientAndroidLog r4 = r7.log // Catch:{ all -> 0x00bd }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ all -> 0x00bd }\n r5.<init>() // Catch:{ all -> 0x00bd }\n java.lang.String r6 = \"Connection can be kept alive \"\n r5.append(r6) // Catch:{ all -> 0x00bd }\n r5.append(r3) // Catch:{ all -> 0x00bd }\n java.lang.String r5 = r5.toString() // Catch:{ all -> 0x00bd }\n r4.debug(r5) // Catch:{ all -> 0x00bd }\n L_0x00ab:\n r0.detach() // Catch:{ all -> 0x00cf }\n r7.conn = r2 // Catch:{ all -> 0x00cf }\n cz.msebera.android.httpclient.impl.conn.HttpPoolEntry r3 = r7.poolEntry // Catch:{ all -> 0x00cf }\n boolean r3 = r3.isClosed() // Catch:{ all -> 0x00cf }\n if (r3 == 0) goto L_0x00ba\n r7.poolEntry = r2 // Catch:{ all -> 0x00cf }\n L_0x00ba:\n monitor-exit(r7) // Catch:{ all -> 0x00cf }\n monitor-exit(r0) // Catch:{ all -> 0x00d2 }\n return\n L_0x00bd:\n r3 = move-exception\n r0.detach() // Catch:{ all -> 0x00cf }\n r7.conn = r2 // Catch:{ all -> 0x00cf }\n cz.msebera.android.httpclient.impl.conn.HttpPoolEntry r4 = r7.poolEntry // Catch:{ all -> 0x00cf }\n boolean r4 = r4.isClosed() // Catch:{ all -> 0x00cf }\n if (r4 == 0) goto L_0x00cd\n r7.poolEntry = r2 // Catch:{ all -> 0x00cf }\n L_0x00cd:\n throw r3 // Catch:{ all -> 0x00cf }\n L_0x00cf:\n r2 = move-exception\n monitor-exit(r7) // Catch:{ all -> 0x00cf }\n throw r2 // Catch:{ all -> 0x00d2 }\n L_0x00d2:\n r1 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x00d2 }\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008cz.msebera.android.httpclient.impl.conn.BasicClientConnectionManager.releaseConnection(cz.msebera.android.httpclient.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit):void\");\n }", "private static final HttpURLConnection createDefaultConn(final URL _url) throws IOException {\n\n\t\tfinal HttpURLConnection conn = (HttpURLConnection) _url.openConnection();\n\t\tconn.setConnectTimeout(Constants.CONN_TIMEOUT);\n\n\t\treturn conn;\n\t}", "public void reuse() {}", "public void setPingOnReuse(boolean pingOnReuse)\n {\n _isPing = pingOnReuse;\n }", "@Override\n public void openConnection(OperatedClientConnection operatedClientConnection, HttpHost httpHost, InetAddress inetAddress, HttpContext httpContext, HttpParams httpParams) throws IOException {\n if (operatedClientConnection == null) throw new IllegalArgumentException(\"Connection may not be null\");\n if (httpHost == null) throw new IllegalArgumentException(\"Target host may not be null\");\n if (httpParams == null) throw new IllegalArgumentException(\"Parameters may not be null\");\n if (operatedClientConnection.isOpen()) throw new IllegalStateException(\"Connection must not be open\");\n Object object = this.schemeRegistry.getScheme(httpHost.getSchemeName());\n SchemeSocketFactory schemeSocketFactory = ((Scheme)object).getSchemeSocketFactory();\n InetAddress[] arrinetAddress = this.resolveHostname(httpHost.getHostName());\n int n = ((Scheme)object).resolvePort(httpHost.getPort());\n int n2 = 0;\n while (n2 < arrinetAddress.length) {\n HttpInetSocketAddress httpInetSocketAddress;\n Socket socket;\n block16 : {\n boolean bl;\n block15 : {\n block14 : {\n block13 : {\n object = arrinetAddress[n2];\n int n3 = arrinetAddress.length;\n bl = true;\n if (n2 != n3 - 1) {\n bl = false;\n }\n socket = schemeSocketFactory.createSocket(httpParams);\n operatedClientConnection.opening(socket, httpHost);\n httpInetSocketAddress = new HttpInetSocketAddress(httpHost, (InetAddress)object, n);\n object = null;\n if (inetAddress != null) {\n object = new InetSocketAddress(inetAddress, 0);\n }\n if (this.log.isDebugEnabled()) {\n Log log = this.log;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Connecting to \");\n stringBuilder.append(httpInetSocketAddress);\n log.debug((Object)stringBuilder.toString());\n }\n object = schemeSocketFactory.connectSocket(socket, httpInetSocketAddress, (InetSocketAddress)object, httpParams);\n if (socket != object) {\n operatedClientConnection.opening((Socket)object, httpHost);\n break block13;\n }\n object = socket;\n }\n try {\n this.prepareSocket((Socket)object, httpContext, httpParams);\n operatedClientConnection.openCompleted(schemeSocketFactory.isSecure((Socket)object), httpParams);\n return;\n }\n catch (ConnectTimeoutException connectTimeoutException) {\n break block14;\n }\n catch (ConnectException connectException) {\n break block15;\n }\n catch (ConnectTimeoutException connectTimeoutException) {\n // empty catch block\n }\n }\n if (bl) throw object;\n break block16;\n catch (ConnectException connectException) {\n // empty catch block\n }\n }\n if (bl) throw new HttpHostConnectException(httpHost, (ConnectException)object);\n }\n if (this.log.isDebugEnabled()) {\n socket = this.log;\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Connect to \");\n ((StringBuilder)object).append(httpInetSocketAddress);\n ((StringBuilder)object).append(\" timed out. \");\n ((StringBuilder)object).append(\"Connection will be retried using another IP address\");\n socket.debug((Object)((StringBuilder)object).toString());\n }\n ++n2;\n }\n }", "private Connection() {\n\n//==================================================//\n\n\n //==============================//\n\n // client = new AsyncHttpClient(true, 0, 443);\n client = new AsyncHttpClient();\n client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());\n contentType = \"application/json\";\n client.setUserAgent(System.getProperty(\"http.agent\"));\n //Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\"\n // client.setUserAgent(\"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\");\n client.setTimeout(20 * 1000);\n client.setResponseTimeout(20 * 1000);\n client.setConnectTimeout(20 * 1000);\n // client.setEnableRedirects(true);\n\n // Log.e(\"agentss\",System.getProperty(\"https.agent\"));\n gson = new GsonBuilder().serializeNulls().create();\n //client.getHttpClient().getConnectionManager().shutdown();\n/*\n try {\n KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());\n trustStore.load(null, null);\n MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);\n sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n client.setSSLSocketFactory(sf);\n }\n catch (Exception e) {\n }\n */\n\n }", "private static HttpURLConnection createDefaultConnection(String url) throws IOException {\n HttpURLConnection connection = (HttpURLConnection) (new URL(url)).openConnection();\n connection.setReadTimeout(20000);\n connection.setConnectTimeout(20000);\n return connection;\n }", "public void internetConnectionProble()\n\t\t{\n\n\n\t\t}", "private void ensureConnectionRelease() {\n if (responseConnection != null) {\n responseConnection.releaseConnection();\n responseConnection = null;\n }\n }", "public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params)\n/* */ throws IOException\n/* */ {\n/* 105 */ if (host == null) {\n/* 106 */ throw new IllegalArgumentException(\"Target host may not be null.\");\n/* */ }\n/* 108 */ if (params == null) {\n/* 109 */ throw new IllegalArgumentException(\"Parameters may not be null.\");\n/* */ }\n/* */ \n/* 112 */ if (sock == null) {\n/* 113 */ sock = createSocket();\n/* */ }\n/* 115 */ if ((localAddress != null) || (localPort > 0))\n/* */ {\n/* */ \n/* 118 */ if (localPort < 0) {\n/* 119 */ localPort = 0;\n/* */ }\n/* 121 */ InetSocketAddress isa = new InetSocketAddress(localAddress, localPort);\n/* */ \n/* 123 */ sock.bind(isa);\n/* */ }\n/* */ \n/* 126 */ int timeout = HttpConnectionParams.getConnectionTimeout(params);\n/* */ \n/* 128 */ InetAddress[] inetadrs = InetAddress.getAllByName(host);\n/* 129 */ List<InetAddress> addresses = new ArrayList(inetadrs.length);\n/* 130 */ addresses.addAll(Arrays.asList(inetadrs));\n/* 131 */ Collections.shuffle(addresses);\n/* */ \n/* 133 */ IOException lastEx = null;\n/* 134 */ for (InetAddress remoteAddress : addresses) {\n/* */ try {\n/* 136 */ sock.connect(new InetSocketAddress(remoteAddress, port), timeout);\n/* */ }\n/* */ catch (SocketTimeoutException ex) {\n/* 139 */ throw new ConnectTimeoutException(\"Connect to \" + remoteAddress + \" timed out\");\n/* */ }\n/* */ catch (IOException ex) {\n/* 142 */ sock = new Socket();\n/* */ \n/* 144 */ lastEx = ex;\n/* */ }\n/* */ }\n/* 147 */ if (lastEx != null) {\n/* 148 */ throw lastEx;\n/* */ }\n/* 150 */ return sock;\n/* */ }", "@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}", "protected void connectionClosed() {}", "private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }", "public Connection getConnection() {\n\n\t\tConnection conn=null;\n\n\t\tif(available){\n\t\t\tboolean gotOne = false;\n\n\t\t\tfor(int outerloop=1; outerloop<=10; outerloop++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tint loop=0;\n\t\t\t\t\tint roundRobin = connLast + 1;\n\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\n\n\t\t\t\t\tdo {\n\t\t\t\t\t\tsynchronized(connStatus) {\n\t\t\t\t\t\t\tif((connStatus[roundRobin] < 1) &&\n\t\t\t\t\t\t\t\t\t(! connPool[roundRobin].isClosed())) {\n\t\t\t\t\t\t\t\tconn = connPool[roundRobin];\n\t\t\t\t\t\t\t\tconnStatus[roundRobin]=1;\n\t\t\t\t\t\t\t\tconnLockTime[roundRobin] =\n\t\t\t\t\t\t\t\t\t\tSystem.currentTimeMillis();\n\t\t\t\t\t\t\t\tconnLast = roundRobin;\n\t\t\t\t\t\t\t\tgotOne = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloop++;\n\t\t\t\t\t\t\t\troundRobin++;\n\t\t\t\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twhile((gotOne==false)&&(loop < currConnections));\n\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\tlog.println(\"Error: \" + e1);\n\t\t\t\t}\n\n\t\t\t\tif(gotOne) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tsynchronized(this) { // Add new connections to the pool\n\t\t\t\t\t\tif(currConnections < maxConns) {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcreateConn(currConnections);\n\t\t\t\t\t\t\t\tcurrConnections++;\n\t\t\t\t\t\t\t} catch(SQLException e) {\n\t\t\t\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\t\t\t\tlog.println(\"Error: Unable to create new connection: \" + e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttry { Thread.sleep(2000); }\n\t\t\t\t\tcatch(InterruptedException e) {}\n\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\tlog.println(\"-----> Connections Exhausted! Will wait and try again in loop \" +\n\t\t\t\t\t\t\t\tString.valueOf(outerloop));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // End of try 10 times loop\n\n\t\t} else {\n\t\t\tif(debugLevel > 0) {\n\t\t\t\tlog.println(\"Unsuccessful getConnection() request during destroy()\");\n\t\t\t}\n\t\t} // End if(available)\n\n\t\tif(debugLevel > 2) {\n\t\t\tlog.println(\"Handing out connection \" +\n\t\t\t\t\tidOfConnection(conn) + \" --> \" +\n\t\t\t\t\t(new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\")).format(new java.util.Date()));\n\t\t}\n\n\t\treturn conn;\n\n\t}", "@Override\r\n\tpublic void closeConnection() {\n\t\t\r\n\t}", "@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}", "private boolean keepAlive(Request request){\n MimeHeaders headers = request.getMimeHeaders();\n\n // Check connection header\n MessageBytes connectionValueMB = headers.getValue(\"connection\");\n if (connectionValueMB != null) {\n ByteChunk connectionValueBC = connectionValueMB.getByteChunk();\n if (findBytes(connectionValueBC, Constants.CLOSE_BYTES) != -1) {\n return false;\n } else if (findBytes(connectionValueBC, \n Constants.KEEPALIVE_BYTES) != -1) {\n return true;\n }\n }\n return false;\n }", "public void test_001_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_001_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss\n sendRequest2(request, 10);\n //R1.2 miss\n checkMiss(request, 2, VALID_RESPONSE);\n }", "public okhttp3.Request followUpRequest() {\n /*\n r5 = this;\n r1 = 0;\n r0 = r5.userResponse;\n if (r0 != 0) goto L_0x000b;\n L_0x0005:\n r0 = new java.lang.IllegalStateException;\n r0.<init>();\n throw r0;\n L_0x000b:\n r0 = r5.streamAllocation;\n r0 = r0.connection();\n if (r0 == 0) goto L_0x0027;\n L_0x0013:\n r0 = r0.route();\n L_0x0017:\n r2 = r5.userResponse;\n r2 = r2.code();\n r3 = r5.userRequest;\n r3 = r3.method();\n switch(r2) {\n case 300: goto L_0x0063;\n case 301: goto L_0x0063;\n case 302: goto L_0x0063;\n case 303: goto L_0x0063;\n case 307: goto L_0x0053;\n case 308: goto L_0x0053;\n case 401: goto L_0x0046;\n case 407: goto L_0x0029;\n case 408: goto L_0x00dc;\n default: goto L_0x0026;\n };\n L_0x0026:\n return r1;\n L_0x0027:\n r0 = r1;\n goto L_0x0017;\n L_0x0029:\n if (r0 == 0) goto L_0x003f;\n L_0x002b:\n r1 = r0.proxy();\n L_0x002f:\n r1 = r1.type();\n r2 = java.net.Proxy.Type.HTTP;\n if (r1 == r2) goto L_0x0046;\n L_0x0037:\n r0 = new java.net.ProtocolException;\n r1 = \"Received HTTP_PROXY_AUTH (407) code while not using proxy\";\n r0.<init>(r1);\n throw r0;\n L_0x003f:\n r1 = r5.client;\n r1 = r1.proxy();\n goto L_0x002f;\n L_0x0046:\n r1 = r5.client;\n r1 = r1.authenticator();\n r2 = r5.userResponse;\n r1 = r1.authenticate(r0, r2);\n goto L_0x0026;\n L_0x0053:\n r0 = \"GET\";\n r0 = r3.equals(r0);\n if (r0 != 0) goto L_0x0063;\n L_0x005b:\n r0 = \"HEAD\";\n r0 = r3.equals(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0063:\n r0 = r5.client;\n r0 = r0.followRedirects();\n if (r0 == 0) goto L_0x0026;\n L_0x006b:\n r0 = r5.userResponse;\n r2 = \"Location\";\n r0 = r0.header(r2);\n if (r0 == 0) goto L_0x0026;\n L_0x0075:\n r2 = r5.userRequest;\n r2 = r2.url();\n r0 = r2.resolve(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0081:\n r2 = r0.scheme();\n r4 = r5.userRequest;\n r4 = r4.url();\n r4 = r4.scheme();\n r2 = r2.equals(r4);\n if (r2 != 0) goto L_0x009d;\n L_0x0095:\n r2 = r5.client;\n r2 = r2.followSslRedirects();\n if (r2 == 0) goto L_0x0026;\n L_0x009d:\n r2 = r5.userRequest;\n r2 = r2.newBuilder();\n r4 = okhttp3.internal.http.HttpMethod.permitsRequestBody(r3);\n if (r4 == 0) goto L_0x00c3;\n L_0x00a9:\n r4 = okhttp3.internal.http.HttpMethod.redirectsToGet(r3);\n if (r4 == 0) goto L_0x00d8;\n L_0x00af:\n r3 = \"GET\";\n r2.method(r3, r1);\n L_0x00b4:\n r1 = \"Transfer-Encoding\";\n r2.removeHeader(r1);\n r1 = \"Content-Length\";\n r2.removeHeader(r1);\n r1 = \"Content-Type\";\n r2.removeHeader(r1);\n L_0x00c3:\n r1 = r5.sameConnection(r0);\n if (r1 != 0) goto L_0x00ce;\n L_0x00c9:\n r1 = \"Authorization\";\n r2.removeHeader(r1);\n L_0x00ce:\n r0 = r2.url(r0);\n r1 = r0.build();\n goto L_0x0026;\n L_0x00d8:\n r2.method(r3, r1);\n goto L_0x00b4;\n L_0x00dc:\n r0 = r5.requestBodyOut;\n if (r0 == 0) goto L_0x00e6;\n L_0x00e0:\n r0 = r5.requestBodyOut;\n r0 = r0 instanceof okhttp3.internal.http.RetryableSink;\n if (r0 == 0) goto L_0x00f1;\n L_0x00e6:\n r0 = 1;\n L_0x00e7:\n r2 = r5.callerWritesRequestBody;\n if (r2 == 0) goto L_0x00ed;\n L_0x00eb:\n if (r0 == 0) goto L_0x0026;\n L_0x00ed:\n r1 = r5.userRequest;\n goto L_0x0026;\n L_0x00f1:\n r0 = 0;\n goto L_0x00e7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http.HttpEngine.followUpRequest():okhttp3.Request\");\n }", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "public Connection getConnection() throws SQLException {\r\n if (poolState.get() != POOL_NORMAL) throw PoolCloseException;\r\n\r\n //0:try to get from threadLocal cache\r\n WeakReference<Borrower> ref = threadLocal.get();\r\n Borrower borrower = (ref != null) ? ref.get() : null;\r\n if (borrower != null) {\r\n PooledConnection pConn = borrower.lastUsedConn;\r\n if (pConn != null && pConn.state == CONNECTION_IDLE && ConnStUpd.compareAndSet(pConn, CONNECTION_IDLE, CONNECTION_USING)) {\r\n if (testOnBorrow(pConn)) return createProxyConnection(pConn, borrower);\r\n\r\n borrower.lastUsedConn = null;\r\n }\r\n } else {\r\n borrower = new Borrower();\r\n threadLocal.set(new WeakReference<Borrower>(borrower));\r\n }\r\n\r\n\r\n final long deadlineNanos = nanoTime() + defaultMaxWaitNanos;\r\n try {\r\n if (!borrowSemaphore.tryAcquire(this.defaultMaxWaitNanos, NANOSECONDS))\r\n throw RequestTimeoutException;\r\n } catch (InterruptedException e) {\r\n throw RequestInterruptException;\r\n }\r\n\r\n try {//borrowSemaphore acquired\r\n //1:try to search one from array\r\n PooledConnection pConn;\r\n PooledConnection[] tempArray = connArray;\r\n for (int i = 0, l = tempArray.length; i < l; i++) {\r\n pConn = tempArray[i];\r\n if (pConn.state == CONNECTION_IDLE && ConnStUpd.compareAndSet(pConn, CONNECTION_IDLE, CONNECTION_USING) && testOnBorrow(pConn))\r\n return createProxyConnection(pConn, borrower);\r\n }\r\n\r\n //2:try to create one directly\r\n if (connArray.length < poolMaxSize && (pConn = createPooledConn(CONNECTION_USING)) != null)\r\n return createProxyConnection(pConn, borrower);\r\n\r\n //3:try to get one transferred connection\r\n boolean failed = false;\r\n SQLException failedCause = null;\r\n Thread cThread = borrower.thread;\r\n borrower.state = BORROWER_NORMAL;\r\n waitQueue.offer(borrower);\r\n int spinSize = (waitQueue.peek() == borrower) ? maxTimedSpins : 0;\r\n\r\n do {\r\n Object state = borrower.state;\r\n if (state instanceof PooledConnection) {\r\n pConn = (PooledConnection) state;\r\n if (transferPolicy.tryCatch(pConn) && testOnBorrow(pConn)) {\r\n waitQueue.remove(borrower);\r\n return createProxyConnection(pConn, borrower);\r\n }\r\n } else if (state instanceof SQLException) {\r\n waitQueue.remove(borrower);\r\n throw (SQLException) state;\r\n }\r\n\r\n if (failed) {\r\n if (borrower.state == state)\r\n BwrStUpd.compareAndSet(borrower, state, failedCause);\r\n } else if (state instanceof PooledConnection) {\r\n borrower.state = BORROWER_NORMAL;\r\n yield();\r\n } else {//here:(state == BORROWER_NORMAL)\r\n long timeout = deadlineNanos - nanoTime();\r\n if (timeout > 0L) {\r\n if (spinSize > 0) {\r\n --spinSize;\r\n } else if (borrower.state == BORROWER_NORMAL && timeout > spinForTimeoutThreshold && BwrStUpd.compareAndSet(borrower, BORROWER_NORMAL, BORROWER_WAITING)) {\r\n parkNanos(timeout);\r\n if (cThread.isInterrupted()) {\r\n failed = true;\r\n failedCause = RequestInterruptException;\r\n }\r\n if (borrower.state == BORROWER_WAITING)\r\n BwrStUpd.compareAndSet(borrower, BORROWER_WAITING, failed ? failedCause : BORROWER_NORMAL);//reset to normal\r\n }\r\n } else {//timeout\r\n failed = true;\r\n failedCause = RequestTimeoutException;\r\n if (borrower.state == BORROWER_NORMAL)\r\n BwrStUpd.compareAndSet(borrower, state, failedCause);//set to fail\r\n }\r\n }//end (state == BORROWER_NORMAL)\r\n } while (true);//while\r\n } finally {\r\n borrowSemaphore.release();\r\n }\r\n }", "public void slowConnection(){\n if(connectionType == ConnectionType.RMI) {\n connectionType = ConnectionType.SOCKET;\n } else {\n connectionType = ConnectionType.RMI;\n }\n }", "public boolean getPingOnReuse()\n {\n return _isPing;\n }", "@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }", "int getKeepAlive();", "@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}", "@Override\r\n\tpublic void exec() {\n\t\tHttpRequestHead hrh = null;\r\n\t\tint headSize = 0;\r\n\t\tboolean isSentHead = false;\r\n\t\ttry {\r\n\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\tint getLen = 0;\r\n\t\t\tboolean getHead = false;\r\n\t\t\tint mode = 0;\r\n\t\t\tlong contentLength = 0;\r\n\t\t\twhile (!proxy.isClosed.get()) {\r\n\t\t\t\tint nextread = inputStream.read(buffer, getLen, buffer.length - getLen);\r\n\t\t\t\tif (nextread == -1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen += nextread;\r\n\t\t\t\tif (!getHead) {\r\n\t\t\t\t\tif ((headSize = Proxy.protocol.validate(buffer, getLen)) > 0) {\r\n\t\t\t\t\t\thrh = (HttpRequestHead) Proxy.protocol.decode(buffer);\r\n\t\t\t\t\t\tlog.debug(proxy.uuid + debug + \"传入如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\t\t\r\n//\t\t\t\t\t\tif(\"keep-alive\".equals(hrh.getHead(\"Connection\")))\r\n//\t\t\t\t\t\t\tkeepAlive = true;\r\n\t\t\t\t\t\tif (\"chunked\".equals(hrh.getHead(\"Transfer-Encoding\")))\r\n\t\t\t\t\t\t\tmode = 2;\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(hrh.getHead(\"Content-Length\"))) {\r\n\t\t\t\t\t\t\tmode = 1;\r\n\t\t\t\t\t\t\tcontentLength = Long.valueOf(hrh.getHead(\"Content-Length\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString forward = hrh.getHead(\"X-Forwarded-For\");\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(forward))\r\n\t\t\t\t\t\t\tforward += \",\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tforward = \"\";\r\n\t\t\t\t\t\tforward += proxy.source.getInetAddress().getHostAddress();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-For\", forward);\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Proto\", \"http\");\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Host\", CoreDef.config.getString(\"serverIp\"));\r\n\r\n\t\t\t\t\t\tgetHead = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// http访问代理服务器模式\r\n//\t\t\t\t\t\tInetAddress addr = InetAddress.getByName(hrh.getHead(\"host\"));\r\n//\t\t\t\t\t\tproxy.destination = new Socket(addr, 80);\r\n//\t\t\t\t\t\toutputStream = proxy.destination.getOutputStream();\r\n//\t\t\t\t\t\tproxy.sender = new ServerChannel(proxy);\r\n//\t\t\t\t\t\tproxy.sender.begin(\"peer - \" + this.getTaskId());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theadSize = 0;\r\n\t\t\t\t\t\tif (getLen > buffer.length - 128)\r\n\t\t\t\t\t\t\tbuffer = Arrays.copyOf(buffer, buffer.length * 10);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!isSentHead) {\r\n\t\t\t\t\tisSentHead = true;\r\n\t\t\t\t\tlog.debug(proxy.uuid + \"为\" + debug + \"转发了如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\toutputStream.write(Proxy.protocol.encode(hrh));\r\n//\t\t\t\t\tswitch (mode) {\r\n//\t\t\t\t\tcase 1:\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\r\n//\t\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2:\r\n//\t\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\r\n//\t\t\t\t\t\tbreak;\r\n//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tswitch (mode) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\toutputStream.write(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\toutputStream.write(buffer, 0, getLen);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\theadSize = 0;\r\n\t\t\t\tif(contentLength == 0) {\r\n\t\t\t\t\tgetHead = false;\r\n\t\t\t\t\tisSentHead = false;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen = 0;\r\n\t\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信发生异常\" + Utils.getStringFromException(e));\r\n\t\t\tlog.info(proxy.uuid + \"最后的数据如下\" + new String(buffer).trim());\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信,试图关闭端口\");\r\n\t\t\tproxy.close();\r\n\t\t}\r\n\t}", "public void run() {\n /*\n r28 = this;\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled\n r24 = r0\n boolean r24 = r24.get()\n if (r24 == 0) goto L_0x000d\n L_0x000c:\n return\n L_0x000d:\n r6 = 0\n r17 = 0\n r14 = 0\n java.io.File r9 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = r24.getTempFile(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n boolean r15 = r9.exists() // Catch:{ Exception -> 0x02f2 }\n anetwork.channel.entity.RequestImpl r19 = new anetwork.channel.entity.RequestImpl // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r19\n r1 = r24\n r0.<init>((java.net.URL) r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r19\n r1 = r24\n r0.setRetryTime(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 1\n r0 = r19\n r1 = r24\n r0.setFollowRedirects(r1) // Catch:{ Exception -> 0x02f2 }\n if (r15 == 0) goto L_0x007e\n java.lang.String r24 = \"Range\"\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"bytes=\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n long r26 = r9.length() // Catch:{ Exception -> 0x02f2 }\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"-\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r19\n r1 = r24\n r2 = r25\n r0.addHeader(r1, r2) // Catch:{ Exception -> 0x02f2 }\n L_0x007e:\n anetwork.channel.degrade.DegradableNetwork r16 = new anetwork.channel.degrade.DegradableNetwork // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n android.content.Context r24 = r24.context // Catch:{ Exception -> 0x02f2 }\n r0 = r16\n r1 = r24\n r0.<init>(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n int r20 = r24.getStatusCode() // Catch:{ Exception -> 0x02f2 }\n if (r20 <= 0) goto L_0x00c7\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 206(0xce, float:2.89E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n L_0x00c7:\n r24 = -102(0xffffffffffffff9a, float:NaN)\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"ResponseCode:\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n r0 = r25\n r1 = r20\n java.lang.StringBuilder r25 = r0.append(r1) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x00ef\n r6.close() // Catch:{ Exception -> 0x0421 }\n L_0x00ef:\n if (r17 == 0) goto L_0x00f4\n r17.close() // Catch:{ Exception -> 0x0424 }\n L_0x00f4:\n if (r14 == 0) goto L_0x00f9\n r14.close() // Catch:{ Exception -> 0x0427 }\n L_0x00f9:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x011e }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x011e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x011e }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x011e }\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n goto L_0x000c\n L_0x011e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n throw r24\n L_0x0121:\n if (r15 == 0) goto L_0x0195\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x018c\n r15 = 0\n java.util.List r24 = r19.getHeaders() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r0.removeRangeHeader(r1) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x017a\n if (r6 == 0) goto L_0x0148\n r6.close() // Catch:{ Exception -> 0x042a }\n L_0x0148:\n if (r17 == 0) goto L_0x014d\n r17.close() // Catch:{ Exception -> 0x042d }\n L_0x014d:\n if (r14 == 0) goto L_0x0152\n r14.close() // Catch:{ Exception -> 0x0430 }\n L_0x0152:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0177 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0177 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0177 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0177 }\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n goto L_0x000c\n L_0x0177:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n throw r24\n L_0x017a:\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n L_0x018c:\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x0195\n r15 = 0\n L_0x0195:\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x01d8\n if (r6 == 0) goto L_0x01a6\n r6.close() // Catch:{ Exception -> 0x0433 }\n L_0x01a6:\n if (r17 == 0) goto L_0x01ab\n r17.close() // Catch:{ Exception -> 0x0436 }\n L_0x01ab:\n if (r14 == 0) goto L_0x01b0\n r14.close() // Catch:{ Exception -> 0x0439 }\n L_0x01b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x01d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x01d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x01d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x01d5 }\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n goto L_0x000c\n L_0x01d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n throw r24\n L_0x01d8:\n r12 = 0\n if (r15 != 0) goto L_0x0250\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x02f2 }\n java.io.FileOutputStream r24 = new java.io.FileOutputStream // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r0.<init>(r9) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n r6 = r7\n L_0x01eb:\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n java.util.Map r24 = r24.getConnHeadFields() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r20\n r2 = r24\n long r22 = r0.parseContentLength(r1, r2, r12) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n anetwork.channel.aidl.ParcelableInputStream r14 = r24.getInputStream() // Catch:{ Exception -> 0x02f2 }\n if (r14 != 0) goto L_0x0279\n r24 = -103(0xffffffffffffff99, float:NaN)\n java.lang.String r25 = \"input stream is null.\"\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x021e\n r6.close() // Catch:{ Exception -> 0x043c }\n L_0x021e:\n if (r17 == 0) goto L_0x0223\n r17.close() // Catch:{ Exception -> 0x043f }\n L_0x0223:\n if (r14 == 0) goto L_0x0228\n r14.close() // Catch:{ Exception -> 0x0442 }\n L_0x0228:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x024d }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x024d }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x024d }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x024d }\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n goto L_0x000c\n L_0x024d:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n throw r24\n L_0x0250:\n java.io.RandomAccessFile r18 = new java.io.RandomAccessFile // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = \"rw\"\n r0 = r18\n r1 = r24\n r0.<init>(r9, r1) // Catch:{ Exception -> 0x02f2 }\n long r12 = r18.length() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r18\n r0.seek(r12) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.nio.channels.FileChannel r24 = r18.getChannel() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.OutputStream r24 = java.nio.channels.Channels.newOutputStream(r24) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r17 = r18\n r6 = r7\n goto L_0x01eb\n L_0x0279:\n r10 = -1\n r21 = 0\n r24 = 2048(0x800, float:2.87E-42)\n r0 = r24\n byte[] r8 = new byte[r0] // Catch:{ Exception -> 0x02f2 }\n L_0x0282:\n int r10 = r14.read(r8) // Catch:{ Exception -> 0x02f2 }\n r24 = -1\n r0 = r24\n if (r10 == r0) goto L_0x0354\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x02d8\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r24.cancel() // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x02a6\n r6.close() // Catch:{ Exception -> 0x0445 }\n L_0x02a6:\n if (r17 == 0) goto L_0x02ab\n r17.close() // Catch:{ Exception -> 0x0448 }\n L_0x02ab:\n if (r14 == 0) goto L_0x02b0\n r14.close() // Catch:{ Exception -> 0x044b }\n L_0x02b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x02d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x02d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x02d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x02d5 }\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n goto L_0x000c\n L_0x02d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n throw r24\n L_0x02d8:\n int r21 = r21 + r10\n r24 = 0\n r0 = r24\n r6.write(r8, r0, r10) // Catch:{ Exception -> 0x02f2 }\n r0 = r21\n long r0 = (long) r0 // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n long r24 = r24 + r12\n r0 = r28\n r1 = r24\n r3 = r22\n r0.notifyProgress(r1, r3) // Catch:{ Exception -> 0x02f2 }\n goto L_0x0282\n L_0x02f2:\n r11 = move-exception\n L_0x02f3:\n java.lang.String r24 = \"anet.DownloadManager\"\n java.lang.String r25 = \"file download failed!\"\n r26 = 0\n r27 = 0\n r0 = r27\n java.lang.Object[] r0 = new java.lang.Object[r0] // Catch:{ all -> 0x03ee }\n r27 = r0\n r0 = r24\n r1 = r25\n r2 = r26\n r3 = r27\n anet.channel.util.ALog.e(r0, r1, r2, r11, r3) // Catch:{ all -> 0x03ee }\n r24 = -104(0xffffffffffffff98, float:NaN)\n java.lang.String r25 = r11.toString() // Catch:{ all -> 0x03ee }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ all -> 0x03ee }\n if (r6 == 0) goto L_0x0322\n r6.close() // Catch:{ Exception -> 0x0460 }\n L_0x0322:\n if (r17 == 0) goto L_0x0327\n r17.close() // Catch:{ Exception -> 0x0463 }\n L_0x0327:\n if (r14 == 0) goto L_0x032c\n r14.close() // Catch:{ Exception -> 0x0466 }\n L_0x032c:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0351 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0351 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0351 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0351 }\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n goto L_0x000c\n L_0x0351:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n throw r24\n L_0x0354:\n r6.flush() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x039a\n if (r6 == 0) goto L_0x0368\n r6.close() // Catch:{ Exception -> 0x044e }\n L_0x0368:\n if (r17 == 0) goto L_0x036d\n r17.close() // Catch:{ Exception -> 0x0451 }\n L_0x036d:\n if (r14 == 0) goto L_0x0372\n r14.close() // Catch:{ Exception -> 0x0454 }\n L_0x0372:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0397 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0397 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0397 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0397 }\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n goto L_0x000c\n L_0x0397:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n throw r24\n L_0x039a:\n java.io.File r24 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n r24.<init>(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.renameTo(r0) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n r1 = r24\n r0.notifySuccess(r1) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x03bc\n r6.close() // Catch:{ Exception -> 0x0457 }\n L_0x03bc:\n if (r17 == 0) goto L_0x03c1\n r17.close() // Catch:{ Exception -> 0x045a }\n L_0x03c1:\n if (r14 == 0) goto L_0x03c6\n r14.close() // Catch:{ Exception -> 0x045d }\n L_0x03c6:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x03eb }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x03eb }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x03eb }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x03eb }\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n goto L_0x000c\n L_0x03eb:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n throw r24\n L_0x03ee:\n r24 = move-exception\n L_0x03ef:\n if (r6 == 0) goto L_0x03f4\n r6.close() // Catch:{ Exception -> 0x0469 }\n L_0x03f4:\n if (r17 == 0) goto L_0x03f9\n r17.close() // Catch:{ Exception -> 0x046b }\n L_0x03f9:\n if (r14 == 0) goto L_0x03fe\n r14.close() // Catch:{ Exception -> 0x046d }\n L_0x03fe:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r25 = r0\n android.util.SparseArray r25 = r25.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x041e }\n r26 = r0\n android.util.SparseArray r26 = r26.taskMap // Catch:{ all -> 0x041e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x041e }\n r27 = r0\n r26.remove(r27) // Catch:{ all -> 0x041e }\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x041e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x0421:\n r24 = move-exception\n goto L_0x00ef\n L_0x0424:\n r24 = move-exception\n goto L_0x00f4\n L_0x0427:\n r24 = move-exception\n goto L_0x00f9\n L_0x042a:\n r24 = move-exception\n goto L_0x0148\n L_0x042d:\n r24 = move-exception\n goto L_0x014d\n L_0x0430:\n r24 = move-exception\n goto L_0x0152\n L_0x0433:\n r24 = move-exception\n goto L_0x01a6\n L_0x0436:\n r24 = move-exception\n goto L_0x01ab\n L_0x0439:\n r24 = move-exception\n goto L_0x01b0\n L_0x043c:\n r24 = move-exception\n goto L_0x021e\n L_0x043f:\n r24 = move-exception\n goto L_0x0223\n L_0x0442:\n r24 = move-exception\n goto L_0x0228\n L_0x0445:\n r24 = move-exception\n goto L_0x02a6\n L_0x0448:\n r24 = move-exception\n goto L_0x02ab\n L_0x044b:\n r24 = move-exception\n goto L_0x02b0\n L_0x044e:\n r24 = move-exception\n goto L_0x0368\n L_0x0451:\n r24 = move-exception\n goto L_0x036d\n L_0x0454:\n r24 = move-exception\n goto L_0x0372\n L_0x0457:\n r24 = move-exception\n goto L_0x03bc\n L_0x045a:\n r24 = move-exception\n goto L_0x03c1\n L_0x045d:\n r24 = move-exception\n goto L_0x03c6\n L_0x0460:\n r24 = move-exception\n goto L_0x0322\n L_0x0463:\n r24 = move-exception\n goto L_0x0327\n L_0x0466:\n r24 = move-exception\n goto L_0x032c\n L_0x0469:\n r25 = move-exception\n goto L_0x03f4\n L_0x046b:\n r25 = move-exception\n goto L_0x03f9\n L_0x046d:\n r25 = move-exception\n goto L_0x03fe\n L_0x046f:\n r24 = move-exception\n r17 = r18\n goto L_0x03ef\n L_0x0474:\n r11 = move-exception\n r17 = r18\n goto L_0x02f3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: anetwork.channel.download.DownloadManager.DownloadTask.run():void\");\n }", "public void test_002_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_002_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss, cached by RFC\n sendRequest2(request, 0);\n // R1.2 hit\n checkHit(request, 2, VALID_RESPONSE);\n }", "public native int reEstablishConn() throws IOException,IllegalArgumentException;", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "@Override\n\tprotected void finalize() throws Throwable {\n\t\t\n\t\tif (this.connection != null) {\n\t\t\tthis.connection.close();\t\t\n\t\t}\n\t\tsuper.finalize();\n\t}", "@Override\n\tpublic void closeConnection() {\n\t\t\n\t}", "protected void connectionEstablished() {}", "protected URLConnection openConnection(URL url)\r\n/* 29: */ throws IOException\r\n/* 30: */ {\r\n/* 31:27 */ System.out.println(\"In openConnection\");\r\n/* 32: */ \r\n/* 33:29 */ return new KentCryptURLConnection(url);\r\n/* 34: */ }", "public synchronized void releaseConnection(HttpClientConnection conn, Object state, long keepalive, TimeUnit timeUnit) {\n/* 259 */ Args.notNull(conn, \"Connection\");\n/* 260 */ Asserts.check((conn == this.conn), \"Connection not obtained from this manager\");\n/* 261 */ if (this.log.isDebugEnabled()) {\n/* 262 */ this.log.debug(\"Releasing connection \" + conn);\n/* */ }\n/* 264 */ if (this.isShutdown.get()) {\n/* */ return;\n/* */ }\n/* */ try {\n/* 268 */ this.updated = System.currentTimeMillis();\n/* 269 */ if (!this.conn.isOpen()) {\n/* 270 */ this.conn = null;\n/* 271 */ this.route = null;\n/* 272 */ this.conn = null;\n/* 273 */ this.expiry = Long.MAX_VALUE;\n/* */ } else {\n/* 275 */ this.state = state;\n/* 276 */ this.conn.setSocketTimeout(0);\n/* 277 */ if (this.log.isDebugEnabled()) {\n/* */ String s;\n/* 279 */ if (keepalive > 0L) {\n/* 280 */ s = \"for \" + keepalive + \" \" + timeUnit;\n/* */ } else {\n/* 282 */ s = \"indefinitely\";\n/* */ } \n/* 284 */ this.log.debug(\"Connection can be kept alive \" + s);\n/* */ } \n/* 286 */ if (keepalive > 0L) {\n/* 287 */ this.expiry = this.updated + timeUnit.toMillis(keepalive);\n/* */ } else {\n/* 289 */ this.expiry = Long.MAX_VALUE;\n/* */ } \n/* */ } \n/* */ } finally {\n/* 293 */ this.leased = false;\n/* */ } \n/* */ }", "private HttpConnection open(String url) throws IOException {\n HttpConnection c;\n int status = -1;\n\n // Open the connection and check for redirects\n while (true) {\n c = (HttpConnection) Connector.open(url);\n\n // Get the status code,\n // causing the connection to be made\n status = c.getResponseCode();\n\n if ((status == HttpConnection.HTTP_TEMP_REDIRECT)\n || (status == HttpConnection.HTTP_MOVED_TEMP)\n || (status == HttpConnection.HTTP_MOVED_PERM)) {\n\n // Get the new location and close the connection\n url = c.getHeaderField(\"location\");\n c.close();\n } else {\n break;\n }\n }\n\n // Only HTTP_OK (200) means the content is returned.\n if (status != HttpConnection.HTTP_OK) {\n c.close();\n throw new IOException(\"Response status not OK\");\n }\n return c;\n }", "public ManagedClientConnection getConnection(HttpRoute route, Object state) {\n ManagedClientConnectionImpl managedClientConnectionImpl;\n Args.notNull(route, \"Route\");\n synchronized (this) {\n assertNotShutdown();\n if (this.log.isDebugEnabled()) {\n HttpClientAndroidLog httpClientAndroidLog = this.log;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Get connection for route \");\n sb.append(route);\n httpClientAndroidLog.debug(sb.toString());\n }\n Asserts.check(this.conn == null, MISUSE_MESSAGE);\n if (this.poolEntry != null && !this.poolEntry.getPlannedRoute().equals(route)) {\n this.poolEntry.close();\n this.poolEntry = null;\n }\n if (this.poolEntry == null) {\n HttpPoolEntry httpPoolEntry = new HttpPoolEntry(this.log, Long.toString(COUNTER.getAndIncrement()), route, this.connOperator.createConnection(), 0, TimeUnit.MILLISECONDS);\n this.poolEntry = httpPoolEntry;\n }\n if (this.poolEntry.isExpired(System.currentTimeMillis())) {\n this.poolEntry.close();\n this.poolEntry.getTracker().reset();\n }\n this.conn = new ManagedClientConnectionImpl(this, this.connOperator, this.poolEntry);\n managedClientConnectionImpl = this.conn;\n }\n return managedClientConnectionImpl;\n }", "protected boolean shouldCloseConnection(HttpConnection conn) {\n return true;\n }", "@Override\n public void createNewIO(boolean isForReconnect) {\n }", "public BasicHttpClientConnectionManager buildBasicHttpClientConnectionManager()\n/* */ {\n/* 61 */ BasicHttpClientConnectionManager connectionManager = new BasicHttpClientConnectionManager();\n/* 62 */ return connectionManager;\n/* */ }", "@Test\n public void testConnectionClose2() throws Exception {\n String oldValue = System.getProperty(\"sun.net.http.retryPost\");\n System.setProperty(\"sun.net.http.retryPost\", \"false\");\n try {\n URL url = new URL(resolveURI(\"/v1/sleep\"));\n\n // Disable the server 2 from discovery\n defaultServer2.cancelRegistration();\n\n HttpURLConnection urlConn = openURL(url);\n urlConn.setDoOutput(true);\n urlConn.setRequestMethod(\"POST\");\n\n // Sleep for 50 ms\n urlConn.getOutputStream().write(\"50\".getBytes(StandardCharsets.UTF_8));\n Assert.assertEquals(200, urlConn.getResponseCode());\n urlConn.getInputStream().close();\n urlConn.disconnect();\n\n // Now disable server1 and enable server2 from discovery\n defaultServer1.cancelRegistration();\n defaultServer2.registerServer();\n\n // Make sure the discovery change is in effect\n Assert.assertNotNull(new RandomEndpointStrategy(\n () -> ((DiscoveryServiceClient) discoveryService).discover(APP_FABRIC_SERVICE)).pick(5, TimeUnit.SECONDS));\n\n // Make a call to sleep for couple seconds\n urlConn = openURL(url);\n urlConn.setDoOutput(true);\n urlConn.setRequestMethod(\"POST\");\n urlConn.getOutputStream().write(\"3000\".getBytes(StandardCharsets.UTF_8));\n\n // Wait for the result asynchronously, while at the same time shutdown server1.\n // Shutting down server1 shouldn't affect the connection.\n CompletableFuture<Integer> result = new CompletableFuture<>();\n HttpURLConnection finalUrlConn = urlConn;\n Thread t = new Thread(() -> {\n try {\n result.complete(finalUrlConn.getResponseCode());\n } catch (Exception e) {\n result.completeExceptionally(e);\n } finally {\n try {\n finalUrlConn.getInputStream().close();\n finalUrlConn.disconnect();\n } catch (IOException e) {\n LOG.error(\"Exception when closing url connection\", e);\n }\n }\n });\n t.start();\n\n defaultServer1.stopAndWait();\n Assert.assertEquals(200, result.get().intValue());\n Assert.assertEquals(1, defaultServer1.getNumRequests());\n Assert.assertEquals(1, defaultServer2.getNumRequests());\n } finally {\n if (oldValue == null) {\n System.clearProperty(\"sun.net.http.retryPost\");\n } else {\n System.setProperty(\"sun.net.http.retryPost\", oldValue);\n }\n }\n }", "private void doRefreshConnection()\r\n\t{\r\n\t\t/* Refresh the connection to S3. */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tservice = new RestS3Service(new AWSCredentials(accessKey, secretKey));\r\n\t\t}\r\n\t\tcatch (S3ServiceException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void tryToCreateNewConnByAsyn() {\r\n do {\r\n int curAddSize = needAddConnSize.get();\r\n int updAddSize = curAddSize + 1;\r\n if (connArray.length + updAddSize > poolMaxSize) return;\r\n if (needAddConnSize.compareAndSet(curAddSize, updAddSize)) {\r\n if (createConnThreadState.get() == THREAD_WAITING && createConnThreadState.compareAndSet(THREAD_WAITING, THREAD_WORKING))\r\n unpark(this);\r\n return;\r\n }\r\n } while (true);\r\n }", "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }", "public boolean needsConnectionLeftOpen() {\n return false;\n }", "@Override\n protected Void doInBackground(Void... voids) {\n response = creatingURLConnection(URL_STRING);\n return null;\n }", "@Override\n\tpublic void connectionClosed() {\n\t}", "private void closeIdleTimeoutConnection() {\r\n if (poolState.get() == POOL_NORMAL) {\r\n PooledConnection[] array = connArray;\r\n for (int i = 0, len = array.length; i < len; i++) {\r\n PooledConnection pConn = array[i];\r\n int state = pConn.state;\r\n if (state == CONNECTION_IDLE && !existBorrower()) {\r\n boolean isTimeoutInIdle = (currentTimeMillis() - pConn.lastAccessTime - poolConfig.getIdleTimeout() >= 0);\r\n if (isTimeoutInIdle && ConnStUpd.compareAndSet(pConn, state, CONNECTION_CLOSED)) {//need close idle\r\n removePooledConn(pConn, DESC_REMOVE_IDLE);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n } else if (state == CONNECTION_USING) {\r\n ProxyConnectionBase proxyConn = pConn.proxyConn;\r\n boolean isHoldTimeoutInNotUsing = currentTimeMillis() - pConn.lastAccessTime - poolConfig.getHoldTimeout() >= 0;\r\n if (isHoldTimeoutInNotUsing) {//recycle connection\r\n if (proxyConn != null) {\r\n proxyConn.trySetAsClosed();\r\n } else {\r\n removePooledConn(pConn, DESC_REMOVE_BAD);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n } else if (state == CONNECTION_CLOSED) {\r\n removePooledConn(pConn, DESC_REMOVE_CLOSED);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n ConnectionPoolMonitorVo vo = this.getMonitorVo();\r\n commonLog.debug(\"BeeCP({})idle:{},using:{},semaphore-waiter:{},wait-transfer:{}\", poolName, vo.getIdleSize(), vo.getUsingSize(), vo.getSemaphoreWaiterSize(), vo.getTransferWaiterSize());\r\n }\r\n }", "@Test\r\n public void testApacheHttpClient4ExecutorAgain() throws Exception\r\n {\r\n doTestApacheHttpClient4Executor();\r\n }", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "@Override\n public void run() {\n super.run(); // obtain connection\n if (connection == null)\n return; // problem obtaining connection\n\n try {\n request_spec.context.setAttribute\n (ExecutionContext.HTTP_CONNECTION, connection);\n\n doOpenConnection();\n\n HttpRequest request = (HttpRequest) request_spec.context.\n getAttribute(ExecutionContext.HTTP_REQUEST);\n request_spec.executor.preProcess\n (request, request_spec.processor, request_spec.context);\n\n response = request_spec.executor.execute\n (request, connection, request_spec.context);\n\n request_spec.executor.postProcess\n (response, request_spec.processor, request_spec.context);\n\n doConsumeResponse();\n\n } catch (Exception ex) {\n if (exception != null)\n exception = ex;\n\n } finally {\n conn_manager.releaseConnection(connection, -1, null);\n }\n }", "private void doStop()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n \"STOP\", \r\n null,\r\n null,\r\n null, \r\n null,\r\n false,\r\n null,\r\n null ) );\r\n }", "public void close() throws java.io.IOException {\n /*\n r8 = this;\n r0 = c;\n if (r0 != 0) goto L_0x0012;\n L_0x0004:\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r0 = java.lang.Thread.holdsLock(r0);\n if (r0 == 0) goto L_0x0012;\n L_0x000c:\n r0 = new java.lang.AssertionError;\n r0.<init>();\n throw r0;\n L_0x0012:\n r0 = okhttp3.internal.http2.Http2Stream.this;\n monitor-enter(r0);\n r1 = r8.a;\t Catch:{ all -> 0x0064 }\n if (r1 == 0) goto L_0x001b;\n L_0x0019:\n monitor-exit(r0);\t Catch:{ all -> 0x0064 }\n return;\n L_0x001b:\n monitor-exit(r0);\t Catch:{ all -> 0x0064 }\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r0 = r0.e;\n r0 = r0.b;\n r1 = 1;\n if (r0 != 0) goto L_0x004e;\n L_0x0025:\n r0 = r8.f;\n r2 = r0.size();\n r4 = 0;\n r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r0 <= 0) goto L_0x003f;\n L_0x0031:\n r0 = r8.f;\n r2 = r0.size();\n r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r0 <= 0) goto L_0x004e;\n L_0x003b:\n r8.a(r1);\n goto L_0x0031;\n L_0x003f:\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r2 = r0.d;\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r3 = r0.c;\n r4 = 1;\n r5 = 0;\n r6 = 0;\n r2.a(r3, r4, r5, r6);\n L_0x004e:\n r2 = okhttp3.internal.http2.Http2Stream.this;\n monitor-enter(r2);\n r8.a = r1;\t Catch:{ all -> 0x0061 }\n monitor-exit(r2);\t Catch:{ all -> 0x0061 }\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r0 = r0.d;\n r0.f();\n r0 = okhttp3.internal.http2.Http2Stream.this;\n r0.m();\n return;\n L_0x0061:\n r0 = move-exception;\n monitor-exit(r2);\t Catch:{ all -> 0x0061 }\n throw r0;\n L_0x0064:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x0064 }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http2.Http2Stream.FramingSink.close():void\");\n }", "@Override\n protected void doFetch(SocketTimeout timeout) throws IOException {\n _aborted = false;\n readHeaders();\n if (_aborted)\n throw new IOException(\"Timed out reading the HTTP headers\");\n \n if (timeout != null) {\n timeout.resetTimer();\n if (_fetchInactivityTimeout > 0)\n timeout.setInactivityTimeout(_fetchInactivityTimeout);\n else\n timeout.setInactivityTimeout(60*1000);\n } \n if (_fetchInactivityTimeout > 0)\n _proxy.setSoTimeout(_fetchInactivityTimeout);\n else\n _proxy.setSoTimeout(INACTIVITY_TIMEOUT);\n\n if (_redirectLocation != null) {\n throw new IOException(\"Server redirect to \" + _redirectLocation + \" not allowed\");\n }\n \n if (_log.shouldLog(Log.DEBUG))\n _log.debug(\"Headers read completely, reading \" + _bytesRemaining);\n \n boolean strictSize = (_bytesRemaining >= 0);\n\n Thread pusher = null;\n _decompressException = null;\n if (_isGzippedResponse) {\n PipedInputStream pi = new PipedInputStream(64*1024);\n PipedOutputStream po = new PipedOutputStream(pi);\n pusher = new I2PAppThread(new Gunzipper(pi, _out), \"EepGet Decompressor\");\n _out = po;\n pusher.start();\n }\n\n int remaining = (int)_bytesRemaining;\n byte buf[] = new byte[16*1024];\n while (_keepFetching && ( (remaining > 0) || !strictSize ) && !_aborted) {\n int toRead = buf.length;\n if (strictSize && toRead > remaining)\n toRead = remaining;\n int read = _proxyIn.read(buf, 0, toRead);\n if (read == -1)\n break;\n if (timeout != null)\n timeout.resetTimer();\n _out.write(buf, 0, read);\n _bytesTransferred += read;\n\n remaining -= read;\n if (remaining==0 && _encodingChunked) {\n int char1 = _proxyIn.read();\n if (char1 == '\\r') {\n int char2 = _proxyIn.read();\n if (char2 == '\\n') {\n remaining = (int) readChunkLength();\n } else {\n _out.write(char1);\n _out.write(char2);\n _bytesTransferred += 2;\n remaining -= 2;\n read += 2;\n }\n } else {\n _out.write(char1);\n _bytesTransferred++;\n remaining--;\n read++;\n }\n }\n if (timeout != null)\n timeout.resetTimer();\n if (_bytesRemaining >= read) // else chunked?\n _bytesRemaining -= read;\n if (read > 0) {\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).bytesTransferred(\n _alreadyTransferred, \n read, \n _bytesTransferred, \n _encodingChunked?-1:_bytesRemaining, \n _url);\n // This seems necessary to properly resume a partial download into a stream,\n // as nothing else increments _alreadyTransferred, and there's no file length to check.\n // Do this after calling the listeners to keep the total correct\n _alreadyTransferred += read;\n }\n }\n \n if (_out != null)\n _out.close();\n _out = null;\n \n if (_isGzippedResponse) {\n try {\n pusher.join();\n } catch (InterruptedException ie) {}\n pusher = null;\n if (_decompressException != null) {\n // we can't resume from here\n _keepFetching = false;\n throw _decompressException;\n }\n }\n\n if (_aborted)\n throw new IOException(\"Timed out reading the HTTP data\");\n \n if (timeout != null)\n timeout.cancel();\n \n if (_transferFailed) {\n // 404, etc - transferFailed is called after all attempts fail, by fetch() above\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).attemptFailed(_url, _bytesTransferred, _bytesRemaining, _currentAttempt, _numRetries, new Exception(\"Attempt failed\"));\n } else if ( (_bytesRemaining == -1) || (remaining == 0) ) {\n for (int i = 0; i < _listeners.size(); i++) \n _listeners.get(i).transferComplete(\n _alreadyTransferred, \n _bytesTransferred, \n _encodingChunked?-1:_bytesRemaining, \n _url, \n _outputFile, \n _notModified);\n } else {\n throw new IOException(\"Disconnection on attempt \" + _currentAttempt + \" after \" + _bytesTransferred);\n }\n }", "@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}", "@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }", "protected URLConnection openConnection(URL u) throws IOException{\r\n\t\tURLConnection connection = new RSuiteConnection(u);\r\n\t\treturn connection;\r\n\t}", "public HTTPResponse finish() {\n HTTPResponse response = new HTTPResponse();\n if (super.requestURL.endsWith(\"&\")) {\n super.requestURL = super.requestURL.substring(0, super.requestURL.length() - 1);\n }\n try {\n super.CreateConnection();\n response.setResponseCode(super.httpConn.getResponseCode());\n response.setResponseBody(super.readResponseBody());\n super.httpConn.disconnect();\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n }\n return response;\n }", "public void run()\n {\n Connection conn;\n Socket clientSock;\n int timeout;\n\n conn = new Connection();\n timeout = _config.getClientTimeout() * 1000;\n\n for ( ; ; ) {\n /*\n * Wait for connection request.\n */\n try {\n clientSock = _serverSock.accept();\n }\n catch(IOException e) {\n logError(\"accept() failure: \" + e.getMessage());\n continue;\n }\n\n try {\n clientSock.setSoTimeout(timeout);\n }\n catch(SocketException e) {\n logError(\"Cannot set timeout of client socket: \" + e.getMessage()\n + \" -- closing socket\");\n\n try {\n clientSock.close();\n }\n catch(IOException e2) {\n logError(\"Cannot close socket: \" + e2.getMessage());\n }\n continue;\n }\n\n /*\n * `Create' a new connection.\n */\n try {\n conn.init(clientSock);\n }\n catch(IOException e) {\n logError(\"Cannot open client streams\" + getExceptionMessage(e));\n try {\n clientSock.close();\n }\n catch(IOException e2) {\n logError(\"Cannot close client socket\" + getExceptionMessage(e2));\n }\n continue;\n }\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Reading HTTP Request...\");\n }\n\n /*\n * `Create' a new container for the request.\n */\n setCurrentDate(_date);\n _req.init(conn, _clfDateFormatter.format(_date));\n\n // Get the current GAP list.\n _gapList = GlobeRedirector.getGAPList();\n\n processRequest(conn);\n\n /*\n * If access logging is enabled, write an entry to the access log.\n */\n if (_config.getAccessLogEnabledFlag()) {\n GlobeRedirector.accessLog.write(_req.getCommonLogFileStatistics());\n } \n\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Closing client connection\");\n }\n\n try {\n conn.close();\n }\n catch(IOException e) {\n logError(\"Cannot close client connection\" + getExceptionMessage(e));\n }\n\n /*\n * Release references that are no longer needed. To reduce the\n * memory footprint, these references are released now because it\n * may take a long time before this thread handles a new request\n * (in which case the references are released too).\n */\n _gapList = null;\n _req.clear();\n _httpRespHdr.clear();\n _cookieCoords = null;\n }\n }", "public void recycle(SnRpcConnection connection) throws Throwable {\n\t\tif (null != connection) {\n\t\t\tpool.returnObject(connection);\n\t\t}\n\t}", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "private HttpProxy createHttpServerConnection() {\n\n final HttpProxy httpProxy = httpConnectionFactory.create();\n\n // TODO: add configurable number of attempts, instead of looping forever\n boolean connected = false;\n while (!connected) {\n LOGGER.debug(\"Attempting connection to HTTP server...\");\n connected = httpProxy.connect();\n }\n\n LOGGER.debug(\"Connected to HTTP server\");\n\n return httpProxy;\n }", "@Override\r\n\tpublic void run() {\n while(true){\r\n \tURIResource uriResource = null;\r\n\t\t\tboolean waitAndContinue = false;\r\n\t\t\tsynchronized (this.pool) {\r\n\t\t\t\tif (this.pool.isEmpty()) {\r\n\t\t\t\t\twaitAndContinue = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\turiResource = this.pool.poll();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(waitAndContinue){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10) ;\r\n\t\t\t\t} catch (InterruptedException 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\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(uriResource ==null){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//获取权威文档URI\r\n\t\t\tURIResource dereferenceDoc = null;\r\n\t\t\tFetch fetch = new Fetch(uriResource.getURI(),this.meta);\r\n\t\t\tdereferenceDoc = fetch.getDereferencDocument();\r\n\t\t\t//check 权威文档内容,如果符合要求,则进行存储三元组以及文档dereferencInfo;否则则删除旧版本\r\n\t\t\t//无论成功与失败都要记录文件尝试下载的记录。\r\n\t\t\tif (dereferenceDoc != null) {\r\n\t\t\t\t//!!!!!!注意这里的timestamp其实不能是当前系统的时间\r\n\t\t\t\tlong timestamp = System.currentTimeMillis();\r\n\t\t\t\tOntModel model = fetch.checkContent(dereferenceDoc);\r\n\t\t\t\tStore store = new Store();\r\n\t\t\t\ttry{\r\n\t\t\t\tif (model != null) {\r\n\t\t\t\t\t// 更新新的三元组\r\n\t\t\t\t\tstore.updateRDFDocument(dereferenceDoc, model, timestamp) ;\r\n\t\t\t\t\t//设置dereference document信息\r\n\t\t\t\t\tstore.setDereferenceInfo(dereferenceDoc.getURI(), dereferenceDoc.getURI());\r\n\t\t\t\t\tif(!uriResource.equals(dereferenceDoc)){\r\n\t\t\t\t\t\tstore.setDereferenceInfo(uriResource.getURI(), dereferenceDoc.getURI());\r\n\t\t\t\t\t\tstore.deleteRDFDocument(uriResource) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodel.close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 删除旧版本三元组\r\n\t\t\t\t\tstore.deleteRDFDocument(dereferenceDoc) ;\r\n\t\t\t\t}\r\n\t\t\t\t//如果前面语句发生错误,那么这条语句不能执行。\r\n\t\t\t\tstore.setLastPingTime(uriResource.getURI(), timestamp) ;\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tfetch.close();\r\n\t\t\t\tstore.reset();\r\n\t\t\t}\r\n\t\t\tsynchronized(this.lockOfURIStatus){\r\n\t\t\t\tthis.busy.remove(uriResource);\r\n\t\t\t\tthis.done.add(uriResource);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected URLConnection createConnection(URL url) throws IOException\n {\n URLConnection con = url.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n return con;\n }", "private DataConnection() {\n \tperformConnection();\n }", "private void openConnection(){}", "public static void releaseConnection(HttpRequestBase request) {\n if (request != null) {\n request.releaseConnection();\n }\n }", "@Override\n \tpublic void reconnectingIn(int arg0) {\n \t}", "private Connection createConnection(URL url)\n throws IOException, LpException {\n HttpURLConnection connection = createHttpConnection(url);\n if (task.getContent().isEmpty()) {\n return wrapConnection(connection);\n }\n if (task.isPostContentAsBody()) {\n LOG.debug(\"Adding body ...\");\n if (task.getContent().size() == 1) {\n return wrapPostBody(connection, task.getContent().get(0));\n } else {\n throw new LpException(\"POST with body \"\n + \"can be used only with a single content file. \"\n + \"Task: {}\",\n task.getIri());\n }\n }\n LOG.debug(\"Wrapping as a multipart ...\");\n return wrapMultipart(connection, task);\n\n }", "public static void closeHttpConn(){ \n\t\thttpUrl.disconnect(); \n\t}", "protected void reuseTxn(Txn txn) throws Exception {\r\n }", "public native final void reconnect() throws IOException;", "public void reuse() {\n method = null;\n uriPath = null;\n versionRange = 0;\n uriFragmentRange = queryStringRange = 0;\n contentOffset = 0;\n contentLength = 0;\n\n if (buffer != null) {\n buffer.clear();\n }\n for (int i = 0; i < nFields; i++) {\n keys[i] = null;\n }\n nFields = 0;\n }" ]
[ "0.69844234", "0.6899843", "0.6874643", "0.6781195", "0.6366963", "0.62760276", "0.6179929", "0.6114569", "0.6075036", "0.6052142", "0.6018485", "0.59778166", "0.59661406", "0.5946922", "0.5918189", "0.59121335", "0.5889206", "0.5872022", "0.58338606", "0.5820319", "0.57885736", "0.5774779", "0.57735586", "0.57469106", "0.5744859", "0.5683649", "0.567703", "0.5667202", "0.56599593", "0.5644046", "0.5635149", "0.56284755", "0.56091434", "0.5553342", "0.5547589", "0.55385035", "0.55175847", "0.550733", "0.550307", "0.54565513", "0.54515624", "0.54452753", "0.5413393", "0.5408784", "0.5408683", "0.5392853", "0.539086", "0.5389102", "0.53781235", "0.5374891", "0.53747374", "0.5372922", "0.536127", "0.5358358", "0.5356532", "0.53510946", "0.5344309", "0.534374", "0.5328285", "0.53280365", "0.5325111", "0.5322426", "0.53210306", "0.5310609", "0.5310254", "0.530913", "0.5289514", "0.5281172", "0.527885", "0.52749866", "0.5267351", "0.52567065", "0.52503777", "0.52497125", "0.5246185", "0.52450424", "0.52387524", "0.52372223", "0.52311516", "0.5227185", "0.52266055", "0.5224008", "0.52175766", "0.5214821", "0.5209737", "0.51953644", "0.5191861", "0.5191861", "0.51860666", "0.5184902", "0.5184369", "0.51837885", "0.5183247", "0.5178118", "0.5177506", "0.51757807", "0.5167682", "0.51658", "0.5155928", "0.51547337" ]
0.5994069
11
TODO Autogenerated method stub /Intent intent=new Intent(OldObjectMain.this,Iguide.class); startActivity(intent); OldObjectMain.this.finish();
@Override public void onClick(View arg0) { AskHelpAdd.this.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void goToMainAppAsGuide(Guide guide) {\n Bundle guideBundle = new Bundle();\n guideBundle.putSerializable(\"guideObj\",guide.getClass());\n Intent moveToMainAppAsGuide = new Intent( this, MainGuideActivity.class );\n moveToMainAppAsGuide.putExtras(guideBundle);\n startActivity( moveToMainAppAsGuide );\n finish();\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent mainIntent = new Intent(mThis,GuideActivity_.class);\n\t\t\t\t\t//Intent mainIntent = new Intent(LuanchActivity.this, \"guideactivity\");\n\t\t\t\t\tmThis.startActivity(mainIntent);\n\t\t\t\t\tmThis.finish();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n//\t\t\t\t\tIntent mainIntent = new Intent(LuanchActivity.this,\n//\t\t\t\t\t\t\tMainActivity.class);\n//\t\t\t\t\tLuanchActivity.this.startActivity(mainIntent);\n//\t\t\t\t\tLuanchActivity.this.finish();\n\t\t\t\t}", "public void mo6083c() {\n Intent intent = new Intent(C3720a.this._context, GuidanceMenuActivity.class);\n C3720a.this.finish();\n C3720a.this.startActivity(intent);\n }", "@Override\r\n\t\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\t\tstartActivity(new Intent(GuideActivity.this,MainActivity.class));\r\n\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tIntent intent=new Intent(getContext(),MainActivity.class);\n\t\t\t\t\t\tgetContext().startActivity(intent);\n\t\t\t\t\t\t((Activity)getContext()).finish();\n\t\t\t\t\t}", "@Override \n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(MyActivity.this,denglu_Activity.class);\n startActivity(intent);\n finish();\n \n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent myIntent = new Intent();\n myIntent = new Intent(picking.this,home_page.class);\n startActivity(myIntent);\n picking.this.finish();\n }", "private void HomePage(){\n Intent intent = new Intent();\n intent.setClass(FaultActivity.this, MainActivity.class);\n startActivity(intent);\n FaultActivity.this.finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tIntent intent = getIntent();\n\t\t \tfinish();\n\t\t \tstartActivity(intent);\t\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tIntent it = new Intent();\n\t\t\t\t\t\t\tit.setClass(TR_MaintainGuide_Activity.this,NewPragramActivity.class);\n\t\t\t\t\t\t\tit.setFlags(3);\n\t\t\t\t\t\t\tstartActivity(it);\n\t\t\t\t\t\t}", "private void m3179g() {\n finish();\n startActivity(new Intent(this, WelcomeActivity.class));\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(Intro.this,MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(GuideActivity.this,MainActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tMyApplication.getApp().getSysSpUtil().setIsFirstTime(false);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent myIntent = new Intent();\n myIntent = new Intent(picking.this, pickingquery.class);\n startActivity(myIntent);\n picking.this.finish();\n\n }", "@Override\n\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\tIntent intent = getIntent();\n\t \tfinish();\n\t \tstartActivity(intent);\t\n\t\t}", "public void buttonHintNext(View view) {\n //using finish to activity\n finish();\n\n //create a new object to start new activity\n Intent intent = new Intent(this, Hint.class);\n //pass object to startActivity\n startActivity(intent);\n }", "@Override\n public void run() {\n Intent mySuperIntent = new Intent(welecomeActivity.this, IntroApplicationActivity.class);\n startActivity(mySuperIntent);\n /* This 'finish()' is for exiting the app when back button pressed\n * from Home page which is ActivityHome\n */\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n finish();\n startActivity(getIntent());\n }", "@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int i) {\n\t\t\t\tMainActivity.this.finish();\r\n\t\t\t}", "public void UpdateUI(){\n startActivity(new Intent(this,MainActivity.class));\n finish();\n }", "@Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.addCategory(Intent.CATEGORY_HOME);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent in = new Intent();\n\t\t\t\tin.setClass(CollegeDetails.this,CollegeCourses.class);\n\t\t\t\tstartActivity(in);\n\t\t\t\t//finish();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent();\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n Intent intent = new Intent(viewplot.this,MainActivity.class);\n\n\n startActivity(intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n\n }", "public void onClick(DialogInterface dialog, int which) {\n Intent nextScreen = new Intent(getApplicationContext(), Mockup1.class);\n startActivityForResult(nextScreen, 0);\n\n }", "@Override\n public void onFinish(){\n Intent intent = new Intent(getBaseContext(), CodakActivity.class);\n startActivity(intent);\n }", "private void openHome(){\n Intent intent2 = new Intent(AddExercises.this, MainActivity.class);\n startActivity(intent2);\n }", "void mstrange(){\n Intent i = new Intent(context,Pengembalian.class);\n context.startActivity(i);\n }", "public void backtoMain()\n {\n Intent i=new Intent(this,MainActivity.class);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n startActivity(finishIntent);\n }", "@Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n context.finish();\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(HelpActivity.this, HomeActivity.class);\n startActivity(i);\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n startActivity(intent);\n int pid = android.os.Process.myPid();\n android.os.Process.killProcess(pid);\n }", "private void goGuide() {\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n try {\n\n\n finish();\n Intent i = new Intent(getApplicationContext(), AddReligious.class);\n startActivity(i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onClick(DialogInterface dialog,int id)\n {\n MainActivity.this.finish();\n }", "public void onFinish(){\n Intent clicky = new Intent(AlertActivity.this,NurseActivity.class);\n startActivity(clicky);\n }", "public void openHelp(){\n\n Intent helpIntent = new Intent(this, Help.class);\n startActivity(helpIntent);\n\n }", "@Override\n public void onBackPressed() {\n //intent that references this class\n Intent intent = new Intent(this, MedplanActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n AtyMain.actionStart(AtyLoginOrRegister.this, \"\");\n //Intent intent = new Intent(this, AtyMain.class);\n //startActivity(intent);\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n startActivity(intent);\n int pid = android.os.Process.myPid();\n android.os.Process.killProcess(pid);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditoryActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(SuperScouting.this, HomeScreen.class);\n startActivity(intent);\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n\t\t\t\t\t\tintent.addCategory(Intent.CATEGORY_HOME);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t_context.startActivity(intent);\n\t\t\t\t\t\t// System.exit(0);\n\t\t\t\t\t}", "private void SendToMain(){\n Intent intent=new Intent(getApplicationContext(),Category.class);\n startActivity(intent);\n\n //by using this keyword every thing in this page is finished\n finish();\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditActivity.this);\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tMainActivity.this.finish();\n\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\tint arg1) {\n\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),MainActivity.class);\n\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t}", "public void onClick(DialogInterface dialog,int id) {\n Intent in = new Intent(OpenBookMark.this,PDFViewActivity_.class);\n startActivity(in);\n Toast.makeText(getApplicationContext(),\"go\", Toast.LENGTH_LONG).show();\n //dialogBookmark.dismiss();\n // OpenBookMark.this.finish();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tIntent intentdia=new Intent(getApplicationContext(),Stage_Activity.class);\n\t\t\t\t\t\tintentdia.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\t\t\tstartActivity(intentdia);\n\t\t\t\t\t}", "public void OnGotoMyRecipes(View View)\n {\n \t\t Intent intent = new Intent(View.getContext(), MyRecipes.class);\n \t\t intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n \t\t EditRecipeActivity.this.finish();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tIntent i =new Intent(AdviceForm.this,AdviceFeedback.class);\n\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.putExtra(\"userMail\", \"\");\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n /*int pid = android.os.Process.myPid();=====> use this if you want to kill your activity. But its not a good one to do.\n android.os.Process.killProcess(pid);*/ //(black magic :) )\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tIntent in=new Intent(AgentSectionActivity.this,MainActivity.class);\n\t\tstartActivity(in);\n\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\t\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t public void onFinish(){\n\t \tIntent nextScreen = new Intent(getApplicationContext(), Main_Menu_2.class);\n\t\t\t // TODO Auto-generated method stub\n\t\t startActivity(nextScreen);\n\t }", "@Override\n public void onClick(DialogInterface arg0, int arg1) {\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n Intent homeIntent = new Intent(Intent.ACTION_MAIN);\n homeIntent.addCategory( Intent.CATEGORY_HOME );\n homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\n\n\t\t\t\t\t\t\t\t\tIntent inten = new Intent(context, CapturePrescriptionActivity.class);\n\t\t\t\t\t\t\t\t\tstartActivity(inten);\n\t\t\t\t\t\t\t\t\tfinish();\n\n\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override \n public void onClick(DialogInterface dialog, int which) {\n finish(); \n \n }", "@Override\n public void onClick(View v) {\n finish();\n //startActivity(i);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(ScannerActivity.this,\"Redirecting...\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerResult.class);\n assignObjValue(laptopCheckOutInfoList, key);\n intent.putExtra(\"laptop_record_info\", laptopCheckOutInfo); //return the object li as a serialized object\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n Intent intent = new Intent(\n Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmActivity.finish();\n\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n Intent i = new Intent(getApplicationContext(), HomeScreenActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(View view){\n startActivity(new Intent(homePage.this, MainActivity.class));\n finish();\n\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n AlertDialog alertDialog = new AlertDialog.Builder(v.getContext()).create(); //Read Update\n alertDialog.setTitle(\"Alert!!!\");\n alertDialog.setMessage(\"Wrong Answer!!!\");\n\n\n\n alertDialog.show();\n finishActivity(1);//<-- See This!\n Intent i = new Intent(getApplicationContext(),Question2.class);\n\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n\n AlertDialog alertDialog = new AlertDialog.Builder(v.getContext()).create(); //Read Update\n alertDialog.setTitle(\"Alert!!!\");\n alertDialog.setMessage(\"Wrong Answer!!!\");\n\n\n\n alertDialog.show();\n finishActivity(1);//<-- See This!\n Intent i = new Intent(getApplicationContext(),Question2.class);\n\n startActivity(i);\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent = new Intent(LeadModeActivity.this,MainFrameActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n NavUtils.navigateUpFromSameTask(EditorActivity.this);\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n FrontCameraVerificationActivity.this.finish();\n }" ]
[ "0.7293891", "0.70356303", "0.66072774", "0.65231305", "0.65005976", "0.6411811", "0.6365273", "0.63331336", "0.6313695", "0.6309744", "0.63037485", "0.6294414", "0.620867", "0.61822575", "0.6152479", "0.6121659", "0.61186576", "0.6114265", "0.6089496", "0.60866576", "0.60841995", "0.60276496", "0.60247886", "0.60098076", "0.59835005", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.5952493", "0.59523886", "0.59498817", "0.59465075", "0.594595", "0.5942105", "0.5938331", "0.59250796", "0.5924514", "0.5921293", "0.5919885", "0.59073323", "0.59073085", "0.59000283", "0.589938", "0.58943194", "0.58849895", "0.5884819", "0.58813936", "0.58753616", "0.58712655", "0.58678883", "0.58614403", "0.5859337", "0.5856909", "0.58558714", "0.5855657", "0.5851965", "0.5846842", "0.5844762", "0.58374095", "0.5823849", "0.5820388", "0.58091754", "0.5806534", "0.57981896", "0.57978964", "0.57951415", "0.5779858", "0.57797384", "0.57765305", "0.577442", "0.5771796", "0.57601625", "0.5758152", "0.57547826", "0.5752859", "0.5752859", "0.5752859", "0.57482654", "0.57467115", "0.5746659", "0.57450587", "0.5742886", "0.5742886", "0.5741114", "0.57406294", "0.57406294", "0.57406294", "0.57406294", "0.57406294", "0.57406294", "0.57406294", "0.57406294", "0.5731825", "0.5728747" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { showwindow(presentadd_group); }
{ "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 onClick(View arg0) { upload(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
public void onItemClick(AdapterView arg0, View arg1, int arg2, long arg3) { groupID = messages.get(arg2).getid(); selfriend.setText(messages.get(arg2).getname()); popupWindow.dismiss(); //myfriends.setText(messages.get(arg2).getname()); // popupWindow.dismiss(); // popupWindow = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "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 boolean onTouchEvent(MotionEvent event) { if (popupWindow != null && popupWindow.isShowing()) { popupWindow.dismiss(); popupWindow = null; } return super.onTouchEvent(event); }
{ "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
Exact equivalent of input parameters used in LObjBoolConsumer.
@SuppressWarnings("UnusedDeclaration") public interface LObjBoolPair<T> extends LTuple<Object> { int SIZE = 2; T first(); default T value() { return first(); } boolean second(); @Override default Object get(int index) { switch(index) { case 1: return first(); case 2: return second(); default: throw new NoSuchElementException(); } } /** Tuple size */ @Override default int tupleSize() { return SIZE; } /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */ static <T> int argHashCode(T a1,boolean a2) { final int prime = 31; int result = 1; result = prime * result + ((a1 == null) ? 0 : a1.hashCode()); result = prime * result + Boolean.hashCode(a2); return result; } /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */ static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) { return Null.equals(a1, b1) && // a2==b2; // } /** * Static equals() implementation that takes two tuples and checks if they are equal. * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class * and how many more values there are. */ static boolean argEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return argEquals(one.first(), one.second(), other.first(), other.second()); }); } /** * Static equals() implementation that takes two tuples and checks if they are equal. */ public static boolean tupleEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return one.tupleSize() == other.tupleSize() && argEquals(one.first(), one.second(), other.first(), other.second()); }); } @Override default Iterator<Object> iterator() { return new Iterator<Object>() { private int index; @Override public boolean hasNext() { return index<SIZE; } @Override public Object next() { index++; return get(index); } }; } interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> { @Override default int compareTo(LObjBoolPair<T> that) { return Null.compare(this, that, (one, two) -> { int retval = 0; return (retval = Null.compare(one.first(), two.first())) != 0 ? retval : // (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; // }); } } abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> { @Override public boolean equals(Object that) { return LObjBoolPair.tupleEquals(this, that); } @Override public int hashCode() { return LObjBoolPair.argHashCode(first(),second()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('('); sb.append(first()); sb.append(','); sb.append(second()); sb.append(')'); return sb.toString(); } } /** * Mutable tuple. */ interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> { SELF first(T first) ; SELF second(boolean second) ; default SELF setFirst(T first) { this.first(first); return (SELF) this; } /** Sets value if predicate(current) is true */ default SELF setFirstIf(T first, LPredicate<T> predicate) { if (predicate.test(this.first())) { return this.first(first); } return (SELF) this; } /** Sets new value if predicate predicate(newValue, current) is true. */ default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) { if (predicate.test(first, this.first())) { return this.first(first); } return (SELF) this; } /** Sets new value if predicate predicate(current, newValue) is true. */ default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) { if (predicate.test(this.first(), first)) { return this.first(first); } return (SELF) this; } default SELF setSecond(boolean second) { this.second(second); return (SELF) this; } /** Sets value if predicate(current) is true */ default SELF setSecondIf(boolean second, LLogicalOperator predicate) { if (predicate.apply(this.second())) { return this.second(second); } return (SELF) this; } /** Sets new value if predicate predicate(newValue, current) is true. */ default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) { if (predicate.apply(second, this.second())) { return this.second(second); } return (SELF) this; } /** Sets new value if predicate predicate(current, newValue) is true. */ default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) { if (predicate.apply(this.second(), second)) { return this.second(second); } return (SELF) this; } default SELF reset() { this.first(null); this.second(false); return (SELF) this; } } public static <T> MutObjBoolPair<T> of() { return of( null , false ); } public static <T> MutObjBoolPair<T> of(T a1,boolean a2){ return new MutObjBoolPair(a1,a2); } public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) { return of(tuple.first(), tuple.second()); } /** * Mutable, non-comparable tuple. */ class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> { private T first; private boolean second; public MutObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override MutObjBoolPair<T> first(T first) { this.first = first; return this; } public @Override boolean second() { return second; } public @Override MutObjBoolPair<T> second(boolean second) { this.second = second; return this; } } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { return comparableOf( null , false ); } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){ return new MutCompObjBoolPair(a1,a2); } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) { return comparableOf(tuple.first(), tuple.second()); } /** * Mutable, comparable tuple. */ final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> { private T first; private boolean second; public MutCompObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override MutCompObjBoolPair<T> first(T first) { this.first = first; return this; } public @Override boolean second() { return second; } public @Override MutCompObjBoolPair<T> second(boolean second) { this.second = second; return this; } } public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){ return new ImmObjBoolPair(a1,a2); } public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) { return immutableOf(tuple.first(), tuple.second()); } /** * Immutable, non-comparable tuple. */ @Immutable final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> { private final T first; private final boolean second; public ImmObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override boolean second() { return second; } } public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){ return new ImmCompObjBoolPair(a1,a2); } public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) { return immutableComparableOf(tuple.first(), tuple.second()); } /** * Immutable, comparable tuple. */ @Immutable final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> { private final T first; private final boolean second; public ImmCompObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override boolean second() { return second; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean getBoolean(String paramString, boolean paramBoolean) {\n }", "public T caseOpBool(OpBool object)\n {\n return null;\n }", "protected abstract Boolean applicable(Map<String, Object> parameters);", "BoolOperation createBoolOperation();", "public T caseValBool(ValBool object)\n {\n return null;\n }", "boolean hasParameterValue();", "static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "@Test\n public void testCaseIsInputEqualsMatchPredicateBool() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseIs(s -> s == o, () -> success.set(true));\n assertTrue(success.get());\n }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "void boolean1(boolean a);", "public abstract boolean read_boolean();", "boolean booleanOf();", "private CheckBoolean() {\n\t}", "public BooleanParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n \n if ( defaultValue instanceof String ) {\n defaultValue = new Boolean( \"TRUE\".equals(defaultValue));\n }\n }", "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "@Test @Ignore\n public void testUfWithBoolArg() throws SolverException, InterruptedException {\n\n UninterpretedFunctionDeclaration<IntegerFormula> uf = fmgr.declareUninterpretedFunction(\"fun_bi\", FormulaType.IntegerType, FormulaType.BooleanType);\n IntegerFormula ufTrue = fmgr.callUninterpretedFunction(uf, ImmutableList.of(bmgr.makeBoolean(true)));\n IntegerFormula ufFalse = fmgr.callUninterpretedFunction(uf, ImmutableList.of(bmgr.makeBoolean(false)));\n\n BooleanFormula f = bmgr.not(imgr.equal(ufTrue, ufFalse));\n assertThat(f.toString()).isEmpty();\n assert_().about(BooleanFormula()).that(f).isSatisfiable();\n }", "public void method_217(boolean var1) {}", "public static final boolean getBooleanParam(Map<String,String> params, String key, boolean def) {\n\t\ttry {\n\t\t\tString val = params.get(key);\n\t\t\tif(val==null || (!\"true\".equals(val) && !\"false\".equals(val))) return def;\n\t\t\treturn Boolean.parseBoolean(val);\n\t\t} catch (Exception e) {\n\t\t\treturn def;\n\t\t}\n\t}", "@Test\n public void testCaseIsPredicateBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseIs(s -> true, () -> success.set(true));\n assertTrue(success.get());\n }", "@Test\n public void testCaseOfBool() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseOf(true, s -> success.set(true));\n assertTrue(success.get());\n }", "protected abstract boolean a(axz paramaxz, long paramLong, int paramInt1, int paramInt2, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, BitSet paramBitSet);", "boolean method_107(boolean var1, class_81 var2);", "protected abstract boolean checkedParametersAppend();", "public void b(boolean paramBoolean)\r\n/* 603: */ {\r\n/* 604:601 */ this.l = paramBoolean;\r\n/* 605: */ }", "public void a(boolean ☃) {\r\n/* 64 */ this.ab.b(a, Boolean.valueOf(☃));\r\n/* */ }", "@Test\n public void testCaseOfBooleanSupplier() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseOf(() -> true, s -> success.set(true));\n assertTrue(success.get());\n }", "boolean hasParameters();", "@Test\n public void testCaseOfBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseOf(true, s -> success.set(true));\n assertTrue(success.get());\n }", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "void mo54420a(boolean z, boolean z2);", "@Test\n public void testCaseIsBool() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseIs(true, () -> success.set(true));\n assertTrue(success.get());\n }", "private void saveBoolean(String paramString, boolean paramBoolean) {\n }", "static public boolean getSingleBooleanFromParameter(RuntimeContract contract, String parameter, boolean def) throws IllegalUsageException {\r\n\t\t// If not given, return default\r\n\t\tif(!contract.hasArgumentClause(parameter)) return def;\r\n\t\t\r\n\t\t// If given convert to boolean\r\n\t\tString value = contract.useArgumentClause(parameter).getSingleValue();\r\n\t\tif(\"true\".equalsIgnoreCase(value))\r\n\t\t\treturn true;\r\n\t\telse if(\"false\".equalsIgnoreCase(value))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthrow new IllegalUsageException(parameter + \": unexpected value '\" + value + \"'. Expected either 'true' or 'false'\");\r\n\t}", "public abstract boolean supportsMultipleInputs();", "@Test\n public void testCaseOfInputEqualsMatchFunction() {\n AtomicBoolean success = new AtomicBoolean(false);\n int expected = 42;\n match(expected).caseObj(Optional::ofNullable, s -> success.set(s == expected));\n\n assertTrue(success.get());\n }", "public T caseExprBool(ExprBool object)\n {\n return null;\n }", "public TrueValue (){\n }", "boolean getBoolValue();", "boolean getBoolValue();", "Boolean isPassed();", "BoolConstant createBoolConstant();", "void mo197b(boolean z);", "private void functionalInterfacesForBoolean() {\n BooleanSupplier b1 = () -> true;\n BooleanSupplier b2 = () -> Math.random() > .5;\n }", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "@Test\n public void testCaseOfBooleanSupplier() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseOf(() -> true, s -> success.set(true));\n assertTrue(success.get());\n }", "@Test\n public void testCaseIsBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseIs(true, () -> success.set(true));\n assertTrue(success.get());\n }", "private static boolean testGetAllowedValues(boolean a[]) {\r\n return a[0] && a[1] && a[2] && a[3] && !a[4] && a[5] && a[6] && a[7] && !a[8];\r\n }", "@Test\n public void testCaseOfInputEqualsMatchFunction() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseObj(Optional::ofNullable, s -> success.set(s == o));\n\n assertTrue(success.get());\n }", "int updateByExampleSelective(@Param(\"record\") Trueorfalse record, @Param(\"example\") TrueorfalseExample example);", "public void am(boolean z) {\n }", "void mo64153a(boolean z);", "public abstract boolean verifyInput();", "public interface BoxedDoubleToBooleanFunction extends ObjectToBooleanFunction<Double> {\n\n}", "public boolean isParameterProvided();", "void invokeBooleanCallback(long callbackPtr, boolean value);", "public boolean getParam0(){\n return localParam0;\n }", "public final boolean func_boolean_a(int var1, int var2) {\n if (this.func_boolean_b(var1, var2)) {\n return true;\n } else if (var2 != 53 && var1 != 8) {\n if (var2 == -8) {\n super.field_class_cb_a.func_void_a(this.field_byte_c, (byte)0);\n return true;\n } else {\n return true;\n }\n } else {\n super.field_class_cb_a.func_void_a(this.field_byte_c, (byte)1);\n return true;\n }\n }", "abstract public boolean getAsBoolean();", "private static boolean\n\t\tdoParametersMatch(Class<?>[] types, Object[] parameters)\n\t{\n\t\tif (types.length != parameters.length) return false;\n\t\tfor (int i = 0; i < types.length; i++)\n\t\t\tif (parameters[i] != null) {\n\t\t\t\tClass<?> clazz = parameters[i].getClass();\n\t\t\t\tif (types[i].isPrimitive()) {\n\t\t\t\t\tif (types[i] != Long.TYPE && types[i] != Integer.TYPE &&\n\t\t\t\t\t\ttypes[i] != Boolean.TYPE) throw new RuntimeException(\n\t\t\t\t\t\t\"unsupported primitive type \" + clazz);\n\t\t\t\t\tif (types[i] == Long.TYPE && clazz != Long.class) return false;\n\t\t\t\t\telse if (types[i] == Integer.TYPE && clazz != Integer.class) return false;\n\t\t\t\t\telse if (types[i] == Boolean.TYPE && clazz != Boolean.class) return false;\n\t\t\t\t}\n\t\t\t\telse if (!types[i].isAssignableFrom(clazz)) return false;\n\t\t\t}\n\t\treturn true;\n\t}", "private static boolean isMoreSpecific(AccessibleObject more, Class<?>[] moreParams, boolean moreVarArgs, AccessibleObject less, Class<?>[] lessParams, boolean lessVarArgs) { // TODO clumsy arguments pending Executable in Java 8\n if (lessVarArgs && !moreVarArgs) {\n return true; // main() vs. main(String...) on []\n } else if (!lessVarArgs && moreVarArgs) {\n return false;\n }\n // TODO what about passing [arg] to log(String...) vs. log(String, String...)?\n if (moreParams.length != lessParams.length) {\n throw new IllegalStateException(\"cannot compare \" + more + \" to \" + less);\n }\n for (int i = 0; i < moreParams.length; i++) {\n Class<?> moreParam = Primitives.wrap(moreParams[i]);\n Class<?> lessParam = Primitives.wrap(lessParams[i]);\n if (moreParam.isAssignableFrom(lessParam)) {\n return false;\n } else if (lessParam.isAssignableFrom(moreParam)) {\n return true;\n }\n if (moreParam == Long.class && lessParam == Integer.class) {\n return false;\n } else if (moreParam == Integer.class && lessParam == Long.class) {\n return true;\n }\n }\n // Incomparable. Arbitrarily pick one of them.\n return more.toString().compareTo(less.toString()) > 0;\n }", "public abstract boolean a(e parame, b paramb, int paramInt1, int paramInt2);", "SubtypedOpCheck(SubtypedDef sd,Element xml)\n{\n String ops = IvyXml.getAttrString(xml,\"OPERATOR\");\n if (ops == null) operator_names = null;\n else {\n operator_names = new HashSet<>();\n StringTokenizer tok = new StringTokenizer(ops,\", \\t;\");\n while (tok.hasMoreTokens()) {\n operator_names.add(tok.nextToken());\n }\n if (operator_names.isEmpty()) operator_names = null;\n }\n \n and_check = IvyXml.getAttrBool(xml,\"AND\");\n result_value = sd.getValue(IvyXml.getAttrString(xml,\"RESULT\"));\n call_name = IvyXml.getAttrString(xml,\"METHOD\");\n \n String atyps = IvyXml.getAttrString(xml,\"ARGS\");\n if (atyps == null) {\n arg_values = null;\n }\n else {\n StringTokenizer tok = new StringTokenizer(atyps,\" \\t,;\");\n arg_values = new SubtypedValue[tok.countTokens()];\n int i = 0;\n while (tok.hasMoreTokens()) {\n String t = tok.nextToken();\n SubtypedValue uv = null;\n if (t.equals(\"*\") || t.equals(\"ANY\")) ;\n else {\n uv = sd.getValue(t);\n }\n arg_values[i++] = uv;\n }\n if (arg_values.length == 0) arg_values = null;\n }\n \n SubtypedValue any = sd.getValue(IvyXml.getAttrString(xml,\"VALUE\"));\n if (any != null) {\n if (result_value == null) result_value = any;\n if (arg_values == null) {\n arg_values = new SubtypedValue [] { any };\n }\n else {\n for (int i = 0; i < arg_values.length; ++i) {\n if (arg_values[i] == null) arg_values[i] = any;\n }\n }\n }\n \n String rvl = IvyXml.getAttrString(xml,\"RETURN\");\n if (rvl != null) {\n return_value = sd.getValue(rvl);\n return_arg = -1;\n if (return_value == null) {\n if (rvl.equals(\"RESULT\")) return_arg = 0;\n else if (rvl.equals(\"LHS\")) return_arg = 1;\n else if (rvl.equals(\"RHS\")) return_arg = 2;\n try {\n return_arg = Integer.parseInt(rvl);\n }\n catch (NumberFormatException e) { \n return_arg = 0;\n }\n }\n }\n}", "void mo21069a(boolean z);", "public void a(boolean paramBoolean)\r\n/* 593: */ {\r\n/* 594:593 */ this.k = paramBoolean;\r\n/* 595: */ }", "public T caseBooleanOperation(BooleanOperation object) {\n\t\treturn null;\n\t}", "static Nda<Boolean> of( Shape shape, boolean... values ) { return Tensor.ofAny( Boolean.class, shape, values ); }", "private BooleanFunctions()\n {\n }", "public void testCompareBoolean() {\n\t\tboolean one = true;\n\t\tboolean two = false;\n\t\t//false ist kleiner wie true\n\t\tassertTrue(comp.compareBoolean(two, one) == -1);\n\t\tassertTrue(comp.compareBoolean(one, one) == 0);\n\t\tassertTrue(comp.compareBoolean(two, two) == 0);\n\t\tassertTrue(comp.compareBoolean(one, two) == 1);\n\t}", "public static boolean bVal( Boolean value ) {\n return value != null && value; \n }", "void mo98208a(boolean z);", "public static void main(String[] args) {\n String str1 = \"true\";\n String str2 = \"false\";\n\n boolean b1 = Boolean.valueOf(str1);\n boolean b2 = Boolean.valueOf(str2);\n\n System.out.println(b1);\n System.out.println(b2);\n }", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tboolean directTrue = true;\n\t\tboolean directFalse = false;\n\n\t\t\n\t\tSystem.out.println(\"true = \"+directTrue+\" false = \"+directFalse);\n\t\t\n\t\t\n\t\t// Values changed dynamically\n\t\t// As per condition\n\t\t\n\t\tboolean dynamicallyTrue = ( 2 < 5);\n\t\tboolean dynamicallyFalse = ( 2 > 5);\n\n\t\tSystem.out.println(\"( 2 < 5 ) = \"+dynamicallyTrue+\" ( 2 > 5 ) = \"+dynamicallyFalse);\n\t\t\n\t}", "public void set(boolean[] abol);", "boolean getValue();", "public T caseCompBool(CompBool object)\n {\n return null;\n }", "void mo6661a(boolean z);", "public boolean method_121(ahb var1, int var2, int var3, int var4, boolean var5) {\r\n return true;\r\n }", "public void setParam0(boolean param){\n \n // setting primitive attribute tracker to true\n \n if (false) {\n localParam0Tracker = false;\n \n } else {\n localParam0Tracker = true;\n }\n \n this.localParam0=param;\n \n\n }", "public void testPositiveScalar() {\n Object value;\n\n /*\n * fixme Boolean converters not implemented value = LocaleConvertUtils.convert(\"true\", Boolean.TYPE); assertTrue(value instanceof Boolean);\n * assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"true\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n */\n\n value = LocaleConvertUtils.convert(\"123\", Byte.TYPE);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n value = LocaleConvertUtils.convert(\"123\", Byte.class);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n /*\n * fixme Character conversion not implemented yet value = LocaleConvertUtils.convert(\"a\", Character.TYPE); assertTrue(value instanceof Character);\n * assertEquals(((Character) value).charValue(), 'a');\n *\n * value = LocaleConvertUtils.convert(\"a\", Character.class); assertTrue(value instanceof Character); assertEquals(((Character) value).charValue(), 'a');\n */\n /*\n * fixme - this is a discrepancy with standard converters ( probably not major issue ) value = LocaleConvertUtils.convert(\"java.lang.String\",\n * Class.class); assertTrue(value instanceof Class); assertEquals(String.class, (Class) value);\n */\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.TYPE);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.class);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.TYPE);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.class);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.TYPE);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.class);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Long.TYPE);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123456\", Long.class);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123456);\n\n /*\n * fixme - Short conversion not implemented at this point value = LocaleConvertUtils.convert(\"123\", Short.TYPE); assertTrue(value instanceof Short);\n * assertEquals(((Short) value).shortValue(), (short) 123);\n *\n * value = LocaleConvertUtils.convert(\"123\", Short.class); assertTrue(value instanceof Short); assertEquals(((Short) value).shortValue(), (short) 123);\n */\n\n String input;\n\n input = \"2002-03-17\";\n value = LocaleConvertUtils.convert(input, Date.class);\n assertTrue(value instanceof Date);\n assertEquals(input, value.toString());\n\n input = \"20:30:40\";\n value = LocaleConvertUtils.convert(input, Time.class);\n assertTrue(value instanceof Time);\n assertEquals(input, value.toString());\n\n input = \"2002-03-17 20:30:40.0\";\n value = LocaleConvertUtils.convert(input, Timestamp.class);\n assertTrue(value instanceof Timestamp);\n assertEquals(input, value.toString());\n\n }", "void mo3305a(boolean z);", "public boolean getBooleanParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!boolParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't a bool parameter...\");\n System.exit(1);\n }\n\n return boolParams.get(name);\n }", "public Boolean asBoolean();", "boolean containsTypedParameter(Parameter typedParameter);", "boolean match(String mnemonic, List<ParameterType>[] parameters);", "@Test\n public void testCaseOfGetsSameObjectAsInput() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseOf(i -> true, s -> success.set(true));\n\n assertTrue(success.get());\n }", "public void b(boolean paramBoolean)\r\n/* 184: */ {\r\n/* 185:183 */ this.g = paramBoolean;\r\n/* 186: */ }", "public boolean a(World paramaqu, BlockPosition paramdt, Block parambec, boolean paramBoolean)\r\n/* 67: */ {\r\n/* 68: 83 */ return true;\r\n/* 69: */ }", "boolean match(String mnemonic, ParameterType[] parameters);", "int updateByExample(@Param(\"record\") Trueorfalse record, @Param(\"example\") TrueorfalseExample example);", "abstract void mo956a(boolean z);", "protected BooleanValue(Boolean bv) {\n boolValue = bv;\n }", "public Value restrictToBool() {\n checkNotPolymorphicOrUnknown();\n if (isMaybeAnyBool())\n return theBoolAny;\n else if (isMaybeTrueButNotFalse())\n return theBoolTrue;\n else if (isMaybeFalseButNotTrue())\n return theBoolFalse;\n else\n return theNone;\n }", "public void checkParameters() {\n }", "public boolean method_107(boolean var1, class_81 var2) {\r\n return true;\r\n }", "void visit(BooleanConstantNode node);" ]
[ "0.59284616", "0.5850165", "0.5765378", "0.56660336", "0.56593126", "0.5605081", "0.559667", "0.55782384", "0.552931", "0.5469051", "0.54520243", "0.54262733", "0.5395711", "0.5386412", "0.5384291", "0.538008", "0.53554016", "0.5351653", "0.5345926", "0.5327184", "0.5323572", "0.5322471", "0.5317169", "0.53046066", "0.52987266", "0.52951515", "0.5292478", "0.5284287", "0.5274482", "0.5274482", "0.5274482", "0.5274482", "0.52632666", "0.52540886", "0.5248526", "0.52158636", "0.5202203", "0.5202173", "0.5197947", "0.5168095", "0.5163555", "0.5158673", "0.5158673", "0.5155709", "0.514488", "0.5140332", "0.513922", "0.51371515", "0.513702", "0.5131461", "0.5126228", "0.5125402", "0.511921", "0.5118612", "0.51010436", "0.5096016", "0.5093912", "0.509354", "0.5092901", "0.5091903", "0.5089296", "0.50870574", "0.50851583", "0.5083452", "0.5078473", "0.5073737", "0.5071687", "0.50527745", "0.5050905", "0.505033", "0.50496256", "0.50454", "0.50356907", "0.50356877", "0.50265336", "0.5023197", "0.5022934", "0.5020957", "0.50103533", "0.5008648", "0.5008151", "0.4999998", "0.49989542", "0.4993033", "0.49903664", "0.49901465", "0.49755743", "0.49710867", "0.49701634", "0.49662688", "0.49629715", "0.49571335", "0.49566442", "0.49559912", "0.49471393", "0.494599", "0.49449745", "0.49378762", "0.49321973", "0.49272788" ]
0.5473392
9
Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it.
static <T> int argHashCode(T a1,boolean a2) { final int prime = 31; int result = 1; result = prime * result + ((a1 == null) ? 0 : a1.hashCode()); result = prime * result + Boolean.hashCode(a2); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int hashCode() {\n return Objects.hash(myInt, myLong, myString, myBool, myOtherInt);\n }", "public abstract int hashCode();", "@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n default T value() {\n return first();\n }\n\n boolean second();\n\n\n\n @Override default Object get(int index) {\n switch(index) {\n case 1: return first();\n case 2: return second();\n default: throw new NoSuchElementException();\n }\n }\n\n\n /** Tuple size */\n @Override default int tupleSize() {\n return SIZE;\n }\n\n \n\n /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */\n static <T> int argHashCode(T a1,boolean a2) {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((a1 == null) ? 0 : a1.hashCode());\n result = prime * result + Boolean.hashCode(a2);\n return result;\n }\n\n /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */\n static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class\n * and how many more values there are.\n */\n static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n */\n public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n\n\n \n @Override default Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int index;\n\n @Override public boolean hasNext() {\n return index<SIZE;\n }\n\n @Override public Object next() {\n index++;\n return get(index);\n }\n };\n }\n\n interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> {\n @Override\n default int compareTo(LObjBoolPair<T> that) {\n return Null.compare(this, that, (one, two) -> {\n int retval = 0;\n\n return\n (retval = Null.compare(one.first(), two.first())) != 0 ? retval : //\n (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; //\n });\n }\n\n }\n \n\n abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> {\n\n @Override\n public boolean equals(Object that) {\n return LObjBoolPair.tupleEquals(this, that);\n }\n\n @Override\n public int hashCode() {\n return LObjBoolPair.argHashCode(first(),second());\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('(');\n sb.append(first());\n sb.append(',');\n sb.append(second());\n sb.append(')');\n return sb.toString();\n }\n\n }\n\n\n\n\n\n /**\n * Mutable tuple.\n */\n\n interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> {\n\n\n\n SELF first(T first) ; \n SELF second(boolean second) ; \n\n default SELF setFirst(T first) {\n this.first(first);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }\n \n\n\n default SELF setSecond(boolean second) {\n this.second(second);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }\n \n\n\n default SELF reset() {\n this.first(null);\n this.second(false);\n return (SELF) this;\n }\n }\n\n\n\n\n\n\n public static <T> MutObjBoolPair<T> of() { \n return of( null , false );\n }\n \n\n public static <T> MutObjBoolPair<T> of(T a1,boolean a2){\n return new MutObjBoolPair(a1,a2);\n }\n\n public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) {\n return of(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, non-comparable tuple.\n */\n\n class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { \n return comparableOf( null , false );\n }\n \n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){\n return new MutCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) {\n return comparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, comparable tuple.\n */\n\n final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutCompObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutCompObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n\n public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){\n return new ImmObjBoolPair(a1,a2);\n }\n\n public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) {\n return immutableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, non-comparable tuple.\n */\n@Immutable\n final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){\n return new ImmCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) {\n return immutableComparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, comparable tuple.\n */\n@Immutable\n final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n}", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "@Override\n\t public int hashCode();", "int hashCode();", "int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + (booleanValue ? 1231 : 1237);\n\t\tlong temp;\n\t\ttemp = Double.doubleToLongBits(doubleValue);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + intValue;\n\t\treturn result;\n\t}", "@Override\n public int hashCode(){\n return (String.valueOf(bool) + statement).hashCode();\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getValueId() == null) ? 0 : getValueId().hashCode());\n result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());\n result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());\n result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());\n result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());\n result = prime * result + ((getBallPackId() == null) ? 0 : getBallPackId().hashCode());\n return result;\n }", "@Override\n int hashCode();", "@Override\r\n\t\tpublic int hashCode() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.hashCode();\r\n\t\t\t}\r\n\t\t}", "@Override\n public int hashCode();", "@Override\n\tpublic int hashCode()\n\t{\n\t\treturn pairs.hashCode();\n\t}", "@Override\n @Generated(\"eclipse\")\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + (this.asyncSupported ? 1231 : 1237);\n result = prime * result + (this.heldValue == null ? 0 : this.heldValue.hashCode());\n result =\n prime * result + (this.initParameters == null ? 0 : this.initParameters.hashCode());\n result = prime * result + (this.name == null ? 0 : this.name.hashCode());\n result =\n prime * result + (this.serviceReference == null ? 0 : this.serviceReference.hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n int result;\n long temp;\n result = type.hashCode();\n result = 31 * result + (name != null ? name.hashCode() : 0);\n result = 31 * result + (mainColor != null ? mainColor.hashCode() : 0);\n result = 31 * result + (material != null ? material.hashCode() : 0);\n result = 31 * result + (origin != null ? origin.hashCode() : 0);\n temp = Double.doubleToLongBits(price);\n result = 31 * result + (int) (temp ^ (temp >>> 32));\n result = 31 * result + Arrays.hashCode(ageDelta);\n return result;\n }", "@Override\n\tpublic int hashCode () {\n\t\treturn Objects.hash(name, active, valueType);\n\t}", "@Override\n public final int hashCode() {\n\t\n \treturn Float.floatToIntBits(this.m00) ^\n \t\t Float.floatToIntBits(this.m01) ^\n \t\t Float.floatToIntBits(this.m02) ^\n Float.floatToIntBits(this.m10) ^\n Float.floatToIntBits(this.m11) ^\n Float.floatToIntBits(this.m12) ^\n Float.floatToIntBits(this.m20) ^\n Float.floatToIntBits(this.m21) ^\n Float.floatToIntBits(this.m22);\n }", "@Override\n public int hashCode() {\n return values.descriptor.hashCode() ^ values.hashCode();\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getRowId() == null) ? 0 : getRowId().hashCode());\n result = prime * result + ((getCoinTypeId() == null) ? 0 : getCoinTypeId().hashCode());\n result = prime * result + ((getRecTime() == null) ? 0 : getRecTime().hashCode());\n result = prime * result + ((getActiontype() == null) ? 0 : getActiontype().hashCode());\n result = prime * result + ((getLockId() == null) ? 0 : getLockId().hashCode());\n result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());\n result = prime * result + ((getServerIp() == null) ? 0 : getServerIp().hashCode());\n result = prime * result + ((getGameId() == null) ? 0 : getGameId().hashCode());\n result = prime * result + ((getServerName() == null) ? 0 : getServerName().hashCode());\n result = prime * result + ((getLockNum() == null) ? 0 : getLockNum().hashCode());\n result = prime * result + ((getChangeNum() == null) ? 0 : getChangeNum().hashCode());\n result = prime * result + ((getRemainNum() == null) ? 0 : getRemainNum().hashCode());\n result = prime * result + ((getOtherLockNum() == null) ? 0 : getOtherLockNum().hashCode());\n return result;\n }", "public int hashCode() {\n/* 69 */ int var1 = super.hashCode();\n/* 70 */ var1 = 31 * var1 + this.allowedValues.hashCode();\n/* 71 */ return var1;\n/* */ }", "@Override\n\tpublic int hashCode() {\n\t\treturn labelTemplate.hashCode() ^ type.hashCode() ^ priority ^ valueTemplate.hashCode();\n\t}", "public int hashCode() {\n return lho.hashCode() + op.hashCode() + rho.hashCode();\n }", "@Override \n int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((color == null) ? 0 : color.hashCode());\n\t\tresult = prime * result + (int) (id ^ (id >>> 32));\n\t\tresult = prime * result + ((largeImage == null) ? 0 : largeImage.hashCode());\n\t\tlong temp;\n\t\ttemp = Double.doubleToLongBits(listPrice);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + ((mediumImage == null) ? 0 : mediumImage.hashCode());\n\t\tresult = prime * result + ((parentProduct == null) ? 0 : parentProduct.hashCode());\n\t\tresult = prime * result + (int) (quantityOnHand ^ (quantityOnHand >>> 32));\n\t\ttemp = Double.doubleToLongBits(salePrice);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + ((size == null) ? 0 : size.hashCode());\n\t\tresult = prime * result + ((smallImage == null) ? 0 : smallImage.hashCode());\n\t\treturn result;\n\t}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());\n result = prime * result + ((getpObjObjectGid() == null) ? 0 : getpObjObjectGid().hashCode());\n result = prime * result + ((getLayoutName() == null) ? 0 : getLayoutName().hashCode());\n result = prime * result + ((getLayoutType() == null) ? 0 : getLayoutType().hashCode());\n result = prime * result + ((getDf() == null) ? 0 : getDf().hashCode());\n result = prime * result + ((getFields() == null) ? 0 : getFields().hashCode());\n result = prime * result + ((getJsondata() == null) ? 0 : getJsondata().hashCode());\n result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());\n result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());\n result = prime * result + ((getActive() == null) ? 0 : getActive().hashCode());\n result = prime * result + ((getDelete() == null) ? 0 : getDelete().hashCode());\n return result;\n }", "public int hashCode() {\n\t\treturn src.hashCode() ^ dst.hashCode() ^ data_len ^ type ^ group ^ data.hashCode();\n\t}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + _currencyPair.hashCode();\n result = prime * result + _expiries.hashCode();\n result = prime * result + _delta.hashCode();\n result = prime * result + _vega.hashCode();\n return result;\n }", "public int hashCode() {\n // For speed, this hash code relies only on the hash codes of its select\n // and criteria clauses, not on the from, order by, or option clauses\n int myHash = 0;\n myHash = HashCodeUtil.hashCode(myHash, this.operation);\n myHash = HashCodeUtil.hashCode(myHash, getProjectedQuery());\n return myHash;\n }", "@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\r\n\t\tif (containingExpression != null)\r\n\t\t{\r\n\t\t\thash = hash & Constants.HASH_PRIME + containingExpression.hashCode();\r\n\t\t}\r\n\r\n\t\tif (conditions != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + new HashSet<ICondition>(conditions).hashCode();\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}", "public static int hashCode(boolean b) {\n return b ? 7 : 3;\n }", "@Override\r\n public int hashCode() {\r\n int hash = 7;\r\n hash = 19 * hash + (int) (this.grauDeEquilibrio ^ (this.grauDeEquilibrio >>> 32));\r\n return hash;\r\n }", "@Override\n public int hashCode() {\n return Short.toUnsignedInt(x) + (Short.toUnsignedInt(y)<<16);\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getPointId() == null) ? 0 : getPointId().hashCode());\n result = prime * result + ((getPersonnelType() == null) ? 0 : getPersonnelType().hashCode());\n result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());\n result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getLogUuid() == null) ? 0 : getLogUuid().hashCode());\n result = prime * result + ((getBversion() == null) ? 0 : getBversion().hashCode());\n result = prime * result + ((getBlockHeight() == null) ? 0 : getBlockHeight().hashCode());\n result = prime * result + ((getPropKey() == null) ? 0 : getPropKey().hashCode());\n result = prime * result + ((getPropValue() == null) ? 0 : getPropValue().hashCode());\n result = prime * result + ((getMptType() == null) ? 0 : getMptType().hashCode());\n result = prime * result + ((getHashValue() == null) ? 0 : getHashValue().hashCode());\n result = prime * result + ((getTxid() == null) ? 0 : getTxid().hashCode());\n result = prime * result + ((getPrevHashValue() == null) ? 0 : getPrevHashValue().hashCode());\n result = prime * result + ((getPrevBlockHeight() == null) ? 0 : getPrevBlockHeight().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());\n return result;\n }", "@Override\n\tpublic int hashCode()\n\t{\n\t\tint hash = 5;\n\t\thash = 41 * hash + (int) (Double.doubleToLongBits(this.latitude) ^ (Double.doubleToLongBits(this.latitude) >>> 32));\n\t\thash = 41 * hash + (int) (Double.doubleToLongBits(this.longitude) ^ (Double.doubleToLongBits(this.longitude) >>> 32));\n\t\treturn hash;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}", "@Override\n public int hashCode() {\n return Double.valueOf(lat).hashCode() + Double.valueOf(lon).hashCode();\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());\n result = prime * result + ((getHotelId() == null) ? 0 : getHotelId().hashCode());\n result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getCreatePerson() == null) ? 0 : getCreatePerson().hashCode());\n result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());\n result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());\n result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());\n return result;\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn map.hashCode() ^ y() << 16 ^ x();\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\tint result=1,prime=31;\r\n\t\tresult = result * prime + tableName.hashCode();\r\n\t\tresult = result * prime + databaseName.hashCode();\r\n\t\tresult = result * prime + limit;\r\n\t\tresult = result * prime + offset;\r\n\t\tresult = result * prime + queryCondition.hashCode();\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\n\tint hash = 3;\n\thash = 41 * hash + (this.utcTime != null ? this.utcTime.hashCode() : 0);\n\thash = 41 * hash + (this._long != null ? this._long.hashCode() : 0);\n\thash = 41 * hash + (this.lat != null ? this.lat.hashCode() : 0);\n\thash = 41 * hash + (this.elevation != null ? this.elevation.hashCode() : 0);\n\thash = 41 * hash + (this.heading != null ? this.heading.hashCode() : 0);\n\thash = 41 * hash + (this.speed != null ? this.speed.hashCode() : 0);\n\thash = 41 * hash + (this.posAccuracy != null ? this.posAccuracy.hashCode() : 0);\n\thash = 41 * hash + (this.timeConfidence != null ? this.timeConfidence.hashCode() : 0);\n\thash = 41 * hash + (this.posConfidence != null ? this.posConfidence.hashCode() : 0);\n\thash = 41 * hash + (this.speedConfidence != null ? this.speedConfidence.hashCode() : 0);\n\treturn hash;\n }", "@Override\n public int hashCode() {\n int result = 17;\n result = 31 * result + x + y;\n return result;\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn this.l1.hashCode() + this.l2.hashCode() + this.l3.hashCode();\n\t}", "public int hashCode() {\n return super.hashCode() ^ 0x1;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode());\n result = prime * result + ((getApiToken() == null) ? 0 : getApiToken().hashCode());\n result = prime * result + ((getPluginClass() == null) ? 0 : getPluginClass().hashCode());\n result = prime * result + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode());\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\n result = prime * result + ((getPublicAccess() == null) ? 0 : getPublicAccess().hashCode());\n result = prime * result + ((getSearchText() == null) ? 0 : getSearchText().hashCode());\n result = prime * result + ((getState() == null) ? 0 : getState().hashCode());\n result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());\n return result;\n }", "public int hashCode()\r\n {\r\n int hash = super.hashCode();\r\n hash ^= hashValue( m_name );\r\n hash ^= hashValue( m_classname );\r\n if( m_implicit )\r\n {\r\n hash ^= 35;\r\n }\r\n hash ^= hashValue( m_production );\r\n hash ^= hashArray( m_dependencies );\r\n hash ^= hashArray( m_inputs );\r\n hash ^= hashArray( m_validators );\r\n hash ^= hashValue( m_data );\r\n return hash;\r\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\n result = prime * result + ((getSeriesId() == null) ? 0 : getSeriesId().hashCode());\n result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());\n result = prime * result + (Arrays.hashCode(getGallery()));\n result = prime * result + ((getKeywords() == null) ? 0 : getKeywords().hashCode());\n result = prime * result + ((getBrief() == null) ? 0 : getBrief().hashCode());\n result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());\n result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());\n result = prime * result + ((getBuyLink() == null) ? 0 : getBuyLink().hashCode());\n result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());\n result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());\n result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());\n result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());\n return result;\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getProject());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getUser());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getStatus());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getLastActivityDate());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasPiSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasDpSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasAdminSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasRequestorSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getEmailStatus());\n return (int)(hash % Integer.MAX_VALUE);\n }", "public int hashCode() {\n\t\tint h = 0, i = 0, j = count;\n\t\twhile (j-- != 0) {\n\t\t\twhile (state[i] != OCCUPIED)\n\t\t\t\ti++;\n\t\t\th += longHash2IntHash(key[i]);\n\t\t\ti++;\n\t\t}\n\t\treturn h;\n\t}", "int\thashCode();", "public int hashCode() {\n return hash.hashCode();\n }", "@Override\n public int hashCode() {\n return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode());\n result = prime * result + ((getTagName() == null) ? 0 : getTagName().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getIndex() == null) ? 0 : getIndex().hashCode());\n return result;\n }", "@Override\n\t\tpublic int hashCode() {\n\t\t\treturn Integer.parseInt(lat.toString()) ^ Integer.parseInt(lng.toString());\n\t\t\t//return super.hashCode();\n\t\t}", "public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }", "public int hashCode()\n {\n int nHash = super.hashCode();\n\n StringBuilder buf = new StringBuilder(m_strDescription.toLowerCase()\n + m_strFieldType + m_strFieldName.toLowerCase() + m_strOperator\n + m_sequence + m_extOperator);\n Iterator iter = m_values.iterator();\n while (iter.hasNext())\n {\n buf.append((String) iter.next());\n }\n return nHash + buf.toString().hashCode() + (m_choices != null ?\n m_choices.hashCode() : 0);\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\t// Only this because other fields could be modified after you hash this.\r\n\t\treturn state.hashCode();\r\n\t}", "public int hashCode()\n {\n return values().hashCode();\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hashCode = 0;\r\n\t\tfor (K key : keySet()) {\r\n\t\t\thashCode += (key.hashCode() ^ get(key).hashCode());\r\n\t\t}\r\n\t\treturn hashCode;\r\n\t}", "@Override\r\n public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((getShareholderid() == null) ? 0 : getShareholderid().hashCode());\r\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\r\n result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());\r\n result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());\r\n result = prime * result + ((getHoldscale() == null) ? 0 : getHoldscale().hashCode());\r\n result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());\r\n result = prime * result + ((getIdimgZ() == null) ? 0 : getIdimgZ().hashCode());\r\n result = prime * result + ((getIdimgF() == null) ? 0 : getIdimgF().hashCode());\r\n result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n return (int) (Double.doubleToLongBits (toDouble())>>31);\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + _currencyPair.hashCode();\n result = prime * result + _vega.hashCode();\n return result;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + mListIndex;\n result = prime * result + ((mText == null) ? 0 : mText.hashCode());\n result = prime * result + (mToggle ? 1231 : 1237);\n return result;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = QAOperation.SEED;\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operator.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operand.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + constraint.hashCode();\r\n\t\treturn result;\r\n\t}", "@Override\r\n public int hashCode() {\r\n int result = (int) (a ^ (a >>> 32));\r\n result = 31 * result + (b != null ? b.hashCode() : 0);\r\n result = 31 * result + (a != null ? a.hashCode() : 0);\r\n result = 31 * result + (b != null ? b.hashCode() : 0);\r\n return result;\r\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\n result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());\n result = prime * result + ((getIsView() == null) ? 0 : getIsView().hashCode());\n result = prime * result + ((getListPhotoUrl() == null) ? 0 : getListPhotoUrl().hashCode());\n result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());\n return result;\n }", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "public static int nullSafeHashCode(boolean[] array) {\r\n if (array == null) {\r\n return 0;\r\n }\r\n int hash = INITIAL_HASH;\r\n int arraySize = array.length;\r\n for (int i = 0; i < arraySize; i++) {\r\n hash = MULTIPLIER * hash + hashCode(array[i]);\r\n }\r\n return hash;\r\n }", "@Override\n\tpublic int hashCode() {\n\t\tint result = 17;\n\t\tresult = 31 * result + userId;\n\t\tresult = 31 * result + yVote;\n\t\treturn result;\n\t}", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "public int hashCode() {\n int result = 17;\n result = (37 * result)\n + ((nullCheck == null) ? 0 : nullCheck.hashCode());\n\n return result;\n }", "public int hashCode() {\n/* 360 */ return Objects.hashCode(new Object[] { Long.valueOf(this.count), Double.valueOf(this.mean), Double.valueOf(this.sumOfSquaresOfDeltas), Double.valueOf(this.min), Double.valueOf(this.max) });\n/* */ }", "public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n return Objects.hash(field);\n }", "@Override\n public int hashCode() {\n return (getType()<<8) | getSubtype();\n }", "public int hashCode() {\n/* 254 */ if (this.hashCode == 0) {\n/* 255 */ int i = 17;\n/* 256 */ i = 37 * i + this.methodName.hashCode();\n/* 257 */ if (this.argClasses != null) {\n/* 258 */ for (byte b = 0; b < this.argClasses.length; b++)\n/* */ {\n/* 260 */ i = 37 * i + ((this.argClasses[b] == null) ? 0 : this.argClasses[b].hashCode());\n/* */ }\n/* */ }\n/* 263 */ this.hashCode = i;\n/* */ } \n/* 265 */ return this.hashCode;\n/* */ }", "@Override\n public int hashCode() {\n long longBits = Double.doubleToLongBits(this.size + this.unit.hashCode());\n return (int) (longBits ^ (longBits >>> 32));\n }", "public int hashCode() {\n\t\tlong bits = Double.doubleToLongBits(mDouble);\n\t\treturn (int) (bits ^ (bits >>> 32));\n\t}", "public int hashCode() {\n/* 4742 */ int result = this.tilex + 1;\n/* 4743 */ result += Zones.worldTileSizeY * (this.tiley + 1);\n/* 4744 */ return result * (this.surfaced ? 1 : 2);\n/* */ }", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "@Override\n public int hashCode() {\n return hash(this.getCoordinate(), this.getSide());\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime\n * result\n + ((electionStatus == null) ? 0 : electionStatus.ordinal() + 10);\n result = prime * result + followerCount;\n result = prime * result + (int) (latestTxId ^ (latestTxId >>> 32));\n result = prime * result + onDiskTx;\n return result;\n }", "public int hashCode()\n {\n int i = 0;\n if ( hasLeg() )\n i ^= getLegDepartureLocalTm().hashCode();\n if ( hasLeg() )\n i ^= getLegArrivalLocalTm().hashCode();\n if ( hasLeg() )\n i ^= getLegArrivalDayOffset().hashCode();\n if ( hasLeg() )\n i ^= getLegStopCount().hashCode();\n if ( hasLeg() )\n i ^= getLegEquipment().hashCode();\n return i;\n }", "public int hashCode()\n {\n return hash;\n }", "@Override\n public int hashCode() {\n return Objects.hash(getId(), getUsername(), getPassword(), getEmail(), isType());\n }", "@Override\r\n public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\r\n result = prime * result + ((getDosageName() == null) ? 0 : getDosageName().hashCode());\r\n result = prime * result + ((getInputCode() == null) ? 0 : getInputCode().hashCode());\r\n result = prime * result + ((getCleared() == null) ? 0 : getCleared().hashCode());\r\n result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getScoreTotalDataId() == null) ? 0 : getScoreTotalDataId().hashCode());\n result = prime * result + ((getTotalScoreResultId() == null) ? 0 : getTotalScoreResultId().hashCode());\n result = prime * result + ((getBaseId() == null) ? 0 : getBaseId().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getTotalScore() == null) ? 0 : getTotalScore().hashCode());\n result = prime * result + ((getSysId() == null) ? 0 : getSysId().hashCode());\n result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());\n result = prime * result + ((getAudioCode() == null) ? 0 : getAudioCode().hashCode());\n result = prime * result + ((getRecordDuration() == null) ? 0 : getRecordDuration().hashCode());\n result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());\n result = prime * result + ((getRemoteUri() == null) ? 0 : getRemoteUri().hashCode());\n result = prime * result + ((getLocalUri() == null) ? 0 : getLocalUri().hashCode());\n result = prime * result + ((getRecordFile() == null) ? 0 : getRecordFile().hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getState() == null) ? 0 : getState().hashCode());\n result = prime * result + ((getCaseId() == null) ? 0 : getCaseId().hashCode());\n result = prime * result + ((getPtpTime() == null) ? 0 : getPtpTime().hashCode());\n result = prime * result + ((getPtpMoney() == null) ? 0 : getPtpMoney().hashCode());\n result = prime * result + ((getCpTime() == null) ? 0 : getCpTime().hashCode());\n result = prime * result + ((getCpMoney() == null) ? 0 : getCpMoney().hashCode());\n result = prime * result + ((getPaidTime() == null) ? 0 : getPaidTime().hashCode());\n result = prime * result + ((getPaidNum() == null) ? 0 : getPaidNum().hashCode());\n result = prime * result + ((getSurUser() == null) ? 0 : getSurUser().hashCode());\n result = prime * result + ((getSurTime() == null) ? 0 : getSurTime().hashCode());\n result = prime * result + ((getDelUser() == null) ? 0 : getDelUser().hashCode());\n result = prime * result + ((getDelTime() == null) ? 0 : getDelTime().hashCode());\n result = prime * result + ((getmPaid() == null) ? 0 : getmPaid().hashCode());\n result = prime * result + ((getCpmPaid() == null) ? 0 : getCpmPaid().hashCode());\n result = prime * result + ((getSeNo() == null) ? 0 : getSeNo().hashCode());\n result = prime * result + ((getCmPaid() == null) ? 0 : getCmPaid().hashCode());\n result = prime * result + ((getBackPaid() == null) ? 0 : getBackPaid().hashCode());\n result = prime * result + ((getBackPaidRate() == null) ? 0 : getBackPaidRate().hashCode());\n result = prime * result + ((getPbackPaid() == null) ? 0 : getPbackPaid().hashCode());\n result = prime * result + ((getEntrustPaid() == null) ? 0 : getEntrustPaid().hashCode());\n result = prime * result + ((getEntrustPaidRate() == null) ? 0 : getEntrustPaidRate().hashCode());\n result = prime * result + ((getLastDebtM() == null) ? 0 : getLastDebtM().hashCode());\n result = prime * result + ((getLeftAmt() == null) ? 0 : getLeftAmt().hashCode());\n result = prime * result + ((getCreateEmpId() == null) ? 0 : getCreateEmpId().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n result = prime * result + ((getModifyEmpId() == null) ? 0 : getModifyEmpId().hashCode());\n result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());\n result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());\n result = prime * result + ((getIsDerate() == null) ? 0 : getIsDerate().hashCode());\n result = prime * result + ((getInDerate() == null) ? 0 : getInDerate().hashCode());\n result = prime * result + ((getOutDerate() == null) ? 0 : getOutDerate().hashCode());\n result = prime * result + ((getCancelReason() == null) ? 0 : getCancelReason().hashCode());\n result = prime * result + ((getRepayType() == null) ? 0 : getRepayType().hashCode());\n result = prime * result + ((getOperateEmpId() == null) ? 0 : getOperateEmpId().hashCode());\n result = prime * result + ((getOperateTime() == null) ? 0 : getOperateTime().hashCode());\n result = prime * result + ((getSurRemark() == null) ? 0 : getSurRemark().hashCode());\n return result;\n }", "public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }", "@Override\n\tpublic int hashCode()\n\t{\n\t\treturn values.hashCode();\n\t}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getSpflbm() == null) ? 0 : getSpflbm().hashCode());\n result = prime * result + ((getSsbkbm() == null) ? 0 : getSsbkbm().hashCode());\n result = prime * result + ((getSpfl() == null) ? 0 : getSpfl().hashCode());\n result = prime * result + ((getSjspflbm() == null) ? 0 : getSjspflbm().hashCode());\n result = prime * result + ((getXspx() == null) ? 0 : getXspx().hashCode());\n result = prime * result + ((getSfsx() == null) ? 0 : getSfsx().hashCode());\n result = prime * result + ((getSpfltpwj() == null) ? 0 : getSpfltpwj().hashCode());\n result = prime * result + ((getTjsj() == null) ? 0 : getTjsj().hashCode());\n result = prime * result + ((getTjr() == null) ? 0 : getTjr().hashCode());\n result = prime * result + ((getZhxgr() == null) ? 0 : getZhxgr().hashCode());\n result = prime * result + ((getZhxgsj() == null) ? 0 : getZhxgsj().hashCode());\n result = prime * result + ((getBz() == null) ? 0 : getBz().hashCode());\n result = prime * result + ((getFldj() == null) ? 0 : getFldj().hashCode());\n return result;\n }" ]
[ "0.67341965", "0.6590731", "0.65655017", "0.6516689", "0.6516689", "0.6516689", "0.6504537", "0.6504537", "0.6504537", "0.6504537", "0.6458634", "0.6430919", "0.6430919", "0.6406573", "0.6401248", "0.63981724", "0.6375067", "0.63439304", "0.62692046", "0.62494683", "0.62492913", "0.62316346", "0.6207315", "0.6203763", "0.6198084", "0.6196966", "0.61878127", "0.6178179", "0.61776155", "0.6173153", "0.6120226", "0.61163443", "0.6114334", "0.6103391", "0.6096304", "0.6060009", "0.6049898", "0.6049345", "0.6014678", "0.6011853", "0.6006532", "0.6001509", "0.60010636", "0.59952444", "0.59888333", "0.59885955", "0.59807426", "0.5967389", "0.5957602", "0.5953348", "0.59368455", "0.5928586", "0.59246916", "0.5923201", "0.5919193", "0.5911243", "0.59035224", "0.5896139", "0.589397", "0.5886366", "0.5881695", "0.5877016", "0.5875939", "0.58621454", "0.5859402", "0.5859112", "0.58517015", "0.5847178", "0.5845182", "0.5844239", "0.58431387", "0.58423775", "0.584217", "0.58334047", "0.5827834", "0.5825553", "0.5819998", "0.58077013", "0.58076274", "0.57954067", "0.57902706", "0.57846534", "0.5780078", "0.5778434", "0.57737345", "0.5773464", "0.57730144", "0.5770321", "0.57596964", "0.5756215", "0.5751484", "0.57467324", "0.57457536", "0.57447493", "0.57414556", "0.5740431", "0.57371306", "0.5733354", "0.57252365", "0.5720974" ]
0.58669555
63
Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal.
static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) { return Null.equals(a1, b1) && // a2==b2; // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n default T value() {\n return first();\n }\n\n boolean second();\n\n\n\n @Override default Object get(int index) {\n switch(index) {\n case 1: return first();\n case 2: return second();\n default: throw new NoSuchElementException();\n }\n }\n\n\n /** Tuple size */\n @Override default int tupleSize() {\n return SIZE;\n }\n\n \n\n /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */\n static <T> int argHashCode(T a1,boolean a2) {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((a1 == null) ? 0 : a1.hashCode());\n result = prime * result + Boolean.hashCode(a2);\n return result;\n }\n\n /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */\n static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class\n * and how many more values there are.\n */\n static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n */\n public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n\n\n \n @Override default Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int index;\n\n @Override public boolean hasNext() {\n return index<SIZE;\n }\n\n @Override public Object next() {\n index++;\n return get(index);\n }\n };\n }\n\n interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> {\n @Override\n default int compareTo(LObjBoolPair<T> that) {\n return Null.compare(this, that, (one, two) -> {\n int retval = 0;\n\n return\n (retval = Null.compare(one.first(), two.first())) != 0 ? retval : //\n (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; //\n });\n }\n\n }\n \n\n abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> {\n\n @Override\n public boolean equals(Object that) {\n return LObjBoolPair.tupleEquals(this, that);\n }\n\n @Override\n public int hashCode() {\n return LObjBoolPair.argHashCode(first(),second());\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('(');\n sb.append(first());\n sb.append(',');\n sb.append(second());\n sb.append(')');\n return sb.toString();\n }\n\n }\n\n\n\n\n\n /**\n * Mutable tuple.\n */\n\n interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> {\n\n\n\n SELF first(T first) ; \n SELF second(boolean second) ; \n\n default SELF setFirst(T first) {\n this.first(first);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }\n \n\n\n default SELF setSecond(boolean second) {\n this.second(second);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }\n \n\n\n default SELF reset() {\n this.first(null);\n this.second(false);\n return (SELF) this;\n }\n }\n\n\n\n\n\n\n public static <T> MutObjBoolPair<T> of() { \n return of( null , false );\n }\n \n\n public static <T> MutObjBoolPair<T> of(T a1,boolean a2){\n return new MutObjBoolPair(a1,a2);\n }\n\n public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) {\n return of(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, non-comparable tuple.\n */\n\n class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { \n return comparableOf( null , false );\n }\n \n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){\n return new MutCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) {\n return comparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, comparable tuple.\n */\n\n final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutCompObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutCompObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n\n public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){\n return new ImmObjBoolPair(a1,a2);\n }\n\n public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) {\n return immutableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, non-comparable tuple.\n */\n@Immutable\n final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){\n return new ImmCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) {\n return immutableComparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, comparable tuple.\n */\n@Immutable\n final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n}", "@Override\n\tpublic boolean equals(Object other) {\n\t\tif (other instanceof DBBoolean) {\n\t\t\tDBBoolean otherDBBoolean = (DBBoolean) other;\n\t\t\treturn getValue().equals(otherDBBoolean.getValue());\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals( Object other) {\n\n\t\tif( !( other instanceof BooleanStateValue)) {\n return false;\n }\n\n\t\tBooleanStateValue otherValue = (BooleanStateValue) other;\n\n\t\treturn _storage == otherValue._storage;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tSecond other = (Second) obj;\n\t\tif (booleanValue != other.booleanValue)\n\t\t\treturn false;\n\t\tif (Double.doubleToLongBits(doubleValue) != Double.doubleToLongBits(other.doubleValue))\n\t\t\treturn false;\n\t\tif (intValue != other.intValue)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tif (obj == null)\r\n\t\t\t\treturn false;\r\n\t\t\tif (this == obj)\r\n\t\t\t\treturn true;\r\n\t\t\tif (! (obj instanceof Pair<?, ?>))\r\n\t\t\t\treturn false;\r\n\t\t\ttry {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tPair<E, E> other = (Pair<E, E>) obj;\r\n\t\t\t\treturn other.getFirst() == null && other.getSecond() == null;\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public boolean equals(Object o) {\n if (!(o instanceof TupleDesc)) return false;\n TupleDesc other = (TupleDesc) o;\n\n if (other.numFields() != numfields) return false;\n for (int i = 0; i < numfields; i += 1) {\n if (other.getType(i) != types[i]) return false;\n }\n return true;\n }", "@Test\n public void testEquals() {\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n assertEquals(\"Expected bool types are equal\", typeBool, typeBool2);\n assertNotSame(\"Expected bool and boolean are not equal\", typeBool, typeBoolean);\n }", "@OperationMeta(name = Constants.EQUALITY, opType = OperationType.INFIX)\n public static boolean equals(boolean b1, boolean b2) {\n return b1 == b2;\n }", "public abstract boolean equals(Object o);", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof TablePair)) return false;\n\n TablePair that = (TablePair) o;\n\n return table1.equals(that.table1) && table2.equals(that.table2);\n }", "protected abstract boolean equalityTest(Object key, Object key2);", "@Override\n public boolean equals(Object o) {\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n return (this.key == pair.key && this.value == pair.value);\n } else\n return false;\n }", "public boolean equals(Object other)\n\t{\n\t\tif (other == null || other instanceof Pair<?> == false)\n\t\t\treturn false;\n\t\t\n\t\t@SuppressWarnings(\"unchecked\") //safe cast\n\t\tPair<T> p = (Pair<T>) other;\n\t\t\n\t\tif ((first.equals(p.first) && second.equals(p.second)) || (first.equals(p.second) && second.equals(p.first)))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equals(obj);\r\n\t\t\t}\r\n\t\t}", "public boolean equals(Object o) {\n if (!(o instanceof OrderedPair)) {\n return false;\n }\n OrderedPair test = (OrderedPair) o;\n return (this.x == test.getX()) && (this.y == test.getY());\n }", "protected abstract boolean isEqual(E entryA, E entryB);", "@Test\n public void testEquality() {\n Map<ColumnType, ColumnType> typeMap = new HashMap<ColumnType, ColumnType>();\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n typeMap.put(typeBool, typeBool2);\n typeMap.put(typeBoolean, typeBool2);\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBool));\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBoolean));\n }", "public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null) {\n return false;\n }\n if (o.getClass().equals(SingleFieldKey.class)) {\n SingleFieldKey otherSingleFieldKey = (SingleFieldKey)o;\n return otherSingleFieldKey.keyField == keyField &&\n keyField.valueEqual(otherSingleFieldKey.value, value);\n }\n\n if (!Key.class.isAssignableFrom(o.getClass())) {\n return false;\n }\n Key otherKey = (Key)o;\n return keyField.getGlobType() == otherKey.getGlobType()\n && keyField.valueEqual(value, otherKey.getValue(keyField));\n }", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "public abstract boolean equals(Object other);", "@Override\n public boolean equals(Object obj) {\n if (!canonicalizing) // use object identity as equality, except during canonicalization\n return obj == this;\n if (obj == this)\n return true;\n if (!(obj instanceof Value))\n return false;\n Value v = (Value) obj;\n // noinspection StringEquality\n return flags == v.flags\n && (var == v.var || (var != null && v.var != null && var.equals(v.var)))\n && ((num == null && v.num == null) || (num != null && v.num != null && num.equals(v.num)))\n && (str == v.str || (str != null && v.str != null && str.equals(v.str)))\n && (object_labels == v.object_labels || (object_labels != null && v.object_labels != null && object_labels.equals(v.object_labels)))\n && (getters == v.getters || (getters != null && v.getters != null && getters.equals(v.getters)))\n && (setters == v.setters || (setters != null && v.setters != null && setters.equals(v.setters)))\n && (excluded_strings == v.excluded_strings || (excluded_strings != null && v.excluded_strings != null && excluded_strings.equals(v.excluded_strings)))\n && (included_strings == v.included_strings || (included_strings != null && v.included_strings != null && included_strings.equals(v.included_strings)))\n && Objects.equals(functionPartitions, v.functionPartitions)\n && Objects.equals(functionTypeSignatures, v.functionTypeSignatures);\n }", "public boolean equals(Object o) {\r\n\t\treturn o instanceof BooleanValue?value == ((BooleanValue) o).value:false;\r\n\t}", "public boolean Equals(Pair rhs) {\n if(this.first == rhs.first &&\n this.second == rhs.second)\n return true;\n\n return false;\n }", "public boolean equals(Object obj) {\n\t\tif ((obj != null) && (obj instanceof MutableDouble)) {\n\t\t\treturn doubleValue() == ((MutableDouble) obj).doubleValue();\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals( Object obj );", "@Override\n public boolean equals(Object obj) {\n Pair temp = (Pair) obj;\n if(left == temp.left && right == temp.right) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n if (key != null ? !key.equals(pair.key) : pair.key != null) return false;\n if (value != null ? !value.equals(pair.value) : pair.value != null) return false;\n return true;\n }\n return false;\n }", "boolean canEqual(Object obj);", "public boolean equals(Pair otherPair){\n return this.item1 == otherPair.item1 && this.item2 == otherPair.item2;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n\r\n if (obj instanceof DocumentPair) {\r\n DocumentPair other = (DocumentPair) obj;\r\n return ((this.doc1.equals(other.doc1) && this.doc2.equals(other.doc2))\r\n || (this.doc1.equals(other.doc2) && (this.doc2.equals(other.doc1))));\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public boolean equals(Object obj);", "public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }", "public boolean equals(Object o) {\r\n\t\tif (!(o instanceof IValuedField)) return false; //get rid of non fields\r\n\t\tIValuedField field= (IValuedField)o;\r\n\t\tboolean areEqual = type.equals(field.getType());//same type \r\n\t\tif (formal){\r\n\t\t\treturn (areEqual && field.isFormal());\r\n\t\t} else //the current field is actual\r\n\t\t\tif (((IValuedField) field).isFormal()) { //if the other is formal\r\n\t\t\t\treturn false;\r\n\t\t\t} else //if they're both actual then their values must match\r\n\t\t\t{\r\n\t\t\t\tif (varname != null) // there is a variable name\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (!(o instanceof NameValueField))\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\telse //check that names match\r\n\t\t\t\t\t\tareEqual = (areEqual && (varname.equals(((NameValueField)field).getVarName())));\r\n\t\t\t\t\t}\r\n\t\t\t\treturn areEqual && value.equals(field.getValue()); //values are the same\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t}", "public final BooleanDataValue equals(DataValueDescriptor left,\n\t\t\t\t\t\t\t DataValueDescriptor right)\n\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tboolean isEqual;\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tisEqual = false;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tisEqual = SQLBinary.compare(left.getBytes(), right.getBytes()) == 0;\n\t\t}\n\n\t\treturn SQLBoolean.truthValue(left,\n\t\t\t\t\t\t\t\t\t right,\n\t\t\t\t\t\t\t\t\t isEqual);\n\t}", "@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans = this.first(temp.first);\n // return ans;\n }", "@Override\r\n public boolean equals(Object o) {\r\n if (this == o)\r\n return true;\r\n if (o == null || getClass() != o.getClass())\r\n return false;\r\n CustomPair c = (CustomPair)o;\r\n if (c.a == a && c.b == b)\r\n return true;\r\n return false;\r\n }", "public boolean equals(Object o);", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n\n FullHalfPair that = (FullHalfPair) o;\n\n if (!fullwidth.equals(that.fullwidth)) {\n return false;\n }\n return halfwidth.equals(that.halfwidth);\n\n }", "public boolean equals(Object thing)\n {\n // boolean input = super.equals(thing);\n if (thing.equals(this.x()) && thing.equals(this.y()))\n {\n return true;\n }\n return false;\n }", "@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "boolean equalTo(ObjectPassDemo o) {\n return (o.a == a && o.b == b);\n }", "public boolean equals(Object obj)\n {\n if (!super.equals(obj))\n return false;\n\n PSSearchField s2 = (PSSearchField) obj;\n\n return m_strDescription.equals(s2.m_strDescription)\n && m_strDisplayName.equals(s2.m_strDisplayName)\n && m_mnemonic.equals(s2.getMnemonic())\n && m_strFieldType.equals(s2.m_strFieldType)\n && m_strFieldName.equals(s2.m_strFieldName)\n && m_values.equals(s2.m_values)\n && m_strOperator.equals(s2.m_strOperator)\n && m_extOperator.equals(s2.m_extOperator)\n && m_sequence == s2.m_sequence\n && compare(m_choices, s2.m_choices);\n }", "@Override\n public boolean equals(Object obj) {\n if(obj.getClass().equals(Lake.class)) {\n Lake lake = (Lake) obj;\n return lake.getId().equals(this.id) &\n lake.getName().equals(this.name) &\n lake.getNearestTown().equals(this.nearestTown) &\n lake.getMostRecentSurveyDate().equals(this.mostRecentSurveyDate) &\n lake.getCounty().equals(this.county);\n }\n return false;\n }", "public boolean equals(Object obj) {\n/* 319 */ if (obj == this) {\n/* 320 */ return true;\n/* */ }\n/* 322 */ if (!(obj instanceof SlidingCategoryDataset)) {\n/* 323 */ return false;\n/* */ }\n/* 325 */ SlidingCategoryDataset that = (SlidingCategoryDataset)obj;\n/* 326 */ if (this.firstCategoryIndex != that.firstCategoryIndex) {\n/* 327 */ return false;\n/* */ }\n/* 329 */ if (this.maximumCategoryCount != that.maximumCategoryCount) {\n/* 330 */ return false;\n/* */ }\n/* 332 */ if (!this.underlying.equals(that.underlying)) {\n/* 333 */ return false;\n/* */ }\n/* 335 */ return true;\n/* */ }", "@Override\n public boolean equals(Object o){\n if(!(o instanceof DoubleVector2)) return false;\n DoubleVector2 dv = (DoubleVector2) o;\n return dv.getVectorOne().equals(dv.getVectorTwo());\n }", "@Test\n public void equals() {\n assertTrue(defaultGuiSettings.equals(defaultGuiSettings));\n assertTrue(userGuiSettings.equals(userGuiSettings));\n\n // same values -> return true\n assertTrue(defaultGuiSettings.equals(new GuiSettings()));\n assertTrue(userGuiSettings.equals(new GuiSettings(700, 900, 200, 300)));\n\n // null -> false\n assertFalse(defaultGuiSettings.equals(null));\n assertFalse(userGuiSettings.equals(null));\n\n // different type -> false\n assertFalse(defaultGuiSettings.equals(0.5f));\n assertFalse(userGuiSettings.equals(0.5f));\n\n // different window width -> false\n GuiSettings guiSettingsDifferentWindowWith = new GuiSettings(1234, 1234, 12, 34);\n assertFalse(userGuiSettings.equals(guiSettingsDifferentWindowWith));\n\n // different window coordinates -> false\n GuiSettings guiSettingsDifferentWindowCoordinate = new GuiSettings(700, 900, 20, 30);\n assertFalse(userGuiSettings.equals(guiSettingsDifferentWindowCoordinate));\n }", "@Test\n void testEquals() {\n final boolean expected_boolean = true;\n\n // Properties for the objects\n final String username = \"username\";\n final String name = \"their_name\";\n final String password = \"password\";\n\n // Create two LoginAccount objects\n LoginAccount first_account = new LoginAccount(username, name, password);\n LoginAccount second_account = new LoginAccount(username, name, password);\n\n // Variable to check\n boolean objects_are_equal = first_account.equals(second_account);\n\n // Assert that the two boolean values are the same\n assertEquals(expected_boolean, objects_are_equal);\n }", "@Override\npublic boolean equals(Object tbl) {\n Table table;\n\n try {\n table = (Table) tbl;\n } catch (Exception e) {\n return false;\n }\n\n if (getNumRows() != table.getNumRows()) {\n return false;\n }\n\n if (getNumColumns() != table.getNumColumns()) {\n return false;\n }\n\n for (int i = 0; i < getNumRows(); i++) {\n\n for (int j = 0; j < getNumColumns(); j++) {\n\n if (!getObject(i, j).equals(table.getObject(i, j))) {\n return false;\n }\n }\n }\n\n return true;\n\n }", "@Override\n\t\tpublic boolean equals(Object p) {\n\t\t\tif (p instanceof Pair) {\n\t\t\t\tPair obj = (Pair)p;\n\t\t\t\treturn (this.sum == obj.sum && this.index == obj.index);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean equals(SimulationUIValues obj)\n {\n return ((host.equals(obj.host)) &&\n (sim.equals(obj.sim)) &&\n (name.equals(obj.name)) &&\n (ivalue == obj.ivalue) &&\n (svalue.equals(obj.svalue)) &&\n (enabled == obj.enabled));\n }", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (!(obj.getClass() == this.getClass())) {\n return false;\n }\n Guppy otherGuppy = (Guppy) obj;\n return genus.equals(otherGuppy.genus) && species.equals(otherGuppy.species)\n && ageInWeeks == otherGuppy.ageInWeeks && isFemale == otherGuppy.isFemale\n && generationNumber == otherGuppy.generationNumber && isAlive == otherGuppy.isAlive\n && healthCoefficient == otherGuppy.healthCoefficient;\n }", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "Equality createEquality();", "public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }", "@Override\n public BooleanValue equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is equal\n // to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() == ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is equal\n // to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() == ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '==' is not defined for type integer and \" + v.getName());\n\n }", "boolean equals(Object obj);", "boolean equals(Object obj);", "public final boolean equals(Object obj) {\n AppMethodBeat.m2504i(109592);\n if (this != obj) {\n if (obj instanceof C22192a) {\n C22192a c22192a = (C22192a) obj;\n if (C25052j.m39373j(this.username, c22192a.username)) {\n if (this.state == c22192a.state) {\n }\n }\n }\n AppMethodBeat.m2505o(109592);\n return false;\n }\n AppMethodBeat.m2505o(109592);\n return true;\n }", "public boolean equals(Object obj) {\n/* 1926 */ if (obj == this) {\n/* 1927 */ return true;\n/* */ }\n/* 1929 */ if (!(obj instanceof DateAxis)) {\n/* 1930 */ return false;\n/* */ }\n/* 1932 */ DateAxis that = (DateAxis)obj;\n/* 1933 */ if (!ObjectUtilities.equal(this.timeZone, that.timeZone)) {\n/* 1934 */ return false;\n/* */ }\n/* 1936 */ if (!ObjectUtilities.equal(this.locale, that.locale)) {\n/* 1937 */ return false;\n/* */ }\n/* 1939 */ if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {\n/* 1940 */ return false;\n/* */ }\n/* 1942 */ if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride))\n/* */ {\n/* 1944 */ return false;\n/* */ }\n/* 1946 */ if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition))\n/* */ {\n/* 1948 */ return false;\n/* */ }\n/* 1950 */ if (!ObjectUtilities.equal(this.timeline, that.timeline)) {\n/* 1951 */ return false;\n/* */ }\n/* 1953 */ return super.equals(obj);\n/* */ }", "@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}", "@Test\n public void testEquals_4()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n Object obj = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n\n boolean result = fixture.equals(obj);\n\n assertEquals(true, result);\n }", "@Override\n public boolean equals(Object o) {\n if(this == o) return true;\n if(this == null) return false;\n if(this.getClass() != o.getClass()) return false;\n MyAllTypesFirst first = (MyAllTypesFirst) o;\n return myInt == first.getMyInt() &&\n myLong == first.getMyLong() &&\n myString.equals(first.getMyString()) &&\n myBool == first.getMyBool() &&\n myOtherInt == first.getMyOtherInt();\n }", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "@Override\n public final boolean equals(Object obj) {\n if (!(obj instanceof UniqueID))\n return false;\n UniqueID castObj = (UniqueID)obj;\n return this.leastSigBits == castObj.leastSigBits && this.mostSigBits == castObj.mostSigBits;\n }", "public native boolean __equals( long __swiftObject, java.lang.Object arg0 );", "public boolean equals(Object obj)\r\n\t{\r\n\t\tif(obj instanceof Term)\r\n\t\t{\r\n\t\t\tTerm comparedTerm = (Term) obj;\r\n\t\t\treturn coefficient == comparedTerm.getCoefficient() && exponent == comparedTerm.getExponent();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static boolean Equal(State o, State goal) {\n\t\tif (o==null || goal==null) return false;\n\t\tfor (int i=0;i<3;i++)\n\t\t\tfor (int j=0;j<3;j++)\n\t\t\t\tif (o.d[i][j]!=goal.d[i][j]) return false;\n\t\treturn true;\n\t}", "@Override\n public abstract boolean equals(final Object o);", "@Override\n public abstract boolean equals(final Object o);", "@Test\n public void testEquals_2()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n Object obj = new Object();\n\n boolean result = fixture.equals(obj);\n\n assertEquals(false, result);\n }", "public boolean equals(Object object);", "public boolean equals(@org.jetbrains.annotations.Nullable java.lang.Object r3) {\n /*\n r2 = this;\n if (r2 == r3) goto L_0x001f\n boolean r0 = r3 instanceof com.bitcoin.mwallet.core.models.user.User\n if (r0 == 0) goto L_0x001d\n com.bitcoin.mwallet.core.models.user.User r3 = (com.bitcoin.mwallet.core.models.user.User) r3\n com.bitcoin.mwallet.core.models.user.UserId r0 = r2.f373id\n com.bitcoin.mwallet.core.models.user.UserId r1 = r3.f373id\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x001d\n com.bitcoin.mwallet.core.models.credential.CredentialId r0 = r2.credentialId\n com.bitcoin.mwallet.core.models.credential.CredentialId r3 = r3.credentialId\n boolean r3 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r3)\n if (r3 == 0) goto L_0x001d\n goto L_0x001f\n L_0x001d:\n r3 = 0\n return r3\n L_0x001f:\n r3 = 1\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.user.User.equals(java.lang.Object):boolean\");\n }", "@Override\n\tpublic abstract boolean equals(Object other);", "@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\t\r\n\t\tif ( this == obj ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !(obj instanceof Good) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tGood good = (Good) obj;\r\n\t\t\r\n\t\treturn\r\n\t\t\t\tthis.isBaseTaxFree() == good.isBaseTaxFree() &&\r\n\t\t\t\tthis.isImported() == good.isImported() &&\r\n\t\t\t\tthis.getDescription().equalsIgnoreCase(good.getDescription());\r\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean mojeEquals(Obj o1, Obj o2) {\r\n\t\t//System.out.println(o1.getName() + \" \" + o2.getName());\r\n\t\tboolean sameRight = true; // 21.06.2020. provera prava pristupa\r\n\t\tboolean sameName = true;\t// 22.06.2020. ako nisu metode ne moraju da imaju isto ime\r\n\t\tboolean sameArrayType = true; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t\t\r\n\t\tif (o1.getKind() == Obj.Meth && o2.getKind() == Obj.Meth) {\r\n\t\t\tsameRight = o1.getFpPos() == o2.getFpPos()+10; \r\n\t\t\tsameName = o1.getName().equals(o2.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o1.getType().getKind() == Struct.Array && o2.getType().getKind() == Struct.Array) {\r\n\t\t\t\tif (!(o1.getType().getElemType() == o2.getType().getElemType())) { // ZA KLASE MOZDA TREBA equals\r\n\t\t\t\t\tsameArrayType = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 16.08.2020.\r\n//\t\tif (o1.getType().getKind() == Struct.Class || o1.getType().getKind() == Struct.Interface)\r\n//\t\t\treturn true;\r\n\t\t\r\n\t\t\r\n\t\treturn o1.getKind() == o2.getKind() \r\n\t\t\t\t&& sameName\r\n\t\t\t\t&& o1.getType().equals(o2.getType())\r\n\t\t\t\t&& /*adr == other.adr*/ o1.getLevel() == o2.getLevel()\r\n\t\t\t\t&& equalsCompleteHash(o1.getLocalSymbols(), o2.getLocalSymbols())\r\n\t\t\t\t&& sameRight // 21.06.2020. provera prava pristupa\r\n\t\t\t\t&& sameArrayType; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t}", "public boolean equals(Object obj)\n {\n TagData t;\n\n if (obj == this)\n {\n return true;\n }\n\n if (!(obj instanceof TagData))\n {\n return false;\n }\n\n t = (TagData)obj;\n\n return (hash == t.hash\n && Arrays.equals(t.epc, epc)\n && getProtocol() == t.getProtocol());\n }", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n BCGlobalProps other = (BCGlobalProps) that;\n return (this.getLogUuid() == null ? other.getLogUuid() == null : this.getLogUuid().equals(other.getLogUuid()))\n && (this.getBversion() == null ? other.getBversion() == null : this.getBversion().equals(other.getBversion()))\n && (this.getBlockHeight() == null ? other.getBlockHeight() == null : this.getBlockHeight().equals(other.getBlockHeight()))\n && (this.getPropKey() == null ? other.getPropKey() == null : this.getPropKey().equals(other.getPropKey()))\n && (this.getPropValue() == null ? other.getPropValue() == null : this.getPropValue().equals(other.getPropValue()))\n && (this.getMptType() == null ? other.getMptType() == null : this.getMptType().equals(other.getMptType()))\n && (this.getHashValue() == null ? other.getHashValue() == null : this.getHashValue().equals(other.getHashValue()))\n && (this.getTxid() == null ? other.getTxid() == null : this.getTxid().equals(other.getTxid()))\n && (this.getPrevHashValue() == null ? other.getPrevHashValue() == null : this.getPrevHashValue().equals(other.getPrevHashValue()))\n && (this.getPrevBlockHeight() == null ? other.getPrevBlockHeight() == null : this.getPrevBlockHeight().equals(other.getPrevBlockHeight()))\n && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));\n }", "public boolean equals(Object obj){\n\t\tif (!(obj instanceof SongRecord)){\n\t\t\treturn false;\n\t\t}\n\t\tif (!(title.equals(((SongRecord)(obj)).getTitle())))\n\t\t\treturn false;\n\t\tif (!(artist.equals(((SongRecord)(obj)).getArtist())))\n\t\t\treturn false;\n\t\tif (min != ((SongRecord)(obj)).getMin())\n\t\t\treturn false;\n\t\tif (sec != ((SongRecord)(obj)).getSec())\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean equals(java.lang.Object r4) {\n /*\n r3 = this;\n boolean r0 = r4 instanceof kotlin.reflect.jvm.internal.pcollections.MapEntry\n r1 = 0\n if (r0 != 0) goto L_0x0006\n return r1\n L_0x0006:\n kotlin.reflect.jvm.internal.pcollections.MapEntry r4 = (kotlin.reflect.jvm.internal.pcollections.MapEntry) r4\n K r0 = r3.key\n if (r0 != 0) goto L_0x0011\n K r0 = r4.key\n if (r0 != 0) goto L_0x002f\n goto L_0x001b\n L_0x0011:\n K r0 = r3.key\n K r2 = r4.key\n boolean r0 = r0.equals(r2)\n if (r0 == 0) goto L_0x002f\n L_0x001b:\n V r0 = r3.value\n if (r0 != 0) goto L_0x0024\n V r4 = r4.value\n if (r4 != 0) goto L_0x002f\n goto L_0x002e\n L_0x0024:\n V r0 = r3.value\n V r4 = r4.value\n boolean r4 = r0.equals(r4)\n if (r4 == 0) goto L_0x002f\n L_0x002e:\n r1 = 1\n L_0x002f:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.pcollections.MapEntry.equals(java.lang.Object):boolean\");\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof BigNumber)) return false;\n BigNumber that = (BigNumber) other;\n if (this.isNaN()) return that.isNaN();\n if (that.isNaN()) return this.isNaN();\n if (this.isZero()) return that.isZero();\n if (that.isZero()) return this.isZero();\n if (this.sign != that.sign) return false;\n if (this.isInfinite()) return that.isInfinite();\n if (that.isInfinite()) return this.isInfinite();\n \n // adjust exponent before comparing mantissa\n int emin = Math.min(this.exponent, that.exponent);\n int dThis = this.exponent - emin;\n int dThat = that.exponent - emin;\n \n for (int i=0; i<Math.max(this.mantissa.length+dThis, that.mantissa.length+dThat); i++) {\n if (this.getMantissaBit(i-dThis) != that.getMantissaBit(i-dThat)) return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Ong)) {\n return false;\n }\n Ong other = (Ong) object;\n if ((this.ongPK == null && other.ongPK != null) || (this.ongPK != null && !this.ongPK.equals(other.ongPK))) {\n return false;\n }\n return true;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\tpublic boolean equals(Object other) {\r\n\t\t\tboolean flag = false;\r\n\r\n\t\t\tif (other instanceof TableElement) {\r\n\t\t\t\tTableElement<K, V> candidate = (TableElement<K, V>) other;\r\n\r\n\t\t\t\tif ((this.getKey()).equals(candidate.getKey()))\r\n\t\t\t\t\tflag = true;\r\n\t\t\t}\r\n\r\n\t\t\treturn flag;\r\n\t\t}", "public boolean equals(java.lang.Object r3) {\n /*\n r2 = this;\n if (r2 == r3) goto L_0x001f;\n L_0x0002:\n r0 = r3 instanceof kotlin.reflect.jvm.internal.impl.load.java.lazy.k;\n if (r0 == 0) goto L_0x001d;\n L_0x0006:\n r3 = (kotlin.reflect.jvm.internal.impl.load.java.lazy.k) r3;\n r0 = r2.fjg;\n r1 = r3.fjg;\n r0 = kotlin.jvm.internal.i.y(r0, r1);\n if (r0 == 0) goto L_0x001d;\n L_0x0012:\n r0 = r2.fjh;\n r3 = r3.fjh;\n r3 = kotlin.jvm.internal.i.y(r0, r3);\n if (r3 == 0) goto L_0x001d;\n L_0x001c:\n goto L_0x001f;\n L_0x001d:\n r3 = 0;\n return r3;\n L_0x001f:\n r3 = 1;\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.impl.load.java.lazy.k.equals(java.lang.Object):boolean\");\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n LitemallProduct other = (LitemallProduct) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))\n && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))\n && (this.getSeriesId() == null ? other.getSeriesId() == null : this.getSeriesId().equals(other.getSeriesId()))\n && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))\n && (Arrays.equals(this.getGallery(), other.getGallery()))\n && (this.getKeywords() == null ? other.getKeywords() == null : this.getKeywords().equals(other.getKeywords()))\n && (this.getBrief() == null ? other.getBrief() == null : this.getBrief().equals(other.getBrief()))\n && (this.getSortOrder() == null ? other.getSortOrder() == null : this.getSortOrder().equals(other.getSortOrder()))\n && (this.getPicUrl() == null ? other.getPicUrl() == null : this.getPicUrl().equals(other.getPicUrl()))\n && (this.getBuyLink() == null ? other.getBuyLink() == null : this.getBuyLink().equals(other.getBuyLink()))\n && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))\n && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))\n && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()));\n }", "public boolean equals(Object aObject) {\n\n if (! (aObject instanceof EPPSecDNSExtUpdate)) {\n return false;\n }\n EPPSecDNSExtUpdate theComp = (EPPSecDNSExtUpdate) aObject;\n\n // add\n\t\tif (!EPPUtil.equalLists(this.addDsData, theComp.addDsData)) {\n\t\t\tcat.error(\"EPPSecDNSExtUpdate.equals(): addDsData not equal\");\n\t\t\treturn false;\n\t\t}\n\n // chg\n\t\tif (!EPPUtil.equalLists(this.chgDsData, theComp.chgDsData)) {\n\t\t\tcat.error(\"EPPSecDNSExtUpdate.equals(): chgDsData not equal\");\n\t\t\treturn false;\n\t\t}\n \n // rem\n\t\tif (!EPPUtil.equalLists(this.remKeyTag, theComp.remKeyTag)) {\n\t\t\tcat.error(\"EPPSecDNSExtUpdate.equals(): remKeyTag not equal\");\n\t\t\treturn false;\n\t\t}\n \n // urgent\n if (! urgent == theComp.urgent ) {\n return false;\n }\n \n return true;\n }", "public boolean realEquals(Object o){\n\t\treturn keywords.equals(o);\n\t}", "@Override\r\n public boolean equals(Object o) {\r\n if (o instanceof IntToInt) {\r\n return ((IntToInt) o).getA() == getA() && ((IntToInt) o).getB() == getB();\r\n }\r\n return false;\r\n }" ]
[ "0.716647", "0.70248806", "0.70100677", "0.64297146", "0.62162584", "0.6045461", "0.60242975", "0.5953244", "0.59492546", "0.5932037", "0.5912234", "0.58843875", "0.58843344", "0.5859845", "0.5858141", "0.58525395", "0.5851747", "0.58456", "0.58296555", "0.5824556", "0.5798473", "0.57934135", "0.5791872", "0.577098", "0.57624507", "0.57554877", "0.5753935", "0.5744788", "0.5744362", "0.5741049", "0.56944424", "0.5688214", "0.56771183", "0.56520903", "0.56506497", "0.5639631", "0.5613484", "0.5604948", "0.55807126", "0.556601", "0.5563845", "0.55630124", "0.5553575", "0.55471045", "0.55470085", "0.5543451", "0.55367625", "0.55343056", "0.55299", "0.5527448", "0.55127305", "0.55089784", "0.5502358", "0.54955715", "0.54954964", "0.54565823", "0.54480034", "0.54429024", "0.54417247", "0.5440334", "0.5435233", "0.5425345", "0.5421713", "0.5421713", "0.5419564", "0.5413301", "0.5412942", "0.54033583", "0.54009247", "0.5396168", "0.5396168", "0.5396168", "0.5396168", "0.5396168", "0.53896534", "0.5386971", "0.53810996", "0.5375593", "0.5373006", "0.5373006", "0.53575647", "0.53564006", "0.53492945", "0.53459376", "0.53454876", "0.53403586", "0.5339935", "0.53365743", "0.5333587", "0.53299", "0.5329433", "0.5328903", "0.5322544", "0.5320926", "0.53134155", "0.53107977", "0.53100055", "0.53094435", "0.5307549", "0.5301104" ]
0.6007662
7
Static equals() implementation that takes two tuples and checks if they are equal. Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class and how many more values there are.
static boolean argEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return argEquals(one.first(), one.second(), other.first(), other.second()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n default T value() {\n return first();\n }\n\n boolean second();\n\n\n\n @Override default Object get(int index) {\n switch(index) {\n case 1: return first();\n case 2: return second();\n default: throw new NoSuchElementException();\n }\n }\n\n\n /** Tuple size */\n @Override default int tupleSize() {\n return SIZE;\n }\n\n \n\n /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */\n static <T> int argHashCode(T a1,boolean a2) {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((a1 == null) ? 0 : a1.hashCode());\n result = prime * result + Boolean.hashCode(a2);\n return result;\n }\n\n /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */\n static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class\n * and how many more values there are.\n */\n static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n */\n public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n\n\n \n @Override default Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int index;\n\n @Override public boolean hasNext() {\n return index<SIZE;\n }\n\n @Override public Object next() {\n index++;\n return get(index);\n }\n };\n }\n\n interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> {\n @Override\n default int compareTo(LObjBoolPair<T> that) {\n return Null.compare(this, that, (one, two) -> {\n int retval = 0;\n\n return\n (retval = Null.compare(one.first(), two.first())) != 0 ? retval : //\n (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; //\n });\n }\n\n }\n \n\n abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> {\n\n @Override\n public boolean equals(Object that) {\n return LObjBoolPair.tupleEquals(this, that);\n }\n\n @Override\n public int hashCode() {\n return LObjBoolPair.argHashCode(first(),second());\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('(');\n sb.append(first());\n sb.append(',');\n sb.append(second());\n sb.append(')');\n return sb.toString();\n }\n\n }\n\n\n\n\n\n /**\n * Mutable tuple.\n */\n\n interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> {\n\n\n\n SELF first(T first) ; \n SELF second(boolean second) ; \n\n default SELF setFirst(T first) {\n this.first(first);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }\n \n\n\n default SELF setSecond(boolean second) {\n this.second(second);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }\n \n\n\n default SELF reset() {\n this.first(null);\n this.second(false);\n return (SELF) this;\n }\n }\n\n\n\n\n\n\n public static <T> MutObjBoolPair<T> of() { \n return of( null , false );\n }\n \n\n public static <T> MutObjBoolPair<T> of(T a1,boolean a2){\n return new MutObjBoolPair(a1,a2);\n }\n\n public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) {\n return of(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, non-comparable tuple.\n */\n\n class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { \n return comparableOf( null , false );\n }\n \n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){\n return new MutCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) {\n return comparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, comparable tuple.\n */\n\n final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutCompObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutCompObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n\n public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){\n return new ImmObjBoolPair(a1,a2);\n }\n\n public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) {\n return immutableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, non-comparable tuple.\n */\n@Immutable\n final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){\n return new ImmCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) {\n return immutableComparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, comparable tuple.\n */\n@Immutable\n final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n}", "public boolean equals(Object o) {\n if (!(o instanceof TupleDesc)) return false;\n TupleDesc other = (TupleDesc) o;\n\n if (other.numFields() != numfields) return false;\n for (int i = 0; i < numfields; i += 1) {\n if (other.getType(i) != types[i]) return false;\n }\n return true;\n }", "public boolean Equals(Pair rhs) {\n if(this.first == rhs.first &&\n this.second == rhs.second)\n return true;\n\n return false;\n }", "public boolean equals(Object other)\n\t{\n\t\tif (other == null || other instanceof Pair<?> == false)\n\t\t\treturn false;\n\t\t\n\t\t@SuppressWarnings(\"unchecked\") //safe cast\n\t\tPair<T> p = (Pair<T>) other;\n\t\t\n\t\tif ((first.equals(p.first) && second.equals(p.second)) || (first.equals(p.second) && second.equals(p.first)))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tif (obj == null)\r\n\t\t\t\treturn false;\r\n\t\t\tif (this == obj)\r\n\t\t\t\treturn true;\r\n\t\t\tif (! (obj instanceof Pair<?, ?>))\r\n\t\t\t\treturn false;\r\n\t\t\ttry {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tPair<E, E> other = (Pair<E, E>) obj;\r\n\t\t\t\treturn other.getFirst() == null && other.getSecond() == null;\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public boolean equals(Pair otherPair){\n return this.item1 == otherPair.item1 && this.item2 == otherPair.item2;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof TablePair)) return false;\n\n TablePair that = (TablePair) o;\n\n return table1.equals(that.table1) && table2.equals(that.table2);\n }", "@Override\r\n public boolean equals(Object o) {\r\n if (this == o)\r\n return true;\r\n if (o == null || getClass() != o.getClass())\r\n return false;\r\n CustomPair c = (CustomPair)o;\r\n if (c.a == a && c.b == b)\r\n return true;\r\n return false;\r\n }", "@OperationMeta(name = Constants.EQUALITY, opType = OperationType.INFIX)\n public static boolean equals(boolean b1, boolean b2) {\n return b1 == b2;\n }", "public boolean equals(Object o) {\n if (!(o instanceof OrderedPair)) {\n return false;\n }\n OrderedPair test = (OrderedPair) o;\n return (this.x == test.getX()) && (this.y == test.getY());\n }", "@Override\n public boolean equals(Object o) {\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n return (this.key == pair.key && this.value == pair.value);\n } else\n return false;\n }", "@Override\n public boolean equals(Object obj) {\n Pair temp = (Pair) obj;\n if(left == temp.left && right == temp.right) {\n return true;\n } else {\n return false;\n }\n }", "public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n if (key != null ? !key.equals(pair.key) : pair.key != null) return false;\n if (value != null ? !value.equals(pair.value) : pair.value != null) return false;\n return true;\n }\n return false;\n }", "public abstract boolean equals(Object other);", "@Override\r\n public boolean equals(Object obj) {\r\n\r\n if (obj instanceof DocumentPair) {\r\n DocumentPair other = (DocumentPair) obj;\r\n return ((this.doc1.equals(other.doc1) && this.doc2.equals(other.doc2))\r\n || (this.doc1.equals(other.doc2) && (this.doc2.equals(other.doc1))));\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}", "protected abstract boolean isEqual(E entryA, E entryB);", "@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equals(obj);\r\n\t\t\t}\r\n\t\t}", "public final BooleanDataValue equals(DataValueDescriptor left,\n\t\t\t\t\t\t\t DataValueDescriptor right)\n\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tboolean isEqual;\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tisEqual = false;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tisEqual = SQLBinary.compare(left.getBytes(), right.getBytes()) == 0;\n\t\t}\n\n\t\treturn SQLBoolean.truthValue(left,\n\t\t\t\t\t\t\t\t\t right,\n\t\t\t\t\t\t\t\t\t isEqual);\n\t}", "public abstract boolean equals(Object o);", "@Override\n\tpublic boolean equals( Object other) {\n\n\t\tif( !( other instanceof BooleanStateValue)) {\n return false;\n }\n\n\t\tBooleanStateValue otherValue = (BooleanStateValue) other;\n\n\t\treturn _storage == otherValue._storage;\n\t}", "public boolean isGeneralTuple();", "protected abstract boolean equalityTest(Object key, Object key2);", "public static void main(String[] args) {\n\t\t\n\t\tGenericPair<Integer> ob1 = new GenericPair(1,1);\n\t\tGenericPair<Integer> ob2 = new GenericPair(2,3);\n\t\tSystem.out.println(ob1.equals(ob2));\n\t\tSystem.out.println(ob1.getFirst());\n\t\tSystem.out.println(ob1.getSecond());\n\t\tSystem.out.println(ob2.getFirst());\n\t\tSystem.out.println(ob2.getSecond());\n\t\tSystem.out.println(ob1.toString());\n\t\tSystem.out.println(ob2.toString());\n\n\t}", "public AlgoAreEqual(Construction cons, String label,\n\t\t\tGeoElement inputElement1, GeoElement inputElement2) {\n\t\tthis(cons, inputElement1, inputElement2);\n\t\toutputBoolean.setLabel(label);\n\t}", "Equality createEquality();", "public boolean equals( Object obj );", "public AlgoAreEqual(Construction cons, GeoElement inputElement1,\n\t\t\tGeoElement inputElement2) {\n\t\tsuper(cons);\n\t\tthis.inputElement1 = inputElement1;\n\t\tthis.inputElement2 = inputElement2;\n\n\t\toutputBoolean = new GeoBoolean(cons);\n\n\t\tsetInputOutput();\n\t\tcompute();\n\n\t}", "@Test\n public void testEquality() {\n Map<ColumnType, ColumnType> typeMap = new HashMap<ColumnType, ColumnType>();\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n typeMap.put(typeBool, typeBool2);\n typeMap.put(typeBoolean, typeBool2);\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBool));\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBoolean));\n }", "@Override\n\tpublic boolean equals(Object other) {\n\t\tif (other instanceof DBBoolean) {\n\t\t\tDBBoolean otherDBBoolean = (DBBoolean) other;\n\t\t\treturn getValue().equals(otherDBBoolean.getValue());\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEqual(Tuple t){\n Object[] temp=t.getPattern();\n if(t.getSize()!=size)return false;\n else {\n for(int i=0;i<size;i++){\n if(pattern[i].equals(temp[i])==false && temp[i]!=\"*\"){\n return false;\n }\n }\n }\n return true;\n }", "boolean isTwoPair();", "@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans = this.first(temp.first);\n // return ans;\n }", "@Test\n public void testEquals() {\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n assertEquals(\"Expected bool types are equal\", typeBool, typeBool2);\n assertNotSame(\"Expected bool and boolean are not equal\", typeBool, typeBoolean);\n }", "public abstract boolean doEquivalent(T t, T t2);", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "public static Object equals(Object val1, Object val2) {\n\t\tif (isBool(val1) && isBool(val2) || isFloat(val1) && isFloat(val2)\n\t\t\t\t|| isInt(val1) && isInt(val2) || isString(val1)\n\t\t\t\t&& isString(val2)) {\n\t\t\treturn val1.equals(val2);\n\t\t} else if (isString(val1) && isInt(val2) || isInt(val1)\n\t\t\t\t&& isString(val2)) {\n\t\t\tif (getIntValue(val1) == getIntValue(val2)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in equals\");\n\t}", "public boolean equals(Object obj);", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tSecond other = (Second) obj;\n\t\tif (booleanValue != other.booleanValue)\n\t\t\treturn false;\n\t\tif (Double.doubleToLongBits(doubleValue) != Double.doubleToLongBits(other.doubleValue))\n\t\t\treturn false;\n\t\tif (intValue != other.intValue)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean equals(Object o);", "@SuppressWarnings(\"unchecked\")\r\n\t\tpublic boolean equals(Object other) {\r\n\t\t\tboolean flag = false;\r\n\r\n\t\t\tif (other instanceof TableElement) {\r\n\t\t\t\tTableElement<K, V> candidate = (TableElement<K, V>) other;\r\n\r\n\t\t\t\tif ((this.getKey()).equals(candidate.getKey()))\r\n\t\t\t\t\tflag = true;\r\n\t\t\t}\r\n\r\n\t\t\treturn flag;\r\n\t\t}", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "@Override\n\tpublic abstract boolean equals(Object other);", "@Test\n void testEquals() {\n final boolean expected_boolean = true;\n\n // Properties for the objects\n final String username = \"username\";\n final String name = \"their_name\";\n final String password = \"password\";\n\n // Create two LoginAccount objects\n LoginAccount first_account = new LoginAccount(username, name, password);\n LoginAccount second_account = new LoginAccount(username, name, password);\n\n // Variable to check\n boolean objects_are_equal = first_account.equals(second_account);\n\n // Assert that the two boolean values are the same\n assertEquals(expected_boolean, objects_are_equal);\n }", "public boolean isTuple() {\n return PyTorchLibrary.LIB.iValueIsTuple(getHandle());\n }", "public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "@Override\n\t\tpublic boolean equals(Object p) {\n\t\t\tif (p instanceof Pair) {\n\t\t\t\tPair obj = (Pair)p;\n\t\t\t\treturn (this.sum == obj.sum && this.index == obj.index);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "boolean hasIsEquivalent();", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "@Override\n public boolean equals(Object o) {\n try {\n Pair p = (Pair) o;\n return (this.getSource().equals(p.source) && this.getDestination().equals(p.getDestination()));\n\n } catch (Exception ex) {\n return false;\n }\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public static boolean equals(Object obj1, Object obj2)\n {\n return obj1 == obj2;\n }", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "public boolean equals(Object obj)\n {\n TagData t;\n\n if (obj == this)\n {\n return true;\n }\n\n if (!(obj instanceof TagData))\n {\n return false;\n }\n\n t = (TagData)obj;\n\n return (hash == t.hash\n && Arrays.equals(t.epc, epc)\n && getProtocol() == t.getProtocol());\n }", "public boolean equals (SetADT<T> set);", "private boolean canJoinTuples() {\n if (predicate == null)\n return true;\n\n environment.clear();\n environment.addTuple(leftSchema, leftTuple);\n environment.addTuple(rightSchema, rightTuple);\n\n return predicate.evaluatePredicate(environment);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Bitacora)) {\n return false;\n }\n Bitacora other = (Bitacora) object;\n if ((this.bitacoraPK == null && other.bitacoraPK != null) || (this.bitacoraPK != null && !this.bitacoraPK.equals(other.bitacoraPK))) {\n return false;\n }\n return true;\n }", "@Override\n public abstract boolean equals(final Object o);", "@Override\n public abstract boolean equals(final Object o);", "boolean equals(Object obj);", "boolean equals(Object obj);", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015\n boolean r0 = r2 instanceof com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice\n if (r0 == 0) goto L_0x0013\n com.ss.android.ugc.aweme.notice.repo.list.bean.PostNotice r2 = (com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice) r2\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r1.aweme\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r2.aweme\n boolean r2 = kotlin.jvm.internal.C7573i.m23585a(r0, r2)\n if (r2 == 0) goto L_0x0013\n goto L_0x0015\n L_0x0013:\n r2 = 0\n return r2\n L_0x0015:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice.equals(java.lang.Object):boolean\");\n }", "public static boolean equalQuick(final Object a, final Object b) {\n \treturn a == b || ((a != null & b != null) && a.equals(b));\n }", "public boolean equals (Tags tags2) {\n return (compareTo(tags2) == 0);\n }", "public static <T> boolean equals(T a, T b) {\n return (a == b) || (a != null && a.equals(b));\n }", "boolean canEqual(Object obj);", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof GlAccountHistoryPK)) {\r\n return false;\r\n }\r\n GlAccountHistoryPK other = (GlAccountHistoryPK) object;\r\n if ((this.glAccountId == null && other.glAccountId != null) || (this.glAccountId != null && !this.glAccountId.equals(other.glAccountId))) {\r\n return false;\r\n }\r\n if ((this.organizationPartyId == null && other.organizationPartyId != null) || (this.organizationPartyId != null && !this.organizationPartyId.equals(other.organizationPartyId))) {\r\n return false;\r\n }\r\n if ((this.customTimePeriodId == null && other.customTimePeriodId != null) || (this.customTimePeriodId != null && !this.customTimePeriodId.equals(other.customTimePeriodId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015\n boolean r0 = r2 instanceof com.p280ss.android.ugc.aweme.shortvideo.subtitle.SubtitleOriginalSoundUploadTask\n if (r0 == 0) goto L_0x0013\n com.ss.android.ugc.aweme.shortvideo.subtitle.SubtitleOriginalSoundUploadTask r2 = (com.p280ss.android.ugc.aweme.shortvideo.subtitle.SubtitleOriginalSoundUploadTask) r2\n java.lang.String r0 = r1.f106943b\n java.lang.String r2 = r2.f106943b\n boolean r2 = kotlin.jvm.internal.C7573i.m23585a(r0, r2)\n if (r2 == 0) goto L_0x0013\n goto L_0x0015\n L_0x0013:\n r2 = 0\n return r2\n L_0x0015:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.shortvideo.subtitle.SubtitleOriginalSoundUploadTask.equals(java.lang.Object):boolean\");\n }", "public boolean equals(Object object);", "public boolean equals(Object o) {\r\n\t\treturn o instanceof BooleanValue?value == ((BooleanValue) o).value:false;\r\n\t}", "public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }", "public boolean equals(ListNode one, ListNode two){\n\t \t\treturn one.val == two.val;\n\t \t}", "public boolean equals(java.lang.Object r4) {\n /*\n r3 = this;\n boolean r0 = r4 instanceof kotlin.reflect.jvm.internal.pcollections.MapEntry\n r1 = 0\n if (r0 != 0) goto L_0x0006\n return r1\n L_0x0006:\n kotlin.reflect.jvm.internal.pcollections.MapEntry r4 = (kotlin.reflect.jvm.internal.pcollections.MapEntry) r4\n K r0 = r3.key\n if (r0 != 0) goto L_0x0011\n K r0 = r4.key\n if (r0 != 0) goto L_0x002f\n goto L_0x001b\n L_0x0011:\n K r0 = r3.key\n K r2 = r4.key\n boolean r0 = r0.equals(r2)\n if (r0 == 0) goto L_0x002f\n L_0x001b:\n V r0 = r3.value\n if (r0 != 0) goto L_0x0024\n V r4 = r4.value\n if (r4 != 0) goto L_0x002f\n goto L_0x002e\n L_0x0024:\n V r0 = r3.value\n V r4 = r4.value\n boolean r4 = r0.equals(r4)\n if (r4 == 0) goto L_0x002f\n L_0x002e:\n r1 = 1\n L_0x002f:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.pcollections.MapEntry.equals(java.lang.Object):boolean\");\n }", "@Override\n public abstract boolean equals(Object obj);", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n BCGlobalProps other = (BCGlobalProps) that;\n return (this.getLogUuid() == null ? other.getLogUuid() == null : this.getLogUuid().equals(other.getLogUuid()))\n && (this.getBversion() == null ? other.getBversion() == null : this.getBversion().equals(other.getBversion()))\n && (this.getBlockHeight() == null ? other.getBlockHeight() == null : this.getBlockHeight().equals(other.getBlockHeight()))\n && (this.getPropKey() == null ? other.getPropKey() == null : this.getPropKey().equals(other.getPropKey()))\n && (this.getPropValue() == null ? other.getPropValue() == null : this.getPropValue().equals(other.getPropValue()))\n && (this.getMptType() == null ? other.getMptType() == null : this.getMptType().equals(other.getMptType()))\n && (this.getHashValue() == null ? other.getHashValue() == null : this.getHashValue().equals(other.getHashValue()))\n && (this.getTxid() == null ? other.getTxid() == null : this.getTxid().equals(other.getTxid()))\n && (this.getPrevHashValue() == null ? other.getPrevHashValue() == null : this.getPrevHashValue().equals(other.getPrevHashValue()))\n && (this.getPrevBlockHeight() == null ? other.getPrevBlockHeight() == null : this.getPrevBlockHeight().equals(other.getPrevBlockHeight()))\n && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));\n }", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015;\n L_0x0002:\n r0 = r2 instanceof com.snap.lenses.app.snappable.SnappableMetadataHttpInterface.a;\n if (r0 == 0) goto L_0x0013;\n L_0x0006:\n r2 = (com.snap.lenses.app.snappable.SnappableMetadataHttpInterface.a) r2;\n r0 = r1.a;\n r2 = r2.a;\n r2 = defpackage.akcr.a(r0, r2);\n if (r2 == 0) goto L_0x0013;\n L_0x0012:\n goto L_0x0015;\n L_0x0013:\n r2 = 0;\n return r2;\n L_0x0015:\n r2 = 1;\n return r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.snap.lenses.app.snappable.SnappableMetadataHttpInterface$a.equals(java.lang.Object):boolean\");\n }", "public final boolean equals(Object obj) {\n AppMethodBeat.m2504i(109592);\n if (this != obj) {\n if (obj instanceof C22192a) {\n C22192a c22192a = (C22192a) obj;\n if (C25052j.m39373j(this.username, c22192a.username)) {\n if (this.state == c22192a.state) {\n }\n }\n }\n AppMethodBeat.m2505o(109592);\n return false;\n }\n AppMethodBeat.m2505o(109592);\n return true;\n }", "public static boolean equalityOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"equalityOperator\")) return false;\n if (!nextTokenIs(b, \"<equality operator>\", EQ_EQ, NEQ)) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, EQUALITY_OPERATOR, \"<equality operator>\");\n r = consumeToken(b, EQ_EQ);\n if (!r) r = consumeToken(b, NEQ);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn a != null && b != null && a.equals(b);\r\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean equals (KeyValuePair<K, V> pair) {\n return key.equals(pair.key);\n }", "@Override\n boolean equals(Object other);", "@Override\n public boolean equals(Object obj) {\n if (!(obj instanceof BoardPosition))\n return false;\n BoardPosition b = (BoardPosition) obj;\n return (this.getRow() == b.getRow()) && (this.getColumn() == b.getColumn()) && (this.getPlayer() == b.getPlayer());\n }", "public boolean almostEqual(Coordinates a, Coordinates b);", "public static <C> boolean EQUAL(LIST<C> L1, LIST<C> L2) {\n if ( isNull( L1 ) ) {\n return isNull(L2);\n }\n if ( isNull( L2 ) ) {\n return isNull(L1);\n }\n return L1.list.equals( L2.list );\n }", "private static boolean contentEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n //if ( !sizeEqual(state1, state2) ) return false;\n\n return Stream.of(new SimpleImmutableEntry<>(state1, state2))\n .flatMap( //map the pair of states to many pairs of piles\n statePair -> Arrays.stream(E_PileID.values())\n .map(pileID -> new SimpleEntry<>(\n statePair.getKey().get(pileID),\n statePair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s.\n listPair -> IntStream //make sure to always traverse the longer list\n .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size()))\n .mapToObj(i -> new SimpleEntry<>(\n getIfExists(listPair.getKey(), i),\n getIfExists(listPair.getValue(), i))\n )\n )\n // map pairs to booleans by checking that the element in a pair are equal\n .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue()))\n // reduce the many values to one bool by saying all must be true or the statement is false\n .reduce(true, (e1, e2) -> e1 && e2);\n }", "public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof Row) {\n return ((Row) obj).table == table\n && ((Row) obj).position == position;\n }\n\n return false;\n }", "@Override\n public boolean equals( Object o ) { \n if (o!=null && this.getClass() == (o.getClass()) && \n getP1().equals(((Triangle)o).getP1()) && \n getP2().equals(((Triangle)o).getP2()) && \n getP3().equals(((Triangle)o).getP3())){\n return true;\n }\n return false;//if not equal to each other\n\n }" ]
[ "0.7989853", "0.74564725", "0.6533522", "0.6262413", "0.6217383", "0.6199891", "0.6196571", "0.61055654", "0.6075562", "0.60131025", "0.596823", "0.59558815", "0.58595264", "0.5756969", "0.5744192", "0.5729089", "0.57036215", "0.56890374", "0.564069", "0.5618284", "0.55846596", "0.55661196", "0.555263", "0.5550966", "0.55319905", "0.55037177", "0.5494787", "0.5467466", "0.5450799", "0.54502827", "0.54485154", "0.5443425", "0.5415548", "0.53996086", "0.53965676", "0.53956354", "0.5392613", "0.5389258", "0.537389", "0.5365695", "0.5361498", "0.5360441", "0.53594893", "0.5348594", "0.53143644", "0.5312197", "0.5310442", "0.53036207", "0.5299327", "0.5276009", "0.52619624", "0.52619624", "0.5256402", "0.5240549", "0.52151006", "0.52151006", "0.52151006", "0.52151006", "0.52151006", "0.5213949", "0.5213227", "0.5209663", "0.51861817", "0.51817286", "0.51710624", "0.5169535", "0.5164222", "0.5154325", "0.51519734", "0.51519734", "0.51466125", "0.51466125", "0.51439655", "0.5139004", "0.5131959", "0.5131099", "0.51250684", "0.51180893", "0.511417", "0.5107404", "0.5095192", "0.50897896", "0.5085699", "0.50741327", "0.5063003", "0.5062346", "0.50608057", "0.5057558", "0.5057526", "0.5047278", "0.5046343", "0.5032577", "0.50240135", "0.5022629", "0.5020911", "0.50185883", "0.50092924", "0.500828", "0.4992684", "0.49862456" ]
0.674067
2
Static equals() implementation that takes two tuples and checks if they are equal.
public static boolean tupleEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return one.tupleSize() == other.tupleSize() && argEquals(one.first(), one.second(), other.first(), other.second()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "public boolean Equals(Pair rhs) {\n if(this.first == rhs.first &&\n this.second == rhs.second)\n return true;\n\n return false;\n }", "protected abstract boolean isEqual(E entryA, E entryB);", "public boolean equals(Object o) {\n if (!(o instanceof TupleDesc)) return false;\n TupleDesc other = (TupleDesc) o;\n\n if (other.numFields() != numfields) return false;\n for (int i = 0; i < numfields; i += 1) {\n if (other.getType(i) != types[i]) return false;\n }\n return true;\n }", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "public boolean equals(Object other)\n\t{\n\t\tif (other == null || other instanceof Pair<?> == false)\n\t\t\treturn false;\n\t\t\n\t\t@SuppressWarnings(\"unchecked\") //safe cast\n\t\tPair<T> p = (Pair<T>) other;\n\t\t\n\t\tif ((first.equals(p.first) && second.equals(p.second)) || (first.equals(p.second) && second.equals(p.first)))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "public abstract boolean equals(Object other);", "protected abstract boolean equalityTest(Object key, Object key2);", "public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "public boolean almostEqual(Coordinates a, Coordinates b);", "public abstract boolean doEquivalent(T t, T t2);", "Equality createEquality();", "private static boolean equalityTest1(String a, String b)\n {\n return a == b;\n }", "@SuppressWarnings(\"unlikely-arg-type\")\n @Test\n public void testEquals() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order same = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order other = new Order(\"Test\", LocalTime.MIDNIGHT, GridCoordinate.ZERO);\n Order another = new Order(\"Test\", LocalTime.NOON, GridCoordinate.of(1, 1));\n Order more = new Order(\"Test2\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertTrue(\"Two objects with the same addresses should be equal.\", order.equals(order));\n Assert.assertFalse(\"Null check.\", order.equals(null));\n Assert.assertFalse(\"Type check.\", order.equals(\"\"));\n Assert.assertFalse(\"Different order times.\", order.equals(other));\n Assert.assertFalse(\"Different customer locations.\", order.equals(another));\n Assert.assertFalse(\"Different order IDs.\", order.equals(more));\n Assert.assertTrue(\"Same values.\", order.equals(same));\n }", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tif (obj == null)\r\n\t\t\t\treturn false;\r\n\t\t\tif (this == obj)\r\n\t\t\t\treturn true;\r\n\t\t\tif (! (obj instanceof Pair<?, ?>))\r\n\t\t\t\treturn false;\r\n\t\t\ttry {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tPair<E, E> other = (Pair<E, E>) obj;\r\n\t\t\t\treturn other.getFirst() == null && other.getSecond() == null;\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean equals(Object o) {\n if (!(o instanceof OrderedPair)) {\n return false;\n }\n OrderedPair test = (OrderedPair) o;\n return (this.x == test.getX()) && (this.y == test.getY());\n }", "public boolean equals(Pair otherPair){\n return this.item1 == otherPair.item1 && this.item2 == otherPair.item2;\n }", "public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn a != null && b != null && a.equals(b);\r\n\t}", "public abstract boolean equals(Object o);", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean equals( Object obj );", "@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n default T value() {\n return first();\n }\n\n boolean second();\n\n\n\n @Override default Object get(int index) {\n switch(index) {\n case 1: return first();\n case 2: return second();\n default: throw new NoSuchElementException();\n }\n }\n\n\n /** Tuple size */\n @Override default int tupleSize() {\n return SIZE;\n }\n\n \n\n /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */\n static <T> int argHashCode(T a1,boolean a2) {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((a1 == null) ? 0 : a1.hashCode());\n result = prime * result + Boolean.hashCode(a2);\n return result;\n }\n\n /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */\n static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class\n * and how many more values there are.\n */\n static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n */\n public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n\n\n \n @Override default Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int index;\n\n @Override public boolean hasNext() {\n return index<SIZE;\n }\n\n @Override public Object next() {\n index++;\n return get(index);\n }\n };\n }\n\n interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> {\n @Override\n default int compareTo(LObjBoolPair<T> that) {\n return Null.compare(this, that, (one, two) -> {\n int retval = 0;\n\n return\n (retval = Null.compare(one.first(), two.first())) != 0 ? retval : //\n (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; //\n });\n }\n\n }\n \n\n abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> {\n\n @Override\n public boolean equals(Object that) {\n return LObjBoolPair.tupleEquals(this, that);\n }\n\n @Override\n public int hashCode() {\n return LObjBoolPair.argHashCode(first(),second());\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('(');\n sb.append(first());\n sb.append(',');\n sb.append(second());\n sb.append(')');\n return sb.toString();\n }\n\n }\n\n\n\n\n\n /**\n * Mutable tuple.\n */\n\n interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> {\n\n\n\n SELF first(T first) ; \n SELF second(boolean second) ; \n\n default SELF setFirst(T first) {\n this.first(first);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }\n \n\n\n default SELF setSecond(boolean second) {\n this.second(second);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }\n \n\n\n default SELF reset() {\n this.first(null);\n this.second(false);\n return (SELF) this;\n }\n }\n\n\n\n\n\n\n public static <T> MutObjBoolPair<T> of() { \n return of( null , false );\n }\n \n\n public static <T> MutObjBoolPair<T> of(T a1,boolean a2){\n return new MutObjBoolPair(a1,a2);\n }\n\n public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) {\n return of(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, non-comparable tuple.\n */\n\n class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { \n return comparableOf( null , false );\n }\n \n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){\n return new MutCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) {\n return comparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, comparable tuple.\n */\n\n final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutCompObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutCompObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n\n public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){\n return new ImmObjBoolPair(a1,a2);\n }\n\n public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) {\n return immutableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, non-comparable tuple.\n */\n@Immutable\n final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){\n return new ImmCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) {\n return immutableComparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, comparable tuple.\n */\n@Immutable\n final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n}", "@Override\n public boolean equals(Object obj) {\n Pair temp = (Pair) obj;\n if(left == temp.left && right == temp.right) {\n return true;\n } else {\n return false;\n }\n }", "@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}", "public boolean equals(Object o);", "@Override\r\n public boolean equals(Object o) {\r\n if (this == o)\r\n return true;\r\n if (o == null || getClass() != o.getClass())\r\n return false;\r\n CustomPair c = (CustomPair)o;\r\n if (c.a == a && c.b == b)\r\n return true;\r\n return false;\r\n }", "public AlgoAreEqual(Construction cons, String label,\n\t\t\tGeoElement inputElement1, GeoElement inputElement2) {\n\t\tthis(cons, inputElement1, inputElement2);\n\t\toutputBoolean.setLabel(label);\n\t}", "private static boolean equalityTest2(String a, String b)\n {\n return a.equals(b);\n }", "private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "public static boolean equals(Object obj1, Object obj2)\n {\n return obj1 == obj2;\n }", "@Override\n\tpublic abstract boolean equals(Object other);", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof TablePair)) return false;\n\n TablePair that = (TablePair) o;\n\n return table1.equals(that.table1) && table2.equals(that.table2);\n }", "public boolean equals(Object obj);", "public static Comparison checkEquality(JexlNode first, JexlNode second) {\n if (first == second) {\n return Comparison.IS_EQUAL;\n } else if (first == null || second == null) {\n return Comparison.notEqual(\"One tree is null: \" + first + \" vs \" + second);\n } else {\n TreeEqualityVisitor visitor = new TreeEqualityVisitor();\n return (Comparison) first.jjtAccept(visitor, second);\n }\n }", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "public static <T> boolean equals(T a, T b) {\n return (a == b) || (a != null && a.equals(b));\n }", "private void assertSymmetric(UMLMessageArgument msgArg1,UMLMessageArgument msgArg2) throws Exception\r\n\t{\r\n\t\tif( msgArg1!=null && msgArg2!=null)\r\n\t\t\tassertEquals(msgArg1.equals(msgArg2),msgArg2.equals(msgArg1));\r\n\t}", "@Test\n\tpublic void testEquals2() {\n\t\tDistance d2 = new Distance();\n\t\tDistance d4 = new Distance(1, 1);\n\t\tassertEquals(true, d2.equals(d4));\n\t}", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "public static boolean isEqual(JexlNode first, JexlNode second) {\n return checkEquality(first, second).isEqual();\n }", "public boolean isEqual(Tuple t){\n Object[] temp=t.getPattern();\n if(t.getSize()!=size)return false;\n else {\n for(int i=0;i<size;i++){\n if(pattern[i].equals(temp[i])==false && temp[i]!=\"*\"){\n return false;\n }\n }\n }\n return true;\n }", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "public AlgoAreEqual(Construction cons, GeoElement inputElement1,\n\t\t\tGeoElement inputElement2) {\n\t\tsuper(cons);\n\t\tthis.inputElement1 = inputElement1;\n\t\tthis.inputElement2 = inputElement2;\n\n\t\toutputBoolean = new GeoBoolean(cons);\n\n\t\tsetInputOutput();\n\t\tcompute();\n\n\t}", "@Override\n public boolean equals(Object o) {\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n return (this.key == pair.key && this.value == pair.value);\n } else\n return false;\n }", "@Test\n\tpublic void test_equals1() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(11,\"Joe Tsonga\");\n\tassertTrue(c1.equals(c2));\n }", "public boolean equals (SetADT<T> set);", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "public static void main(String[] args) {\n\t\t\n\t\tGenericPair<Integer> ob1 = new GenericPair(1,1);\n\t\tGenericPair<Integer> ob2 = new GenericPair(2,3);\n\t\tSystem.out.println(ob1.equals(ob2));\n\t\tSystem.out.println(ob1.getFirst());\n\t\tSystem.out.println(ob1.getSecond());\n\t\tSystem.out.println(ob2.getFirst());\n\t\tSystem.out.println(ob2.getSecond());\n\t\tSystem.out.println(ob1.toString());\n\t\tSystem.out.println(ob2.toString());\n\n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n if (key != null ? !key.equals(pair.key) : pair.key != null) return false;\n if (value != null ? !value.equals(pair.value) : pair.value != null) return false;\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "public boolean equals(Grid<T> other) {\r\n // TODO Auto-generated method stub\r\n return this.toString() == other.toString();\r\n }", "public boolean equals(Object object);", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "private Equals() {}", "private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }", "public static void equalsDemo() {\n\n//\t\tSystem.out.printf(\"demo1 == demo2 = %s%n\", demo1 == demo2);\n//\t\tSystem.out.printf(\"demo2 == demo3 = %s%n\", demo2 == demo3);\n//\t\tSystem.out.printf(\"demo2.equals(demo3) = %s%n\", demo2.equals(demo3));\n//\t\tSystem.out.printf(\"%n\");\n\t}", "public final EObject ruleEqualsOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4540:28: ( ( () otherlv_1= '==' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: () otherlv_1= '=='\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4542:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getEqualsOperatorAccess().getEqualsOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,55,FOLLOW_55_in_ruleEqualsOperator9973); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getEqualsOperatorAccess().getEqualsSignEqualsSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }", "public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }", "private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}", "@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }", "public boolean equals(ListNode one, ListNode two){\n\t \t\treturn one.val == two.val;\n\t \t}", "public static boolean equal(VectorIntf x, VectorIntf y) {\r\n if (x==null && y==null) \r\n\t\t\tthrow new IllegalArgumentException(\"both args null\");\r\n if (x==null || y==null) return false;\r\n if (x.getNumCoords()!=y.getNumCoords()) return false;\r\n // short-cut for specific sparse vectors\r\n if (x instanceof DblArray1SparseVector && \r\n\t\t\t y instanceof DblArray1SparseVector)\r\n return ((DblArray1SparseVector) x).equals((DblArray1SparseVector) y);\r\n for (int i=0; i<x.getNumCoords(); i++) {\r\n if (Double.compare(x.getCoord(i),y.getCoord(i))!=0) return false;\r\n }\r\n return true;\r\n }", "@Test\n\tpublic void test_equals1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.equals(t2));\n }", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "@Test\n void testEquals() {\n final boolean expected_boolean = true;\n\n // Properties for the objects\n final String username = \"username\";\n final String name = \"their_name\";\n final String password = \"password\";\n\n // Create two LoginAccount objects\n LoginAccount first_account = new LoginAccount(username, name, password);\n LoginAccount second_account = new LoginAccount(username, name, password);\n\n // Variable to check\n boolean objects_are_equal = first_account.equals(second_account);\n\n // Assert that the two boolean values are the same\n assertEquals(expected_boolean, objects_are_equal);\n }", "@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\tif (!(other instanceof Graph))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tGraph<N, ET> otherGraph = (Graph<N, ET>) other;\n\t\tList<N> otherNodeList = otherGraph.getNodeList();\n\t\tint thisNodeSize = nodeList.size();\n\t\tif (thisNodeSize != otherNodeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherNodeList = new ArrayList<N>(otherNodeList);\n\t\tif (otherNodeList.retainAll(nodeList))\n\t\t{\n\t\t\t// Some nodes are not identical\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node list\");\n\t\t\t//\t\t\tSystem.err.println(nodeList);\n\t\t\t//\t\t\tSystem.err.println(otherNodeList);\n\t\t\treturn false;\n\t\t}\n\t\t// Here, the node lists are identical...\n\t\tList<ET> otherEdgeList = otherGraph.getEdgeList();\n\t\tint thisEdgeSize = edgeList.size();\n\t\tif (thisEdgeSize != otherEdgeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal edge count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherEdgeList = new ArrayList<ET>(otherEdgeList);\n\t\tif (otherEdgeList.retainAll(edgeList))\n\t\t{\n\t\t\t// Other Graph contains extra edges\n\t\t\t//\t\t\tSystem.err.println(\"not equal edge retain\");\n\t\t\t//\t\t\tSystem.err.println(edgeList);\n\t\t\t//\t\t\tSystem.err.println(otherEdgeList);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }", "public static <C> boolean EQUAL(LIST<C> L1, LIST<C> L2) {\n if ( isNull( L1 ) ) {\n return isNull(L2);\n }\n if ( isNull( L2 ) ) {\n return isNull(L1);\n }\n return L1.list.equals( L2.list );\n }", "private static <F> /*@ pure @*/ boolean elem_equals(F item1,\n F item2) {\n return (item1 != null && item1.equals(item2))\n\t || (item1 == null && item2 == null);\n }", "public static boolean equalQuick(final Object a, final Object b) {\n \treturn a == b || ((a != null & b != null) && a.equals(b));\n }", "@Override\r\n public boolean equals(Object obj) {\r\n\r\n if (obj instanceof DocumentPair) {\r\n DocumentPair other = (DocumentPair) obj;\r\n return ((this.doc1.equals(other.doc1) && this.doc2.equals(other.doc2))\r\n || (this.doc1.equals(other.doc2) && (this.doc2.equals(other.doc1))));\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "@Test\n public void equalsTest() {\n boolean expected = false;\n\n assertEquals(\"The equals test for comparing e1 and e2 is expected to be false\",\n expected, e1.equals(e2));\n\n }", "public boolean equals(Object other) {\n System.out.println(\"Calling our equals method now!\");\n\n if (other == null) {\n return false;\n }\n\n if (!(other instanceof Point)) {\n return false;\n }\n\n // other must be a Point here\n Point p = (Point) other;\n return (this.x == p.x) && (this.y == p.y);\n }", "@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }", "public void testEqualsObject()\n {\n // Null check\n assertFalse(b1.equals(null));\n // Type mismatch\n assertFalse(b1.equals(\"a\"));\n\n // Reflexive\n assertTrue(b1.equals(b1));\n\n // In general, two empty boards\n assertTrue(b1.equals(b2));\n\n // Different contents\n b1.setCell(0, 0, Cell.RED1);\n assertFalse(b1.equals(b2));\n\n // Same Contents\n b2.setCell(0, 0, Cell.RED1);\n assertTrue(b1.equals(b2));\n\n // Some more complex cases\n b1.fromString(\"RRRBEEBBE\");\n assertFalse(b1.equals(b2));\n b2.fromString(\"RRRBEEBBE\");\n assertTrue(b1.equals(b2));\n\n }", "boolean equals(Object obj);", "boolean equals(Object obj);", "boolean hasIsEquivalent();", "@Override\n boolean equals(Object other);", "static public boolean testEquality(Object a, Object b) {\r\n\t\tif (a == null && b == null) // undefined == undefined\r\n\t\t\treturn true;\r\n\t\tif ((a == null || b == null) && (a instanceof JSNull || b instanceof JSNull)) // undefined or null\r\n\t\t\treturn true;\r\n\t\tif ((a == null && b instanceof JSNull) || (a == null && b instanceof JSNull)) // anything == undefined\r\n\t\t\treturn true;\r\n\t\tif (a == null || b == null) // anything equals null\r\n\t\t\treturn false;\r\n\t\treturn a.equals(b);\r\n\t}", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }", "@Test\n public void testEquals() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n \n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n \n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst1 = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n ConstraintSyntaxTree cst2 = new OCLFeatureCall(\n new Variable(decl), IntegerType.GREATER_EQUALS_INTEGER_INTEGER.getName(), c0);\n\n EvaluationAccessor val1 = Utils.createValue(ConstraintType.TYPE, context, cst1);\n EvaluationAccessor val2 = Utils.createValue(ConstraintType.TYPE, context, cst2);\n EvaluationAccessor nullV = Utils.createNullValue(context);\n \n // equals is useless and will be tested in the EvaluationVisitorTest\n \n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val1);\n Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val2);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val1);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, nullV);\n Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, nullV);\n\n val1.release();\n val2.release();\n nullV.release();\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }" ]
[ "0.6395972", "0.63267195", "0.6226341", "0.61683697", "0.61413264", "0.6116091", "0.6041172", "0.6035154", "0.60133046", "0.59941286", "0.59852487", "0.5935354", "0.5917981", "0.59003496", "0.58805454", "0.5872012", "0.5852087", "0.5828267", "0.58065104", "0.57981503", "0.57974887", "0.57768136", "0.57670856", "0.57524395", "0.5725529", "0.5709678", "0.56881577", "0.5670616", "0.5659487", "0.5657904", "0.56454504", "0.5643326", "0.5614871", "0.56076425", "0.55832726", "0.5576653", "0.5568896", "0.5567817", "0.55622387", "0.55549157", "0.55536205", "0.5547509", "0.5547509", "0.55434316", "0.5541769", "0.5537569", "0.55356395", "0.5532319", "0.55270606", "0.55198765", "0.55198765", "0.55198765", "0.55198765", "0.55198765", "0.5511271", "0.5507879", "0.5506249", "0.5498917", "0.54917294", "0.5477223", "0.54727286", "0.5464395", "0.54580826", "0.5450879", "0.54439265", "0.5443258", "0.5441923", "0.5439549", "0.5437277", "0.5436398", "0.54305094", "0.5430381", "0.54273736", "0.54270715", "0.5426632", "0.5422098", "0.5421067", "0.54114836", "0.54081106", "0.5407635", "0.5404185", "0.54038423", "0.54037416", "0.5396821", "0.53964394", "0.5395238", "0.5381912", "0.53696144", "0.53673315", "0.53629565", "0.53591245", "0.5356972", "0.5356972", "0.53548247", "0.5351896", "0.53498596", "0.5345129", "0.53441346", "0.53327", "0.5330165" ]
0.6985036
0
Sets value if predicate(current) is true
default SELF setFirstIf(T first, LPredicate<T> predicate) { if (predicate.test(this.first())) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "public void setCurrent(Node current) {\n this.current = current;\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "public abstract boolean setValue(Value value, boolean asAssignment);", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "public V setValue(V value);", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "public void setCurrent(int current) {\n\tif(current >= 0 && current <= ceiling) {\n\t this.current = current;\n\t}\n }", "default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }", "void setValue(V value);", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "public void apply() { writable.setValue(value); }", "public void setValue(A value) {this.value = value; }", "protected abstract void setValue(V value);", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "@Test\n public void setCurrent() throws SQLException {\n DataStorer.insertProfile(profile1);\n DataStorer.insertGoal(goal1, profile1);\n // Current for goal1 is currently true so change it to false\n boolean current = false;\n goal1.setCurrent(current);\n // Load profile1 from the database\n loadedProfile = DataLoader.loadProfile(profile1.getFirstName(), profile1.getLastName());\n\n //goal1.setCurrent(true);\n\n // Check that current was updated correctly in the database - will get index out of bounds exception if it was not\n assertEquals(current, loadedProfile.getPastGoals().get(0).isCurrent());\n\n // Reset current to true so other tests can use goal1\n goal1.setCurrent(true);\n }", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "public void setValue(Object value) { this.value = value; }", "public Object set(Object value, IMObject parent, NodeDescriptor node, AssertionDescriptor assertion) {\r\n Object result = value;\r\n ActionTypeDescriptor actionType = getActionType(Actions.set.toString());\r\n if (actionType != null) {\r\n try {\r\n result = evaluateAction(Actions.set.toString(), value, parent, node, assertion);\r\n } catch (Exception exception) {\r\n throw new AssertionException(\r\n AssertionException.ErrorCode.FailedToApplyAssertion,\r\n new Object[]{\"assert\", getName()}, exception);\r\n }\r\n }\r\n return result;\r\n }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "void setValue(T value);", "void setValue(T value);", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "public abstract void setValue(ELContext context, Object value);", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public ContentObject setCurrent(\n ContentObject value\n )\n {\n ContentObject replacedObject = objects.set(index,value);\n refresh();\n\n return replacedObject;\n }", "public boolean setPropertyCurrentAction(long aValue);", "public void setElseValue(Object pValue);", "@Override\n public void setValue(ELContext context, Object base, Object property,\n Object value) throws NullPointerException, PropertyNotFoundException,\n PropertyNotWritableException, ELException {\n }", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "protected void _setBooleanElement(int index, boolean value) {\n\t\tint bitOffset = Math.multiplyExact(index, this.step);\n\t\t// the number of the Bit in the byte it is in\n\t\tbyte bitnum = (byte) (bitOffset % Constants.BITS_PER_BYTE);\n\t\t// position of the byte in the data section\n\t\tint position = (this.ptr + bitOffset / Constants.BITS_PER_BYTE);\n\t\tbyte oldValue = this.segment.buffer.get(position);\n\t\t// the left side of the '|' zeros the selected bit; the right side sets the new value\n\t\tthis.segment.buffer.put(position, (byte) ((oldValue & (~(1 << bitnum))) | ((value ? 1 : 0) << bitnum)));\n\t}", "public void setValue(Object value);", "protected void doSetValue(Object _value) {\n\t\tthis.value = (Boolean) _value;\n\t}", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "public void setValue(ELContext context, Object base, Object property, Object val) {\n/* 349 */ context.setPropertyResolved(false);\n/* */ \n/* 351 */ for (int i = 0; i < this.size; i++) {\n/* 352 */ this.elResolvers[i].setValue(context, base, property, val);\n/* 353 */ if (context.isPropertyResolved()) {\n/* */ return;\n/* */ }\n/* */ } \n/* */ }", "public void setValue(Object val);", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public abstract void setValue(ELContext context,\n Object base,\n Object property,\n Object value);", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "@Override\n public void setValue(Node value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "void setValue(int value);", "@PortedFrom(file = \"Taxonomy.h\", name = \"setCurrent\")\n public void setCurrent(TaxonomyVertex cur) {\n current = cur;\n }", "void setValue(Object value);", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setValue(boolean value) {\n this.value = value;\n }", "public abstract void setValue(T value);", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "public abstract void setValue(Context c, Object v) throws PropertyException;", "@Test\n public void testSet_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void setValue(Value value) {\n this.value = value;\n }", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "public void setValue(final Object value) { _value = value; }", "public void setCurrent(Prompt current) {\n\t\t\tthis.current = current;\n\t\t}", "public void setFlying ( boolean value ) {\n\t\texecute ( handle -> handle.setFlying ( value ) );\n\t}", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "protected void setCurrentColumnValue(String currentColumnValue) {\r\n this.currentColumnValue = currentColumnValue;\r\n }", "void setValueOfNode(String path, String value)\n throws ProcessingException;", "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "@Override\r\n\tpublic IPage<T> setCurrent(long current) {\n\t\treturn null;\r\n\t}", "public void setValue (V v) {\n value = v;\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public void setCurrentValue(int currentValue_) {\n\t\tif (currentValue_ > 0 && currentValue_ <= this.numSides) {\n\t\t\tthis.currentValue = currentValue_;\n\t\t} else {\n\t\t\tSystem.out.println(\"ERROR: New value must be greater than 1 and less than or equal the number of sides on the die.\");\n\t\t}\n\t}", "@Override\r\n\tpublic void setCurrent(double iCurrent) {\n\r\n\t}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public void setValue(T value) {\n this.value = value;\n }", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "public int setValue (int val);", "void setNextValue() {\n this.value = this.value * 2;\n }", "public void ifThen(final Predicate<Boolean> cond, final Statement f) {\n synchronized (this) {\n if (cond.test(this.val)) {\n f.execute();\n }\n }\n }", "void setActiveOperand(double activeOperand);", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "public abstract void setValueAction(Object value);", "public static void setFound(boolean a){\n found = a;\n }", "@Override\n\tpublic void setBindingValue(T value, Object target, BindingEvaluationContext context) {\n\n\t}", "public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}", "protected void changeCurrent(int current) {\n\t\tif (current > mEnd) {\n\t\t\tcurrent = mStart;\n\t\t} else if (current < mStart) {\n\t\t\tcurrent = mEnd;\n\t\t}\n\t\tmPrevious = mCurrent;\n\t\tmCurrent = current;\n\t\tnotifyChange();\n\t\tupdateView();\n\t}", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "private void setSeen(boolean value)\n\t{\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].setSeen(value);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}" ]
[ "0.5986008", "0.55188686", "0.5479107", "0.54401684", "0.5439245", "0.54204345", "0.5377112", "0.53505856", "0.53299624", "0.5319342", "0.52817", "0.52546155", "0.52220535", "0.51959294", "0.51854277", "0.51810086", "0.51760554", "0.517124", "0.51251817", "0.51066566", "0.5090327", "0.5069843", "0.506939", "0.5035963", "0.50133157", "0.50121874", "0.50106436", "0.50106436", "0.50079995", "0.50022334", "0.5001896", "0.49937904", "0.49849582", "0.49840423", "0.49840423", "0.4965586", "0.49488774", "0.49457645", "0.49420524", "0.49314073", "0.49148226", "0.48982665", "0.48840117", "0.48698747", "0.48685268", "0.4851154", "0.48376578", "0.4834117", "0.48275217", "0.48173", "0.48149285", "0.48104423", "0.4808984", "0.4801996", "0.48006973", "0.4790868", "0.47700346", "0.4769559", "0.47687885", "0.475873", "0.4756017", "0.47531313", "0.4750241", "0.47497988", "0.47494212", "0.4749235", "0.474378", "0.47430897", "0.47430545", "0.47326788", "0.47321403", "0.4731844", "0.47218025", "0.47164616", "0.47131786", "0.46979225", "0.46943972", "0.46832967", "0.4681817", "0.4676377", "0.4676147", "0.46724457", "0.4668787", "0.46612886", "0.46572274", "0.4655077", "0.46543002", "0.46524107", "0.4640442", "0.46326718", "0.46214163", "0.4617407", "0.46171987", "0.461602", "0.46135628", "0.4608875", "0.46035573", "0.46031284", "0.46025807", "0.46025807" ]
0.53294986
9
Sets new value if predicate predicate(newValue, current) is true.
default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) { if (predicate.test(first, this.first())) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "public void setValue(int newValue) {\n if (mValue != newValue) {\n mValue = newValue;\n setUpdate(CONCEPT_VALUE);\n }\n }", "public void setValue(V newValue) {\n this.value = newValue;\n }", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "void valueChanged(T oldValue, T newValue);", "public void setValue(V newValue) {\r\n\t\tvalue = newValue;\r\n\t}", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public V setValue(V value);", "public void apply() { writable.setValue(value); }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "void onChange( T newValue );", "public abstract boolean setValue(Value value, boolean asAssignment);", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "void setValue(V value);", "protected abstract void setValue(V value);", "public void setValue(String value) {\n if(!watchedValue.equals(value)) {\n System.out.println(\"Value changed to new value: \"+value);\n watchedValue = value;\n\n // mark as value changed\n setChanged();\n // trigger notification with arguments\n notifyObservers(value);\n }\n }", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\n \n\t}", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "protected void soConsumerIndex(long newValue)\r\n/* 27: */ {\r\n/* 28:139 */ C_INDEX_UPDATER.lazySet(this, newValue);\r\n/* 29: */ }", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\n }", "@Override public final void setValue(V newValue) {\n versionedValue.updateAndGet(prev -> new VersionedValue<>(prev.getVersion() + 1, newValue));\n }", "public abstract void set(M newValue);", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "public void changeValue(ValueHolder newValue) {\r\n value = ((AttrObject) newValue).getValue();\r\n\tuserInfo = ((AttrObject) newValue).getUserInfo();\r\n\tnotifyFromAttr(); \r\n }", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "public static Action set(final ModifiableBoolean value, final ModifiableBoolean newValue) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n value.setValue(newValue);\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return new ModifiableBoolean[]{value, newValue};\n }\n\n @Override\n public String toString() {\n return \"Set(\" + (value != null ? value.toString() : \"null\")\n + \", \" + (newValue != null ? newValue.toString() : \"null\") + \")\";\n }\n };\n }", "public void setValue(A value) {this.value = value; }", "public void setValue(int newValue) {\t\r\n\t\tthis.value = newValue;\r\n\t}", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public static void UpdateOneByKey_Vaule(String collection_name, Document filter, Document update_value) {\r\n\t\tMongoCollection<Document> col = getCollection(collection_name);\r\n\t\tcol.updateMany(filter, new Document(\"$set\", update_value));\r\n\t}", "public void setValue(int new_value){\n this.value=new_value;\n }", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "public static <T> void updatePropertyIfAbsent(Supplier<T> getterMethod, Consumer<T> setterMethod, T newValue) {\n if (newValue != null && getterMethod.get() == null) {\n setterMethod.accept(newValue);\n }\n }", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public void setValue(Object newValue) {\n Object oldValue = value;\n value = newValue;\n modifiedEditor.setValue (value);\n firePropertyChange ();\n }", "void setPointChange(Integer setPoint, Integer expectedValue);", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "protected Tuple2<T, V> setValue(V newValue) {\n this.v = newValue;\n return this;\n }", "public void updatePropertyValue(URI newProperty, String newValue)\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n property = newProperty;\n value = newValue;\n annotation.getStatements().add(new Statement(subject.getUri(), property, value));\n annotation.update();\n }", "protected void changeValue() {\n \tif(value == null)\n \t\tvalue = true;\n \telse if(!value) { \n \t\tif (mode == Mode.THREE_STATE)\n \t\t\tvalue = null;\n \t\telse\n \t\t\tvalue = true;\n \t}else\n \t\tvalue = false;\n \t\n \tsetStyle();\n \t\n \tValueChangeEvent.fire(this, value);\n }", "public void setValue(Value value) {\n this.value = value;\n }", "private void checkAndSet() {\n if (value == null) {\n throw new IllegalArgumentException(EXC_NodeCannotBeNull());\n }\n\n if (equalNodes(value, selectedNodes)) {\n return;\n }\n\n List<Node> validNodes = null;\n for (int i = 0; i < value.length; i++) {\n if (value[i] == null) {\n throw new IllegalArgumentException(EXC_NoElementOfNodeSelectionMayBeNull());\n }\n \n if (!isUnderRoot(value[i])) {\n if (validNodes == null) {\n validNodes = new ArrayList<Node>(value.length);\n for (int j = 0; j < i; j++) {\n validNodes.add(value[j]);\n }\n }\n } else if (validNodes != null) {\n validNodes.add(value[i]);\n }\n }\n if (validNodes != null) {\n newValue = validNodes.toArray(new Node[validNodes.size()]);\n if (equalNodes(newValue, selectedNodes)) {\n return;\n } \n } else {\n newValue = value;\n }\n\n if ((newValue.length != 0) && (vetoableSupport != null)) {\n try {\n // we send the vetoable change event only for non-empty selections\n vetoableSupport.fireVetoableChange(PROP_SELECTED_NODES, selectedNodes, newValue);\n } catch (PropertyVetoException ex) {\n veto = ex;\n return;\n }\n }\n updateSelection();\n }", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "public void setValue(Object value) { this.value = value; }", "public final void lazySet(int newValue) {\n unsafe.putOrderedInt(this, valueOffset, newValue);\n }", "protected abstract void updateImpl(M newValue);", "public void setQueryMatchForKey(Object value, String selector, String key);", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(WHO_PROPERTY.equals(property)){\n\t\t\tchangeWhoProperty(newValueExpr);\n\t\t}\n\t\tif(PAID_TIME_PROPERTY.equals(property)){\n\t\t\tchangePaidTimeProperty(newValueExpr);\n\t\t}\n\t\tif(AMOUNT_PROPERTY.equals(property)){\n\t\t\tchangeAmountProperty(newValueExpr);\n\t\t}\n\n \n\t}", "public boolean setValue (\n\t\t\tfinal V value)\n\t\t{\n\t\t\t_value = value;\n\t\t\treturn true;\n\t\t}", "public abstract void updateFilter();", "public void setEvaluationProcedure(final Citation newValue) {\n checkWritePermission(evaluationProcedure);\n evaluationProcedure = newValue;\n }", "public void setValue(Object value, String parentLogDomain, boolean waitUntilUpdated) \n\t\t\tthrows AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tLOG.debug(\"Setting value of property \" + getStandardID() + \" to \" + value + \"...\");\n\t\tsetValue(value);\n\t\tupdate(parentLogDomain, waitUntilUpdated);\n\t}", "void setValue(T value);", "void setValue(T value);", "public void setNewPVal(double pVal) { this.pValAfter = pVal; }", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "@Test\n public void setCurrent() throws SQLException {\n DataStorer.insertProfile(profile1);\n DataStorer.insertGoal(goal1, profile1);\n // Current for goal1 is currently true so change it to false\n boolean current = false;\n goal1.setCurrent(current);\n // Load profile1 from the database\n loadedProfile = DataLoader.loadProfile(profile1.getFirstName(), profile1.getLastName());\n\n //goal1.setCurrent(true);\n\n // Check that current was updated correctly in the database - will get index out of bounds exception if it was not\n assertEquals(current, loadedProfile.getPastGoals().get(0).isCurrent());\n\n // Reset current to true so other tests can use goal1\n goal1.setCurrent(true);\n }", "bool setFrequency(double newFrequency);", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "public void setValue (V v) {\n value = v;\n }", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "public void updateCurrentPriceAndValue (Double newPrice) {\n\t\t\n\t\tcurrentPrice = newPrice;\n\t\tcurrentValue = currentPrice * quantity;\n\t\t\n\t\t\n\t}", "public void setIsour( java.lang.Boolean newValue ) {\n __setCache(\"isour\", newValue);\n }", "private void setCurrentBean(Object newBean)\r\n {\r\n T oldValue = getValue();\r\n\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryRemoveNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n bean = newBean;\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryAddNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n T newValue = getValue();\r\n if (!Objects.equals(oldValue, newValue))\r\n {\r\n fireValueChanged(oldValue, newValue);\r\n }\r\n }", "bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }", "public void setValue(Object val);", "private final void setValueImpl (String newValue) {\n String oldValue = this.getValue ();\n \n this.valueList.clear ();\n \n if ( newValue.length () != 0) {\n try {\n TreeText newText = new TreeText (newValue);\n this.valueList.add (newText);\n } catch (TreeException exc) {\n // something is wrong -- OK\n }\n }\n \n firePropertyChange (PROP_VALUE, oldValue, newValue);\n }", "public void observe(int val) {\n observe(val, 1);\n }", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }", "private void change(Node n, int value) {\n\t\tn.pendingVal = value;\n\t\tn.sum = n.size() * value;\n\t\tn.min = value;\n\t\tarray[n.from] = value;\n\n\t}", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }" ]
[ "0.60006934", "0.5581882", "0.52968955", "0.52942586", "0.5293127", "0.52424175", "0.52401125", "0.52367747", "0.5220226", "0.5186571", "0.516681", "0.51546264", "0.51346004", "0.5121217", "0.50979984", "0.50901043", "0.50787485", "0.5077679", "0.5030916", "0.5020283", "0.5007065", "0.5000193", "0.49830398", "0.49828675", "0.49462354", "0.4942326", "0.49385604", "0.4935086", "0.4907169", "0.49008083", "0.48997313", "0.489141", "0.48675558", "0.48554358", "0.48224822", "0.4800364", "0.47976288", "0.4795282", "0.47906342", "0.47898677", "0.47850072", "0.47836605", "0.47833532", "0.4781937", "0.4777331", "0.47724447", "0.4766285", "0.4760355", "0.4751511", "0.47280023", "0.47255814", "0.4715038", "0.47121283", "0.47120178", "0.47112566", "0.46989873", "0.46969652", "0.46809217", "0.46787202", "0.4670591", "0.46698073", "0.4664023", "0.46597365", "0.46527472", "0.4646715", "0.46424422", "0.4639823", "0.4629222", "0.46264803", "0.4617503", "0.46110135", "0.4601778", "0.45999664", "0.45971322", "0.4596812", "0.45940995", "0.45940995", "0.45912683", "0.45890668", "0.45857507", "0.4567633", "0.45574242", "0.45555705", "0.45504043", "0.4548806", "0.45457157", "0.45451206", "0.454438", "0.45420116", "0.45335868", "0.45238003", "0.4523145", "0.4522619", "0.45208943", "0.45185885", "0.45169163", "0.45128912", "0.45088083", "0.45064473", "0.44930804" ]
0.4974873
24
Sets new value if predicate predicate(current, newValue) is true.
default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) { if (predicate.test(this.first(), first)) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "public void setValue(int newValue) {\n if (mValue != newValue) {\n mValue = newValue;\n setUpdate(CONCEPT_VALUE);\n }\n }", "public void setValue(V newValue) {\n this.value = newValue;\n }", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "public void setValue(V newValue) {\r\n\t\tvalue = newValue;\r\n\t}", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "void valueChanged(T oldValue, T newValue);", "void onChange( T newValue );", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\n \n\t}", "public V setValue(V value);", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "public static <T> void updatePropertyIfAbsent(Supplier<T> getterMethod, Consumer<T> setterMethod, T newValue) {\n if (newValue != null && getterMethod.get() == null) {\n setterMethod.accept(newValue);\n }\n }", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void apply() { writable.setValue(value); }", "public static Action set(final ModifiableBoolean value, final ModifiableBoolean newValue) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n value.setValue(newValue);\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return new ModifiableBoolean[]{value, newValue};\n }\n\n @Override\n public String toString() {\n return \"Set(\" + (value != null ? value.toString() : \"null\")\n + \", \" + (newValue != null ? newValue.toString() : \"null\") + \")\";\n }\n };\n }", "public void setValue(String value) {\n if(!watchedValue.equals(value)) {\n System.out.println(\"Value changed to new value: \"+value);\n watchedValue = value;\n\n // mark as value changed\n setChanged();\n // trigger notification with arguments\n notifyObservers(value);\n }\n }", "public void updatePropertyValue(URI newProperty, String newValue)\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n property = newProperty;\n value = newValue;\n annotation.getStatements().add(new Statement(subject.getUri(), property, value));\n annotation.update();\n }", "protected void soConsumerIndex(long newValue)\r\n/* 27: */ {\r\n/* 28:139 */ C_INDEX_UPDATER.lazySet(this, newValue);\r\n/* 29: */ }", "public void setValue(int newValue) {\t\r\n\t\tthis.value = newValue;\r\n\t}", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void changeValue(ValueHolder newValue) {\r\n value = ((AttrObject) newValue).getValue();\r\n\tuserInfo = ((AttrObject) newValue).getUserInfo();\r\n\tnotifyFromAttr(); \r\n }", "@Override public final void setValue(V newValue) {\n versionedValue.updateAndGet(prev -> new VersionedValue<>(prev.getVersion() + 1, newValue));\n }", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "public static void UpdateOneByKey_Vaule(String collection_name, Document filter, Document update_value) {\r\n\t\tMongoCollection<Document> col = getCollection(collection_name);\r\n\t\tcol.updateMany(filter, new Document(\"$set\", update_value));\r\n\t}", "void setValue(V value);", "public abstract boolean setValue(Value value, boolean asAssignment);", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "protected abstract void setValue(V value);", "public void setValue(Object newValue) {\n Object oldValue = value;\n value = newValue;\n modifiedEditor.setValue (value);\n firePropertyChange ();\n }", "public abstract void set(M newValue);", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "public final void lazySet(int newValue) {\n unsafe.putOrderedInt(this, valueOffset, newValue);\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(WHO_PROPERTY.equals(property)){\n\t\t\tchangeWhoProperty(newValueExpr);\n\t\t}\n\t\tif(PAID_TIME_PROPERTY.equals(property)){\n\t\t\tchangePaidTimeProperty(newValueExpr);\n\t\t}\n\t\tif(AMOUNT_PROPERTY.equals(property)){\n\t\t\tchangeAmountProperty(newValueExpr);\n\t\t}\n\n \n\t}", "protected Tuple2<T, V> setValue(V newValue) {\n this.v = newValue;\n return this;\n }", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "protected abstract void updateImpl(M newValue);", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "public void setEvaluationProcedure(final Citation newValue) {\n checkWritePermission(evaluationProcedure);\n evaluationProcedure = newValue;\n }", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "public void updateValue(String newValue)\n throws ROSRSException {\n updatePropertyValue(property, newValue);\n }", "void setPointChange(Integer setPoint, Integer expectedValue);", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "public void setQueryMatchForKey(Object value, String selector, String key);", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public MethodPredicate withPredicate(Predicate<Method> predicate) {\n this.predicate = predicate;\n return this;\n }", "public FieldPredicate withPredicate(Predicate<Field> predicate) {\n this.predicate = predicate;\n return this;\n }", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public void setValue(Object value, String parentLogDomain, boolean waitUntilUpdated) \n\t\t\tthrows AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tLOG.debug(\"Setting value of property \" + getStandardID() + \" to \" + value + \"...\");\n\t\tsetValue(value);\n\t\tupdate(parentLogDomain, waitUntilUpdated);\n\t}", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public void setValue(A value) {this.value = value; }", "public void setIsour( java.lang.Boolean newValue ) {\n __setCache(\"isour\", newValue);\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(NAME_PROPERTY.equals(property)){\n\t\t\tchangeNameProperty(newValueExpr);\n\t\t}\n\t\tif(MOBILE_PROPERTY.equals(property)){\n\t\t\tchangeMobileProperty(newValueExpr);\n\t\t}\n\t\tif(EMAIL_PROPERTY.equals(property)){\n\t\t\tchangeEmailProperty(newValueExpr);\n\t\t}\n\t\tif(FOUNDED_PROPERTY.equals(property)){\n\t\t\tchangeFoundedProperty(newValueExpr);\n\t\t}\n\n \n\t}", "public void setValue(Value value) {\n this.value = value;\n }", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "public V getAndSet(final V newValue) {\n\t\tsynchronized (this.monitor) {\n\t\t\tfinal V prev = this.value;\n\t\t\tthis.value = newValue;\n\t\t\treturn prev;\n\t\t}\n\t}", "public void setValue(int column, int row, int newValue) {\n\t\tint goodValue = newValue;\n\t\tif (goodValue < 0) {\n\t\t\tgoodValue = 0;\n\t\t}\n\t\tif (this.hasMaximumValue) {\n\t\t\tif (goodValue > this.maximumValue) {\n\t\t\t\tgoodValue = this.maximumValue;\n\t\t\t}\n\t\t}\n\n\t\tthis.bitmap[column][row] = goodValue;\n\t}", "public void ifThen(final Predicate<Boolean> cond, final Statement f) {\n synchronized (this) {\n if (cond.test(this.val)) {\n f.execute();\n }\n }\n }", "public void setIntValue(int newValue){\n value = newValue; //set value to newValue\n }", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}", "public void check(final Predicate<T> property);", "public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }", "public void observe(int val) {\n observe(val, 1);\n }", "private void setCurrentBean(Object newBean)\r\n {\r\n T oldValue = getValue();\r\n\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryRemoveNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n bean = newBean;\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryAddNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n T newValue = getValue();\r\n if (!Objects.equals(oldValue, newValue))\r\n {\r\n fireValueChanged(oldValue, newValue);\r\n }\r\n }", "private final void setValueImpl (String newValue) {\n String oldValue = this.getValue ();\n \n this.valueList.clear ();\n \n if ( newValue.length () != 0) {\n try {\n TreeText newText = new TreeText (newValue);\n this.valueList.add (newText);\n } catch (TreeException exc) {\n // something is wrong -- OK\n }\n }\n \n firePropertyChange (PROP_VALUE, oldValue, newValue);\n }", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void setValue(Object value) { this.value = value; }", "bool setFrequency(double newFrequency);", "private void setInternalValueFunction(Criterion criterion, ReversedLinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleDecrease());\n this.reversedValueFunctions.put(criterion, vf);\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "private void valueIteration(double discount, double threshold) {\n\t\tArrayList<Double> myStateValueCopy = new ArrayList<Double>(this.numMyStates);\n\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\tmyStateValueCopy.add((double) this.stateValueList.get(i));\n\t\t}\n\t\tdouble delta = 100.0;\n\t\tdo {\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble maxValue = -1000000000000000.0;\n\t\t\t\tmyState s = new myState(i);\n\t\t\t\tfor(myAction a: this.getActions(s)) {\n\t\t\t\t\tdouble qValue = this.rewardTable.get(i).get(a.id);\n\t\t\t\t\tfor(int k=0; k<this.numMyStates; k++) {\n\t\t\t\t\t\tdouble transProb = this.transitionProbabilityTable.get(i).get(a.id).get(k);\n\t\t\t\t\t\tqValue+=discount*(transProb*myStateValueCopy.get(k));\n\t\t\t\t\t}\n\t\t\t\t\tif(qValue>maxValue) {\n\t\t\t\t\t\tmaxValue = qValue;\n\t\t\t\t\t\tthis.policy.set(i, a.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmyStateValueCopy.set(i, maxValue);\n\t\t\t}\n\t\t\t// compute delta change in value list\n\t\t\tdelta = 0.0;\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble vsDelta = this.stateValueList.get(i) - myStateValueCopy.get(i);\n\t\t\t\tthis.stateValueList.set(i, (double) myStateValueCopy.get(i));\n\t\t\t\tdelta+= vsDelta*vsDelta;\n\t\t\t}\n\t\t} while(delta>threshold);\n\t\tSystem.gc();\n\t}", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "void setValue(T value);", "void setValue(T value);", "private void change(Node n, int value) {\n\t\tn.pendingVal = value;\n\t\tn.sum = n.size() * value;\n\t\tn.min = value;\n\t\tarray[n.from] = value;\n\n\t}", "@Override\n public void setValue(ELContext context, Object base, Object property,\n Object value) throws NullPointerException, PropertyNotFoundException,\n PropertyNotWritableException, ELException {\n }", "public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }" ]
[ "0.5702053", "0.5676041", "0.5441933", "0.53814626", "0.53559476", "0.5344194", "0.52817774", "0.52280575", "0.520287", "0.51958203", "0.5186019", "0.5171827", "0.5090885", "0.5028234", "0.50207907", "0.49758634", "0.49733618", "0.49602497", "0.4951166", "0.49450332", "0.4940395", "0.49396312", "0.49331832", "0.49288765", "0.4903886", "0.49035335", "0.49033317", "0.48896533", "0.48795527", "0.4870433", "0.48662698", "0.48567685", "0.48509705", "0.4836263", "0.48135146", "0.480813", "0.48032123", "0.48010552", "0.4800033", "0.47953868", "0.47891524", "0.47891194", "0.47862563", "0.47793803", "0.47694618", "0.47602803", "0.47443816", "0.47293538", "0.47247708", "0.47214073", "0.4720569", "0.47146153", "0.47085983", "0.46986556", "0.46964082", "0.46540236", "0.46522564", "0.46490875", "0.46470731", "0.4628206", "0.46230653", "0.46035582", "0.46004716", "0.45825768", "0.457747", "0.4573032", "0.45617336", "0.45476466", "0.45457652", "0.45450494", "0.45432764", "0.45409805", "0.45400327", "0.45384073", "0.45378903", "0.45370936", "0.45320404", "0.4528631", "0.45259607", "0.45207462", "0.45011464", "0.44977498", "0.44959444", "0.44868508", "0.44798008", "0.44773436", "0.44731265", "0.44634873", "0.44619778", "0.4450303", "0.44490382", "0.44421008", "0.44403583", "0.44343376", "0.44265577", "0.44265577", "0.4420397", "0.441268", "0.44125658", "0.44099584" ]
0.487373
29
Sets value if predicate(current) is true
default SELF setSecondIf(boolean second, LLogicalOperator predicate) { if (predicate.apply(this.second())) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "public void setCurrent(Node current) {\n this.current = current;\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "public abstract boolean setValue(Value value, boolean asAssignment);", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "public V setValue(V value);", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void setCurrent(int current) {\n\tif(current >= 0 && current <= ceiling) {\n\t this.current = current;\n\t}\n }", "default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }", "void setValue(V value);", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "public void apply() { writable.setValue(value); }", "public void setValue(A value) {this.value = value; }", "protected abstract void setValue(V value);", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "@Test\n public void setCurrent() throws SQLException {\n DataStorer.insertProfile(profile1);\n DataStorer.insertGoal(goal1, profile1);\n // Current for goal1 is currently true so change it to false\n boolean current = false;\n goal1.setCurrent(current);\n // Load profile1 from the database\n loadedProfile = DataLoader.loadProfile(profile1.getFirstName(), profile1.getLastName());\n\n //goal1.setCurrent(true);\n\n // Check that current was updated correctly in the database - will get index out of bounds exception if it was not\n assertEquals(current, loadedProfile.getPastGoals().get(0).isCurrent());\n\n // Reset current to true so other tests can use goal1\n goal1.setCurrent(true);\n }", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "public void setValue(Object value) { this.value = value; }", "public Object set(Object value, IMObject parent, NodeDescriptor node, AssertionDescriptor assertion) {\r\n Object result = value;\r\n ActionTypeDescriptor actionType = getActionType(Actions.set.toString());\r\n if (actionType != null) {\r\n try {\r\n result = evaluateAction(Actions.set.toString(), value, parent, node, assertion);\r\n } catch (Exception exception) {\r\n throw new AssertionException(\r\n AssertionException.ErrorCode.FailedToApplyAssertion,\r\n new Object[]{\"assert\", getName()}, exception);\r\n }\r\n }\r\n return result;\r\n }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "void setValue(T value);", "void setValue(T value);", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "public abstract void setValue(ELContext context, Object value);", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public ContentObject setCurrent(\n ContentObject value\n )\n {\n ContentObject replacedObject = objects.set(index,value);\n refresh();\n\n return replacedObject;\n }", "public boolean setPropertyCurrentAction(long aValue);", "public void setElseValue(Object pValue);", "@Override\n public void setValue(ELContext context, Object base, Object property,\n Object value) throws NullPointerException, PropertyNotFoundException,\n PropertyNotWritableException, ELException {\n }", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "protected void _setBooleanElement(int index, boolean value) {\n\t\tint bitOffset = Math.multiplyExact(index, this.step);\n\t\t// the number of the Bit in the byte it is in\n\t\tbyte bitnum = (byte) (bitOffset % Constants.BITS_PER_BYTE);\n\t\t// position of the byte in the data section\n\t\tint position = (this.ptr + bitOffset / Constants.BITS_PER_BYTE);\n\t\tbyte oldValue = this.segment.buffer.get(position);\n\t\t// the left side of the '|' zeros the selected bit; the right side sets the new value\n\t\tthis.segment.buffer.put(position, (byte) ((oldValue & (~(1 << bitnum))) | ((value ? 1 : 0) << bitnum)));\n\t}", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setValue(Object value);", "protected void doSetValue(Object _value) {\n\t\tthis.value = (Boolean) _value;\n\t}", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "public void setValue(ELContext context, Object base, Object property, Object val) {\n/* 349 */ context.setPropertyResolved(false);\n/* */ \n/* 351 */ for (int i = 0; i < this.size; i++) {\n/* 352 */ this.elResolvers[i].setValue(context, base, property, val);\n/* 353 */ if (context.isPropertyResolved()) {\n/* */ return;\n/* */ }\n/* */ } \n/* */ }", "public void setValue(Object val);", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public abstract void setValue(ELContext context,\n Object base,\n Object property,\n Object value);", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "@Override\n public void setValue(Node value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "void setValue(int value);", "@PortedFrom(file = \"Taxonomy.h\", name = \"setCurrent\")\n public void setCurrent(TaxonomyVertex cur) {\n current = cur;\n }", "void setValue(Object value);", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setValue(boolean value) {\n this.value = value;\n }", "public abstract void setValue(T value);", "public abstract void setValue(Context c, Object v) throws PropertyException;", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "@Test\n public void testSet_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void setValue(Value value) {\n this.value = value;\n }", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "public void setValue(final Object value) { _value = value; }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "public void setFlying ( boolean value ) {\n\t\texecute ( handle -> handle.setFlying ( value ) );\n\t}", "public void setCurrent(Prompt current) {\n\t\t\tthis.current = current;\n\t\t}", "protected void setCurrentColumnValue(String currentColumnValue) {\r\n this.currentColumnValue = currentColumnValue;\r\n }", "void setValueOfNode(String path, String value)\n throws ProcessingException;", "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "@Override\r\n\tpublic IPage<T> setCurrent(long current) {\n\t\treturn null;\r\n\t}", "public void setValue (V v) {\n value = v;\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public void setCurrentValue(int currentValue_) {\n\t\tif (currentValue_ > 0 && currentValue_ <= this.numSides) {\n\t\t\tthis.currentValue = currentValue_;\n\t\t} else {\n\t\t\tSystem.out.println(\"ERROR: New value must be greater than 1 and less than or equal the number of sides on the die.\");\n\t\t}\n\t}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "@Override\r\n\tpublic void setCurrent(double iCurrent) {\n\r\n\t}", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public void setValue(T value) {\n this.value = value;\n }", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public int setValue (int val);", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "void setNextValue() {\n this.value = this.value * 2;\n }", "public void ifThen(final Predicate<Boolean> cond, final Statement f) {\n synchronized (this) {\n if (cond.test(this.val)) {\n f.execute();\n }\n }\n }", "void setActiveOperand(double activeOperand);", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "public abstract void setValueAction(Object value);", "public static void setFound(boolean a){\n found = a;\n }", "@Override\n\tpublic void setBindingValue(T value, Object target, BindingEvaluationContext context) {\n\n\t}", "public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}", "protected void changeCurrent(int current) {\n\t\tif (current > mEnd) {\n\t\t\tcurrent = mStart;\n\t\t} else if (current < mStart) {\n\t\t\tcurrent = mEnd;\n\t\t}\n\t\tmPrevious = mCurrent;\n\t\tmCurrent = current;\n\t\tnotifyChange();\n\t\tupdateView();\n\t}", "public void setQueryMatchForKey(Object value, String selector, String key);", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "private void setSeen(boolean value)\n\t{\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].setSeen(value);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}" ]
[ "0.5984474", "0.5516796", "0.54791754", "0.54405916", "0.5439595", "0.5421406", "0.5377935", "0.5351316", "0.5331222", "0.53274745", "0.5321055", "0.5283311", "0.5255572", "0.522244", "0.5196468", "0.51864713", "0.5182087", "0.51770544", "0.5172624", "0.51242846", "0.51072246", "0.50906974", "0.5071529", "0.50703734", "0.50334734", "0.50141215", "0.50131035", "0.5011479", "0.5011479", "0.50094754", "0.50024617", "0.5002174", "0.49834093", "0.4981746", "0.4981746", "0.4966898", "0.49491295", "0.49451503", "0.49422267", "0.49317408", "0.49152756", "0.48975688", "0.48843807", "0.48698014", "0.4869442", "0.48519573", "0.48380688", "0.48348814", "0.48278826", "0.48185965", "0.48155743", "0.48107782", "0.4809707", "0.4801698", "0.48009077", "0.4789996", "0.47700965", "0.47697893", "0.47679365", "0.4759472", "0.47561565", "0.4752645", "0.47512084", "0.4749872", "0.4749732", "0.474894", "0.4743644", "0.47435993", "0.47432595", "0.47322708", "0.47314695", "0.4730288", "0.47198573", "0.47168753", "0.47129634", "0.46963438", "0.46944758", "0.46829647", "0.46794653", "0.4676477", "0.467424", "0.46729285", "0.46689722", "0.46613902", "0.4657557", "0.46552736", "0.46551788", "0.46518496", "0.464009", "0.46321982", "0.46210897", "0.46185362", "0.4617489", "0.46169809", "0.46138877", "0.46058398", "0.46039364", "0.4603149", "0.46029848", "0.46026236" ]
0.49951357
32
Sets new value if predicate predicate(newValue, current) is true.
default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) { if (predicate.apply(second, this.second())) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "public void setValue(int newValue) {\n if (mValue != newValue) {\n mValue = newValue;\n setUpdate(CONCEPT_VALUE);\n }\n }", "public void setValue(V newValue) {\n this.value = newValue;\n }", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "void valueChanged(T oldValue, T newValue);", "public void setValue(V newValue) {\r\n\t\tvalue = newValue;\r\n\t}", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public V setValue(V value);", "public void apply() { writable.setValue(value); }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "void onChange( T newValue );", "public abstract boolean setValue(Value value, boolean asAssignment);", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "void setValue(V value);", "protected abstract void setValue(V value);", "public void setValue(String value) {\n if(!watchedValue.equals(value)) {\n System.out.println(\"Value changed to new value: \"+value);\n watchedValue = value;\n\n // mark as value changed\n setChanged();\n // trigger notification with arguments\n notifyObservers(value);\n }\n }", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\n \n\t}", "default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "protected void soConsumerIndex(long newValue)\r\n/* 27: */ {\r\n/* 28:139 */ C_INDEX_UPDATER.lazySet(this, newValue);\r\n/* 29: */ }", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\n }", "@Override public final void setValue(V newValue) {\n versionedValue.updateAndGet(prev -> new VersionedValue<>(prev.getVersion() + 1, newValue));\n }", "public abstract void set(M newValue);", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "public void changeValue(ValueHolder newValue) {\r\n value = ((AttrObject) newValue).getValue();\r\n\tuserInfo = ((AttrObject) newValue).getUserInfo();\r\n\tnotifyFromAttr(); \r\n }", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "public static Action set(final ModifiableBoolean value, final ModifiableBoolean newValue) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n value.setValue(newValue);\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return new ModifiableBoolean[]{value, newValue};\n }\n\n @Override\n public String toString() {\n return \"Set(\" + (value != null ? value.toString() : \"null\")\n + \", \" + (newValue != null ? newValue.toString() : \"null\") + \")\";\n }\n };\n }", "public void setValue(A value) {this.value = value; }", "public void setValue(int newValue) {\t\r\n\t\tthis.value = newValue;\r\n\t}", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public static void UpdateOneByKey_Vaule(String collection_name, Document filter, Document update_value) {\r\n\t\tMongoCollection<Document> col = getCollection(collection_name);\r\n\t\tcol.updateMany(filter, new Document(\"$set\", update_value));\r\n\t}", "public void setValue(int new_value){\n this.value=new_value;\n }", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "public static <T> void updatePropertyIfAbsent(Supplier<T> getterMethod, Consumer<T> setterMethod, T newValue) {\n if (newValue != null && getterMethod.get() == null) {\n setterMethod.accept(newValue);\n }\n }", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public void setValue(Object newValue) {\n Object oldValue = value;\n value = newValue;\n modifiedEditor.setValue (value);\n firePropertyChange ();\n }", "void setPointChange(Integer setPoint, Integer expectedValue);", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "protected Tuple2<T, V> setValue(V newValue) {\n this.v = newValue;\n return this;\n }", "public void updatePropertyValue(URI newProperty, String newValue)\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n property = newProperty;\n value = newValue;\n annotation.getStatements().add(new Statement(subject.getUri(), property, value));\n annotation.update();\n }", "protected void changeValue() {\n \tif(value == null)\n \t\tvalue = true;\n \telse if(!value) { \n \t\tif (mode == Mode.THREE_STATE)\n \t\t\tvalue = null;\n \t\telse\n \t\t\tvalue = true;\n \t}else\n \t\tvalue = false;\n \t\n \tsetStyle();\n \t\n \tValueChangeEvent.fire(this, value);\n }", "public void setValue(Value value) {\n this.value = value;\n }", "private void checkAndSet() {\n if (value == null) {\n throw new IllegalArgumentException(EXC_NodeCannotBeNull());\n }\n\n if (equalNodes(value, selectedNodes)) {\n return;\n }\n\n List<Node> validNodes = null;\n for (int i = 0; i < value.length; i++) {\n if (value[i] == null) {\n throw new IllegalArgumentException(EXC_NoElementOfNodeSelectionMayBeNull());\n }\n \n if (!isUnderRoot(value[i])) {\n if (validNodes == null) {\n validNodes = new ArrayList<Node>(value.length);\n for (int j = 0; j < i; j++) {\n validNodes.add(value[j]);\n }\n }\n } else if (validNodes != null) {\n validNodes.add(value[i]);\n }\n }\n if (validNodes != null) {\n newValue = validNodes.toArray(new Node[validNodes.size()]);\n if (equalNodes(newValue, selectedNodes)) {\n return;\n } \n } else {\n newValue = value;\n }\n\n if ((newValue.length != 0) && (vetoableSupport != null)) {\n try {\n // we send the vetoable change event only for non-empty selections\n vetoableSupport.fireVetoableChange(PROP_SELECTED_NODES, selectedNodes, newValue);\n } catch (PropertyVetoException ex) {\n veto = ex;\n return;\n }\n }\n updateSelection();\n }", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "public void setValue(Object value) { this.value = value; }", "public final void lazySet(int newValue) {\n unsafe.putOrderedInt(this, valueOffset, newValue);\n }", "protected abstract void updateImpl(M newValue);", "public void setQueryMatchForKey(Object value, String selector, String key);", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(WHO_PROPERTY.equals(property)){\n\t\t\tchangeWhoProperty(newValueExpr);\n\t\t}\n\t\tif(PAID_TIME_PROPERTY.equals(property)){\n\t\t\tchangePaidTimeProperty(newValueExpr);\n\t\t}\n\t\tif(AMOUNT_PROPERTY.equals(property)){\n\t\t\tchangeAmountProperty(newValueExpr);\n\t\t}\n\n \n\t}", "public boolean setValue (\n\t\t\tfinal V value)\n\t\t{\n\t\t\t_value = value;\n\t\t\treturn true;\n\t\t}", "public abstract void updateFilter();", "public void setEvaluationProcedure(final Citation newValue) {\n checkWritePermission(evaluationProcedure);\n evaluationProcedure = newValue;\n }", "public void setValue(Object value, String parentLogDomain, boolean waitUntilUpdated) \n\t\t\tthrows AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tLOG.debug(\"Setting value of property \" + getStandardID() + \" to \" + value + \"...\");\n\t\tsetValue(value);\n\t\tupdate(parentLogDomain, waitUntilUpdated);\n\t}", "void setValue(T value);", "void setValue(T value);", "public void setNewPVal(double pVal) { this.pValAfter = pVal; }", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "@Test\n public void setCurrent() throws SQLException {\n DataStorer.insertProfile(profile1);\n DataStorer.insertGoal(goal1, profile1);\n // Current for goal1 is currently true so change it to false\n boolean current = false;\n goal1.setCurrent(current);\n // Load profile1 from the database\n loadedProfile = DataLoader.loadProfile(profile1.getFirstName(), profile1.getLastName());\n\n //goal1.setCurrent(true);\n\n // Check that current was updated correctly in the database - will get index out of bounds exception if it was not\n assertEquals(current, loadedProfile.getPastGoals().get(0).isCurrent());\n\n // Reset current to true so other tests can use goal1\n goal1.setCurrent(true);\n }", "bool setFrequency(double newFrequency);", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "public void setValue (V v) {\n value = v;\n }", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "public void updateCurrentPriceAndValue (Double newPrice) {\n\t\t\n\t\tcurrentPrice = newPrice;\n\t\tcurrentValue = currentPrice * quantity;\n\t\t\n\t\t\n\t}", "public void setIsour( java.lang.Boolean newValue ) {\n __setCache(\"isour\", newValue);\n }", "private void setCurrentBean(Object newBean)\r\n {\r\n T oldValue = getValue();\r\n\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryRemoveNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n bean = newBean;\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryAddNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n T newValue = getValue();\r\n if (!Objects.equals(oldValue, newValue))\r\n {\r\n fireValueChanged(oldValue, newValue);\r\n }\r\n }", "bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }", "public void setValue(Object val);", "private final void setValueImpl (String newValue) {\n String oldValue = this.getValue ();\n \n this.valueList.clear ();\n \n if ( newValue.length () != 0) {\n try {\n TreeText newText = new TreeText (newValue);\n this.valueList.add (newText);\n } catch (TreeException exc) {\n // something is wrong -- OK\n }\n }\n \n firePropertyChange (PROP_VALUE, oldValue, newValue);\n }", "public void observe(int val) {\n observe(val, 1);\n }", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }", "private void change(Node n, int value) {\n\t\tn.pendingVal = value;\n\t\tn.sum = n.size() * value;\n\t\tn.min = value;\n\t\tarray[n.from] = value;\n\n\t}", "public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }" ]
[ "0.60006934", "0.5581882", "0.52968955", "0.52942586", "0.5293127", "0.52424175", "0.52401125", "0.52367747", "0.5220226", "0.5186571", "0.516681", "0.51546264", "0.51346004", "0.5121217", "0.50979984", "0.50901043", "0.50787485", "0.5077679", "0.5030916", "0.5020283", "0.5007065", "0.5000193", "0.49830398", "0.49828675", "0.4974873", "0.49462354", "0.4942326", "0.4935086", "0.4907169", "0.49008083", "0.48997313", "0.489141", "0.48675558", "0.48554358", "0.48224822", "0.4800364", "0.47976288", "0.4795282", "0.47906342", "0.47898677", "0.47850072", "0.47836605", "0.47833532", "0.4781937", "0.4777331", "0.47724447", "0.4766285", "0.4760355", "0.4751511", "0.47280023", "0.47255814", "0.4715038", "0.47121283", "0.47120178", "0.47112566", "0.46989873", "0.46969652", "0.46809217", "0.46787202", "0.4670591", "0.46698073", "0.4664023", "0.46597365", "0.46527472", "0.4646715", "0.46424422", "0.4639823", "0.4629222", "0.46264803", "0.4617503", "0.46110135", "0.4601778", "0.45999664", "0.45971322", "0.4596812", "0.45940995", "0.45940995", "0.45912683", "0.45890668", "0.45857507", "0.4567633", "0.45574242", "0.45555705", "0.45504043", "0.4548806", "0.45457157", "0.45451206", "0.454438", "0.45420116", "0.45335868", "0.45238003", "0.4523145", "0.4522619", "0.45208943", "0.45185885", "0.45169163", "0.45128912", "0.45088083", "0.45064473", "0.44930804" ]
0.49385604
27
Sets new value if predicate predicate(current, newValue) is true.
default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) { if (predicate.apply(this.second(), second)) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMinValue);\n\t\t\tcurrent = Math.min(current, mMaxValue);\n\t\t}\n\t\t// int previous = mValue;\n\t\tmValue = current;\n\t\tupdateInputTextView();\n\t\tif (notifyChange) {\n\t\t\t// notifyChange(previous, current);\n\t\t}\n\t\tinitializeSelectorWheelIndices();\n\t\tinvalidate();\n\t}", "public void setValue(int newValue) {\n if (mValue != newValue) {\n mValue = newValue;\n setUpdate(CONCEPT_VALUE);\n }\n }", "public void setValue(V newValue) {\n this.value = newValue;\n }", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "public void setValue(V newValue) {\r\n\t\tvalue = newValue;\r\n\t}", "private void setInternalValueFunction(Criterion criterion, BooleanValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.hasBooleanDomain());\n this.booleanValueFunctions.put(criterion, vf);\n }", "public final void setInterceptor(Predicate<? extends Event> value)\n {\n myInterceptorProperty.set(value);\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n IntermediateType value\n ) {\n return given(predicate, (in, v) -> value);\n }", "void valueChanged(T oldValue, T newValue);", "void onChange( T newValue );", "public ContactListFilterPredicate value(String value) {\n this.value = value;\n return this;\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\n \n\t}", "public V setValue(V value);", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\n }", "boolean setValueForNode(Node node, TargetValue value) {\n\n // Assert integrity of target value. Other parts of code assume shared identities for bottom (UNDEFINED) and top\n // (NOT_A_CONSTANT) values. Maybe we should change this? But at least we don't fail silently now.\n\n assert !value.equals(TargetValue.getUnknown()) || value.equals(UNDEFINED);\n assert !value.equals(TargetValue.getBad()) || value.equals(NOT_A_CONSTANT);\n\n TargetValue oldValue = this.getValueForNode(node);\n TargetValue newValue = join(oldValue, value);\n\n // System.out.println(describe(oldValue) + \" ⊔ \" + describe(value) + \" = \" + describe(newValue) + \"\\t\" + node);\n\n this.values.put(node, newValue);\n\n return !oldValue.equals(newValue);\n }", "default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "public static <T> void updatePropertyIfAbsent(Supplier<T> getterMethod, Consumer<T> setterMethod, T newValue) {\n if (newValue != null && getterMethod.get() == null) {\n setterMethod.accept(newValue);\n }\n }", "public void setValue(XPath v)\n {\n m_valueExpr = v;\n }", "public static Action set(final ModifiableBoolean value, final ModifiableBoolean newValue) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n value.setValue(newValue);\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return new ModifiableBoolean[]{value, newValue};\n }\n\n @Override\n public String toString() {\n return \"Set(\" + (value != null ? value.toString() : \"null\")\n + \", \" + (newValue != null ? newValue.toString() : \"null\") + \")\";\n }\n };\n }", "default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }", "public void apply() { writable.setValue(value); }", "public void setValue(String value) {\n if(!watchedValue.equals(value)) {\n System.out.println(\"Value changed to new value: \"+value);\n watchedValue = value;\n\n // mark as value changed\n setChanged();\n // trigger notification with arguments\n notifyObservers(value);\n }\n }", "public void updatePropertyValue(URI newProperty, String newValue)\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n property = newProperty;\n value = newValue;\n annotation.getStatements().add(new Statement(subject.getUri(), property, value));\n annotation.update();\n }", "default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }", "protected void soConsumerIndex(long newValue)\r\n/* 27: */ {\r\n/* 28:139 */ C_INDEX_UPDATER.lazySet(this, newValue);\r\n/* 29: */ }", "public void setValue(int newValue) {\t\r\n\t\tthis.value = newValue;\r\n\t}", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void changeValue(ValueHolder newValue) {\r\n value = ((AttrObject) newValue).getValue();\r\n\tuserInfo = ((AttrObject) newValue).getUserInfo();\r\n\tnotifyFromAttr(); \r\n }", "@Override public final void setValue(V newValue) {\n versionedValue.updateAndGet(prev -> new VersionedValue<>(prev.getVersion() + 1, newValue));\n }", "protected Expression setFunctionOnContext(DynaBean contextBean, Object contextModelNode, Expression xPath, String prefix, QName leafQName) {\n \n if (xPath.toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n Expression xpression = xPath;\n if (xpression instanceof LocationPath) {\n Step[] originalSteps = ((LocationPath) xpression).getSteps();\n Step[] newSteps = new Step[originalSteps.length];\n for (int i=0;i<originalSteps.length;i++) {\n boolean stepChanged = false;\n Expression[] predicates = originalSteps[i].getPredicates();\n Expression[] newPredicates = new Expression[predicates.length];\n for (int j=0;j<predicates.length;j++) {\n if (predicates[j].toString().contains(DataStoreValidationUtil.CURRENT_PATTERN)) {\n if (predicates[j] instanceof CoreOperation) {\n Expression childExpression[] = ((Operation) predicates[j]).getArguments();\n Expression newChildExpression[] = new Expression[childExpression.length];\n for (int k = 0; k < childExpression.length; k++) {\n if (childExpression[k] instanceof ExtensionFunction) {\n String leafName = childExpression[k-1].toString();\n newChildExpression[k] = evaluateCurrent((ExtensionFunction) childExpression[k], contextBean,\n contextModelNode, prefix, leafName);\n } else if (childExpression[k] instanceof ExpressionPath) {\n newChildExpression[k] = evaluateCurrent((ExpressionPath) childExpression[k], contextModelNode,\n prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else if (childExpression[k] instanceof CoreOperation) {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = setFunctionOnContext(contextBean, contextModelNode,\n\t\t\t\t\t\t\t\t\t\t\t\t(CoreOperation) childExpression[k], prefix, leafQName);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnewChildExpression[k] = childExpression[k];\n\t\t\t\t\t\t\t\t\t}\n }\n newPredicates[j] = JXPathUtils.getCoreOperation((CoreOperation) predicates[j], newChildExpression);\n stepChanged = true;\n }\n } else {\n newPredicates[j] = predicates[j];\n }\n }\n \n if (stepChanged) {\n NodeTest nodeTest = originalSteps[i].getNodeTest();\n if (nodeTest instanceof NodeNameTest) {\n NodeNameTest nameNode = (NodeNameTest) nodeTest;\n newSteps[i] = new YangStep(nameNode.getNodeName(), nameNode.getNamespaceURI(), newPredicates);\n } else {\n newSteps[i] = originalSteps[i];\n }\n } else {\n newSteps[i] = originalSteps[i];\n }\n }\n return new LocationPath(((LocationPath)xpression).isAbsolute(), newSteps);\n } else if (xpression instanceof ExpressionPath) {\n return evaluateCurrent((ExpressionPath)xpression, contextModelNode, prefix, leafQName);\n } else if (xpression instanceof ExtensionFunction) {\n return evaluateCurrent((ExtensionFunction) xpression, contextBean, contextModelNode, prefix, leafQName.getLocalName());\n } else if (xpression instanceof CoreOperation) {\n Expression[] newExpressions = new Expression[((CoreOperation) xpression).getArguments().length];\n Expression[] expressions = ((CoreOperation) xpression).getArguments();\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreOperation((CoreOperation) xpression, newExpressions);\n } else if (xpression instanceof CoreFunction) {\n Expression[] expressions = ((CoreFunction) xpression).getArguments();\n Expression[] newExpressions = new Expression[expressions.length];\n int index = 0;\n for (Expression expression:expressions) {\n newExpressions[index++] = setFunctionOnContext(contextBean, contextModelNode, expression, prefix, leafQName);\n }\n return JXPathUtils.getCoreFunction( ((CoreFunction) xpression).getFunctionCode(), newExpressions);\n }\n }\n return xPath;\n }", "public static void UpdateOneByKey_Vaule(String collection_name, Document filter, Document update_value) {\r\n\t\tMongoCollection<Document> col = getCollection(collection_name);\r\n\t\tcol.updateMany(filter, new Document(\"$set\", update_value));\r\n\t}", "void setValue(V value);", "public abstract boolean setValue(Value value, boolean asAssignment);", "public void setValue(boolean value)\n {\n if(this.valueBoolean == value)\n {\n return;\n }\n this.valueBoolean = value;\n treeModel.nodeChanged(this.treeNode);\n }", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "protected abstract void setValue(V value);", "public void setValue(Object newValue) {\n Object oldValue = value;\n value = newValue;\n modifiedEditor.setValue (value);\n firePropertyChange ();\n }", "public abstract void set(M newValue);", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n BiFunction<? super In, ? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return new ConditionalEnd<>(\n getter,\n predicate,\n newGetter -> new MutableConstructionStep<>(builder, newGetter, safetyMode),\n mapper,\n safetyMode\n );\n }", "public final void lazySet(int newValue) {\n unsafe.putOrderedInt(this, valueOffset, newValue);\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(WHO_PROPERTY.equals(property)){\n\t\t\tchangeWhoProperty(newValueExpr);\n\t\t}\n\t\tif(PAID_TIME_PROPERTY.equals(property)){\n\t\t\tchangePaidTimeProperty(newValueExpr);\n\t\t}\n\t\tif(AMOUNT_PROPERTY.equals(property)){\n\t\t\tchangeAmountProperty(newValueExpr);\n\t\t}\n\n \n\t}", "protected Tuple2<T, V> setValue(V newValue) {\n this.v = newValue;\n return this;\n }", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "private void setInternalValueFunction(Criterion criterion, LinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleCrescent());\n this.linearValueFunctions.put(criterion, vf);\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public void setOp ( boolean value ) {\n\t\texecute ( handle -> handle.setOp ( value ) );\n\t}", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "protected abstract void updateImpl(M newValue);", "public void setEvaluationProcedure(final Citation newValue) {\n checkWritePermission(evaluationProcedure);\n evaluationProcedure = newValue;\n }", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "public void updateValue(String newValue)\n throws ROSRSException {\n updatePropertyValue(property, newValue);\n }", "void setPointChange(Integer setPoint, Integer expectedValue);", "public <IntermediateType> ConditionalEnd<In, CurrentType, IntermediateType, MutableConstructionStep<In, IntermediateType, Out>> given(\n Predicate<? super CurrentType> predicate,\n Function<? super CurrentType, ? extends IntermediateType> mapper\n ) {\n return given(predicate, (in, v) -> mapper.apply(v));\n }", "public void setQueryMatchForKey(Object value, String selector, String key);", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public MethodPredicate withPredicate(Predicate<Method> predicate) {\n this.predicate = predicate;\n return this;\n }", "public FieldPredicate withPredicate(Predicate<Field> predicate) {\n this.predicate = predicate;\n return this;\n }", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public void setValue(Object value, String parentLogDomain, boolean waitUntilUpdated) \n\t\t\tthrows AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tLOG.debug(\"Setting value of property \" + getStandardID() + \" to \" + value + \"...\");\n\t\tsetValue(value);\n\t\tupdate(parentLogDomain, waitUntilUpdated);\n\t}", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "private void setInternalValueFunction(Criterion criterion) {\n checkNotNull(criterion);\n if (criterion.isDoubleCrescent()) {\n this.linearValueFunctions.put(criterion, null);\n } else if (criterion.isDoubleDecrease()) {\n this.reversedValueFunctions.put(criterion, null);\n } else if (criterion.hasBooleanDomain()) {\n this.booleanValueFunctions.put(criterion, new BooleanValueFunction(true));\n } else {\n throw new IllegalArgumentException(\n \"The type associated with the Criterion must be boolean or non-boolean\");\n }\n }", "public void setValue(A value) {this.value = value; }", "public void setIsour( java.lang.Boolean newValue ) {\n __setCache(\"isour\", newValue);\n }", "public void changePropery(String property, String newValueExpr) {\n \t\n\t\tif(NAME_PROPERTY.equals(property)){\n\t\t\tchangeNameProperty(newValueExpr);\n\t\t}\n\t\tif(MOBILE_PROPERTY.equals(property)){\n\t\t\tchangeMobileProperty(newValueExpr);\n\t\t}\n\t\tif(EMAIL_PROPERTY.equals(property)){\n\t\t\tchangeEmailProperty(newValueExpr);\n\t\t}\n\t\tif(FOUNDED_PROPERTY.equals(property)){\n\t\t\tchangeFoundedProperty(newValueExpr);\n\t\t}\n\n \n\t}", "public void setValue(Boolean newLiteralValue) {\n\t\tsuper.setLiteralValue(newLiteralValue);\n\t}", "public void setValue(Value value) {\n this.value = value;\n }", "public V getAndSet(final V newValue) {\n\t\tsynchronized (this.monitor) {\n\t\t\tfinal V prev = this.value;\n\t\t\tthis.value = newValue;\n\t\t\treturn prev;\n\t\t}\n\t}", "public void setValue(int column, int row, int newValue) {\n\t\tint goodValue = newValue;\n\t\tif (goodValue < 0) {\n\t\t\tgoodValue = 0;\n\t\t}\n\t\tif (this.hasMaximumValue) {\n\t\t\tif (goodValue > this.maximumValue) {\n\t\t\t\tgoodValue = this.maximumValue;\n\t\t\t}\n\t\t}\n\n\t\tthis.bitmap[column][row] = goodValue;\n\t}", "public void ifThen(final Predicate<Boolean> cond, final Statement f) {\n synchronized (this) {\n if (cond.test(this.val)) {\n f.execute();\n }\n }\n }", "public void setIntValue(int newValue){\n value = newValue; //set value to newValue\n }", "private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }", "public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}", "public void check(final Predicate<T> property);", "public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }", "public void observe(int val) {\n observe(val, 1);\n }", "private void setCurrentBean(Object newBean)\r\n {\r\n T oldValue = getValue();\r\n\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryRemoveNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n bean = newBean;\r\n if (bean != null)\r\n {\r\n PropertyChangeUtils.tryAddNamedPropertyChangeListenerUnchecked(\r\n bean, name, propertyChangeListener);\r\n }\r\n T newValue = getValue();\r\n if (!Objects.equals(oldValue, newValue))\r\n {\r\n fireValueChanged(oldValue, newValue);\r\n }\r\n }", "private final void setValueImpl (String newValue) {\n String oldValue = this.getValue ();\n \n this.valueList.clear ();\n \n if ( newValue.length () != 0) {\n try {\n TreeText newText = new TreeText (newValue);\n this.valueList.add (newText);\n } catch (TreeException exc) {\n // something is wrong -- OK\n }\n }\n \n firePropertyChange (PROP_VALUE, oldValue, newValue);\n }", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void setValue(Object value) { this.value = value; }", "bool setFrequency(double newFrequency);", "private void setInternalValueFunction(Criterion criterion, ReversedLinearValueFunction vf) {\n checkNotNull(vf);\n checkNotNull(criterion);\n checkArgument(criterion.isDoubleDecrease());\n this.reversedValueFunctions.put(criterion, vf);\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "private void valueIteration(double discount, double threshold) {\n\t\tArrayList<Double> myStateValueCopy = new ArrayList<Double>(this.numMyStates);\n\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\tmyStateValueCopy.add((double) this.stateValueList.get(i));\n\t\t}\n\t\tdouble delta = 100.0;\n\t\tdo {\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble maxValue = -1000000000000000.0;\n\t\t\t\tmyState s = new myState(i);\n\t\t\t\tfor(myAction a: this.getActions(s)) {\n\t\t\t\t\tdouble qValue = this.rewardTable.get(i).get(a.id);\n\t\t\t\t\tfor(int k=0; k<this.numMyStates; k++) {\n\t\t\t\t\t\tdouble transProb = this.transitionProbabilityTable.get(i).get(a.id).get(k);\n\t\t\t\t\t\tqValue+=discount*(transProb*myStateValueCopy.get(k));\n\t\t\t\t\t}\n\t\t\t\t\tif(qValue>maxValue) {\n\t\t\t\t\t\tmaxValue = qValue;\n\t\t\t\t\t\tthis.policy.set(i, a.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmyStateValueCopy.set(i, maxValue);\n\t\t\t}\n\t\t\t// compute delta change in value list\n\t\t\tdelta = 0.0;\n\t\t\tfor(int i=0; i<this.numMyStates; i++) {\n\t\t\t\tdouble vsDelta = this.stateValueList.get(i) - myStateValueCopy.get(i);\n\t\t\t\tthis.stateValueList.set(i, (double) myStateValueCopy.get(i));\n\t\t\t\tdelta+= vsDelta*vsDelta;\n\t\t\t}\n\t\t} while(delta>threshold);\n\t\tSystem.gc();\n\t}", "public void setKnownValue(boolean isKnownValue) {\r\n\t\t\tthis.isKnownValue = isKnownValue;\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\t// if this leaf should return a constant, then evaluationList is useless...\r\n\t\t\t\tthis.setEvaluationList(null);\r\n\t\t\t\t//this.setEvaluationList(new ArrayList<EntityAndArguments>());\r\n\t\t\t}\r\n\t\t}", "void setValue(T value);", "void setValue(T value);", "private void change(Node n, int value) {\n\t\tn.pendingVal = value;\n\t\tn.sum = n.size() * value;\n\t\tn.min = value;\n\t\tarray[n.from] = value;\n\n\t}", "@Override\n public void setValue(ELContext context, Object base, Object property,\n Object value) throws NullPointerException, PropertyNotFoundException,\n PropertyNotWritableException, ELException {\n }", "public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }" ]
[ "0.5701735", "0.567706", "0.5440111", "0.53802073", "0.53554827", "0.53429127", "0.5283081", "0.52288485", "0.5201554", "0.5196137", "0.51866406", "0.51715565", "0.5090957", "0.5029188", "0.5022094", "0.49757457", "0.49742422", "0.4960465", "0.49500522", "0.49452335", "0.494055", "0.49404794", "0.4933054", "0.49294284", "0.490441", "0.49038625", "0.4902705", "0.4889484", "0.48788157", "0.48736656", "0.48697665", "0.48650083", "0.4855679", "0.48496836", "0.48352185", "0.4814836", "0.48082963", "0.48034552", "0.480195", "0.4800843", "0.47894594", "0.4789158", "0.47847378", "0.47778213", "0.47695678", "0.4760319", "0.47422355", "0.47303084", "0.47236502", "0.47224185", "0.47207683", "0.47134486", "0.47103372", "0.4697858", "0.46976948", "0.4655019", "0.46526134", "0.46481803", "0.4647217", "0.46283686", "0.46230918", "0.4602691", "0.4601116", "0.45829353", "0.45774636", "0.45725825", "0.45627996", "0.45471647", "0.4546353", "0.4545905", "0.45426083", "0.45411253", "0.45410714", "0.45388922", "0.45380506", "0.45363238", "0.4530534", "0.45300934", "0.45247456", "0.45204553", "0.45005247", "0.44991994", "0.4495438", "0.4486816", "0.44788152", "0.4476661", "0.44733694", "0.4464272", "0.4461713", "0.4451158", "0.4448872", "0.44431674", "0.44405437", "0.4434373", "0.44267458", "0.44267458", "0.442052", "0.4413081", "0.44120073", "0.4410072" ]
0.47954702
40
This is a repository interface for Investment details
@Repository public interface InvestmentRepository extends JpaRepository<Investment, Integer> { public List<Investment> findByinvestmentInvestorId(int investorId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface InviteRepository extends Repository<Invite> {\n}", "@Override\r\n public Class<Investment> getEntityType() {\n return Investment.class;\r\n }", "public interface InviteRepository extends CrudRepository<Invite, Integer> {\n List<Invite> findByEmail(String email);\n List <Invite> findByWeddingId(Integer weddingId);\n Invite findOneByEmail(String email);\n}", "public interface InvitationService {\n\n Invitation createInvitation(String email);\n\n Invitation addInvitation(Invitation invitation);\n\n void addInvitations(List<Invitation> invitationList);\n\n //get records from db\n Invitation getInvitationById(int invitationId);\n\n List<Invitation> getAllInvitations();\n\n List<Invitation> getInvitationsByEvent(int eventId);\n\n List<Invitation> getInvitationsByUser(int userId);\n\n //update record in db\n boolean editInvitation(Invitation invitation);\n\n void editInvitationList(Event event);\n\n boolean respondToInvitation(int eventId, int userId, int responseId);\n\n //delete records from db\n boolean deleteInvitation(int invitationId);\n\n void deleteInvitationsByEvent(int eventId);\n\n void deleteInvitationsByUser(int userId);\n\n void deleteAllInvitations();\n}", "public Investment() {\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface InviteRepository extends JpaRepository<Invite, Long> {\n\n\n List<Invite> findAllBySentTo_Id(Long id);\n}", "public interface ShipmentRepository {\n /**\n * Return shipment for the specified order.\n *\n * @param orderId the order identifier\n *\n * @return the shipment for the specified order;\n * {@code null} if the shipment doesn't exist\n */\n Shipment getShipment(String orderId);\n\n /**\n * Save shipment details into the repository.\n *\n * @param shipment the shipment to save\n */\n void saveShipment(Shipment shipment);\n}", "public Investor(String name) {\n super(name, \"Investor\", 80, 100, 110, 2);\n }", "InviteEntity getInvitationById(Integer inviteId);", "public interface AnnouncementStatusRepository extends CrudRepository<AnnouncementStatus, Integer>{\n\tpublic AnnouncementStatus findById(int id);\n\tpublic List<AnnouncementStatus> getAnnouncementStatusById(int id);\n}", "public interface ShipmentRepository extends CrudRepository<ShipmentModel, Long> {\n\n ShipmentModel findByShipmentId(long shipmentId);\n\n}", "public Invitation(){}", "public interface VoucherRepository {\n //可领优惠券列表\n List<VoucherEntity> getVoucherList();\n //优惠券详情\n VoucherEntity getVoucherDetail(String id);\n //更新优惠券\n void updateVoucher(VoucherEntity voucherEntity);\n //获取过期优惠券列表\n List<VoucherEntity> getOverDueList();\n}", "public interface ReminderRepository {\n public void add(ReminderEntity reminderEntity);\n public void update(ReminderEntity reminderEntity);\n public ReminderEntity remove(Integer id);\n public ReminderEntity find(Integer id);\n public List<ReminderEntity> findAll();\n}", "@Repository\npublic interface EnterprisesRepository extends JpaRepository<Enterprises, Long> {\n\n Enterprises findById(Long id);\n\n/* @Query(\"SELECT e.id,e.entpName,e.contactPerson,e.createdDate FROM Enterprises e\")\n List<Enterprises> findAllEnterprises();*/\n\n @Query(\"SELECT e FROM Enterprises e where e.id = :id\")\n Enterprises findEnterprise(@Param(\"id\") Long id);\n}", "Invitation getInvitationById(int invitationId);", "public interface IAcquestRepository {\n //createAcquest is used to create a new acquest in database\n boolean createAcquest(Acquest acquest);\n //getAcquest is used for getting selected acquest from database\n Acquest getAcquest(int Acquest_id);\n //getAllAcquests is used to get all acquests from database\n List<Acquest> getAllAcquests();\n}", "public interface Investor<K> {\r\n\r\n /**\r\n * Method to enable the investor to create a portfolio. A Portfolio is simply a collection of\r\n * stocks. The only restriction imposed on an investor for creating a portfolio is that he\r\n * shouldn't have two portfolio's name with the same name.\r\n *\r\n * @param portfolioName the String that is to be the portfolio's name.\r\n */\r\n void createPortFolio(String portfolioName);\r\n\r\n /**\r\n * Method to enable the investor to buy some shares of a particular stock for a portfolio at a\r\n * given date.\r\n *\r\n * @param portfolio The portfolio to which the user wants to add the stock he is buying.\r\n * @param stock The String representation of the stock the user intends to buy.\r\n * @param count The integral count of the number of shares of the stock the user intends to\r\n * buy.\r\n * @param date The time for which the user intends to buy shares of a particular stock.\r\n * @throws IllegalArgumentException when portfolio is not present or stock is unavailable ot\r\n * invalid values are inputed for count and date.\r\n */\r\n void buyStock(String portfolio, String stock, Integer count, Date date)\r\n throws IllegalArgumentException;\r\n\r\n /**\r\n * Method to return the total value of shares of a Portfolio. The restriction here is that the\r\n * Portfolio for which the user intends to fetch the total value has to be one of the investors\r\n * existing Portfolios.\r\n *\r\n * @param date The time for which the user intends to buy shares of a particular stock.\r\n * @param portfolioName the portfolio for which value is to be returned.\r\n * @return String that represents each stock and its value.\r\n * @throws IllegalArgumentException if the user doesn't have a portfolio with the same name as the\r\n * portfolio passed as an argument or date is invalid or Date is\r\n * invalid.\r\n */\r\n String getPortfolioValueByStocks(String portfolioName, Date date) throws IllegalArgumentException;\r\n\r\n /**\r\n * Method to return the total cost basis of shares of a Portfolio. The restriction here is that\r\n * the Portfolio for which the user intends to fetch the cost basis has to be one of the investors\r\n * existing Portfolios.\r\n *\r\n * @param date The time at and before which the user intends to check for cost basis of\r\n * his portfolio.\r\n * @param portfolioName the portfolio for which the cost basis is to be returned.\r\n * @return String that represents each stock and its value.\r\n * @throws IllegalArgumentException if the user doesn't have a portfolio with the same name as the\r\n * portfolio passed as an argument or date is invalid.\r\n */\r\n String getPortfolioCostBasis(String portfolioName, Date date) throws IllegalArgumentException;\r\n\r\n /**\r\n * Method to return the total value of shares of a Portfolio. The restriction here is that the\r\n * Portfolio for which the user intends to fetch the cost basis has to be one of the investors\r\n * existing Portfolios.\r\n *\r\n * @param date The time at which the user intends to check for value of his portfolio.\r\n * @param portfolioName the portfolio for which the cost basis is to be returned.\r\n * @return String that is the total value of the portfolio at given date.\r\n * @throws IllegalArgumentException if the user doesn't have a portfolio with the same name as the\r\n * portfolio passed as an argument or date is invalid.\r\n */\r\n String getPortfolioTotalValue(String portfolioName, Date date) throws IllegalArgumentException;\r\n\r\n /**\r\n * Method to return a String that contains the cost basis of each stock till a particular date.\r\n *\r\n * @param portfolioName the name of the portfolio to be considered.\r\n * @param date the date before which all stocks bought are to be considered.\r\n * @return the String that contains the cost basis of each stock till a particulat date.\r\n */\r\n String getPortfolioCostBasisByStocks(String portfolioName, Date date)\r\n throws IllegalArgumentException;\r\n\r\n /**\r\n * Method to return all Portfolios of a user.\r\n *\r\n * @return String that repreesnts all portfolio's of a user.\r\n */\r\n String getAllPortfolio();\r\n}", "IPayerEntity withPayerEntity();", "public interface ICommitteeService {\n /**\n *\n * @param orgnizationList\n * @param number\n * @param page\n * @return\n * @throws DMException\n */\n List<Person> getCandidatePerson(List<Orgnization> orgnizationList,String number,Page page) throws DMException;\n /**\n *\n * @param condition\n * @param page\n * @return\n * @throws DMException\n */\n List<CommitteeInfo> getByCondition(CommitteeCondition condition, Page page) throws DMException;\n\n /**\n *\n * @param condition\n * @return\n * @throws DMException\n */\n int countByCondition(CommitteeCondition condition)throws DMException;\n\n /**\n *\n * @param activitistInfo\n * @throws DMException\n */\n void createCommitteeInfo(CommitteeInfo activitistInfo) throws DMException;\n\n /**\n *\n * @param activitistInfo\n * @throws DMException\n */\n void deleteCommitteeInfo(CommitteeInfo activitistInfo) throws DMException;\n\n /**\n *\n * @param activitistId\n * @return\n * @throws DMException\n */\n CommitteeInfo getById(int activitistId) throws DMException;\n\n /**\n *\n * @param person\n * @return\n * @throws DMException\n */\n CommitteeInfo getByPerson(Person person) throws DMException;\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ShipmentActivityRepository extends JpaRepository<ShipmentActivity, Long> {}", "public Invitation() {\n }", "public interface PaymentInfoRepo {\n PaymentInfo findByMatch(PaymentInfo paymentInfo);\n\n PaymentInfo create(PaymentInfo paymentInfo);\n\n void update(PaymentInfo paymentInfo);\n}", "public interface PresupuestosExpedRepository\nextends CrudRepository<PresupuestosExped, PresupuestosExpedPK>, PresupuestosExpedRepositoryCustom {\n\t/**\n\t * UMESCI-713 Find PresupuestosExped by the parameters\n\t *\n\t * @param numExp\n\t * @param tipMovValue\n\t * @param billStatusActive\n\t * @return\n\t */\n\tPresupuestosExped findPresupuestosExpedByIdNumExpAndTipMovAndEstado(String numExp, String tipMovValue,\n\t\t\tString billStatusActive);\n\n\n}", "@Repository\npublic interface RedeemRepo extends JpaRepository<Redeem , Long> {\n}", "public interface MeetingRepository extends JpaRepository<Meeting, Long> {\n}", "public interface OrderInvoiceRepository extends Repository<OrderInvoice, Long> {\n\n}", "public interface alertRepo {\n\n List<alerts> findAll();\n\n List<alerts> findAlertsFromVehicle(String vin);\n\n alerts create(alerts alert);\n}", "public interface Pledge_Service {\n\n PledgeEnt getPledge(String id);\n List<PledgeEnt> getPledgeList(String line_no,String CUSTCOD);\n\n}", "IPayerEntity getPayerEntity();", "public interface ShipperRepositoryTest extends JpaRepository<Shipper, ShipperKey> {\n}", "public interface MemberService {\n\n public MemberPaginationObject getMember(int step, MemberFilter filter, int count);\n\n public MemberPaginationObject getMember(int step, int count,int timeExpiry);\n\n public void saveMember(Member mem) ;\n\n public void editMember(Member mem) ;\n\n public void editAddress(Address addr) ;\n\n public Member getMemberFromId(long id);\n\n public int getMemberPackageUtilizationPercentage(long id);\n\n public CustomerPackageEntityPaginationObject getCustomerPackageEntityList(long id,int step,int count);\n\n public CustomerPackageEntity getCustomerPackageEntityFromId(long id);\n\n public Date getExpiryDateAssociatedWithMember(long memberId,long custPkgEntityId);\n\n public void editCustomerPackageEntity(CustomerPackageEntity mem);\n\n public void saveCustomerPackageEntity(CustomerPackageEntity obj) ;\n\n public void saveProgressText(MemberPackageProgressEntity o1);\n\n public CustomerPackageEntityReadResponse getCustomerPackageEntityReadResponse(long id);\n\n public CustomerPackageEntity getCustomerPackageEntityFromPkgId(long pkgId);\n\n}", "public interface IInvoiceService {\r\n\r\n\t/**\r\n\t * Get a list of invoices from persistence layer\r\n\t * @return all items\r\n\t */\r\n\tList<InvoiceDTO> fetchAll();\r\n\r\n\t/**\r\n\t * Get invoice from persistence layer\r\n\t * @param id a unique lookup\r\n\t * @return an invoice with a matching ID\r\n\t */\r\n\tInvoiceDTO fetchByID(int id);\r\n\r\n\t/**\r\n\t * Add the given DTO\r\n\t * @param invoiceDTO an invoice dto without an ID\r\n\t * @return Success or failure\r\n\t */\r\n\tboolean add(InvoiceDTO invoiceDTO);\r\n\t\r\n\t/**\r\n\t * Edit the given DTO by ID\r\n\t * @param itemDTO an invoice dto with an ID\r\n\t * @return Success or failure\r\n\t */\r\n\tboolean edit(InvoiceDTO invoiceDTO);\r\n\r\n}", "public interface InvitationsDatabaseService extends InvitationsDatabaseServiceSubject, DatabaseService {\n\n /**\n * Create an invitation document for the receiving user's received invitations in\n * this service's provider database.\n *\n * <p>Updates the invitation's ID to that of the newly created document</p>\n * @param invitation the invitation being sent to the user.\n * @return a task containing the result of trying to create the invitation document.\n */\n Task<?> addInvitationForReceivingUser(Invitation invitation);\n\n /**\n * Create an invitation document for the sending user's sent invitations in\n * this service's provider database.\n * @param invitation the invitation being sent by the user.\n * @return a task containing the result of trying to create the invitation document.\n */\n Task<?> addInvitationForSendingUser(Invitation invitation);\n\n /**\n * Update the given invitation's document for the receiving user in this service's provider\n * database.\n * @param invitation the invitation that is being updated. Must have an invitation ID.\n */\n void updateInvitationForReceivingUser(Invitation invitation);\n\n /**\n * Update the given invitation's document for the sending user in this service's provider\n * database.\n * @param invitation the invitation that is being updated. Must have an invitation ID.\n */\n void updateInvitationForSendingUser(Invitation invitation);\n\n /**\n * Query this service's provider database for the given user's received invitations that have\n * {@link InvitationStatus} equal to PENDING.\n * <p>On complete, calls {@link InvitationsDatabaseServiceSubject#notifyObserversPendingInvitations(List)} to\n * notify observers that the invitations are ready to read.</p>\n * @param user\n */\n void getUserPendingInvitations(IUser user);\n void addInvitationsSnapshotListener(IUser user);\n}", "public Invitation(int personId, Party party, String status) {\n this.personId = personId;\n this.party = party;\n this.status = status;\n }", "public interface INewsInfoRepository {\n}", "public interface InspectAcceptanceRepository {\n /**\n * 按条件检索工程检查列表\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceList(Map map, WebPage webPage,String staffId);\n /**\n * 按条件检索工程检查列表\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceList(Map map, WebPage webPage);\n /**\n * 工程检查列表\n *\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceAllList();\n\n /**\n * 按条件检索工程检查列表(不带分页)\n *\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceAllList(Map map);\n\n /**\n * 新增工程检查信息\n *\n * @param inspectAcceptanceEntity\n * @return\n */\n boolean addProjectExamineInfo(ProjectExamineEntity inspectAcceptanceEntity);\n\n /**\n * 检索已进行的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchHasBeenGetOnByProjectNum(String projectNum);\n\n /**\n * 检索合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchQualifiedByProjectNum(String projectNum);\n\n /**\n * 检索不合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchUnqualifiedByProjectNum(String projectNum);\n\n /**\n * 检索不合格的工程检查信息\n *\n * @param projectNum\n * @return\n */\n int searchOnePassByProjectNum(String projectNum);\n\n /**\n * 统计工程检查信息(前台)\n *\n * @param projectNum\n * @return\n */\n List<Object[]> searchAcceptanceListByProjectNum(String projectNum);\n\n /**\n * 根据楼栋检索工程检查批次列表\n *\n * @param buildingId\n * @param projectCategoryName\n * @return\n */\n List<Object[]> searchAcceptanceBatchList(String buildingId, String projectCategoryName);\n\n /**\n * 检索工程检查批次详情\n *\n * @param batchId\n * @return\n */\n ProjectExamineEntity searchAcceptanceBatchInfo(String batchId);\n\n /**\n * 修改工程检查批次\n *\n * @param projectExamineEntity\n * @return\n */\n boolean modifyAcceptanceBatchInfo(ProjectExamineEntity projectExamineEntity);\n\n /**\n * 检查工程验收是否有更新\n *\n * @param id\n * @param beginDateNew\n * @param projectNum\n * @return\n */\n boolean searchToUpdateForAcceptance(String id, String beginDateNew, String projectNum,String creatBy,String type,String day7Ago);\n\n /**\n * 下载更新数据\n *\n * @param id\n * @param timeStamp\n * @param projectNum\n * @return\n */\n List<ProjectExamineEntity> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum,String day7Ago);\n\n /**\n * 查询工程抄送人\n *\n * @param batchId\n * @return\n */\n List<ProjectCopyEntity> getProjectCopyList(String batchId);\n\n /**\n * 查询工程抄送详情\n *\n * @param copyId\n * @return\n */\n List<ProjectCopyDetailsEntity> getProjectCopyDetailsList(String copyId);\n\n /**\n * 保存抄送\n */\n boolean saveProjectCopy(ProjectCopyEntity projectCopy);\n\n /**\n * 删除抄送\n * id: 外键id\n */\n boolean deleteProjectCopy(String id);\n\n /**\n * 保存抄送人员\n */\n boolean saveProjectCopyDetails(ProjectCopyDetailsEntity projectCopyDetails);\n\n /**\n * 删除抄送人员\n * id: 外键id\n * type:模块\n */\n boolean deleteProjectCopyDetails(String id);\n\n /**\n * 统计\n *\n * @param map\n * @param webPage\n * @return\n */\n List<ProjectExamineEntity> searchInspectAcceptanceCountList(Map map, WebPage webPage);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map, WebPage webPage,String staffId);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map, WebPage webPage);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n List<Object[]> searchAcceptanceCountList(Map map,String staffId);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int searchInspectAcceptanceCount(Map map);\n\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int getCount(Map map,String staffId);\n /**\n * 统计\n *\n * @param map\n * @return\n */\n int getCount(Map map);\n /**\n * 查询自己的批次\n *\n * @param batchId\n * @param staffId\n * @return\n */\n ProjectExamineEntity searchAcceptanceBatchInfoByStaffId(String batchId, String staffId);\n\n /**\n * 根据APPID检索批次信息\n *\n * @param id\n * @return\n */\n ProjectExamineEntity getProjectExamineByAppId(String id);\n\n /**\n * 整改中的总数(当前登录人)\n *\n * @param staffId\n * @return\n */\n int getRectificationCount(String staffId);\n\n List<Object[]> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum, String day7Ago, String staffId, String type);\n\n List<Object[]> getAllProjectAcceptanceQuestion(String id, String timeStamp, String projectNum, String staffId, String type);\n}", "public interface DealerRepository {\n public List getDealerByLocation(Point point);\n\n public Dealer save(Dealer dealer);\n\n public List getMatchingDealers(Dealer dealer, Query query);\n\n public void updateDealerSpecials(Dealer dealer);\n\n public List<Dealer> findAllDealers();\n\n public Dealer getDealerById(String id);\n}", "@Repository\npublic interface InternshipRepository extends CrudRepository<Internship,Integer>, PagingAndSortingRepository<Internship, Integer> {\n Internship findById(int id);\n// Internship findByStudentId(int studentId);\n}", "public interface FixerIncomeService {\n List<FixerIncome> listIncome(Integer fixerId, Date startDate, Date endDate, boolean withPaymentInfo);\n}", "public interface IModeratorProposalRepository extends JpaRepository<ModeratorProposal, Integer> {\n}", "public interface ContractDAO {\n /**\n * Find all list.\n *\n * @return the list\n */\n List<Contract> findAll();\n\n /**\n * Find by id contract.\n *\n * @param id the id\n * @return the contract\n */\n Contract findById(int id);\n\n /**\n * Add message.\n *\n * @param customer the customer\n * @return the message\n */\n Message add(Contract customer);\n\n /**\n * Gets revenue for customer.\n *\n * @param id the id\n * @return the revenue for customer\n */\n Message getRevenueForCustomer(int id);\n\n /**\n * Gets revenue for type.\n *\n * @param type the type\n * @return the revenue for type\n */\n Message getRevenueForType(String type);\n}", "public interface OfferingRepository extends JpaRepository<Offering, Long>{\r\n\r\n}", "@Override\npublic void investment() {\n\t\n}", "public interface OutboundRepository {\n\n void persist(OutboundEntity message) throws Exception;\n\n OutboundEntity findByMessageId(String messageId) throws Exception;\n\n void update(OutboundEntity message) throws Exception;\n\n OutboundEntity findByMessageId(String messageId, String tableName) throws Exception;\n\n}", "public interface Partner_apiRepository extends JpaRepository<Partner_api,Long> {\n\n}", "public Asistencia(Investigador inv ) throws SQLException{\r\n this.inv = inv;\r\n Calendar now = Calendar.getInstance(); //trae el calendario\r\n horaEntrada = new Timestamp(now.getTime().getTime());\r\n horaSalida = null;\r\n this.ps = null;\r\n doEntrada(); //setea la id\r\n\r\n }", "InviteEntity accept(Integer inviteId);", "public interface IBadgeDao {\n /**\n * Get all\n * @return\n */\n List<BadgeEntity> get();\n\n /**\n * get by id\n * @param id\n * @return\n */\n BadgeEntity get(Integer id);\n\n /**\n * update + save\n * @param answerEntity\n * @return\n */\n BadgeEntity update(BadgeEntity answerEntity);\n boolean delete(int id);\n}", "public interface RepoPrestamos {\n\n public List<Prestamo> getPrestamosPendientes();\n public Prestamo getPrestamo(Long id);\n public void addPrestamo(Prestamo prestamo);\n public void removePrestamo(Prestamo prestamo);\n public void updatePrestamo(Prestamo prestamo);\n\n}", "public interface ProviderCommandRequestService {\n\n /**\n * Save a providerCommandRequest.\n *\n * @param providerCommandRequest the entity to save\n * @return the persisted entity\n */\n ProviderCommandRequest save(ProviderCommandRequest providerCommandRequest);\n\n /**\n * Get all the providerCommandRequests.\n *\n * @return the list of entities\n */\n List<ProviderCommandRequest> findAll();\n\n /**\n * Get the \"id\" providerCommandRequest.\n *\n * @param id the id of the entity\n * @return the entity\n */\n ProviderCommandRequest findOne(Long id);\n\n /**\n * Delete the \"id\" providerCommandRequest.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n /**\n * Find by Request Id.\n *\n * @param id the id of the entity -- Does NOT require fully object.\n */\n ProviderCommandRequest findByRequestId(Long requestId);\n}", "@Override\n\tpublic ActRepository<CreditrepayplanAct> getActRepository() {\n\t\treturn creditrepayplanActRepository;\n\t}", "public interface ProjectTeamMemberEducationService {\n void save(ProjectTeamMemberEducation projectTeamMemberEducation);\n\n void deleteAll(Integer memberId);\n\n void delete(ProjectTeamMemberEducation projectTeamMemberEducation);\n\n int insertList(List<ProjectTeamMemberEducation> projectTeamMemberEducationList);\n\n List<ProjectTeamMemberEducation> select(ProjectTeamMemberEducation projectTeamMemberEducation);\n}", "public interface TrackingRepositoryI {\n\n void saveLocation(String lat, String lng, Object object);\n void setmRestAdapter(Object object);\n int getIdFromEmployee();\n}", "@Repository\npublic interface InvoicesRepository extends JpaRepository<Invoice, Integer> {\n\n /**\n * Get the list of invoices of the defined debtor with pagination\n *\n * @return all invoices of this debtor\n */\n List<Invoice> getByDebtorIdOrderByDateDesc(int debtorId, Pageable page);\n\n /**\n * Get the list of invoices of the defined debtor without pagination\n *\n * @return all invoices of this debtor\n */\n List<Invoice> getByDebtorIdOrderByDateDesc(int debtorId);\n\n /**\n * Get the list of invoices of the defined debtor in ascending order\n *\n * @return all invoices of this debtor\n */\n List<Invoice> getByDebtorIdOrderByDateAsc(int debtorId);\n\n /**\n * Get the invoice by id\n *\n * @return invoice\n */\n Invoice getById(int invoiceId);\n}", "public interface MemberDao extends JpaRepository<Member, Long>{\n}", "public interface RepoModule {\n void saveModule(Module module) throws Exception;\n void saveLocalObj(Collection<Module> modules) throws Exception;\n void updateFinalStatus(String vehicleNo) throws Exception;\n void updateFlag(String vehicleNo, String checkPointName) throws Exception;\n void deleteTableData()throws Exception;\n void deleteTableData(String vehicleNo) throws Exception;\n Set<Module> uploadModuleData(String userId) throws Exception;\n Integer checkDataInspections() throws Exception;\n List<String> getLocalVehicleList()throws Exception;\n List<Module> uploadData(String userId)throws Exception;\n Set<Module> selectAll()throws Exception;\n}", "public interface SandboxRepository extends JpaRepository<SandboxEntity, Long> {\n\n}", "@Resource\npublic interface CreditHistoryRepository {\n\n /**\n * Lookup all of the transactions based on the customer's email.\n *\n * @param email the customer's email\n * @return the customer's history\n */\n Collection lookupTransactions(String email);\n\n /**\n * Lookup all of the transactions based on the customer's email and the reason.\n *\n * @param email the customer's email\n * @param reason the credit decision reason\n * @return the customer's history\n */\n Collection lookupTransactions(String email, String reason);\n\n\n void storeTransaction(String email, CreditTransactionV1 creditTransactionV1);\n\n}", "public interface InvMainDao extends GenericDao<InvMain, String> {\n\tpublic JQueryPager getInvMainCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic boolean checkAllInitInvMainConfirm(String orgCode,String copyCode,String kjYear,String storeId);\n\tpublic InvMain getInvMainByNo(String no, String orgCode, String copyCode);\n\tpublic boolean checkAllDocsInStore(String storeId,String orgCode,String copyCode,String kjYear);\n\tpublic void deleteInvDictAccount(String storeId, String orgCode,String copyCode,String kjYear);\n\n}", "@ImplementationClassName(\"fi.weasel.commitment2050.commitmentanalysis.model.impl.CommitmentImpl\")\n@ProviderType\npublic interface Commitment extends CommitmentModel, PersistedModel {\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify this interface directly. Add methods to {@link fi.weasel.commitment2050.commitmentanalysis.model.impl.CommitmentImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.\n\t */\n\tpublic static final Accessor<Commitment, String> COMMITMENT_ID_ACCESSOR = new Accessor<Commitment, String>() {\n\t\t\t@Override\n\t\t\tpublic String get(Commitment commitment) {\n\t\t\t\treturn commitment.getCommitmentId();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<String> getAttributeClass() {\n\t\t\t\treturn String.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<Commitment> getTypeClass() {\n\t\t\t\treturn Commitment.class;\n\t\t\t}\n\t\t};\n\n\tpublic java.util.List<fi.weasel.commitment2050.commitmentanalysis.model.Operation> getOperations();\n\n\tpublic void setOperations(\n\t\tjava.util.List<fi.weasel.commitment2050.commitmentanalysis.model.Operation> operations);\n\n\tpublic java.util.List<fi.weasel.commitment2050.commitmentanalysis.model.DoneOperation> getDoneOperations();\n\n\tpublic void setDoneOperations(\n\t\tjava.util.List<fi.weasel.commitment2050.commitmentanalysis.model.DoneOperation> doneOperations);\n\n\tpublic java.util.List<fi.weasel.commitment2050.commitmentanalysis.model.Report> getGenericReports();\n\n\tpublic void setGenericReports(\n\t\tjava.util.List<fi.weasel.commitment2050.commitmentanalysis.model.Report> genericReports);\n}", "public interface MemberDao {\n\n /**\n * Creates persistent representation of Member in the database. Sets the ID.\n *\n * @param member Member object to be persisted\n *\n */\n void create(Member member);\n\n /**\n * Updates entity data in database\n *\n * @param member Member object to be updated\n *\n */\n void update(Member member);\n\n /**\n * Finds a member in the database by its ID\n *\n * @param id member id\n * @return Found Member object or null if no loan was found.\n *\n */\n Member findById(Long id);\n\n /**\n * Retrieves all Member from the database\n *\n * @return List of all Members\n *\n */\n List<Member> findAll();\n\n /**\n * Finds members by name\n *\n * @param name of member\n * @return list of members\n */\n List<Member> findByName(String name);\n\n /**\n * Finds members by name\n *\n * @param email of member\n * @return list of members\n */\n List<Member> findByEmail(String email);\n\n /**\n * Removes given Member from the database\n *\n * @param member member to be deleted\n *\n */\n void delete(Member member); \n}", "public String getInvestorName() {\r\n return investorName;\r\n }", "public interface DailyPatrolInspectionRepository {\n /**\n * 按项目判断是否有数据更新\n */\n boolean checkInspectionByApp(String id, String timeStamp, String projectId, String creaBy, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionListByApp(String id, String timeStamp, String projectId, String creaid, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionList(Map map, WebPage webPage);\n\n /**\n * 导出所有日常巡检的整改单\n */\n List<Object[]> getexportExcelList(Map map);\n\n DailyPatrolInspectionEntity getInspectionEntityById(String id);\n\n /**\n * 根据appid存入\n */\n DailyPatrolInspectionEntity getInspectionEntityByAppId(String id);\n\n /**\n * 保存日常巡检的整改单\n */\n void saveInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存日常巡检的整改单\n */\n void updateInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存图片\n */\n void saveProjectImages(ProjectImagesEntity projectImages);\n\n\n /**\n * 删除不包含的图片\n */\n void deleteByNotIds(List<String> id);\n\n /**\n * 保存图片\n */\n List<ProjectImagesEntity> getProjectImages(String id);\n\n /**\n * 删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImages(String id, String type);\n\n /**\n * 保存抄送\n */\n void saveProjectCopy(ProjectCopyEntity projectCopy);\n\n /**\n * 删除抄送\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopy(String id, String type);\n\n /**\n * 保存抄送人员\n */\n void saveProjectCopyDetails(ProjectCopyDetailsEntity ProjectCopyDetails);\n\n /**\n * 删除抄送人员\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopyDetails(String id);\n\n /**\n * 查询抄送人员\n * id: 外键id\n * type:模块\n */\n List<Object[]> getProjectCopy(String id);\n\n /**\n * 查询整改记录\n */\n\n List<DailyPatrolInspectionDetailsEntity> getDailyPatrolInspectionDetails(String id);\n\n /**\n * 按项目查询统计信息\n */\n List<Object[]> searchInspection(String projectId);\n\n\n /**\n * 查询日常巡检代办理事项\n */\n List<Object[]> getInspectionListByAppTodo(String id, String timeStamp, String creaid);\n\n\n /**\n * 查询日常巡检待办事项是否有新数据更心\n */\n boolean checkInspectionTodo(String id, String timeStamp, String creaBy);\n\n /**\n * 保存巡检详情\n *\n * @param dailyPatrolInspectionDetailsEntity\n */\n void saveInspectionDetais(DailyPatrolInspectionDetailsEntity dailyPatrolInspectionDetailsEntity);\n\n\n /**\n * 批量删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImagesList(List id, String type);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map);\n\n int searchDailyPatrolInspectionCount(Map map);\n\n int getCount(Map map);\n\n /**\n * 统计项目\n */\n int getProjectCount(Map map);\n\n /**\n * 统计区域\n */\n int getOperatCount(Map map);\n\n /**\n * 查询日常巡检详情\n */\n Object[] getInspectionListByAdmin(String id);\n\n\n DailyPatrolInspectionEntity getDailyPatrolInspection(String id);\n\n /**\n * 日常巡检 按照当前登录人的员工id 查询整改中本人所负责人数据\n */\n int inspectionCount(String userId);\n\n\n List<DailyPatrolInspectionEntity> getDailyPatrolInspectionByInspectionId(String inspectionId);\n\n\n /**\n * 日常巡检统计(项目)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(区域)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(项目)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map);\n\n /**\n * 日常巡检统计(区域)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map);\n}", "@Repository\npublic interface FeeBaseService {\n List<FeeBase> selectList(Integer roleId);\n}", "public interface ReservationRepository extends CrudRepository<Reservation, Integer> {\n\n}", "public interface PaymentContextRepository extends CrudRepository<PaymentContext, Long> {\n\n}", "public interface SavingsRepository extends Repository<Savings,Long>{\n}", "public interface EnrollmentService {\n\n /**\n * Save a enrollment.\n *\n * @param enrollment the entity to save\n * @return the persisted entity\n */\n Enrollment save(Enrollment enrollment);\n\n /**\n * Get all the enrollments.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<Enrollment> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" enrollment.\n *\n * @param id the id of the entity\n * @return the entity\n */\n Enrollment findOne(Long id);\n\n /**\n * Delete the \"id\" enrollment.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "public interface RechargeListExRepo {\n Observable<RechargeListExEntity> getRechargeListEx();\n}", "public interface AnnouncementService {\n List<Announcement> getAllAnnouncements();\n\n List<Announcement> getAnnouncement(String announcementID);\n\n /**\n * 返回最新的几个公告\n * @param amount 需要的公告个数\n * @return 以时间倒序的公告列表\n */\n List<Announcement> getNewAnnouncements(int amount);\n\n /**\n * 获取某个学生的所选的课程的公告,可选返回个数\n * @param studentID 学生ID\n * @param limited 可选通知个数,0表示所有公告,正整数表示对应小于总公告范围的数量\n * @return 以时间倒序的公告列表\n */\n List<Announcement> getStudentCoursesAnnouncementsWithLimited(String studentID, int limited);\n\n void addAnnouncement(Announcement announcement);\n\n void deleteAnnouncement(String announcementID);\n\n void updateAnnouncement(Announcement announcement);\n\n List<Announcement> getCourseAnnouncements(String courseID);\n}", "public interface NotificationRepository extends CrudRepository<Notification,String>, NotificationRepositoryAddon {\r\n\r\n Notification findByPublisherIdAndPublisherNotificationId (String publisherId, String publisherNotificationId);\r\n \r\n List<Notification> findByPublisherId (String publisherId);\r\n\r\n List<Notification> findByPublisherIdAndTopic (String publisherId, String topic);\r\n \r\n List<Notification> findDeletableNotification(Date date);\r\n\r\n}", "public interface AttachmentRepo extends CrudRepository<Attachment,Long> {\n}", "@Repository\npublic interface IPaymentRepository extends JpaRepository<Payment, Long> {\n}", "public interface PurchaseRecordDetailRepository extends JpaRepository<PurchaseRecordDetail, Long> {\r\n}", "public interface SavingsRepository extends Repository<Savings, Long> {\n}", "public interface TransactionRepository extends CrudRepository<Transaction> {\r\n\r\n}", "public Integer getInvestId() {\r\n\t\treturn investId;\r\n\t}", "public interface EthTransactionPendingDao {\n\n EthTransactionPending save(EthTransactionPending ethTransactionPending);\n\n List<EthTransactionPending> getTransactions(long limit);\n\n void delete(String hash);\n}", "@Override\n public String toString() {\n return \"Invitation{\" +\n \"personId=\" + personId +\n \", party=\" + party +\n \", status='\" + status + '\\'' +\n '}';\n }", "public interface BookAccountRepository {\n\n\t/**\n\t * Number of records needed to be processed.\n\t * \n\t * @return number of found records\n\t */\n\tlong countUnprocessedOrders();\n\n\t\n\tList<BookAccount> findAll();\n\t\n\t/**\n\t * Finds all records where current time \n\t * is later than return time.\n\t * \n\t * @return list of orders\n\t */\n\tList<BookAccount> findAllDebtors();\n\t\n\tvoid addFine(long bookAccountId, double fine);\n\t\n\tBookAccount findById(long orderId);\n\t\n\tvoid processNewOrder(long orderId, String borrowType, Timestamp returnTime);\n\t\n\tvoid deleteOrder(long idOrder);\n\t\n\tvoid createNewOrder(long idAccount, long idBook);\n\t\n\t/**\n\t * Finds all orders for certain account\n\t * \n\t * @param idAccount \n\t * @return list of orders\n\t */\n\tList<BookAccount> findAllForAccount(long idAccount);\n\n}", "public interface InventoryLineRepository extends CrudRepository<InventoryLine, Long> {\n List<InventoryLine> findAllByInventoryAndDeleted(Inventory inventory, boolean deleted);\n}", "public interface PurchPaymentDao extends JpaRepository<PurchPayment, Serializable> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface InternshipTaskRepository extends JpaRepository<InternshipTask, Long> {\n\n /**\n * 根据实习表 ID 查询实习任务\n * @param interId\n * @return\n */\n List<InternshipTask> findByInterIdId(Long interId);\n\n}", "public interface EntitlementPersistence extends BasePersistence<Entitlement> {\n /*\n * NOTE FOR DEVELOPERS:\n *\n * Never modify or reference this interface directly. Always use {@link EntitlementUtil} to access the entitlement persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.\n */\n\n /**\n * Caches the entitlement in the entity cache if it is enabled.\n *\n * @param entitlement the entitlement\n */\n public void cacheResult(\n de.fraunhofer.fokus.movepla.model.Entitlement entitlement);\n\n /**\n * Caches the entitlements in the entity cache if it is enabled.\n *\n * @param entitlements the entitlements\n */\n public void cacheResult(\n java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> entitlements);\n\n /**\n * Creates a new entitlement with the primary key. Does not add the entitlement to the database.\n *\n * @param entitlementId the primary key for the new entitlement\n * @return the new entitlement\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement create(\n long entitlementId);\n\n /**\n * Removes the entitlement with the primary key from the database. Also notifies the appropriate model listeners.\n *\n * @param entitlementId the primary key of the entitlement\n * @return the entitlement that was removed\n * @throws de.fraunhofer.fokus.movepla.NoSuchEntitlementException if a entitlement with the primary key could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement remove(\n long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;\n\n public de.fraunhofer.fokus.movepla.model.Entitlement updateImpl(\n de.fraunhofer.fokus.movepla.model.Entitlement entitlement, boolean merge)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the entitlement with the primary key or throws a {@link de.fraunhofer.fokus.movepla.NoSuchEntitlementException} if it could not be found.\n *\n * @param entitlementId the primary key of the entitlement\n * @return the entitlement\n * @throws de.fraunhofer.fokus.movepla.NoSuchEntitlementException if a entitlement with the primary key could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement findByPrimaryKey(\n long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;\n\n /**\n * Returns the entitlement with the primary key or returns <code>null</code> if it could not be found.\n *\n * @param entitlementId the primary key of the entitlement\n * @return the entitlement, or <code>null</code> if a entitlement with the primary key could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement fetchByPrimaryKey(\n long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns all the entitlements where companyId = &#63;.\n *\n * @param companyId the company ID\n * @return the matching entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findByc(\n long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns a range of all the entitlements where companyId = &#63;.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param companyId the company ID\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @return the range of matching entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findByc(\n long companyId, int start, int end)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns an ordered range of all the entitlements where companyId = &#63;.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param companyId the company ID\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n * @return the ordered range of matching entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findByc(\n long companyId, int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the first entitlement in the ordered set where companyId = &#63;.\n *\n * @param companyId the company ID\n * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n * @return the first matching entitlement\n * @throws de.fraunhofer.fokus.movepla.NoSuchEntitlementException if a matching entitlement could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement findByc_First(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;\n\n /**\n * Returns the first entitlement in the ordered set where companyId = &#63;.\n *\n * @param companyId the company ID\n * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n * @return the first matching entitlement, or <code>null</code> if a matching entitlement could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement fetchByc_First(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the last entitlement in the ordered set where companyId = &#63;.\n *\n * @param companyId the company ID\n * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n * @return the last matching entitlement\n * @throws de.fraunhofer.fokus.movepla.NoSuchEntitlementException if a matching entitlement could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement findByc_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;\n\n /**\n * Returns the last entitlement in the ordered set where companyId = &#63;.\n *\n * @param companyId the company ID\n * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n * @return the last matching entitlement, or <code>null</code> if a matching entitlement could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement fetchByc_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the entitlements before and after the current entitlement in the ordered set where companyId = &#63;.\n *\n * @param entitlementId the primary key of the current entitlement\n * @param companyId the company ID\n * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n * @return the previous, current, and next entitlement\n * @throws de.fraunhofer.fokus.movepla.NoSuchEntitlementException if a entitlement with the primary key could not be found\n * @throws SystemException if a system exception occurred\n */\n public de.fraunhofer.fokus.movepla.model.Entitlement[] findByc_PrevAndNext(\n long entitlementId, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;\n\n /**\n * Returns all the entitlements.\n *\n * @return the entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns a range of all the entitlements.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @return the range of entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findAll(\n int start, int end)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns an ordered range of all the entitlements.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n * @return the ordered range of entitlements\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findAll(\n int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Removes all the entitlements where companyId = &#63; from the database.\n *\n * @param companyId the company ID\n * @throws SystemException if a system exception occurred\n */\n public void removeByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Removes all the entitlements from the database.\n *\n * @throws SystemException if a system exception occurred\n */\n public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the number of entitlements where companyId = &#63;.\n *\n * @param companyId the company ID\n * @return the number of matching entitlements\n * @throws SystemException if a system exception occurred\n */\n public int countByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the number of entitlements.\n *\n * @return the number of entitlements\n * @throws SystemException if a system exception occurred\n */\n public int countAll()\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns all the application_ entitlements associated with the entitlement.\n *\n * @param pk the primary key of the entitlement\n * @return the application_ entitlements associated with the entitlement\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Application_Entitlement> getApplication_Entitlements(\n long pk) throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns a range of all the application_ entitlements associated with the entitlement.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param pk the primary key of the entitlement\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @return the range of application_ entitlements associated with the entitlement\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Application_Entitlement> getApplication_Entitlements(\n long pk, int start, int end)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns an ordered range of all the application_ entitlements associated with the entitlement.\n *\n * <p>\n * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.\n * </p>\n *\n * @param pk the primary key of the entitlement\n * @param start the lower bound of the range of entitlements\n * @param end the upper bound of the range of entitlements (not inclusive)\n * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n * @return the ordered range of application_ entitlements associated with the entitlement\n * @throws SystemException if a system exception occurred\n */\n public java.util.List<de.fraunhofer.fokus.movepla.model.Application_Entitlement> getApplication_Entitlements(\n long pk, int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns the number of application_ entitlements associated with the entitlement.\n *\n * @param pk the primary key of the entitlement\n * @return the number of application_ entitlements associated with the entitlement\n * @throws SystemException if a system exception occurred\n */\n public int getApplication_EntitlementsSize(long pk)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns <code>true</code> if the application_ entitlement is associated with the entitlement.\n *\n * @param pk the primary key of the entitlement\n * @param application_EntitlementPK the primary key of the application_ entitlement\n * @return <code>true</code> if the application_ entitlement is associated with the entitlement; <code>false</code> otherwise\n * @throws SystemException if a system exception occurred\n */\n public boolean containsApplication_Entitlement(long pk,\n long application_EntitlementPK)\n throws com.liferay.portal.kernel.exception.SystemException;\n\n /**\n * Returns <code>true</code> if the entitlement has any application_ entitlements associated with it.\n *\n * @param pk the primary key of the entitlement to check for associations with application_ entitlements\n * @return <code>true</code> if the entitlement has any application_ entitlements associated with it; <code>false</code> otherwise\n * @throws SystemException if a system exception occurred\n */\n public boolean containsApplication_Entitlements(long pk)\n throws com.liferay.portal.kernel.exception.SystemException;\n}", "public interface PlanOrderADao extends CrudRepository<PlanOrderA, Long> {\n\n}", "@SuppressWarnings(\"unused\")\npublic interface CrewMemberRepository extends JpaRepository<CrewMember,Long> {\n\n List<CrewMember> findByCrewId(Long crewId);\n\n}", "public interface ProjectRepository extends BasePagingAndSortingRepository<ProjectEntity, Long> {\n\n boolean changeStatus(ProjectEntity project, StatusEnum newStatus);\n\n List<ProjectEntity> findByOwner(String client);\n\n List<ProjectEntity> findForUser(String client);\n\n List<ProjectEntity> findForMember(Long memberId, String client);\n\n\n}", "public interface LostItemDAO\n{\n void create(LostItem item, int lostItemID,int userid);\n List<LostItem> getItemList(String query);\n int getUserID(LostItem item);\n String getEmailID(int ID);\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface InvoiceHistoryRepository extends JpaRepository<InvoiceHistory, Long> {\n}", "public Investigator() {}", "public interface ReimbursementDao {\n\t\n\tReimbursementDao currentImplementation = new ReimbursementDaoImpl();\n\t\n\t/************************************************\n\t * \tUser get requests\t\t\t\t\t\t\t*\n\t ***********************************************/\n\t/**\n\t * Get the reimbursements by the user ID\n\t * @param userId = the user ID of an employee (not a manager)\n\t * @return return the list reimbursements\n\t */\n\tList<Reimbursement> getReimbursementsById(int userId);\n\t\n\n\t/************************************************\n\t * \tUser post requests\t\t\t\t\t\t\t*\n\t ***********************************************/\n\t/**\n\t * Post a new reimbursements request.\n\t * @param amount = the being requested for reimbursement \n\t * @param submitted = the date the reimbursement was submitted\n\t * @param description = why the user needed a reimbursements\n\t * @param author = the user that submitted the reimbursement form\n\t * @param statusId = the status ID should be (1)\n\t * @param typeId = the type ID should be (1)\n\t * @return true if updated, false if note updated\n\t */\n\tboolean postReimbursementToDataBase(int amount, String description, int author, int statusId, int typeId);\n\t\n\n\t/************************************************\n\t * \tAdmin get and update (post) requests\t\t*\n\t ***********************************************/\n\t/**\n\t * Get all reimbursements for the admin user\n\t * @return return a list of reimbursements\n\t */\n\tList<Reimbursement> adminGetReimbursements();\n\t\n\t/**\n\t * Get all reimbursements for the admin user and displays information based on their status\n\t * @param status = the status by number ID\n\t * @return return the list reimbursements\n\t */\n\tList<Reimbursement> adminGetReimbursementsByStatus(int statusId);\n\t\n\t/**\n\t * This is for updating a row in the database\n\t * @param userId = the userId of the admin\n\t * @param statusId = the status (2 if approved, 3 if denied)\n\t * @param reimbId = the id for the reimbursement that is being updated\n\t * @return true if updated, false if note updated\n\t */\n\tboolean adminUpdate(int userId, int statusId, int reimbId);\n\t\n}", "public interface GoalRepository extends JpaRepository<Goal,Long> {\n\n}", "public String getInvestor() {\r\n\t\treturn investor;\r\n\t}", "public interface ActionRepository extends JpaRepository<Action, Integer> {\n\n}", "public interface InterviewerService {\n\n Interviewer createInterviewer(Interviewer interviewer);\n\n Interviewer readInterviewer(String id);\n\n Interviewer findInterviewer(String login);\n\n List<Interviewer> readAllInterviewers();\n\n Interviewer updateInterviewer(Interviewer interviewer);\n\n boolean deleteInterviewer(String id);\n}", "public interface IMember {\n\n\n /**\n * Returns the title for this member.\n *\n * @return the title for this member.\n */\n String getTitle();\n\n /**\n * Sets the title for this member.\n *\n * @param title the title for this member.\n */\n void setTitle(String title);\n\n /**\n * Returns the initials for this member.\n *\n * @return the initials for this member.\n */\n String getInitials();\n\n /**\n * Sets the initials for this member.\n *\n * @param initials the initials for this member.\n */\n void setInitials(String initials);\n\n /**\n * Returns the firstName for this member.\n *\n * @return the firstName for this member.\n */\n String getFirstName();\n\n /**\n * Sets the firstName for this member.\n *\n * @param firstName the firstName for this member.\n */\n void setFirstName(String firstName);\n\n /**\n * Returns the surname for this member.\n *\n * @return the surname for this member.\n */\n String getSurname();\n\n /**\n * Sets the surname for this member.\n *\n * @param surname the surname for this member.\n */\n void setSurname(String surname);\n\n /**\n * Returns the idNumber for this member.\n *\n * @return the idNumber for this member.\n */\n String getIdNumber();\n\n /**\n * Sets the idNumber for this member.\n *\n * @param idNumber the idNumber for this member.\n */\n void setIdNumber(String idNumber);\n\n /**\n * Returns the {@link GenderStatus genderStatus} for this member.\n *\n * @return the {@link GenderStatus genderStatus} for this member.\n */\n GenderStatus getGenderStatus();\n\n /**\n * Sets the {@link GenderStatus genderStatus} for this member.\n *\n * @param genderStatus the {@link GenderStatus genderStatus} for this member.\n */\n void setGenderStatus(GenderStatus genderStatus);\n\n /**\n * Returns the date of birth for this member.\n *\n * @return the date of birth for this member.\n */\n LocalDate getDateOfBirth();\n\n /**\n * Sets the date of birth for this member.\n *\n * @param dateOfBirth the date of birth for this patient.\n */\n void setDateOfBirth(LocalDate dateOfBirth);\n\n /**\n * Returns the mugShot for this member.\n *\n * @return the mugShot for this member.\n */\n ILogo getMugShot();\n\n /**\n * Sets the mugShot for this member.\n *\n * @param mugShot for this member.\n */\n void setMugShot(ILogo mugShot);\n\n /**\n * Gets the {@link ISystemUser user} of the member.\n *\n * @return { {@link ISystemUser user} of the member.\n */\n ISystemUser getSystemUser();\n\n /**\n * Sets the {@link ISystemUser user} of the member.\n *\n * @param user of the area user was created member.\n */\n void setSystemUser(ISystemUser user);\n}", "public interface IInventoryDao {\n\n\t// public boolean ingredientAvailable(String name, int count);\n\tpublic List<InventoryEntry> getInventoryEntries();\n\n\tpublic void removeIngredients(Map<String, Integer> ingredientMap);\n\n\tpublic BigDecimal getIngredientCost(String name);\n\n\tpublic int getIngredientCount(String iname);\n\n\tpublic InventoryEntry getInventoryEntry(String name);\n\n\tpublic void updateInventoryEntry(InventoryEntry entry);\n}", "public interface IVendedor extends JpaRepository<Vendedor, Integer> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ChatInvitationRepository extends JpaRepository<ChatInvitation, Long>, JpaSpecificationExecutor<ChatInvitation> {\n\n}" ]
[ "0.6801583", "0.6676036", "0.6633593", "0.6602116", "0.6404072", "0.6396059", "0.604053", "0.59762585", "0.5971555", "0.5966714", "0.5946365", "0.59460473", "0.59278756", "0.5870428", "0.5855118", "0.58262163", "0.57567644", "0.5746025", "0.5737712", "0.57281035", "0.5721465", "0.5718748", "0.571142", "0.56939274", "0.56826293", "0.56747955", "0.5662025", "0.5639211", "0.5600415", "0.55637395", "0.5539767", "0.5536185", "0.55247027", "0.5517906", "0.5512723", "0.54959637", "0.5487872", "0.5465871", "0.5463462", "0.5453898", "0.54314697", "0.5428196", "0.5420904", "0.5407994", "0.5397659", "0.5392485", "0.53864586", "0.53851616", "0.5383415", "0.5356431", "0.5355798", "0.53522116", "0.53500724", "0.53497654", "0.53472537", "0.53465617", "0.5334964", "0.53342706", "0.5333609", "0.5326836", "0.532608", "0.53246784", "0.5319564", "0.5318117", "0.5312571", "0.5306084", "0.53054035", "0.5300967", "0.52941597", "0.5290918", "0.52902484", "0.5285811", "0.528581", "0.52798074", "0.527301", "0.52721226", "0.5256812", "0.5256793", "0.52460366", "0.52449584", "0.52447826", "0.524367", "0.5241616", "0.5239855", "0.52397376", "0.52355903", "0.5232735", "0.52294534", "0.52258873", "0.5222167", "0.5221884", "0.52187175", "0.5217093", "0.5208516", "0.5206745", "0.52046716", "0.52045876", "0.5203244", "0.5200746", "0.5193825" ]
0.726334
0
DateAndTime constructor: hour, minute and second supplied
public DateAndTime(int hour, int minute, int second, int month, int day, int year) { if (hour < 0 || hour >= 24) throw new IllegalArgumentException("hour must be 0-23"); if (minute < 0 || minute >= 60) throw new IllegalArgumentException("minute must be 0-59"); if (second < 0 || second >= 60) throw new IllegalArgumentException("second must be 0-59"); this.hour = hour; this.minute = minute; this.second = second; // check if month in range if (month <= 0 || month > 12) throw new IllegalArgumentException( "month (" + month + ") must be 1-12"); // check if day in range for month if (day <= 0 || (day > daysPerMonth[month] && !(month == 2 && day == 29))) throw new IllegalArgumentException("day (" + day + ") out-of-range for the specified month and year"); // check for leap year if month is 2 and day is 29 if (month == 2 && day == 29 && !(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))) throw new IllegalArgumentException("day (" + day + ") out-of-range for the specified month and year"); // check for nonnegative years if (year < 0) { throw new IllegalArgumentException("year (" + year + ") must be greater than 0"); } this.month = month; this.day = day; this.year = year; System.out.printf( "DateAndTime object constructor for DateAndTime %s%n", this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DateTime(final int year, final int month, final int day, final int hour, final int minute, final int second) {\n this(null, year, month, day, hour, minute, second);\n }", "public Time(long hour, long minute, long second) {\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = minute;\r\n\t\tthis.second = second;\r\n\t}", "public Time( int hour, int minute ) {\n this( hour * MINS_PER_HR + minute );\n }", "public DateTime(int year, int month, int date, int hour, int minute,\r\n\t\t\tint second) {\r\n\t\tCalendar calendar = createCalendar(year, month, date, hour, minute,\r\n\t\t\t\tsecond);\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(calendar\r\n\t\t\t\t.getTime());\r\n\t}", "public DateTime(final int year, final int month, final int day, final int hour, final int minute) {\n this(null, year, month, day, hour, minute, 0);\n }", "public Time4( int hour, int minute, int second )\r\n { \r\n this.setTime( hour, minute, second ); \r\n }", "public Time(int hour, int minute, int second){ //method in the initializer block\n setHour(hour);\n setMinute(minute);\n setSecond(second);\n}", "public Time(int hours, int minutes) {\n this.hours = hours;\n this.minutes = minutes;\n }", "public DateTime(int year, int month, int date, int hour, int minute) {\r\n\t\tCalendar calendar = createCalendar(year, month, date, hour, minute);\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_FORMATTER.format(calendar\r\n\t\t\t\t.getTime());\r\n\t}", "protected Time(int hours, int minutes, int seconds) {\n\t\tthis();\n\t\tthis.hours = hours;\n\t\tthis.minutes = minutes;\n\t\tthis.seconds = seconds;\n\t}", "public MyTime(int hours, int minutes, int seconds){\n\t\tsetHours(hours);\n\t\tsetMinute(minutes);\n\t\tsetSeconds(seconds);\n\t}", "public DateTime(\n int year,\n int month,\n int day,\n int hours,\n int minutes,\n int seconds) {\n setCharacteristic(null);\n setYear(year);\n setMonth(month);\n setDay(day);\n setHours(hours);\n setMinutes(minutes);\n setSeconds(seconds);\n }", "public DateTime(Date date,Time12 time)\n {\n\t\tthis.date=date;\n\t\tthis.time=time;\n }", "public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec) throws BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\t\t// code below by Jeremy//\r\n\t\tthis.dateType = dateType;\r\n\t\t// code above by Jeremy//\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}", "public Time(int hour, int minutes) throws BlablakidException{\n\t\tif(checkTime(hour,minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour or the minutes introduced are wrong , \"+hour+\":\"+minutes);\n\t\t}\n\t\telse {\n\t\t\tthis.hour = hour;\n\t\t\tthis.minutes = minutes;\n\t\t}\n\t}", "public Clock()\n {\n hour = 11;\n min = 28;\n sec = 12;\n }", "public Time4( int hour, int minute ) \r\n { \r\n this.setTime( hour, minute, 0 ); \r\n }", "public Time4 setTime( int hour, int minute, int second )\r\n {\r\n this.setHour( hour ); // set hour\r\n this.setMinute( minute ); // set minute\r\n this.setSecond( second ); // set second\r\n\r\n return this; // enables chaining\r\n }", "public Time() {\r\n\t\tsecond = (System.currentTimeMillis() / 1000) % 60;\r\n\t\tminute = (System.currentTimeMillis() / 1000) / 60 % 60;\r\n\t\thour = ((System.currentTimeMillis() / 1000) / 3600) % 24;\r\n\t}", "public void setDateAndTime(int d,int m,int y,int h,int n,int s);", "public DateTime(final BusinessObject parent, final int year, final int month, final int day, final int hour, final int minute, final int second) {\n super(parent);\n setValue(year, month, day, hour, minute, second);\n isNull = false;\n }", "public DateTime(\n int year,\n int month,\n int day,\n int hours,\n int minutes,\n int seconds,\n BluetoothGattCharacteristic characteristic) {\n setCharacteristic(characteristic);\n setYear(year);\n setMonth(month);\n setDay(day);\n setHours(hours);\n setMinutes(minutes);\n setSeconds(seconds);\n }", "public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec, int ehour, int emin, int esec)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.dateType = dateType;\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.ehour = ehour;\r\n\t\tthis.eminute = emin;\r\n\t\tthis.esecond = esec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr, ehourStr, eminStr, esecStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\t\tehourStr = \"\" + ehour;\r\n\t\teminStr = \"\" + emin;\r\n\t\tesecStr = \"\" + esec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\t\tif (ehourStr.length() < 2)\r\n\t\t\tehourStr = '0' + ehourStr;\r\n\t\tif (eminStr.length() < 2)\r\n\t\t\teminStr = '0' + eminStr;\r\n\t\tif (esecStr.length() < 2)\r\n\t\t\tesecStr = '0' + esecStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr\r\n\t\t\t\t+ ehourStr + eminStr + esecStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}", "public static Date newDate(final int year, final int month, final int day, final int hour,\r\n\t\tfinal int min, final int sec)\r\n\t{\r\n\t\treturn newDate(year, month, day, hour, min, sec, 0);\r\n\t}", "private static Calendar createCalendar(int year, int month, int date,\r\n\t\t\tint hour, int minute, int second) {\r\n\t\tCalendar calendar = createCalendar(year, month, date, hour, minute);\r\n\t\tcalendar.set(Calendar.SECOND, second);\r\n\t\treturn calendar;\r\n\t}", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "protected Time(int minutes) throws ArgumentException {\n\t\tthis();\n\t\tif (minutes < 0 || minutes >= 1440) {\n\t\t\tthrow new ArgumentException(String.format(\"%s,%s\",\n\t\t\t\t\tStrings.MinutesMustBeBetween0And1439, \"minutes\"));\n\t\t}\n\n\t\tthis.hours = minutes / 60;\n\t\tthis.minutes = minutes % 60;\n\t\tthis.seconds = 0;\n\t}", "public Time( int minutes ) {\n this.minutes = minutes;\n }", "public DateParser(String dateAndTimeString) {\n this.dateAndTimeString = dateAndTimeString;\n }", "public Time( int hour, int minute, Meridiem meridiem ) {\n this(\n hour == Time.HALF_DAY_HRS ?\n meridiem == Meridiem.AM ?\n 0 :\n Time.HALF_DAY_HRS\n :\n meridiem == Meridiem.AM ?\n hour :\n hour + Time.HALF_DAY_HRS,\n minute\n );\n }", "public DateHour(int year, int month, int day, int hour)\n\t{\n\t\tm_year = year;\n\t\tm_month = month;\n\t\tm_day = day;\n\t\tm_hour = hour;\n\t}", "protected Time(Date dateTime) throws ArgumentException {\n\t\tthis.setHours(dateTime.getHours());\n\t\tthis.setMinutes(dateTime.getMinutes());\n\t\tthis.setSeconds(dateTime.getSeconds());\n\t}", "public FlightTime(int hour, int minute, String timeType) {\n\t\tthis.hour = hour;\n\t\tthis.minute = minute;\n\t\tthis.timeType = timeType;\n\t}", "public SweDate(int year, int month, int day, double hour) {\n\t\tsetFields(year, month, day, hour);\n\t}", "public ClockTime(String s, String subtype) {\n super(Property.CLOCKTIME_PROPERTY,subtype);\n\n\n Date value = null;\n\n try {\n StringTokenizer tokens = new StringTokenizer(s, \":\");\n if (tokens.countTokens() == 1) {\n if (s.startsWith(\"24\")) {\n s = \"00\" + s.substring(2);\n }\n if (s.startsWith(\"00\")) {\n s = s.substring(2);\n if (s == null || s.equals(\"\"))\n s = \"00\";\n if (!s.equals(\"00\") && Integer.parseInt(s) >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n try {\n value = dfMedium.get().parse(\"00:\" + s + \":00\");\n }\n catch (Exception e) {\n calValue = null;\n return;\n }\n calValue = Calendar.getInstance();\n calValue.setTime(value);\n normalize();\n return;\n }\n if (s.length() > 0 && s.charAt(0) == '0')\n s = s.substring(1);\n int h = Integer.parseInt(s);\n if (h >= 0 && h <= 9)\n s = \"0\" + s + \":00:00\";\n else if (h < 24)\n s = s + \":00:00\";\n else if (h >= 100 && h <= 959) {\n int hh = Integer.parseInt(s.substring(0, 1));\n int mm = Integer.parseInt(s.substring(1, 3));\n if (mm >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n s = \"0\" + hh + \":\" + mm + \":00\";\n }\n else if (h >= 1000 && h <= 2359) {\n int hh = Integer.parseInt(s.substring(0, 2));\n int mm = Integer.parseInt(s.substring(2, 4));\n if (hh >= 24) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n if (mm >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n s = hh + \":\" + mm + \":00\";\n }\n else {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n }\n else\n if (tokens.countTokens() == 2) {\n s += \":00\";\n }\n try {\n value = dfMedium.get().parse(s);\n calValue = Calendar.getInstance();\n calValue.setTime(value);\n normalize();\n if (getSubType(\"showseconds\") != null && getSubType(\"showseconds\").equalsIgnoreCase(\"false\")) {\n \tsetShortFormat(true);\n }\n }\n catch (Exception e) {\n //throw new Exception(e);\n calValue = null;\n }\n } catch (Throwable e1) {\n calValue = null;\n }\n }", "public TimedEvent(String label, Date date, Time time) {\n super(label, date); // using the constructor of its superclass\n this.setTime(time); // assigns the time argument value to the attribute\n }", "public ClockTime(String value) {\n this(value,null);\n }", "private static Calendar createCalendar(int year, int month, int date,\r\n\t\t\tint hour, int minute) {\r\n\t\tCalendar calendar = createCalendar(year, month, date);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, hour);\r\n\t\tcalendar.set(Calendar.MINUTE, minute);\r\n\t\treturn calendar;\r\n\t}", "public TimeSpan(int hours, int minutes) {\n\t\tthis.hours = 0;\n\t\tthis.minutes = 0;\n\t\tadd(hours, minutes);\n\t}", "public Time() {\n this(System.currentTimeMillis());\n }", "Appointment(String description, String beginTime , String endTime){\n ShortDateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\", Locale.ENGLISH);\n //Check for bad data\n try{\n if(beginTime.contains(\"\\\"\")||endTime.contains(\"\\\"\"))\n throw new IllegalArgumentException(\"Date and time cannot contain quotes \");\n\n String[] tempStart = beginTime.split(\" \");\n String[] tempEnd= endTime.split(\" \");\n\n if(!tempStart[0].matches(\"(0?[1-9]|1[012])/(0?[1-9]|[12][0-9]|3[01])/((19|20)\\\\d\\\\d)\")||!tempEnd[0].matches(\"(0?[1-9]|1[012])/(0?[1-9]|[12][0-9]|3[01])/((19|20)\\\\d\\\\d)\")) {\n throw new IllegalArgumentException(\"Invalid Date Format\");\n }\n\n if(!tempStart[1].matches(\"([01]?[0-9]|2[0-3]):[0-5][0-9]\")||!tempEnd[1].matches(\"([01]?[0-9]|2[0-3]):[0-5][0-9]\"))\n throw new IllegalArgumentException(\"Time format must follow mm:hh (12 hour time)\");\n\n if(!tempStart[2].matches(\"(am|pm|AM|PM)\")&&!tempEnd[2].matches(\"(am|pm|AM|PM)\"))\n throw new IllegalArgumentException(\"Time must include am/pm\");\n }\n catch(IllegalArgumentException ex){\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n\n setDate(beginTime,endTime);\n this.description = description;\n\n }", "public Time4( int hour ) \r\n { \r\n this.setTime( hour, 0, 0 ); \r\n }", "public Timetable(String description, LocalDate date, LocalTime time) {\n this(description, null, date, time);\n }", "public void setDate(int day, int month, int year, int hour, int minute) // Maybe\n\n {\n this.day = day;\n this.month = month;\n this.year = year;\n this.hour = hour;\n this.minute = minute;\n }", "public Date(int year, int month, int day, int hour, int minute) throws InvalidDateException {\r\n\t\tthis.setYear(year);\r\n\t\tthis.setMonth(month);\r\n\t\tthis.setDay(day);\r\n\t\tthis.setHour(hour);\r\n\t\tthis.setMinute(minute);\r\n\t}", "public DateTime(Date date) {\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(date);\r\n\t}", "public static Date newDate(final int year, final int month, final int day, final int hour,\r\n\t\tfinal int minute, final int seconds, final int milliSecond)\r\n\t{\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\r\n\t\tcalendar.set(Calendar.YEAR, year);\r\n\t\tcalendar.set(Calendar.MONTH, month - 1);\r\n\t\tcalendar.set(Calendar.DATE, day);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, hour);\r\n\t\tcalendar.set(Calendar.MINUTE, minute);\r\n\t\tcalendar.set(Calendar.SECOND, seconds);\r\n\t\tcalendar.set(Calendar.MILLISECOND, milliSecond);\r\n\t\treturn calendar.getTime();\r\n\t}", "private Calendar createNewCalendar(String dateAndTime) {\n // initiate a calendar\n Calendar calendar = Calendar.getInstance();\n // take the given dateandTime string and split it into the different values\n String date = dateAndTime.split(\" \")[0];\n String time = dateAndTime.split(\" \")[1];\n int year = Integer.valueOf(date.split(\"-\")[0]);\n int month = Integer.valueOf(date.split(\"-\")[1]) - 1;\n int day = Integer.valueOf(date.split(\"-\")[2]);\n int hour = Integer.valueOf(time.split(\":\")[0]);\n int min = Integer.valueOf(time.split(\":\")[1]);\n // set the calendar to the wanted values\n calendar.set(year, month, day, hour, min);\n return calendar;\n }", "protected Time() {\n\t}", "public static String create(int year, int month, int date, int hour,\r\n\t\t\tint minute, int second) {\r\n\t\tCalendar dateTime = createCalendar(year, month, date, hour, minute,\r\n\t\t\t\tsecond);\r\n\t\treturn YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(dateTime.getTime());\r\n\t}", "public DateTime(String showName, String date, String startTime, String endTime) throws ParseException //Constructor.\n\t{//Start Constructor.\n\t\tthis.showName = showName;//Initializes the show name variable.\n\t\tthis.date = convertDate(date);//Initializes the date variable.\n\t\tthis.startTime = convertTime(startTime);//Initializes the start time variable.\n\t\tthis.endTime = convertTime(endTime);//Initializes the end time variable.\n\t}", "private TimeUtil() {}", "public DateTime(String string) {\r\n\t\tSimpleDateFormat[] formats = new SimpleDateFormat[] {\r\n\t\t\t\tYYYY_MM_DD_FORMATTER, YYYY_MMT_DD_T_HH_MM_FORMATTER,\r\n\t\t\t\tYYYY_MMT_DD_T_HH_MM_SS_FORMATTER };\r\n\t\tfor (SimpleDateFormat format : formats) {\r\n\t\t\ttry {\r\n\t\t\t\tformat.parse(string);\r\n\t\t\t\tthis.timeString = string;\r\n\t\t\t\treturn;\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IllegalArgumentException();\r\n\t}", "public void setTime(int hour, int minute, int second)\r\n\t{\r\n\t\tHours.setValue(hour);\r\n\t\tMinutes.setValue(minute);\r\n\t\tSeconds.setValue(second);\r\n\t\t\r\n\t\tupdateTime();\r\n\t}", "public static native JsDate create(int year, int month, int dayOfMonth, int hours,\n int minutes, int seconds) /*-{\n return new Date(year, month, dayOfMonth, hours, minutes, seconds);\n }-*/;", "public void init( Object date,\n Object time)\n {\n leftOperand = (ValueNode) date;\n rightOperand = (ValueNode) time;\n operator = \"timestamp\";\n methodName = \"getTimestamp\";\n }", "public Timetable(String description, String location, LocalDate date, LocalTime time) {\n super(description);\n setLocation(location);\n setDate(date);\n setTime(time);\n }", "public void setTime(int mins, int sec){\r\n this.Minutes = mins;\r\n this.Seconds = sec;\r\n }", "public CinemaDate(String m, String d, String t) {\n this.month = m;\n this.day = d;\n this.time = t;\n }", "public DateTime(LocalDate date, Optional<LocalTime> optionalTime) {\n this.date = date;\n this.optionalTime = optionalTime;\n }", "public static Date getDate(int year, int month, int day, int hour, int minute, int second) \n\t{\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(year, month, day, hour, minute, second);\n\t\tDate date = calendar.getTime();\n\t\t\n\t\treturn date;\n\t}", "public Coursetime() {\n\t}", "public CTime() {\n\t\n}", "default LocalDateTime getLocalTime(int year, int month, int day, int hour, int minute, int second) {\n return LocalDateTime.parse(new StringBuilder()\n .append(year).append('-').append(preZero(month)).append('-').append(preZero(day))\n .append('T')\n .append(preZero(hour)).append(':').append(preZero(minute)).append(':').append(preZero(second))\n .toString());\n }", "public CinemaDate setTime(String t) {\n return new CinemaDate(this.month, this.day, t);\n }", "public Schedule(int timeOfDay, int minute, int duration, List<Integer> daysOfWeek, List<SprinklerGroup> sprinklerGroups) {\n\t\tsuper();\n\t\t\n\t\t\tTimeOfDay = timeOfDay;\n\t\t\tMinute = minute;\n\t\t\tDuration = duration;\n\t\t\tDaysOfWeek = daysOfWeek;\n\t\t\tSprinklerGroups = sprinklerGroups;\n\t\t\tType=ScheduleType.TIMED;\t\n\t\t\n\t}", "public TimeField() {\n\t\tsuper('t', \"0 0\");\n\t}", "public Time4( Time4 time )\r\n {\r\n this.setTime( time.getHour(), time.getMinute(),\r\n time.getSecond() );\r\n }", "public ShortDate(final long time) {\n super(time);\n }", "default LocalDateTime getLocalTime(int year, int month, int day, int hour, int minute) {\n return getLocalTime(year, month, day, hour, minute, 0);\n }", "public static void setTime(Clock clock, int hour, int minute, int second) {\n\t\tif (hour < 0 || hour > 24) {\r\n\t\t\thour = 0;\r\n\t\t}\r\n\t\tif (minute < 0 || minute > 60) {\r\n\t\t\tminute = 0;\r\n\t\t}\r\n\t\tif (second < 0 || second > 60) {\r\n\t\t\tsecond = 0;\r\n\t\t}\r\n\r\n\t\tclock.setHour(hour);\r\n\t\tclock.setMinute(minute);\r\n\t\tclock.setSecond(second);\r\n\r\n\t}", "public Clock() {\r\n this.hour = 0;\r\n this.minute = 0;\r\n }", "@Test (expected = IllegalArgumentException.class)\n\tpublic void testConstructor3ParametersNegHour() {\n\t\tnew CountDownTimer(-2, 3, 4);\n\t}", "public static native JsDate create(int year, int month, int dayOfMonth, int hours,\n int minutes) /*-{\n return new Date(year, month, dayOfMonth, hours, minutes);\n }-*/;", "private void setDate(String beginning, String end){\n try {\n\n this.beginTime=ShortDateFormat.parse(beginning);\n this.endTime = ShortDateFormat.parse(end);\n }\n catch(ParseException ex){\n System.out.println(\"Error Parsing the time, please enter valid time, dont forget to include am/pm \" +ex.getMessage());\n System.exit(1);\n }\n }", "public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }", "public DateTime(String datetime) {\n super();\n if(datetime!=null) {\n try {\n SimpleDateFormat f = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = (Date)f.parse(datetime);\n this.setTime(date.getTime());\n } catch (ParseException e) {\n }\n\n }\n }", "public DateTime(final DateTime timeStamp) {\n this(null, timeStamp);\n }", "public Clock (double tic) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 1\n\t\tif (tic <= 0.0 || tic > 1800.0) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid tic value\");\n\t\t}\n\t\tthis.tic = tic;\n\t}", "public Calendar() {\n dateAndTimeables = new HashMap<>();\n }", "public DERUTCTime(java.util.Date time) {\n\t}", "public TimedEvent() {\n this(DEFAULT_LABEL + nextTaskID, DEFAULT_DATE, DEFAULT_TIME); // assigning default values\n }", "public DateTime(int year, int month, int date) {\r\n\t\tCalendar calendar = createCalendar(year, month, date);\r\n\t\tthis.timeString = YYYY_MM_DD_FORMATTER.format(calendar.getTime());\r\n\t}", "private void setTime(int h, int m, int s) {\r\n\t\tString sHours = String.valueOf(h);\r\n\t\tString sMin = String.valueOf(m);\r\n\t\tString sSec = String.valueOf(s);\r\n\t\tif (sHours.length() > 1) {\r\n\t\t\tledDisplay[4] = Integer.parseInt(sHours.substring(1, 2));\r\n\t\t\tledDisplay[5] = Integer.parseInt(sHours.substring(0, 1));\r\n\t\t} else {\r\n\t\t\tledDisplay[4] = Integer.parseInt(sHours.substring(0, 1));\r\n\t\t\tledDisplay[5] = 0;\r\n\t\t}\r\n\r\n\t\tif (sMin.length() > 1) {\r\n\t\t\tledDisplay[2] = Integer.parseInt(sMin.substring(1, 2));\r\n\t\t\tledDisplay[3] = Integer.parseInt(sMin.substring(0, 1));\r\n\t\t} else {\r\n\t\t\tledDisplay[2] = Integer.parseInt(sMin.substring(0, 1));\r\n\t\t\tledDisplay[3] = 0;\r\n\t\t}\r\n\r\n\t\tif (sSec.length() > 1) {\r\n\t\t\tledDisplay[0] = Integer.parseInt(sSec.substring(1, 2));\r\n\t\t\tledDisplay[1] = Integer.parseInt(sSec.substring(0, 1));\r\n\t\t} else {\r\n\t\t\tledDisplay[0] = Integer.parseInt(sSec.substring(0, 1));\r\n\t\t\tledDisplay[1] = 0;\r\n\t\t}\r\n\r\n\t}", "public static Date parseDateTime(String val, int hour, int minute) {\n\n\t\tDate d = null;\n\t\tval = val + \" \" + hour + \":\" + minute;\n\t\tif (val != null && !val.equals(\"0\")) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\n\t\t\ttry {\n\t\t\t\td = format.parse(val);\n\t\t\t} catch (ParseException e) {\n\t\t\t}\n\t\t}\n\n\t\treturn d;\n\n\t}", "public Duration(int years, int months, int days, int hours, int minutes, double seconds) {\n this.years = years;\n this.months = months;\n this.days = days;\n this.hours = hours;\n this.minutes = minutes;\n this.seconds = seconds;\n this.negative = false;\n }", "public DateTime() {\n setCharacteristic(null);\n setYear(1582);\n setMonth(0);\n setDay(1);\n setHours(0);\n setMinutes(0);\n setSeconds(0);\n }", "public static native JsDate create(int year, int month, int dayOfMonth, int hours,\n int minutes, int seconds, int millis) /*-{\n return new Date(year, month, dayOfMonth, hours, minutes, seconds, millis);\n }-*/;", "public ClockTime(Timestamp d) {\n super(Property.CLOCKTIME_PROPERTY);\n calValue = Calendar.getInstance();\n calValue.setTimeInMillis(d.getTime());\n normalize();\n }", "default LocalDateTime getLocalTime(int hour, int minute) {\n return getLocalTime(2017, 1, 31, hour, minute);\n }", "public static void main(String[] args){\n\t\tCalendar now = Calendar.getInstance(); // Gets the current date and time\n\t\tint year = now.get(Calendar.YEAR); \n\t\tint moth = now.get(Calendar.MONTH);\n\t\tint date = now.get(Calendar.DATE); \n\t\tDate d = now.getTime();\n\t\tTime t = ServletFunctions.getNowTime();\n\t\tSystem.out.println(t);\n\t\tSystem.out.println(year+\"-\"+moth+\"-\"+date);\n\t\t\n\t\tSystem.out.println(moth);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(d);\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tString ti = \"22:12:22\";\n\t\ttry {\n\t\t\tjava.sql.Time timeValue = new java.sql.Time(formatter.parse(ti).getTime());\n\t\t\tSystem.out.println(timeValue);\n\t\t} catch (ParseException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tDateTimeFormatter formatterr = DateTimeFormatter.ofPattern(\"HH:mm:ss\");\n\t\tString str = \"12:22:10\";\n\t\tLocalTime time = LocalTime.parse(str, formatterr);\n\t\tSystem.out.println(time);\n\t\t\n\t\tTime tt = ServletFunctions.strToTime(\"08:10:12\");\n\t\tSystem.out.println(tt);\n\t}", "Time getTime();", "public static String create(int year, int month, int date, int hour,\r\n\t\t\tint minute) {\r\n\t\tCalendar dateTime = createCalendar(year, month, date, hour, minute);\r\n\t\treturn YYYY_MMT_DD_T_HH_MM_FORMATTER.format(dateTime.getTime());\r\n\t}", "public Schedule(Date startTime, long repeatAfter, TimeUnit unit) {\n\t\tsuper();\n\t\tthis.startTime = startTime == null ? new Date() : startTime;\n\t\tthis.repeatAfter = repeatAfter;\n\t\tthis.unit = unit;\n\t}", "public Appointment(int hour, String description) {\n\n // this refers to the appointment being made\n // hour and description refer to the input parameters\n // this.hour and this.description refer to the object's variables\n this.hour = hour;\n this.description = description;\n }", "public void setTime(DateTime inputTime){\n time = inputTime.getMillis();\n timeZone = inputTime.getZone();\n }", "public DERUTCTime(String time) {\n\t}", "public static void main(String[] args) {\n LocalDate date = LocalDate.of(1986, 02, 12);\n LocalTime time = LocalTime.of(12, 30);\n LocalDateTime localDateTime = LocalDateTime.of(date, time);\n System.out.println(localDateTime);\n\n// Exercise 16\n String customizedDate = localDateTime.format(DateTimeFormatter.ofPattern(\"YYYY-MM-dd\"));\n System.out.println(customizedDate);\n LocalDate getDate = LocalDate.parse(customizedDate);\n System.out.println(getDate);\n String customizedTime = localDateTime.format(DateTimeFormatter.ofPattern(\"HH:mm\"));\n System.out.println(customizedTime);\n LocalTime getTime = LocalTime.parse(customizedTime);\n System.out.println(getTime);\n }", "public TimeField(String start, String stop) {\n\t\tsuper('t', start + \" \" + stop);\n\t}", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tint hour, minute;\n\t\tSystem.out.print(\"Enter the hour: \");\n\t\thour = keyboard.nextInt();\n\t\tSystem.out.print(\"Enter the minute: \");\n\t\tminute = keyboard.nextInt();\n\t\tTime time = new Time(hour,minute);\n\t\tSystem.out.print(\"Time 12: \");\n\t\tSystem.out.println(time.getTime12());\n\t\tSystem.out.print(\"Time 24: \");\n\t\tSystem.out.println(time.getTime24());\t\t\n\n\n\t}" ]
[ "0.7490668", "0.74391025", "0.71702254", "0.71512115", "0.70697397", "0.6959278", "0.6886207", "0.68845904", "0.6822506", "0.6817271", "0.68035173", "0.67923504", "0.6768003", "0.66717815", "0.664209", "0.6598843", "0.64553124", "0.6422888", "0.6418404", "0.6405137", "0.6390555", "0.6225098", "0.6189646", "0.61660475", "0.61638683", "0.6131271", "0.6100932", "0.60737544", "0.6062986", "0.6016147", "0.6015392", "0.59803873", "0.59386617", "0.59021205", "0.5890724", "0.5886238", "0.5844397", "0.58114207", "0.5805689", "0.5792447", "0.57864016", "0.576705", "0.57467806", "0.57401675", "0.5736328", "0.57336295", "0.5705353", "0.5693385", "0.56894255", "0.5681854", "0.5671794", "0.5646895", "0.56337893", "0.5603971", "0.5575863", "0.5574384", "0.5564871", "0.5541478", "0.55337", "0.5532121", "0.5520305", "0.5512772", "0.5504709", "0.54968625", "0.54480827", "0.5444701", "0.5439277", "0.54153687", "0.54045415", "0.53857225", "0.5346959", "0.5336762", "0.53291804", "0.5325452", "0.53172725", "0.52971643", "0.5275491", "0.52732056", "0.52648604", "0.5257746", "0.5255363", "0.5248957", "0.523905", "0.5231876", "0.5218006", "0.52024865", "0.5194755", "0.5192517", "0.51918375", "0.5191298", "0.51872987", "0.5157619", "0.5154699", "0.51501465", "0.5133832", "0.51333916", "0.5121047", "0.5114182", "0.5110965", "0.50927734" ]
0.7964678
0
validate and set hour
public void setHour(int hour) { if (hour < 0 || hour >= 24) throw new IllegalArgumentException("hour must be 0-23"); this.hour = hour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHour(int hour) throws InvalidDateException {\r\n\t\tif (hour < 24 & hour >= 0) {\r\n\t\t\tthis.hour = hour;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic hour for the date (between 0 and 23) !\");\r\n\t\t}\r\n\t}", "public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }", "public void setHour(int hour) throws BlablakidException {\n\t\tif(checkTime(hour,this.minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour introduced is wrong : \"+hour);\n\t\t}\n\t\telse {\n\t\tthis.hour = hour;\n\t\t}\n\t}", "private boolean checkValidHour() {\n return numHours >= 0 && numHours <= 23;\n }", "public void setHour(int hour)\n {\n this.hour = hour;\n }", "public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "@Override\r\n public boolean setHours(int hours) {\r\n if(hours<0||hours>23)\r\n {\r\n return false;\r\n }\r\n calendar.set(Calendar.HOUR_OF_DAY, hours);\r\n return true;\r\n }", "public Time4 setHour( int hour ) \r\n { \r\n this.hour = ( hour >= 0 && hour < 24 ? hour : 0 ); \r\n\r\n return this; // enables chaining\r\n }", "public void setHour(Integer hour) {\n this.hour = hour;\n }", "public void setHour(int hour) {\n/* 51 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}", "public void setHours(String hours) {\n this.hours = parseHours(hours);\n }", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public boolean setHour(double newHour) {\n\t\tthis.hour = newHour;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType);\n\t\treturn true;\n\t}", "public boolean setHours(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mHours = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }", "public void setTime(String newHour) { // setTime sets the appointment's hour in standard time\n \n // this divides the newHour string into the hour part and the 'am'/'pm' part\n int timeHour = Integer.parseInt(newHour.substring(0, newHour.length()-2)); // the number of the hour\n String timeAmPm = newHour.substring(newHour.length()-2); // whether it is 'am' or 'pm'\n\n // 4 possible cases exist and are handled in this order:\n // 1. after midnight/before noon\n // 2. midnight (12am)\n // 3. noon (12pm)\n // 4. afternoon\n if(timeAmPm.equalsIgnoreCase(\"am\") && timeHour != 12) {\n this.hour = timeHour;\n }\n else if(timeAmPm.equalsIgnoreCase(\"am\")) {\n this.hour = 0;\n }\n else if(timeHour == 12){\n this.hour = timeHour;\n }\n else {\n this.hour = timeHour + 12;\n }\n }", "public void sethourNeed(Integer h){hourNeed=h;}", "public static void setHour(String HourString) {\n\t\thour = HourString;\n\t}", "private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}", "public void setHours(double hours) {\r\n this.hours = hours;\r\n }", "public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "public static final Function<Date,Date> setHour(final int value) {\r\n return new Set(Calendar.HOUR, value);\r\n }", "public void setHours(int hours) {\n this.hours = hours;\n }", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "public void setHours(int x, double h) {\r\n hours[x] = h;\r\n }", "public void setHour(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setHour(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setHour(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setHour(int):void\");\n }", "public Builder setHour(final int hour) {\n this.hour = hour;\n return this;\n }", "private void setTime(int hour, int minute){\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n persistLong(calendar.getTimeInMillis());\n\n notifyChanged();\n notifyDependencyChange(shouldDisableDependents());\n }", "Integer getHour();", "private boolean CheckVisitorHour() {\n\t\tif (VisitHour_ComboBox.getValue() == null) {\n\t\t\tif (!VisitHour_ComboBox.getStyleClass().contains(\"error\"))\n\t\t\t\tVisitHour_ComboBox.getStyleClass().add(\"error\");\n\t\t\tVisitorHourNote.setText(\"* Select hour\");\n\t\t\treturn false;\n\t\t}\n\t\tVisitHour_ComboBox.getStyleClass().remove(\"error\");\n\t\tVisitorHourNote.setText(\"*\");\n\t\treturn true;\n\t}", "public static void set24Hour( boolean hour24 ) {\n AM_PM = !hour24;\n }", "public Time4( int hour ) \r\n { \r\n this.setTime( hour, 0, 0 ); \r\n }", "public void setHours(int hours) {\n\t\tthis.hours = hours;\n\t}", "private boolean timeValidation(String time){\n if(! time.matches(\"(?:[0-1][0-9]|2[0-4]):[0-5]\\\\d\")){\n return false;\n }\n return true;\n }", "public void setHours(double hours) {\r\n // if hours is negative, hours is 0\r\n if (hours < 0) {\r\n this.hours = 0;\r\n }\r\n else {\r\n this.hours = hours;\r\n }\r\n // calls calculateSalary to update the salary once hours is changed\r\n calculateSalary();\r\n }", "Integer getStartHour();", "public void setHours(int[] hours) {\n if (hours == null)\n hours = new int[] {};\n this.hours = hours;\n }", "private boolean checkTime(int hour, int minutes) {\n\tboolean check = true;\n\t\tif((hour < 0) || (hour > 23) || (minutes < 0) || (minutes > 59)) {\n\t\t\tcheck = false;\n\t\t}\n\t\telse {\n\t\t\tcheck = true;\n\t\t}\n\treturn check;\n\t}", "public DateHour(int year, int month, int day, int hour)\n\t{\n\t\tm_year = year;\n\t\tm_month = month;\n\t\tm_day = day;\n\t\tm_hour = hour;\n\t}", "public static String[] validateHours(String hours) {\n\tString[] hourString=new String[2];\r\n\tStringTokenizer st=new StringTokenizer(hours,\"-\");\r\n\ttry{\r\n\t\thourString[0]=st.nextToken();\r\n\t\thourString[1]=st.nextToken();\r\n\t}\r\n\tcatch(Exception e){\r\n\t\tSystem.out.println(\"Hours are not proper:\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tboolean validHour=validInteger(hourString[0]);\r\n\tif(!validHour || hourString[0].length()!=4){\r\n\t\tSystem.out.println(\"Invalid Start Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tvalidHour=validInteger(hourString[1]);\r\n\tif(!validHour || hourString[1].length()!=4){\r\n\t\tSystem.out.println(\"Invalid End Time Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tString time=hourString[0].substring(0, 2)+\":\"+hourString[0].substring(2, 4);\r\n\thourString[0]=time;\r\n\tSystem.out.println(\"Start Time : \"+time);\r\n\ttime=null;\r\n\ttime=hourString[1].substring(0, 2)+\":\"+hourString[1].substring(2, 4);\r\n\thourString[1]=time;\r\n\treturn hourString;\r\n}", "public int getHour() { return this.hour; }", "private void setTimeOfDay(){\n Calendar calendar = Calendar.getInstance();\n int timeOfDay = calendar.get(Calendar.HOUR_OF_DAY);\n if(timeOfDay >= 0 && timeOfDay < 12){\n greetings.setText(\"Good Morning\");\n }else if(timeOfDay >= 12 && timeOfDay < 16){\n greetings.setText(\"Good Afternoon\");\n }else if(timeOfDay >= 16 && timeOfDay < 23){\n greetings.setText(\"Good Evening\");\n }\n }", "public void setHours(double hoursWorked){\n if ((hoursWorked >= 0.0) && (hoursWorked <= 168.0))\n hours = hoursWorked;\n else\n throw new IllegalArgumentException(\"Hours worked must be >= 0 and <= 168\");\n }", "float hour() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n case SOUTH_4M:\n case SOUTH_16M:\n return 0f;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * At 10h33m, Orion is about to set in the west and the\n * Pointers of the Big Dipper are near the meridian.\n */\n return 10.55f;\n }\n throw new IllegalStateException();\n }", "public static boolean isPickupTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<30){\n return false;\n }\n\n return true;\n }", "private boolean isValidHours(int hours){\n boolean isValid = false;\n if(hours < 0){\n generalTextArea.appendText(\"Working hours cannot be negative.\\n\");\n }else if(hours > MAXHOURS){\n generalTextArea.appendText(\"Invalid hours: over 100.\\n\");\n }else{\n isValid = true;\n }\n return isValid;\n }", "public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }", "public void setAditionalNightHours(int hours){\r\n\t this.addings = (double)(40*hours);\r\n }", "public int getHour() \n { \n return hour; \n }", "public void setPerHour(double perHour) {\r\n if (perHour < 0 || Double.isNaN(perHour)){\r\n throw new IllegalArgumentException();\r\n }\r\n this.perHour = perHour;\r\n }", "boolean isValidExpTime();", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n int timeToSet = (hourOfDay * 1000 + (minute * 1000)/60 + 18000) % 24000;\n prompt.sendCommand(CommandSet.getCommand(CommandSet.TIME) + \"set \"+timeToSet, new ResponseToastGenerator(getActivity(), \n new CommandResponseEvaluator(EvaluatorType.time),\n R.string.time_set_ok, R.string.time_set_failed));\n }", "private boolean checkValidTime(String inputTime) {\n int hour = Integer.parseInt(inputTime.substring(0,2));\n int minute = Integer.parseInt(inputTime.substring(2,4));\n \n if ((hour >= 0 && hour <= 23) && (minute >= 0 && minute <= 59)) {\n return true;\n } else {\n return false;\n }\n }", "public void setWorkingHour (int newWorkingHour) {\n this.workingHour = newWorkingHour;\n }", "public void updateChangedTime(int hour, int minute);", "public final flipsParser.hour_return hour() throws RecognitionException {\n flipsParser.hour_return retval = new flipsParser.hour_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal374=null;\n Token string_literal375=null;\n Token string_literal376=null;\n Token string_literal377=null;\n Token string_literal378=null;\n\n CommonTree char_literal374_tree=null;\n CommonTree string_literal375_tree=null;\n CommonTree string_literal376_tree=null;\n CommonTree string_literal377_tree=null;\n CommonTree string_literal378_tree=null;\n RewriteRuleTokenStream stream_250=new RewriteRuleTokenStream(adaptor,\"token 250\");\n RewriteRuleTokenStream stream_251=new RewriteRuleTokenStream(adaptor,\"token 251\");\n RewriteRuleTokenStream stream_252=new RewriteRuleTokenStream(adaptor,\"token 252\");\n RewriteRuleTokenStream stream_249=new RewriteRuleTokenStream(adaptor,\"token 249\");\n RewriteRuleTokenStream stream_253=new RewriteRuleTokenStream(adaptor,\"token 253\");\n\n try {\n // flips.g:559:2: ( ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' ) -> HOUR )\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n {\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n int alt143=5;\n switch ( input.LA(1) ) {\n case 249:\n {\n alt143=1;\n }\n break;\n case 250:\n {\n alt143=2;\n }\n break;\n case 251:\n {\n alt143=3;\n }\n break;\n case 252:\n {\n alt143=4;\n }\n break;\n case 253:\n {\n alt143=5;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 143, 0, input);\n\n throw nvae;\n }\n\n switch (alt143) {\n case 1 :\n // flips.g:559:5: 'h'\n {\n char_literal374=(Token)match(input,249,FOLLOW_249_in_hour3249); \n stream_249.add(char_literal374);\n\n\n }\n break;\n case 2 :\n // flips.g:559:9: 'hr'\n {\n string_literal375=(Token)match(input,250,FOLLOW_250_in_hour3251); \n stream_250.add(string_literal375);\n\n\n }\n break;\n case 3 :\n // flips.g:559:14: 'hrs'\n {\n string_literal376=(Token)match(input,251,FOLLOW_251_in_hour3253); \n stream_251.add(string_literal376);\n\n\n }\n break;\n case 4 :\n // flips.g:559:20: 'hour'\n {\n string_literal377=(Token)match(input,252,FOLLOW_252_in_hour3255); \n stream_252.add(string_literal377);\n\n\n }\n break;\n case 5 :\n // flips.g:559:27: 'hours'\n {\n string_literal378=(Token)match(input,253,FOLLOW_253_in_hour3257); \n stream_253.add(string_literal378);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 560:2: -> HOUR\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(HOUR, \"HOUR\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public static void setGreeting(int hourOfDay) {\n if (hourOfDay >= 0 && hourOfDay < 12) {\n dayHourGreeting = MORNING;\n } else if (hourOfDay >= 12 && hourOfDay < 16) {\n dayHourGreeting = AFTERNOON;\n } else if (hourOfDay >= 16 && hourOfDay < 21) {\n dayHourGreeting = EVENING;\n } else if (hourOfDay >= 21 && hourOfDay < 24) {\n dayHourGreeting = NIGHT;\n }\n }", "protected void runEachHour() {\n \n }", "@Override\n \tpublic boolean saveHours(HourRegistration reg) {\n \t\treturn false;\n \t}", "public void setPriceperhour(int priceperhour) {\n this.priceperhour = priceperhour;\n }", "public int getHour(){\n return hour;\n }", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n time = 3600 * hour + 60 * minute;\n\n\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetRegistrationDate2() {\n user1.setRegistrationDate(LocalDateTime.now().plusHours(1));\n }", "public int getHour()\n {\n return hour;\n }", "@Override\n public String onHourChange(long hour) {\n return null;\n }", "private boolean checkIfAfternoon(int hours) {\n\t\treturn hours >= 12 && hours <= 17;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getStarttime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getStarttime().set(Calendar.MINUTE, minute);\n updateStartTime();\n }", "public void advanceHour(long hour) {\n clock = Clock.offset(clock, Duration.ofHours(hour));\n }", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getEndtime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getEndtime().set(Calendar.MINUTE, minute);\n updateEndTime();\n }", "public static boolean isReservationTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<180){\n return false;\n }\n\n return true;\n }", "public void addToHeartrate(\tString hr )\r\n\t{\n\t\theartRates.add(validateInteger( hr, \"heartrate\" ) );\r\n\t}", "public void setOccupiedHours(int hours){\n \t\tif(hours > 0 && hours*60 > 0)\n \t\t\tsetOccupiedMinutes(hours*60);\n \t}", "public final native double setHours(int hours) /*-{\n this.setHours(hours);\n return this.getTime();\n }-*/;", "Integer getEndHour();", "public Time(int hour, int minutes) throws BlablakidException{\n\t\tif(checkTime(hour,minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour or the minutes introduced are wrong , \"+hour+\":\"+minutes);\n\t\t}\n\t\telse {\n\t\t\tthis.hour = hour;\n\t\t\tthis.minutes = minutes;\n\t\t}\n\t}", "public void pickOfficeHours(String day, int start){\n\t\tthis.officeHourDay = day;\n\t\tthis.officeHourTime = start;\n\t}", "private void setFields(int year, int month, int day, double hour) {\n\t\t// Get year, month, day of jdCO and compare to given date to\n\t\t// find out about the calendar system:\n\t\tIDate dt = swe_revjul(jdCO, SE_GREG_CAL);\n\t\tboolean calType = SE_GREG_CAL;\n\t\tif (dt.year > year || (dt.year == year && dt.month > month)\n\t\t\t\t|| (dt.year == year && dt.month == month && dt.day > day)) {\n\t\t\tcalType = SE_JUL_CAL;\n\t\t}\n\t\tsetFields(year, month, day, hour, calType);\n\t}", "public void increaseHour() {\n\t\tthis.total++;\n\t}", "@Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n \n Calendar cal = Calendar.getInstance();\n int hour = cal.get(Calendar.HOUR_OF_DAY);\n System.out.println(hour);\n\n if (hour >= 15 && hour <= 25) {\n response.getWriter().write(\"This servers is under Maintenance. \"\n + \"Please Try After some Time. Sorry for this Inconvenience\");\n return false;\n } else {\n return true;\n }\n }", "private static void checkFormat(String str) {\n if (str.length() != 8)\n throw new IllegalArgumentException(\"length has too be 8\");\n try {\n Integer.parseInt(str.substring(0,2)); //Hours\n Integer.parseInt(str.substring(3,5)); //Minutes\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"These numbers are wrong\");\n }\n if (str.charAt(2) != ':') {\n throw new IllegalArgumentException(\"requires colon between times\");\n }\n if (str.charAt(5) != ' ') {\n throw new IllegalArgumentException(\"requires space between time and period\");\n }\n String mStr = str.substring(6);\n if (!mStr.equals(\"PM\") && !mStr.equals(\"AM\")) {\n throw new IllegalArgumentException(\"Must be AM or PM\");\n }\n }", "public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }", "public Time( int hour, int minute ) {\n this( hour * MINS_PER_HR + minute );\n }", "public void setMaxHour(Integer maxHour) {\r\n this.maxHour = maxHour;\r\n }", "@Test\n void deve_retornar_uma_datetimeexception() {\n List<LocalTime> localTimes = Arrays.asList(LocalTime.parse(\"12:00:00\"));\n TimeModel timeModel = TimeModelStub.getTimeModel();\n timeModel.setPeriod(TimeCourseEnum.SECOND_PERIOD_IN);\n timeModel.setTime(\"12:30\");\n Assert.assertThrows(DateTimeException.class, () -> timeService.checkInterval(timeModel, localTimes));\n }", "public void setSleepHour(int hours) {\n\t\tif (hours >= 0)\n\t\t\tsleepHours = hours;\n\t\telse\n\t\t\tsleepHours = -1;\n\t}", "public MyTime nextHour(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\t\t\n\t\tif (hours!=23){\n\t\t\thour++;\n\t\t}\n\t\telse{\n\t\t\thour = 0;\n\t\t}\n\t\t\n\t\treturn new MyTime(hour,minute,second);\n\t}", "public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }", "public int getHour() {\n\t\treturn hour;\n\t}", "public int getHour() {\n\t\treturn hour;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }", "void updateTaskHours(int id, float hours);", "public void setHourlyRate(double hr)\n\t{\n\t\thourlyRate = hr;\n\t}", "public void setHours(int noOfHours2) {\n\t\t\tthis.noOfHours=noOfHours2;\r\n\t\t\t\r\n\t\t}", "@Override\n public void onSleepingHoursSet(int hourOfDay, int minute, int hourOfDayEnd, int minuteEnd) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\n calendar.set(Calendar.MINUTE, minute);\n // create a date object\n Date startSHdate = calendar.getTime();\n // add one day (for the stopSleepingHours end interval - assuming it next day)\n calendar.add(Calendar.DAY_OF_WEEK, 1);\n // set user selected hour and minute\n calendar.set(Calendar.HOUR_OF_DAY, hourOfDayEnd);\n calendar.set(Calendar.MINUTE, minuteEnd);\n // create a date object\n Date stopSHDate = calendar.getTime();\n // Check of the difference between the dates is at least 8 hours\n if (DateUtils.getDifferenceInHours(startSHdate, stopSHDate) >= 8) {\n // the difference between the dates is > = 8 hours. It is OK\n // Check if the start hour is before midnight\n if (hourOfDay <= ELEVEN_PM && hourOfDay >= SEVEN_PM) {\n try {\n mModel.setSleepingHours(hourOfDay, minute, hourOfDayEnd, minuteEnd);\n mView.showMessage(\"Selected: \" +\n hourOfDay + \" \" + minute +\n \" \" + hourOfDayEnd\n + \" \" + minuteEnd);\n } catch (Exception e) {\n mView.showMessage(\"Error! \" + e.getMessage());\n }\n } else {\n mView.showMessage(\"The start hour has to be between 7pm and 11pm\");\n }\n\n } else {\n mView.showMessage(\"The minimal interval for Sleeping hours is 8 hours!\");\n }\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n editASLTStime.setText((((hourOfDay < 10) ? \"0\" + hourOfDay : hourOfDay) + \":\" + ((minute < 10) ? \"0\" + minute : minute) + \":00\"));\n }", "void testDateSetHourMinutesSeconds(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Date) { return; } // java.sql.Date throws IllegalArgumentException in setHours(),\n // setMinutes(), and setSeconds().\n\n if (validate) {\n assertEqualDate(createDateTime(\"Feb 20, 2006 03:20:20\"), date);\n } else {\n synchronized (date) {\n date.setHours(3);\n date.setMinutes(20);\n date.setSeconds(20);\n }\n }\n }", "public DateTimeFormatterBuilder appendHourOfDay(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.hourOfDay(), minDigits, 2);\r\n }" ]
[ "0.79209894", "0.7660724", "0.75577456", "0.72400194", "0.71984506", "0.7146316", "0.7010471", "0.6992469", "0.6941009", "0.69388753", "0.6860422", "0.6855962", "0.6695786", "0.6692523", "0.66528684", "0.6615622", "0.6545083", "0.6540104", "0.6410614", "0.6403631", "0.6390692", "0.6304835", "0.62973434", "0.62618345", "0.6244773", "0.6197984", "0.6182513", "0.6168347", "0.6106985", "0.61024123", "0.6079081", "0.6074859", "0.60344595", "0.599866", "0.59967065", "0.5992705", "0.5963718", "0.59538776", "0.59448045", "0.5925938", "0.5912597", "0.5899435", "0.58991385", "0.58972293", "0.5892114", "0.5891114", "0.5888635", "0.5886179", "0.5880387", "0.5818338", "0.5802178", "0.5766768", "0.57655793", "0.574731", "0.5716683", "0.5689056", "0.5676567", "0.5675126", "0.5674617", "0.56667274", "0.56590676", "0.5636968", "0.56354576", "0.563234", "0.56105846", "0.55953574", "0.55950767", "0.5592758", "0.55913264", "0.5579012", "0.556917", "0.55607533", "0.5544477", "0.5544165", "0.5534476", "0.5529302", "0.55291826", "0.55106723", "0.55025554", "0.5501997", "0.54935306", "0.54876256", "0.54839313", "0.5467596", "0.5452285", "0.5447482", "0.54465735", "0.5446566", "0.544482", "0.5434966", "0.5431919", "0.5431919", "0.54294044", "0.5419394", "0.54060006", "0.5404555", "0.5393416", "0.538713", "0.53616774", "0.5356788" ]
0.7587189
2
validate and set minute
public void setMinute(int minute) { if (minute < 0 || minute >= 60) throw new IllegalArgumentException("minute must be 0-59"); this.minute = minute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMinute(int value) {\n this.minute = value;\n }", "public void setMinute(int minute) throws InvalidDateException {\r\n\t\tif (minute < 60 & minute >= 0) {\r\n\t\t\tthis.minute = minute;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic minute for the date (between 0 and 59) !\");\r\n\t\t}\r\n\t}", "public void setMinute(int value) {\n this.minute = value;\n }", "public void setMinute(int minute)\n {\n this.minute = minute;\n }", "public void setMinute(int nMinute) { m_nTimeMin = nMinute; }", "public Time4 setMinute( int minute ) \r\n { \r\n this.minute = \r\n ( minute >= 0 && minute < 60 ) ? minute : 0;\r\n\r\n return this; // enables chaining\r\n }", "public void setMinutes(String minutes) {\n this.minutes = parseMinutes(minutes);\n }", "public void setMinute(int minute) {\n\t\tthis.minute = minute;\n\t}", "public void setMin(int min) throws MinuteInputException{\n\t\tif (min < 0)\n\t\t\tthrow new MinuteInputException(\"Invalid minute\");\n\t\tthis.min = min;\n\t}", "public void setMinute(int minute) {\n/* 70 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setMinutes(int minutes) throws BlablakidException {\n\t\tif(checkTime(this.hour, minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The minute introduced is wrong : \"+minutes);\n\t\t}\n\t\telse {\n\t\t\tthis.minutes = minutes;\n\t\t}\n\t}", "private int getMinute() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[1]);\n\t}", "public void setMinutes(int minutes) {\n this.minutes = minutes;\n }", "public int getMinute() { return this.minute; }", "Integer getMinute();", "public void setTime(double minutes) {\n\t\t// implement this method.\n\n\t}", "public int getMinute() {\n return minute;\n }", "public int getMinute() {\n return minute;\n }", "public void setMinutes(int[] minutes) {\n if (minutes == null)\n minutes = new int[] {};\n this.minutes = minutes;\n }", "public void setMinute(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: gov.nist.javax.sip.header.SIPDate.setMinute(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setMinute(int):void\");\n }", "public int getMinute()\n {\n return minute;\n }", "public void setTimestampMinute(Date timestampMinute) {\n\tthis.timestampMinute = timestampMinute;\n }", "public boolean setMinutes(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mMinutes = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }", "private void setTime(int hour, int minute){\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n persistLong(calendar.getTimeInMillis());\n\n notifyChanged();\n notifyDependencyChange(shouldDisableDependents());\n }", "public void uneMinuteDePlus() {\n\t\tthis.m = m+1 > 59 ? 0 : m+1;\n\t}", "public void setSecond(int second) \n { \n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"second must be 0-59\");\n\n this.second = second; \n }", "public Time( int minutes ) {\n this.minutes = minutes;\n }", "public static boolean isPickupTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<30){\n return false;\n }\n\n return true;\n }", "public final flipsParser.minute_return minute() throws RecognitionException {\n flipsParser.minute_return retval = new flipsParser.minute_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal379=null;\n Token string_literal380=null;\n Token string_literal381=null;\n Token string_literal382=null;\n\n CommonTree string_literal379_tree=null;\n CommonTree string_literal380_tree=null;\n CommonTree string_literal381_tree=null;\n CommonTree string_literal382_tree=null;\n RewriteRuleTokenStream stream_257=new RewriteRuleTokenStream(adaptor,\"token 257\");\n RewriteRuleTokenStream stream_254=new RewriteRuleTokenStream(adaptor,\"token 254\");\n RewriteRuleTokenStream stream_256=new RewriteRuleTokenStream(adaptor,\"token 256\");\n RewriteRuleTokenStream stream_255=new RewriteRuleTokenStream(adaptor,\"token 255\");\n\n try {\n // flips.g:564:2: ( ( 'min' | 'mins' | 'minute' | 'minutes' ) -> MINUTE )\n // flips.g:564:4: ( 'min' | 'mins' | 'minute' | 'minutes' )\n {\n // flips.g:564:4: ( 'min' | 'mins' | 'minute' | 'minutes' )\n int alt144=4;\n switch ( input.LA(1) ) {\n case 254:\n {\n alt144=1;\n }\n break;\n case 255:\n {\n alt144=2;\n }\n break;\n case 256:\n {\n alt144=3;\n }\n break;\n case 257:\n {\n alt144=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 144, 0, input);\n\n throw nvae;\n }\n\n switch (alt144) {\n case 1 :\n // flips.g:564:5: 'min'\n {\n string_literal379=(Token)match(input,254,FOLLOW_254_in_minute3275); \n stream_254.add(string_literal379);\n\n\n }\n break;\n case 2 :\n // flips.g:564:11: 'mins'\n {\n string_literal380=(Token)match(input,255,FOLLOW_255_in_minute3277); \n stream_255.add(string_literal380);\n\n\n }\n break;\n case 3 :\n // flips.g:564:18: 'minute'\n {\n string_literal381=(Token)match(input,256,FOLLOW_256_in_minute3279); \n stream_256.add(string_literal381);\n\n\n }\n break;\n case 4 :\n // flips.g:564:27: 'minutes'\n {\n string_literal382=(Token)match(input,257,FOLLOW_257_in_minute3281); \n stream_257.add(string_literal382);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 565:2: -> MINUTE\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(MINUTE, \"MINUTE\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n\tpublic void validate(Component arg0, Object arg1) throws WrongValueException {\n\t\tif (arg0 instanceof Timebox) {\n\n\t\t\t// no need for checking ?\n\t\t\tif (((Timebox) arg0).isDisabled())\n\t\t\t\treturn;\n\t\t\t\n\t\t\tif (arg1 == null)\n\t\t\t\tthrow new WrongValueException(arg0, \"Campo obligatorio\");\n\t\t\telse{\n\t\t\t\tCalendar validaMinutos = Calendar.getInstance();\n\t\t\t\tvalidaMinutos.setTime((Date)arg1);\n\t\t\t\tint totalMinutos = ((validaMinutos.get(Calendar.HOUR_OF_DAY)*60) + validaMinutos.get(Calendar.MINUTE));\n\t\t\t\t\n\t\t\t\tif(totalMinutos < 15)\n\t\t\t\t\tthrow new WrongValueException(arg0, \"Duración mínima de recesos es de 15 minutos\");\n\t\t\t\telse\n\t\t\t\t\tif(totalMinutos % 5 != 0)\n\t\t\t\t\t\tthrow new WrongValueException(arg0, \"Tiempo no permitido, debe ser múltiplo de 5 minutos\");\n\t\t\t}\n\t\t}\n\t}", "public boolean isSupportMinutes() {\r\n return true;\r\n }", "public static void setBeatsPerMinute( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, BEATSPERMINUTE, value);\r\n\t}", "public void run() {\n\t\t\tCalendar c = new GregorianCalendar();\n\t\t\tcurrHour = c.get(Calendar.HOUR);\n\t\t\tcurrMin = String.valueOf(c.get(Calendar.MINUTE));\n\t\t\tif(currMin.length()==1) {\n\t\t\t\tcurrMin = \"0\"+currMin;\n\t\t\t}\n\t\t\tcheckAlarm();\n\t\t}", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "public int getMinute() {\n\t\treturn minute;\n\t}", "public static final Function<Date,Date> setMinute(final int value) {\r\n return new Set(Calendar.MINUTE, value);\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n int timeToSet = (hourOfDay * 1000 + (minute * 1000)/60 + 18000) % 24000;\n prompt.sendCommand(CommandSet.getCommand(CommandSet.TIME) + \"set \"+timeToSet, new ResponseToastGenerator(getActivity(), \n new CommandResponseEvaluator(EvaluatorType.time),\n R.string.time_set_ok, R.string.time_set_failed));\n }", "public void setTime(int mins, int sec){\r\n this.Minutes = mins;\r\n this.Seconds = sec;\r\n }", "public static void setBeatsPerMinute(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.set(model, instanceResource, BEATSPERMINUTE, value);\r\n\t}", "public void setMinTime(Integer minTime) {\n this.minTime = minTime;\n }", "public void setBeatsPerMinute( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), BEATSPERMINUTE, value);\r\n\t}", "public final native double setMinutes(int minutes) /*-{\n this.setMinutes(minutes);\n return this.getTime();\n }-*/;", "public void setBeatsPerMinute(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), BEATSPERMINUTE, value);\r\n\t}", "public int getStartMinute() {\n return startMinute;\n }", "public void setLaMinutes(int laMinutes) {\n this.laMinutes = laMinutes;\n }", "public DateTimeFormatterBuilder appendMinuteOfHour(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.minuteOfHour(), minDigits, 2);\r\n }", "public int getMinutes(){\r\n return Minutes;\r\n }", "public String getMinutes();", "public void setOccupiedMinutes(int minutes){\n \t\tif(minutes > 0 && minutes*60 > 0)\n \t\t\tsetOccupiedSeconds(minutes*60);\n \t}", "public int getMinute() {\n\t\treturn this.minute;\n\t}", "public final native double setMinutes(int minutes, int seconds) /*-{\n this.setMinutes(minutes, seconds);\n return this.getTime();\n }-*/;", "public final native double setMinutes(int minutes, int seconds, int millis) /*-{\n this.setMinutes(minutes, seconds, millis);\n return this.getTime();\n }-*/;", "public void checkRegScore(){\n currentSecond = timeCounter / 60;\n currentMinute = timeElapsed;\n }", "public Builder setMinuteOfHour(final int minuteOfHour) {\n this.minuteOfHour = minuteOfHour;\n return this;\n }", "public DateTimeFormatterBuilder appendMinuteOfDay(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.minuteOfDay(), minDigits, 4);\r\n }", "public MyTime nextMinute(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\t\t\n\t\tif (minute!=59){\n\t\t\tminute++;\n\t\t}\n\t\telse{\n\t\t\tminute = 0;\n\t\t\tif (hours!=23){\n\t\t\t\thour++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thour = 0;\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\t\n\t\treturn new MyTime(hour,minute,second);\n\t}", "private boolean checkTime(int hour, int minutes) {\n\tboolean check = true;\n\t\tif((hour < 0) || (hour > 23) || (minutes < 0) || (minutes > 59)) {\n\t\t\tcheck = false;\n\t\t}\n\t\telse {\n\t\t\tcheck = true;\n\t\t}\n\treturn check;\n\t}", "public void setLoMinutes(int loMinutes) {\n this.loMinutes = loMinutes;\n }", "public static boolean isReservationTimeValid(int hour, int minute){\n Calendar currentTime = Calendar.getInstance();\n int c_hour = currentTime.get(Calendar.HOUR_OF_DAY);\n int c_minute = currentTime.get(Calendar.MINUTE);\n\n //Given time in minutes\n int g_mins = hour*60 + minute;\n\n //Current time in minutes\n int c_mins = c_hour*60 + c_minute;\n\n if(g_mins-c_mins<180){\n return false;\n }\n\n return true;\n }", "private boolean checkValidTime(String inputTime) {\n int hour = Integer.parseInt(inputTime.substring(0,2));\n int minute = Integer.parseInt(inputTime.substring(2,4));\n \n if ((hour >= 0 && hour <= 23) && (minute >= 0 && minute <= 59)) {\n return true;\n } else {\n return false;\n }\n }", "public void setMon6059(double mon6059) {\r\n\t\tthis.mon6059 = mon6059;\r\n\t}", "protected Time(int minutes) throws ArgumentException {\n\t\tthis();\n\t\tif (minutes < 0 || minutes >= 1440) {\n\t\t\tthrow new ArgumentException(String.format(\"%s,%s\",\n\t\t\t\t\tStrings.MinutesMustBeBetween0And1439, \"minutes\"));\n\t\t}\n\n\t\tthis.hours = minutes / 60;\n\t\tthis.minutes = minutes % 60;\n\t\tthis.seconds = 0;\n\t}", "public void onTimeSet(TimePicker tp, int hourOfDay,\n\t\t\t\t\t\t\tint minute) {\n\t\t\t\t\t\tString s1 = String.valueOf(hourOfDay);\n\t\t\t\t\t\tString s2 = String.valueOf(minute);\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tContentValues cvtime = new ContentValues();// 实例化ContentValues\n\t\t\t\t\t\tcvtime.put(\"time_hour\", hourOfDay);\n\t\t\t\t\t\tcvtime.put(\"time_min\", minute);// 添加要更改的字段及内容\n\t\t\t\t\t\tString whereClause = \"time_number=?\";\n\t\t\t\t\t\tString[] whereday = new String[] { String.valueOf(i) };\n\t\t\t\t\t\tdb.update(\"time\", cvtime, whereClause,\n\t\t\t\t\t\t\t\twhereday);\n\n\t\t\t\t\t\tif (minute < 10) {\n\t\t\t\t\t\t\ts2 = \"0\" + s2;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hourOfDay < 10) {\n\t\t\t\t\t\t\ts1 = \"0\" + s1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttv.setText(s1 + \":\" + s2);\n\n\t\t\t\t\t}", "public Time4( int hour, int minute ) \r\n { \r\n this.setTime( hour, minute, 0 ); \r\n }", "void setTime(final int time);", "public int parseTimeForMinute(String time)\n\t{\n\t\ttry {\n\t\t\tDate date = new SimpleDateFormat(\"hh:mma\", Locale.ENGLISH).parse(time);\n\t\t\t\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tint minute = date.getMinutes();\n\t\t\treturn minute;\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn -1;\t\n\t}", "protected static int getMinute(String dateTime) {\n return Integer.parseInt(dateTime.substring(9, 11));\n }", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getStarttime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getStarttime().set(Calendar.MINUTE, minute);\n updateStartTime();\n }", "private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }", "private boolean timeValidation(String time){\n if(! time.matches(\"(?:[0-1][0-9]|2[0-4]):[0-5]\\\\d\")){\n return false;\n }\n return true;\n }", "public Time(int hour, int minutes) throws BlablakidException{\n\t\tif(checkTime(hour,minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour or the minutes introduced are wrong , \"+hour+\":\"+minutes);\n\t\t}\n\t\telse {\n\t\t\tthis.hour = hour;\n\t\t\tthis.minutes = minutes;\n\t\t}\n\t}", "public int getMinute() {\n return dateTime.getMinute();\n }", "public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }", "public int getMinutes() {\n return this.minutes;\n }", "public Date getTimestampMinute() {\n\treturn timestampMinute;\n }", "public void setTime(){\r\n \r\n }", "@Deprecated\n/* */ public void setCurrentMinute(@RecentlyNonNull Integer currentMinute) {\n/* 107 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void testDateSetHourMinutesSeconds(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Date) { return; } // java.sql.Date throws IllegalArgumentException in setHours(),\n // setMinutes(), and setSeconds().\n\n if (validate) {\n assertEqualDate(createDateTime(\"Feb 20, 2006 03:20:20\"), date);\n } else {\n synchronized (date) {\n date.setHours(3);\n date.setMinutes(20);\n date.setSeconds(20);\n }\n }\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n editASLTStime.setText((((hourOfDay < 10) ? \"0\" + hourOfDay : hourOfDay) + \":\" + ((minute < 10) ? \"0\" + minute : minute) + \":00\"));\n }", "public int getStartMinute() {\n\treturn start.getMinute();\n }", "public DateTimeFormatterBuilder appendSecondOfMinute(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.secondOfMinute(), minDigits, 2);\r\n }", "public Clock()\n {\n hour = 11;\n min = 28;\n sec = 12;\n }", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n time = 3600 * hour + 60 * minute;\n\n\n }", "@Test public void shouldGive60MinFor150cent() {\r\n // First hour: $1.5\r\n assertEquals( 60 /*minutes*/, rs.calculateTime(150) ); \r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n }", "public Time( int hour, int minute ) {\n this( hour * MINS_PER_HR + minute );\n }", "public void setTime(double time) {_time = time;}", "public static void addBeatsPerMinute( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, BEATSPERMINUTE, value);\r\n\t}", "public void setMinutesPerDay(Number minutesPerDay)\r\n {\r\n if (minutesPerDay != null)\r\n {\r\n m_minutesPerDay = minutesPerDay;\r\n }\r\n }", "public static boolean validateTime(String validTill) {\n\t\treturn true;\n\t}", "@Override\n public void onTimeSet(TimePicker timePicker, int hour, int minute) {\n String str_min = \"\" + minute;\n if (minute < 10) {\n str_min = \"0\" + minute;\n }\n btnHoraCitaver.setText(hour + \":\" + str_min);\n }", "public void setTime(int hour, int minute, int second)\r\n\t{\r\n\t\tHours.setValue(hour);\r\n\t\tMinutes.setValue(minute);\r\n\t\tSeconds.setValue(second);\r\n\t\t\r\n\t\tupdateTime();\r\n\t}", "public String selectStartMinutes(String object, String data) {\n\t\tlogger.debug(\"Entering start Minutes\");\n\t\ttry {\n\n\t\t\tString allObjs[] = object.split(Constants.DATA_SPLIT);\n\t\t\tobject = allObjs[0];\n\t\t\tString hr = allObjs[1];\n\t\t\tString FinalNum = \"\";\n\t\t\tint num = 0;\n\t\t\tDate date = new Date();\n\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"mm\");\n\t\t\ttimeFormat.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t\t\tString Min = timeFormat.format(date.getTime());\n\t\t\tlogger.debug(Min);\n\t\t\tint Minutes = Integer.parseInt(Min);\n\t\t\tlogger.debug(\"Minutes=\" + Minutes);\n\t\t\tif ((Minutes % 5) == 0) {\n\t\t\t\tnum = Minutes + 5;\n\t\t\t\tif (num == 5) {\n\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\tselectList(object, num3);\n\t\t\t\t\tlogger.debug(\"when num==5:--\" + num3);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\n\t\t\t\t}\n\t\t\t\tif (num >= 60) {\n\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tif (!(data.equals(Constants.VALUE_12))) {\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t}\n\t\t\t\tFinalNum = String.valueOf(num);\n\t\t\t\tFinalNum = \":\" + FinalNum;\n\t\t\t\tselectList(object, FinalNum);\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t} else {\n\t\t\t\tint unitdigit = Minutes % 10;\n\t\t\t\tlogger.debug(\"Unitdigit=\" + unitdigit);\n\t\t\t\tnum = Minutes - unitdigit;\n\t\t\t\tlogger.debug(\"num=\" + num);\n\t\t\t\tif (unitdigit > 0 && unitdigit < 4) {\n\t\t\t\t\tnum = num + 5;\n\t\t\t\t\tif (num == 5) {\n\t\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\t\tselectList(object, String.valueOf(num3));\n\t\t\t\t\t\tlogger.debug(\"when num==5:--\" + num3);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString num3 = \":\" + num;\n\t\t\t\t\t\tselectList(object, String.valueOf(num3));\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t} else if (unitdigit == 4) {\n\t\t\t\t\tnum = num + 10;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tString num8 = \":\" + num;\n\t\t\t\t\tselectList(object, String.valueOf(num8));\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t} else if (unitdigit > 5 && unitdigit < 9) {\n\t\t\t\t\tnum = num + 10;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t} else if (unitdigit == 9) {\n\t\t\t\t\tnum = num + 15;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tnum = num - 60;\n\t\t\t\t\t\tif (num == 5) {\n\t\t\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\t\t\tselectList(object, num3);\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString num4 = String.valueOf(num);\n\t\t\t\t\t\tnum4 = \":\" + num4;\n\t\t\t\t\t\tselectList(object, num4);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tFinalNum = String.valueOf(num);\n\t\t\t\tFinalNum = \":\" + FinalNum;\n\t\t\t\tselectList(object, FinalNum);\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t\treturn Constants.KEYWORD_FAIL + e.getMessage();\n\t\t}\n\t}", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n String newValue = String.format(\"%d:%02d\", hourOfDay, minute);\n mPrefs.edit().putString(mPreference.getKey(), newValue).apply();\n mPreference.setSummary(DateFormatter.getSummaryTimestamp(getActivity(), newValue));\n mListener.onPreferenceChange(mPreference, newValue);\n SettingsFragment.updateAlarmManager(getActivity(), true);\n }", "public int getMinutes() {\n\t\treturn minutes;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getEndtime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getEndtime().set(Calendar.MINUTE, minute);\n updateEndTime();\n }", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "public Builder byMinute(Integer... minutes) {\n\t\t\treturn byMinute(Arrays.asList(minutes));\n\t\t}", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorBadMinutesOne() {\n CountDownTimer s = new CountDownTimer(4, 100, 30);\n }", "public Time(int hour, int minute, int second){ //method in the initializer block\n setHour(hour);\n setMinute(minute);\n setSecond(second);\n}" ]
[ "0.76856345", "0.76606596", "0.761505", "0.7490553", "0.7289403", "0.71394736", "0.71306384", "0.71127254", "0.6789289", "0.678369", "0.6775174", "0.6765561", "0.67346364", "0.6708564", "0.662914", "0.6562724", "0.65306157", "0.6511293", "0.64461", "0.63807404", "0.63447887", "0.62821025", "0.6210527", "0.620591", "0.6171624", "0.6151923", "0.61511207", "0.6089423", "0.60888445", "0.60844994", "0.60760874", "0.6017675", "0.59876025", "0.59777886", "0.59722555", "0.59719753", "0.5953284", "0.5921049", "0.59192497", "0.59064496", "0.5870456", "0.5862591", "0.5823412", "0.5820283", "0.58094794", "0.580287", "0.5791597", "0.57804775", "0.5773722", "0.5768442", "0.57484233", "0.5746158", "0.57426167", "0.5729934", "0.5723379", "0.5722968", "0.5720585", "0.56775963", "0.567678", "0.5666745", "0.5665843", "0.56653243", "0.5641603", "0.5631578", "0.5630684", "0.5620296", "0.5607106", "0.56041586", "0.55841327", "0.55724025", "0.55715555", "0.5564328", "0.5553001", "0.5529258", "0.55262595", "0.5524664", "0.55188835", "0.5513617", "0.5512848", "0.5505069", "0.5499772", "0.54982823", "0.5489632", "0.5488765", "0.54800296", "0.54726", "0.54618454", "0.5443349", "0.5441113", "0.5432726", "0.54301846", "0.54232407", "0.5418111", "0.54170036", "0.54155684", "0.5414426", "0.54115385", "0.540658", "0.5404106", "0.5398024" ]
0.77163154
0
validate and set second
public void setSecond(int second) { if (second < 0 || second >= 60) throw new IllegalArgumentException("second must be 0-59"); this.second = second; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSecond(@NotNull S second) {\n Condition.argNotNull(\"second\", second);\n this.second = second;\n }", "@Override\r\n\t\tpublic E setSecond(E second) {\n\t\t\treturn pair.setSecond(second);\r\n\t\t}", "public void setSecond(V second) {\r\n\t\tthis.second = second;\r\n\t}", "@Override\r\n\t\tpublic S setSecond(S second) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.setSecond(second);\r\n\t\t\t}\r\n\t\t}", "public void setSecond(int count){\n this.second = count;\n }", "public void setSecondSSN(float num2){\n\t\t SecondSSN= ((num2>0 && num2<=99)?num2:0);\n\t\t }", "public void setSecond(T tt) {\n\t\t\tthis.t = tt;\n\t\t}", "@NotNull\n public S getSecond() {\n return second;\n }", "public void setSecond(double value) {\n this.second = value;\n }", "public void setSecondExtreme(double se){\r\n secondExtreme = se;\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetUserId2() {\n user1.setUserId(-1);\n }", "public void setValue2(Object value2) { this.value2 = value2; }", "public int getSecond() { return this.second; }", "@Test(expected = IllegalArgumentException.class)\n public void testSetLastName2() {\n user1.setLastName(\"\");\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetFirstName2() {\n user1.setFirstName(\"\");\n }", "public void setSecondSet(String set) {\n\t\tset2 = set;\n\t\tsetsList = null;\n\t}", "public Integer getSecond(){\n return this.second;\n }", "private Pair(U first, V second) {\n\t\t\tthis.first = first;\n\t\t\tthis.second = second;\n\t\t}", "public void setSecond(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setSecond(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setSecond(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setSecond(int):void\");\n }", "private void issecond() {\n\n\t\t\tString tn = \"\";\n\t\t\tif (mytn == null || ((String) mytn).length() == 0) {\n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\t\tbuilder.setTitle(\"错误提示\");\n\t\t\t\tbuilder.setMessage(\"网络连接失败,请重试!\");\n\t\t\t\tbuilder.setNegativeButton(\"确定\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tbuilder.create().show();\n\t\t\t} else {\n\t\t\t\ttn = mytn;\n\t\t\t\t/************************************************* \n\t\t\t\t * \n\t\t\t\t * 步骤2:通过银联工具类启动支付插件 \n\t\t\t\t * \n\t\t\t\t ************************************************/\n\t\t\t\tdoStartUnionPayPlugin(this, tn, mMode);\n\t\t\t}\n\n\n\n\n\t\t}", "@Test(expected = IllegalArgumentException.class)\n public void testSetEmail2() {\n user1.setEmail(\"\");\n }", "public void err2() {\n\t\tString errMessage = CalculatorValue.checkMeasureValue(text_Operand2.getText());\n\t\tif (errMessage != \"\") {\n\t\t\tlabel_errOperand2.setText(CalculatorValue.measuredValueErrorMessage);\n\t\t\tif (CalculatorValue.measuredValueIndexofError <= -1)\n\t\t\t\treturn;\n\t\t\tString input = CalculatorValue.measuredValueInput;\n\t\t\toperand2ErrPart1.setText(input.substring(0, CalculatorValue.measuredValueIndexofError));\n\t\t\toperand2ErrPart2.setText(\"\\u21EB\");\n\t\t}\n\t}", "public void setValue2 (String Value2);", "public static void setFailure(String sub){\n if(subject1 == \"\")\n subject1 = sub;\n else if (subject2 ==\"\")\n subject2 = sub;\n else if(subject3 == \"\")\n subject3 = sub;\n else \n subject4 = sub;\n }", "private void setP2( Point p2 ){\n this.p2=p2;\n }", "public T getSecond() {\n return second;\n }", "public T2 getSecond() {\n\t\treturn second;\n\t}", "public void setP2(Point point){\n\t\tif((point.getX() <= getP1().getX()) || (point.getY() <= getP1().getY())){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tsuper.setP2(point);\n\t}", "public void setSec(int sec) throws SecondInputException{\n\t\tif ((sec < 0) || (sec > 59))\n\t\t\tthrow new SecondInputException(\"Invalid second\");\n\t\telse\n\t\t\tthis.sec = sec;\n\t}", "private void setOperand2() {\n\t\ttext_Result.setText(\"\");\n\t\tlabel_Result.setText(\"Result\");\n\t\tlabel_errResult.setText(\"\");\n\t\tif (perform.setOperand2(text_Operand2.getText())) {\n\t\t\tlabel_errOperand2.setText(\"\");\n\t\t\toperand2ErrPart1.setText(\"\"); // Clear the first term of error part\n\t\t\toperand2ErrPart2.setText(\"\"); // Clear the second term of error part\n\t\t\tif (text_Operand1.getText().length() == 0)\n\t\t\t\tlabel_errOperand1.setText(\"\");\n\t\t} else\n\t\t\terr2();\n\t}", "public void setEndTwoElement(ElementStub endTwoElement)\n {\n this.endTwoElement = endTwoElement;\n }", "@Test\n public void setError_ErrorIsSet_Passes() throws Exception {\n test2JsonResponse.setError(test2error);\n Assert.assertEquals(test2JsonResponse.getError(), test2error);\n }", "public void setA2(int a2)\n {\n this.a2 = a2;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetUsername2() {\n user1.setUsername(\"\");\n }", "@Override\n\tpublic void setField2(boolean field2) {\n\t\t_second.setField2(field2);\n\t}", "public void setX2()\n\t{\n\t\tthis.x[2] = this.x[0] + (this.length)/2;\n\t}", "@Test\n\tpublic void whenFirstMoreSecond() {\n\t\tMax max = new Max();\n\t\tint result = max.max(5, 3);\n\t\tint expected = 5;\n\t\tassertThat(result, is(expected));\n\t}", "public void setInput2(int input2) {\n this.input2 = input2;\n }", "protected void setP1P2(byte[] p1p2) {\n\tsetP1(p1p2[0]);\n\tsetP2(p1p2[1]);\n }", "public S second() {\n return this.second;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetPassword2() {\n user1.setPassword(\"\");\n }", "public V getSecond() {\r\n\t\treturn second;\r\n\t}", "public Builder setS2(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n s2_ = value;\n onChanged();\n return this;\n }", "public void validateRpd1s2()\n {\n // This guideline cannot be automatically tested.\n }", "public B getSecond() {return second; }", "public void setData(final List<Double> second) {\n this.data = second;\n }", "@Test\r\n\tpublic void test2(){\n\t \tE1.setFirstName(\"FN1\");\r\n\t\tE2.setFirstName(\"FN2\");\r\n\t String actual = E1.getFirstName();\r\n String expected = \"FN1\";\r\n assertEquals(actual,expected);\r\n }", "@Test(expected = IllegalArgumentException.class)\n @SuppressFBWarnings(\"NP\")\n public void testSetRegistrationDate3() {\n user1.setRegistrationDate(null);\n }", "private void check2(){\n \n // All methods past the first rule check to see\n // if errorCode is still 0 or not; if not skips respective method\n if(errorCode == 0){\n \n if (!(fourthDigit == fifthDigit + 1)){\n valid = false;\n errorCode = 2;\n }\n }\n\t}", "public int getSecond() {\n\t\treturn second;\n\t}", "@Test\n public void whenFirstEqualsSecond() {\n Max maximum = new Max();\n int result = maximum.max(2, 2);\n assertThat(result, is(2));\n }", "default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public void setB2(int b2)\n {\n this.b2 = b2;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testSetRegistrationDate2() {\n user1.setRegistrationDate(LocalDateTime.now().plusHours(1));\n }", "protected void setP2(byte p2) {\n\theader[3] = p2;\n }", "public void setFirstSSN(float num1){\n\t\t FirstSSN = ((num1>0 && num1<=999)?num1:0);\n\t\t }", "public B second() {\n return second;\n }", "private void createTwoValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(2));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {{ add(0); add(1); }}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(3));\n\t\t\t}\n\t\t});\n\t}", "@Test\n public void testValiderLaLimiteDuSoin() {\n \n assertTrue(soin1.validerLaLimiteDuSoin());\n soin3.setLimite(-2.0);\n assertFalse(soin3.validerLaLimiteDuSoin());\n assertTrue(soin2.validerLaLimiteDuSoin());\n }", "@Test\n\tpublic void whenSecondMoreFirst() {\n\t\tMax max = new Max();\n\t\tint result = max.max(2, 7);\n\t\tint expected = 7;\n\t\tassertThat(result, is(expected));\n\t}", "@Test\r\n void B6007089_test_SemeterMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Time Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(\"1\");\r\n section.setTime(null);\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"time\", v.getPropertyPath().toString());\r\n }", "@Test\n\tpublic void testSetFecha2(){\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(2);\n\t\tassertFalse(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "@Test(expected = IllegalArgumentException.class)\n @SuppressFBWarnings(\"NP\")\n public void testSetFirstName3() {\n user1.setFirstName(null);\n }", "private void validationMotsDePasse(String motDePasse, String confirmation)\n\t\t\tthrows FormValidationException, SecondException {\n\t\tif (motDePasse != null && confirmation != null) {\n\t\t\tif (!motDePasse.equals(confirmation)) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Les mots de passe entrés sont différents, merci de les saisir à nouveau.\");\n\t\t\t\tthrow new SecondException(\"Password different from the first\");\n\t\t\t} else if (motDePasse.length() < 3) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Les mots de passe doivent contenir au moins 3 caractères.\");\n\t\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\t\"Les mots de passe doivent contenir au moins 3 caractères.\");\n\t\t\t}\n\t\t}\n\t\t// TODO verifier que le pwd est unique dans le group\n\t\t// else if(){\n\t\t//\n\t\t// }\n\n\t\telse {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Merci de saisir et confirmer votre mot de passe.\");\n\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\"Merci de saisir et confirmer votre mot de passe.\");\n\t\t}\n\t}", "@Test\n\tpublic void testMiddleTwoSecond() {\n\t\t\n\t\tStringMiddle strMiddle = new StringMiddle();\n\t\tString result = strMiddle.middleTwo(\"code\");\n\t\tassertEquals(\"od\", result);\n\t\t\n\t}", "public void testSetLine2_EmptyString() {\r\n try {\r\n address.setLine2(\" \");\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Nonnull\n default ArgumentParser<T> thenTry(@Nonnull ArgumentParser<T> other) {\n ArgumentParser<T> first = this;\n return t -> {\n Optional<T> ret = first.parse(t);\n return ret.isPresent() ? ret : other.parse(t);\n };\n }", "default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }", "public void setInput2(final String input2) {\n this.input2 = input2;\n }", "public void setInvalid();", "public void afterTextChanged(Editable s) {\n\n if (s.length() ==1) {\n edit_two.requestFocus();\n }\n\n }", "@Test(expected = IllegalArgumentException.class)\n @SuppressFBWarnings(\"NP\")\n public void testSetLastName3() {\n user1.setLastName(null);\n }", "@Test\n public void whenSecondIsMax() {\n Max max = new Max();\n int rsl = max.max(0, 3, -1);\n assertThat(rsl, is(3));\n }", "@Test\r\n public void test4(){\n\t E1.setSocialSecurityNumber(\"SSN1\");\r\n\t\tE2.setSocialSecurityNumber(\"SSN2\");\r\n String actual = E1.getSocialSecurityNumber();\r\n String expected = \"SSN1\";\r\n assertEquals(actual,expected);\r\n }", "@Test\n\tpublic void testSetValueMult1to1Ok() {\n\n\t\t// set up\n\t\tPerson martin = new Person(\"\\\"Bl�mel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Bl�mel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tTestUser user = new TestUser(\"admin\");\n\t\tAssert.assertNull(martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t\tAssert.assertNull(user.getPerson());\n\n\t\t// test\n\t\tuser.setPerson(martin);\n\t\tAssert.assertSame(martin, user.getPerson());\n\t\tAssert.assertSame(user, martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t}", "void setP2p(int p2p);", "public void setResultDoubles(final double first, final double second)\r\n {\r\n resultDoubles[0] = first;\r\n resultDoubles[1] = second;\r\n }", "protected void setSecondPlayer(TennisPlayer tennisPlayer) {\r\n this.secondPlayer = tennisPlayer;\r\n }", "private void validateFirst() {\n mNameValidator.processResult(\n mNameValidator.apply(binding.personFirstName.getText().toString().trim()),\n this::validateLast,\n result -> binding.personFirstName.setError(\"Please enter a first name.\"));\n }", "public GPoint getSecondPoint(){\n return(point2);\n }", "@Test\n\tpublic void nextAttemptSecond() {\n\t\tMockito.when(mockBowlingGameController.isLastFrame()).thenReturn(false);\n\t\tMockito.when(mockBowlingGameController.getCurrentFrame()).thenReturn(bowler.getFrames().get(0));\n\t\tFrame frame = bowler.getFrames().get(0);\n\t\tframe.setFirstAttempt(5);\n\t\tif (!frame.isLastFrame()) {\n\t\t\tAssert.assertEquals(Attempt.SECOND, mockBowlingGameController.nextAttempt(Attempt.FIRST));\n\t\t}\n\t}", "public U getSecond() {\n return u;\n }", "@Override\n\tpublic boolean getField2() {\n\t\treturn _second.getField2();\n\t}", "public String firstTwo(String str) {\r\n return str.length() < 2 ? str : str.substring(0, 2);\r\n }", "boolean hasSecondField();", "private void validateUser(user theUserOfThisAccount2) {\n\t\tboolean ok=false;\n\n\t\t\t\n\t\tif(passwordOfRegisteration.equals(passwordConfirm)&&!passwordOfRegisteration.equals(\"\")&&passwordOfRegisteration!=null){\n\t\t\tok=true;\n\t\t}\n\t\t\n\t\t\n\t\tif(ok){\n\t\t\t\n\t\t\t\ttheUserOfThisAccount2.setPassword(new Md5PasswordEncoder().encodePassword(passwordOfRegisteration,theUserOfThisAccount2.getUserName()));\n\t\t\t\tuserDataFacede.adduser(theUserOfThisAccount2);\n\t\t\t\tPrimeFaces.current().executeScript(\"new PNotify({\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttitle: 'Success',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttext: 'Your data has been changed.',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttype: 'success'\\r\\n\" + \n\t\t\t\t\t\t\"\t\t});\");\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tpleaseCheck();\n\t\t\t\n\t\t}\n\t}", "@Test\n public void parse_invalidValueFollowedByValidValue_success() {\n Index targetIndex = INDEX_FIRST;\n String userInput = targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;\n ClientDescriptor descriptor = new ClientDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();\n EditClientCommand expectedCommand = new EditClientCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n\n // other valid values specified\n userInput = targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB\n + PHONE_DESC_BOB;\n descriptor = new ClientDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)\n .withAddress(VALID_ADDRESS_BOB).build();\n expectedCommand = new EditClientCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n }", "public void testCaseTwo() {\n\t\tgrcbal3 = new GRCbal3();\n\n\t\t// first tick\n\t\tgrcbal3.doTick();\n\t\tassertEquals(grcbal3.a.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.b.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.c.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.d.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.e.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.t.isPresent(), ABSENT);\n\n\t\t// second tick\n\t\tgrcbal3.doTick();\n\t\tassertEquals(grcbal3.a.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.b.isPresent(), PRESENT);\n\t\tassertEquals(grcbal3.c.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.d.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.e.isPresent(), ABSENT);\n\t\tassertEquals(grcbal3.t.isPresent(), ABSENT);\n\t}", "public void setTest2(String test2) {\r\n this.test2 = test2 == null ? null : test2.trim();\r\n }", "public void setValue2(final java.lang.String value2) {\n this.value2 = value2;\n }", "@Test\r\n\tpublic void test3(){\n\t \tE1.setLastName(\"LN1\");\r\n\t\tE2.setLastName(\"LN2\");\r\n\t String actual = E1.getLastName();\r\n String expected = \"LN1\";\r\n assertEquals(actual,expected);\r\n }", "default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }", "@Override\r\n\t\tpublic E setFirst(E first) {\n\t\t\treturn pair.setFirst(first);\r\n\t\t}", "public void validateRpd22s2()\n {\n // This guideline cannot be automatically tested.\n }", "@Override\n\tpublic boolean isField2() {\n\t\treturn _second.isField2();\n\t}", "@Override\n protected void postInitializeMethod() {\n Debug.printLogError(TAG, \"postInitializeMethod_1: \" + Validator.getInstance().checkEmpty(\"\", 0), false);\n Debug.printLogError(TAG, \"postInitializeMethod_2: \" + Validator.getInstance().checkEmpty(\"\", 0.00), false);\n Debug.printLogError(TAG, \"postInitializeMethod_3: \" + Validator.getInstance().checkEmpty(\"\", \"no_data\"), false);\n\n ValueExtractor valueExtractor = new ValueExtractor(this);\n Debug.printLogError(TAG, \"postInitializeMethod_4: \"\n + valueExtractor.getValue(\"hasValue\", \"\"), false);\n\n /*\n * Fetch value on second screen which is passed through intent.putExtra();\n * */\n String firstValue = valueExtractor.getValue(\"value1\", \"1\");\n int secondValue = valueExtractor.getValue(\"value2\", 2);\n boolean isAdd = valueExtractor.getValue(\"value3\", false);\n\n /*\n * SharedPreferences class\n * */\n SharedPreferencesUtility sp = new SharedPreferencesUtility(mContext);\n sp.setString(\"key1\", \"komal\");\n sp.setInteger(\"key2\", 1224);\n sp.setBoolean(\"isPass\", false);\n\n String str1 = sp.getString(\"key1\", \"komal\");\n int int1 = sp.getInteger(\"key2\", 0);\n boolean b1 = sp.getBoolean(\"isPass\", false);\n }", "@Override\r\n\t\tpublic V setValue(V value) {\n\t\t\treturn pair.setSecond(value);\r\n\t\t}", "private void _createSecondPort() throws NameDuplicationException, IllegalActionException {\r\n // Go looking for the port in case somebody else created the port\r\n // already. For example, this might\r\n // happen in shallow code generation.\r\n secondOperand = (Port) getPort(\"secondOperand\");\r\n if (secondOperand == null) {\r\n secondOperand = PortFactory.getInstance().createInputPort(this, \"secondOperand\", Double.class);\r\n\r\n } else if (secondOperand.getContainer() == null) {\r\n secondOperand.setContainer(this);\r\n }\r\n }", "public void setItem2(Object item) throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\tthis.item2 = item;\n\t}", "@Override\r\n\t\tpublic S getSecond() {\n\t\t\treturn pair.getSecond();\r\n\t\t}" ]
[ "0.70856446", "0.6361905", "0.6276206", "0.61921954", "0.6108844", "0.6033085", "0.5817619", "0.57620233", "0.56099474", "0.5560786", "0.55570865", "0.5548216", "0.5530626", "0.55087465", "0.5489879", "0.54160947", "0.538465", "0.5380144", "0.5351246", "0.5337013", "0.5325775", "0.5299226", "0.5292747", "0.528845", "0.5287958", "0.52599066", "0.5250725", "0.5231811", "0.522612", "0.52260584", "0.5217545", "0.52103096", "0.520871", "0.5191407", "0.514803", "0.5147685", "0.51308423", "0.512434", "0.5120787", "0.51199204", "0.508878", "0.50785565", "0.50782496", "0.50706667", "0.5059575", "0.504993", "0.5048382", "0.50349295", "0.5027704", "0.50262403", "0.50219136", "0.50210536", "0.49957043", "0.49911508", "0.4975445", "0.49701214", "0.49700725", "0.49655023", "0.49650523", "0.4958813", "0.49469355", "0.49436298", "0.49419892", "0.49411136", "0.49388015", "0.49370348", "0.4931854", "0.49308363", "0.49299875", "0.4927398", "0.4923964", "0.49204218", "0.49137163", "0.4906939", "0.49064654", "0.49035504", "0.4897129", "0.48903775", "0.48866248", "0.48810107", "0.48809224", "0.48754185", "0.4875343", "0.4867154", "0.48638645", "0.4863739", "0.48614398", "0.4857561", "0.48551404", "0.48498577", "0.48479116", "0.48458526", "0.4836963", "0.4833648", "0.48333356", "0.48264468", "0.48204368", "0.48197994", "0.48152795", "0.48148644" ]
0.57132304
8
Get Methods get hour value
public int getHour() { return hour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getHour();", "public int getHour() { return this.hour; }", "public int getHour()\n {\n return hour;\n }", "public int getHour(){\n return hour;\n }", "public String getHours();", "Integer getStartHour();", "public Integer getHour() {\n return hour;\n }", "public double getHour() {\n\t\treturn this.hour;\n\t}", "public int getHour() {\n\t\treturn hour;\n\t}", "public int getHour() {\n\t\treturn hour;\n\t}", "Integer getEndHour();", "public Integer getHour() {\n\t\treturn hour;\n\t}", "public int getStartHour() {\n return startHour; // stub\n }", "public int getHour() {\n\t\treturn this.hour;\n\t}", "public double getHours() {\r\n return hours;\r\n }", "public double getHours() {\r\n return hours;\r\n }", "public int getHour() {\n return dateTime.getHour();\n }", "public int getHour() {\n return hour; // returns the appointment's hour in military time\n }", "public double getHours(){\n return hours;\n }", "public int getHour() {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.getHour():int, dex: in method: gov.nist.javax.sip.header.SIPDate.getHour():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getHour():int\");\n }", "public int[] getHours() {\n return hours;\n }", "private int getHours() {\n //-----------------------------------------------------------\n //Preconditions: none.\n //Postconditions: returns the value for the data field hours.\n //-----------------------------------------------------------\n\n return this.hours;\n\n }", "public int getHour() {\n\t\tthis.hour = this.total % 12;\n\t\treturn this.hour;\n\t}", "public int getHours() {\n return this.hours;\n }", "public final native int getHours() /*-{\n return this.getHours();\n }-*/;", "public int getIntervalHours();", "@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}", "@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }", "public int getStartHour() {\n\treturn start.getHour();\n }", "float hour() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n case SOUTH_4M:\n case SOUTH_16M:\n return 0f;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * At 10h33m, Orion is about to set in the west and the\n * Pointers of the Big Dipper are near the meridian.\n */\n return 10.55f;\n }\n throw new IllegalStateException();\n }", "public int getEndHour() {\n\treturn end.getHour();// s\n }", "public int getHours(){\n return (int) totalSeconds/3600;\n }", "public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int hourOfDay() {\r\n\t\treturn mC.get(Calendar.HOUR_OF_DAY);\r\n\t}", "private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}", "@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }", "public int[] getHours() {\n int[] hoursArray = {this.hours, this.overtimeHours};\n return hoursArray;\n }", "public String getCurrentHours() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}", "public double getPerHour() {\r\n return perHour;\r\n }", "public int getHours() {\r\n return FormatUtils.uint8ToInt(mHours);\r\n }", "public int getLogHour(int index)\n {\n return m_Log.get(index).getHour();\n }", "public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }", "public List<Integer> getByHour() {\n\t\treturn byHour;\n\t}", "public void setHour(int hour)\n {\n this.hour = hour;\n }", "public int getFinishHour() {\n return finishHour;\n }", "public final flipsParser.hour_return hour() throws RecognitionException {\n flipsParser.hour_return retval = new flipsParser.hour_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal374=null;\n Token string_literal375=null;\n Token string_literal376=null;\n Token string_literal377=null;\n Token string_literal378=null;\n\n CommonTree char_literal374_tree=null;\n CommonTree string_literal375_tree=null;\n CommonTree string_literal376_tree=null;\n CommonTree string_literal377_tree=null;\n CommonTree string_literal378_tree=null;\n RewriteRuleTokenStream stream_250=new RewriteRuleTokenStream(adaptor,\"token 250\");\n RewriteRuleTokenStream stream_251=new RewriteRuleTokenStream(adaptor,\"token 251\");\n RewriteRuleTokenStream stream_252=new RewriteRuleTokenStream(adaptor,\"token 252\");\n RewriteRuleTokenStream stream_249=new RewriteRuleTokenStream(adaptor,\"token 249\");\n RewriteRuleTokenStream stream_253=new RewriteRuleTokenStream(adaptor,\"token 253\");\n\n try {\n // flips.g:559:2: ( ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' ) -> HOUR )\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n {\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n int alt143=5;\n switch ( input.LA(1) ) {\n case 249:\n {\n alt143=1;\n }\n break;\n case 250:\n {\n alt143=2;\n }\n break;\n case 251:\n {\n alt143=3;\n }\n break;\n case 252:\n {\n alt143=4;\n }\n break;\n case 253:\n {\n alt143=5;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 143, 0, input);\n\n throw nvae;\n }\n\n switch (alt143) {\n case 1 :\n // flips.g:559:5: 'h'\n {\n char_literal374=(Token)match(input,249,FOLLOW_249_in_hour3249); \n stream_249.add(char_literal374);\n\n\n }\n break;\n case 2 :\n // flips.g:559:9: 'hr'\n {\n string_literal375=(Token)match(input,250,FOLLOW_250_in_hour3251); \n stream_250.add(string_literal375);\n\n\n }\n break;\n case 3 :\n // flips.g:559:14: 'hrs'\n {\n string_literal376=(Token)match(input,251,FOLLOW_251_in_hour3253); \n stream_251.add(string_literal376);\n\n\n }\n break;\n case 4 :\n // flips.g:559:20: 'hour'\n {\n string_literal377=(Token)match(input,252,FOLLOW_252_in_hour3255); \n stream_252.add(string_literal377);\n\n\n }\n break;\n case 5 :\n // flips.g:559:27: 'hours'\n {\n string_literal378=(Token)match(input,253,FOLLOW_253_in_hour3257); \n stream_253.add(string_literal378);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 560:2: -> HOUR\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(HOUR, \"HOUR\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "private String getHours() {\n StringBuilder hoursSB = new StringBuilder();\n\n if (hours > 0) {\n hoursSB.append(hours);\n } else {\n hoursSB.append(\"0\");\n }\n\n return hoursSB.toString();\n }", "public String displayHours() {\n String hrs=day+\" Hours: \" +getStartHours()+ \" to \"+get_endingHour();\n return hrs;\n }", "@Override\n public String onHourChange(long hour) {\n return null;\n }", "public void setHour(Integer hour) {\n this.hour = hour;\n }", "static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }", "public String toString() {\n return hour+\" \"+minute;\r\n }", "public void sethourNeed(Integer h){hourNeed=h;}", "public static int getCurrentHour()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t}", "@Override\n\tpublic SeckillPhoneInfo getPhoneInfo(int hour) {\n\t\treturn seck.getPhoneInfo(hour);\n\t}", "public DayHourGreeting () {\n Calendar c = Calendar.getInstance();\n int hourOfDay = c.get(Calendar.HOUR_OF_DAY);\n setGreeting(hourOfDay);\n }", "@Deprecated\n/* */ @RecentlyNonNull\n/* */ public Integer getCurrentHour() {\n/* 97 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getHourFraction()\n {\n return (int)Math.floor(hours);\n }", "@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }", "public double getPriceperhour() {\n return priceperhour;\n }", "java.lang.String getBusinesshours();", "public String getFullHour()\n {\n\n String str = \"\";\n\n if (hour < 10)\n {\n str += \"0\";\n }\n str += hour + \":\";\n\n if (minute < 10)\n {\n str += \"0\";\n }\n str += minute;\n\n return str;\n }", "private KilometersPerHour() {}", "public double totalHours(){\n return (this._startingHour - this._endingHour);\n }", "@Override\n\tpublic HourRegistration getHours(Long person_id, LocalDate date) {\n\t\treturn null;\n \t}", "public int generateHour() {\n Random random = new Random();\n int hour = random.nextInt(8);\n\n return hour;\n }", "@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }", "public String getHourActualStart() {\n return hourStartInput.getAttribute(\"value\");\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "public SpinnerNumberModel getHoursModel() {\n\treturn this.hoursModel;\n }", "protected void runEachHour() {\n \n }", "public String getOperatingHours() {\n return mOperatingHours;\n }", "public Integer getMaxHour() {\r\n return maxHour;\r\n }", "public static SimpleDateFormat getHourFormat() {\n return new SimpleDateFormat(\"HH:mm\");\n }", "public float getHourHeight() {\n return config.hourHeight;\n }", "public int getHora(){\n return minutosStamina;\n }", "private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}", "public int getET()\n {\n return exTime;\n }", "Long getTemperatureForLastHour();", "public String getDateHourRepresentation()\n\t{\n\t\tchar[] charArr = new char[13];\n\t\tcharArr[2] = charArr[5] = charArr[10] = '/';\n\t\tint day = m_day;\n\t\tint month = m_month;\n\t\tint year = m_year;\n\t\tint hour = m_hour;\n\t\tfor(int i = 0; i < 2; i++)\n\t\t{\n\t\t\tcharArr[1 - i] = Character.forDigit(day % 10, 10);\n\t\t\tcharArr[4 - i] = Character.forDigit(month % 10, 10);\n\t\t\tcharArr[12 - i] = Character.forDigit(hour % 10, 10);\n\t\t\tday /= 10;\n\t\t\tmonth /= 10;\n\t\t\thour /=10;\n \t\t}\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tcharArr[9 - i] = Character.forDigit(year % 10, 10);\n\t\t\tyear /= 10;\n\t\t}\n\t\treturn new String(charArr);\n\t}", "@Override\n public String getSavingsHours() {\n\n final String savingsHrs = getElement(getDriver(), By.className(SAVINGS_HOURS), TINY_TIMEOUT)\n .getText();\n setLogString(\"Savings Hours:\" + savingsHrs, true, CustomLogLevel.HIGH);\n return savingsHrs.substring(savingsHrs.indexOf(\"(\") + 1, savingsHrs.indexOf(\"h\"));\n }", "public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}", "public static int getHourOfTime(long time){\n \t//time-=59999;\n \tint retHour=0;\n \tlong edittime=time;\n \twhile (edittime>=60*60*1000){\n \t\tedittime=edittime-60*60*1000;\n \t\tretHour++;\n \t}\n \tretHour = retHour % 12;\n \tif (retHour==0){ retHour=12; }\n \treturn retHour;\n }", "public String getHoursOfOperationId() {\n return this.hoursOfOperationId;\n }", "public String getHourActualEnd() {\n return hourEndInput.getAttribute(\"value\");\n }", "public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n return sdf.format(calendario.getTime());\n }", "public String getAttractionHours() {\n return mAttractionHours;\n }", "public double getPreferredConsecutiveHours();", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "public int getMinHours() {\r\n return minHours;\r\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public double calculatePayment (int hours);", "public int getEndMilitaryHour() {\n return this.endMilitaryHour;\n }", "private void loadHours(){\n int hours = 0;\n int minutes = 0;\n for(int i=0; i<24;i++){\n for(int j=0; j<4;j++){\n this.hoursOfTheDay.add(String.format(\"%02d\",hours)+\":\"+ String.format(\"%02d\",minutes));\n minutes+=15;\n }\n hours++;\n minutes = 0;\n }\n }", "public final native double setHours(int hours) /*-{\n this.setHours(hours);\n return this.getTime();\n }-*/;", "@Override\n public String toString() {return super.toString()+\" payment by hours\";}", "public float getCost(Date hour) {\r\n Iterator<Date> it = schedule.iterator();\r\n int i = 0;\r\n while (it.hasNext()) {\r\n if (it.next().after(hour)) {\r\n return cost.get(i);\r\n }\r\n i++;\r\n }\r\n return defaultCost;\r\n }", "public double getHourlyRate() {\r\n return hourlyRate;\r\n }" ]
[ "0.832758", "0.80446076", "0.80116737", "0.7951062", "0.7887101", "0.77631855", "0.7653993", "0.7550536", "0.7537496", "0.7537496", "0.7524768", "0.7499852", "0.74854606", "0.7463203", "0.7413942", "0.7413942", "0.7364893", "0.73415977", "0.73282725", "0.7297467", "0.7182356", "0.71120566", "0.7108752", "0.7091565", "0.6970545", "0.69622713", "0.6902409", "0.6838351", "0.6825019", "0.67767954", "0.677334", "0.67335886", "0.6728236", "0.67185014", "0.6715288", "0.6708868", "0.66789645", "0.66350585", "0.663474", "0.6629566", "0.6519258", "0.6518958", "0.6497577", "0.6456545", "0.64060736", "0.63893116", "0.6348291", "0.6344579", "0.63089985", "0.63001037", "0.62920827", "0.6286515", "0.6272728", "0.62682503", "0.62575364", "0.62536156", "0.6252475", "0.6239379", "0.6226951", "0.6220189", "0.6213106", "0.6177262", "0.61712307", "0.6149309", "0.6144652", "0.61386406", "0.6130404", "0.611273", "0.6109752", "0.6107596", "0.61073005", "0.6081229", "0.6078222", "0.6074408", "0.60635346", "0.60342425", "0.6010573", "0.5972964", "0.59650064", "0.59628034", "0.5956669", "0.5952456", "0.5900416", "0.587587", "0.5871945", "0.58619225", "0.58374554", "0.58317953", "0.5830568", "0.5820656", "0.58174425", "0.5794426", "0.579194", "0.5791038", "0.57897455", "0.578538", "0.57673967", "0.57654554", "0.57516205", "0.57472426" ]
0.808581
1
convert to String in universaltime format (HH:MM:SS)
public String toUniversalString() { return String.format( "%02d:%02d:%02d %d/%d/%d", getHour(), getMinute(), getSecond(), month, day, year); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toUniversalString() {\n return String.format(\"%02d:%02d:%02d\", hour, minutes, seconds);\n\n }", "public String toUniversalString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return twoDigits.format( this.getHour() ) + \":\" +\r\n twoDigits.format( this.getMinute() ) + \":\" +\r\n twoDigits.format( this.getSecond() );\r\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 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 }", "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 getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "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 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 getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "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}", "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 timeAsString(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n return String.format(\"%02d:%02d:%02d\", hour, minute, second);\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\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 }", "@Override\n\tpublic String toString() {\n\t\tLocalTime lT = LocalTime.of(hour, minute);\n\t\tDateTimeFormatter.ofPattern(\"hh:mm\").format(lT);\n\t\treturn lT.toString() + \" \" + timeType;\n\t}", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\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 String toString(){\r\n String strout = \"\";\r\n strout = String.format(\"%02d:%02d\", this.getMinutes(), this.getSeconds());\r\n return strout;\r\n }", "public String toString() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 4\n\t\tString hours = String.format(\"%02d\", this.hours);\n\t\tString minutes = String.format(\"%02d\", this.minutes);\n\t\tString seconds = String.format(\"%05.2f\", this.seconds);\n\n\t\tString time = hours + \":\" + minutes + \":\" + seconds;\n\t\treturn time;\n\t}", "public String toString() {\n if (time != null) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n return time.format(formatter);\n } else {\n return \"INVALID TIME\";\n }\n }", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "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}", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "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 }", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "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 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}", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "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 }", "public static String convertTimeToString(LocalDateTime localDateTime) {\n\t\treturn localDateTime.truncatedTo(ChronoUnit.MINUTES)\n\t\t\t\t\t\t\t .format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);\n\t}", "public static String TimeConvert(int num) {\n\n int hours;\n int minutes;\n\n if (num < 60){\n\n return \"0:\" + num;\n }\n else {\n\n hours = num / 60;\n minutes = num % 60;\n\n return hours + \":\" + minutes;\n }\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 }", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\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 }", "@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 hoursMinutesSeconds(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(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }", "public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}", "static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }", "java.lang.String getTime();", "static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "public String toString() {\n return hour+\" \"+minute;\r\n }", "public String getNiceTime(){\n\t\treturn sTimeFormat.format(mTime);\n\t}", "public String getFormattedTime() {\n return formattedTime;\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 static String toString(LocalDateTime time) {\n\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"HH:mm dd-MM-yyyy\");\n\t\t\n\t\treturn time.format(formatter);\n\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 convertFromTime(int time){\n int hour = time/100;\n int min = time%100;\n String hourStr = String.format(\"%02d\", hour);\n String minStr = String.format(\"%02d\",min);\n return hourStr + \":\" + minStr;\n }", "static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }", "public String gameTimeToText()\n {\n // CALCULATE GAME TIME USING HOURS : MINUTES : SECONDS\n if ((startTime == null) || (endTime == null))\n return \"\";\n long timeInMillis = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n return timeToText(timeInMillis);\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "public String getFullHour()\n {\n\n String str = \"\";\n\n if (hour < 10)\n {\n str += \"0\";\n }\n str += hour + \":\";\n\n if (minute < 10)\n {\n str += \"0\";\n }\n str += minute;\n\n return str;\n }", "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 }", "private String getFinalTimeString() {\n double fltTime = (double)(lngTimelineDataAmountInRmsFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime);\n }", "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 getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\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 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 }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\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 final native String toTimeString() /*-{\n return this.toTimeString();\n }-*/;", "public static String tenthsToStringShort(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00\";\r\n\t\t}\r\n\t\t\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d\", min, sec);\r\n\t}", "public String toString() {\n\t\treturn hours + \"h\" + minutes + \"m\";\n\t}", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\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 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 getTimeString()\n\t{\n\t\treturn TimeUtils.getTimeString(this.timesCurrentMillis);\n\t}", "public static String time(int time) {\n return time((long)time);\n }", "public static String secondsToTimeString(double time) {\n\t\tint rawSecs = (int) Math.floor(time);\n\t\tdouble millis = time - rawSecs;\n\t\tint days = Math.floorDiv(rawSecs, 86400);\n\t\tint hours = Math.floorDiv((rawSecs % 86400), 3600);\n\t\tint minutes = Math.floorDiv((rawSecs % 3600), 60);\t\n\t\tint seconds = rawSecs % 60;\n\n\t\tString ret;\n\t\tif(days > 0)\n\t\t\tret = String.format(\"%d:%02d:%02d:%02d\", days, hours, minutes, seconds);\n\t\telse if(hours > 0)\n\t\t\tret = String.format(\"%d:%02d:%02d\", hours, minutes, seconds);\n\t\telse\n\t\t\tret = String.format(\"%d:%02d\", minutes, seconds);\n\t\t\n\t\tif(millis != 0)\n\t\t\tret += \".\"+ String.format(\"%03d\", (int)(millis*1000));\n\t\t\n\t\treturn ret;\n\t}", "static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }", "public String toString()\n {\n String output = new String();\n output = \"The time is \" + hour + \":\" + min + \":\" + sec + \"\\n\";\n return output;\n }", "public static String getNowTimeHHMM() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\treturn timeFormat.format(new Date());\n\t}", "public String getCurrentTimeHourMinSec() {\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(\"HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "java.lang.String getPlayTime();", "public static String convert(int secs) {\n int h = secs / 3600, i = secs - h * 3600, m = i / 60, s = i - m * 60;\n String timeF = \"\";\n\n if (h < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + h + \" hour(s) \";\n if (m < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + m + \" minute(s) \";\n if (s < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + s + \" second(s) \";\n\n return timeF;\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 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 static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\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 }", "static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\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 mSecsToString(long actualTimeInMseconds) {\n Date date = new Date(actualTimeInMseconds);\n DateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return (formatter.format(date));\n }", "public static String tenthsToString(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00.0\";\r\n\t\t}\r\n\t\t\r\n\t\tint tenths = time % 10;\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d.%d\", min, sec, tenths);\r\n\t}", "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 static String getTime(LocalDateTime ldt)\n\t{\n\t\treturn ldt.getHour() + \":\" + ldt.getMinute() + \":\" + ldt.getSecond() + \",\" + ldt.getNano()/1000000;\n\t}", "private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\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 String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }", "public static String timeAsUIString(LocalDateTime time) {\n return time == null ? \"Still In Progress\" : uiFormatter.format(time);\n }", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "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 toTimeString(Date dateTime) {\n\t\treturn dateTime != null ? timeFormat.format(dateTime) : \"\";\n\t}", "public String getFormattedTimeFromStart() {\r\n if (history.getNumberOfJumpsSoFar() == 0) {\r\n return \"00:00\";\r\n }\r\n\r\n double time = history.getTimeFromStart();\r\n double maxTime = 59.59;\r\n if (time < maxTime) {\r\n return String.format(\"%02d:%02d\", (int) (time % 60), (int) (time * 100 % 100));\r\n } else {\r\n return \"59:59\";\r\n }\r\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 }", "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 }" ]
[ "0.80046374", "0.7815428", "0.75898767", "0.75248414", "0.71624917", "0.7161535", "0.710841", "0.7094705", "0.7051629", "0.70079744", "0.6935209", "0.690322", "0.69021595", "0.68425685", "0.6828247", "0.6827858", "0.6818873", "0.68144214", "0.6807079", "0.6768991", "0.6767582", "0.6757", "0.6731343", "0.6700604", "0.66749835", "0.6662808", "0.6643021", "0.66420764", "0.66348016", "0.66040313", "0.656819", "0.6567422", "0.65580934", "0.65518624", "0.65371495", "0.65317345", "0.65298486", "0.6508488", "0.64946723", "0.64886504", "0.6475177", "0.64705807", "0.6467463", "0.6447658", "0.64378047", "0.6405186", "0.6402401", "0.63981855", "0.63967824", "0.6391064", "0.6390611", "0.6389783", "0.6388332", "0.6386398", "0.6381635", "0.63651496", "0.6355326", "0.6354509", "0.6353063", "0.63198435", "0.6316039", "0.628746", "0.62684494", "0.62680775", "0.6249596", "0.62453765", "0.6244481", "0.6235005", "0.62347883", "0.6234448", "0.62340266", "0.62300956", "0.6219343", "0.6191433", "0.6188216", "0.61822265", "0.61814845", "0.6180613", "0.61518043", "0.6149158", "0.61428297", "0.6140715", "0.6129372", "0.6126864", "0.6114828", "0.6105615", "0.6102879", "0.60961986", "0.60951567", "0.6086979", "0.6081834", "0.6080963", "0.6076842", "0.6075768", "0.6060662", "0.60586995", "0.60493", "0.60456777", "0.6039956", "0.60374147" ]
0.7246816
4
convert to String in standardtime format (H:MM:SS AM or PM)
public String toString() { return String.format("%d:%02d:%02d %s %d/%d/%d", ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12), getMinute(), getSecond(), (getHour() < 12 ? "AM" : "PM"), month, day, year); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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 getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public String getPrintFormattedTime() {\n return this.optionalTime.map(x -> x.format(DateTimeFormatter.ofPattern(\"HHmma\"))).orElse(\"\");\n }", "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 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 }", "public String toString() {\n if (time != null) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n return time.format(formatter);\n } else {\n return \"INVALID TIME\";\n }\n }", "static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}", "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 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 static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\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 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 }", "java.lang.String getTime();", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\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 return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "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 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 static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\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 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 static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "public static String timeAsString(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n return String.format(\"%02d:%02d:%02d\", hour, minute, second);\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}", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\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 }", "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 }", "@Override\n\tpublic String toString() {\n\t\tLocalTime lT = LocalTime.of(hour, minute);\n\t\tDateTimeFormatter.ofPattern(\"hh:mm\").format(lT);\n\t\treturn lT.toString() + \" \" + timeType;\n\t}", "public String getAnserTime() {\r\n \tString time=null;\r\n\t\tif(anserTime!=null){\r\n\t\t\tSimpleDateFormat sf=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\ttime=sf.format(anserTime);\r\n\t\t}\r\n return time;\r\n }", "public String gameTimeToText()\n {\n // CALCULATE GAME TIME USING HOURS : MINUTES : SECONDS\n if ((startTime == null) || (endTime == null))\n return \"\";\n long timeInMillis = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n return timeToText(timeInMillis);\n }", "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}", "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 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}", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "public String toUniversalString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return twoDigits.format( this.getHour() ) + \":\" +\r\n twoDigits.format( this.getMinute() ) + \":\" +\r\n twoDigits.format( this.getSecond() );\r\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 String toUniversalString() {\n return String.format(\"%02d:%02d:%02d\", hour, minutes, seconds);\n\n }", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }", "private String convertToAMPM(Date time) {\r\n\r\n String modifier = \"\";\r\n String dateTime = Util.formateDate(time, \"yyyy-MM-dd HH:mm\");\r\n\r\n\r\n // Get the raw time\r\n String rawTime = dateTime.split(\" \")[1];\r\n // Get the hour as 24 time and minutes\r\n String hour24 = rawTime.split(\":\")[0];\r\n String minutes = rawTime.split(\":\")[1];\r\n // Convert the hour\r\n Integer hour = Integer.parseInt(hour24);\r\n\r\n if (hour != 12 && hour != 0) {\r\n modifier = hour < 12 ? \"am\" : \"pm\";\r\n hour %= 12;\r\n } else {\r\n modifier = (hour == 12 ? \"pm\" : \"am\");\r\n hour = 12;\r\n }\r\n // Concat and return\r\n return hour.toString() + \":\" + minutes + \" \" + modifier;\r\n }", "public String toTimeString(Date dateTime) {\n\t\treturn dateTime != null ? timeFormat.format(dateTime) : \"\";\n\t}", "public String toString() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 4\n\t\tString hours = String.format(\"%02d\", this.hours);\n\t\tString minutes = String.format(\"%02d\", this.minutes);\n\t\tString seconds = String.format(\"%05.2f\", this.seconds);\n\n\t\tString time = hours + \":\" + minutes + \":\" + seconds;\n\t\treturn time;\n\t}", "public static String convertFromTime(int time){\n int hour = time/100;\n int min = time%100;\n String hourStr = String.format(\"%02d\", hour);\n String minStr = String.format(\"%02d\",min);\n return hourStr + \":\" + minStr;\n }", "public String getFormattedTime() {\n return formattedTime;\n }", "static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }", "public static String milToStandard(int milTime){\n\n String output;\n int tempHours = milTime / 100;\n String ampm;\n if(tempHours - 12 < 0){\n if(tempHours == 0){tempHours = 12;}\n ampm = \"AM\";\n }\n else{\n tempHours = tempHours - 12;\n if(tempHours == 0){tempHours = 12;}\n ampm = \"PM\";\n }\n output = tempHours+\":\";\n int tempMins = milTime % 100;\n if(tempMins < 10){ output = output + \"0\" + tempMins + ampm;}\n else{ output = output + tempMins + ampm;}\n\n return output;\n\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 String getTime(){\r\n String time = \"\";\r\n return time;\r\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}", "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}", "static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }", "public String toString(){\r\n String strout = \"\";\r\n strout = String.format(\"%02d:%02d\", this.getMinutes(), this.getSeconds());\r\n return strout;\r\n }", "public String getNiceTime(){\n\t\treturn sTimeFormat.format(mTime);\n\t}", "public String toString()\n {\n String output = new String();\n output = \"The time is \" + hour + \":\" + min + \":\" + sec + \"\\n\";\n return output;\n }", "public String getSimpleTime( java.sql.Time time, int dateformat ){\n if ( time == null ) return null;\n DateFormat timeFormatter = DateFormat.getTimeInstance( dateformat );\n return timeFormatter.format(time);\n }", "private String formatTime(Date dateObject) {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\", Locale.getDefault());\n return timeFormat.format(dateObject);\n }", "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 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 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}", "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 final native String toTimeString() /*-{\n return this.toTimeString();\n }-*/;", "java.lang.String getPlayTime();", "public static String getNowTimeHHMM() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\treturn timeFormat.format(new Date());\n\t}", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\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}", "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 }", "@Override\n\tpublic String convertTime(String aTime) {\n\n\t\tif (aTime == null)\n\t\t\tthrow new IllegalArgumentException(NO_TIME);\n\n\t\tString[] times = aTime.split(\":\", 3);\n\n\t\tif (times.length != 3)\n\t\t\tthrow new IllegalArgumentException(INVALID_TIME);\n\n\t\tint hours, minutes, seconds = 0;\n\n\t\ttry {\n\t\t\thours = Integer.parseInt(times[0]);\n\t\t\tminutes = Integer.parseInt(times[1]);\n\t\t\tseconds = Integer.parseInt(times[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(NUMERIC_TIME);\n\t\t}\n\n\t\tif (hours < 0 || hours > 24)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Hour\");\n\t\tif (minutes < 0 || minutes > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Minutes\");\n\t\tif (seconds < 0 || seconds > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Seconds\");\n\n\t\tString line1 = (seconds % 2 == 0) ? \"Y\" : \"O\";\n\t\tString line2 = rowString(hours / 5, 4, \"R\").replace('0', 'O');\n\t\tString line3 = rowString(hours % 5, 4, \"R\").replace('0', 'O');\n\t\tString line4 = rowString(minutes / 5, 11, \"Y\").replaceAll(\"YYY\", \"YYR\").replace('0', 'O');\n\t\tString line5 = rowString(minutes % 5, 4, \"Y\").replace('0', 'O');\n\n\t\tString cTime = String.join(NEW_LINE, Arrays.asList(line1, line2, line3, line4, line5));\n\n\t\tSystem.out.println(cTime);\n\n\t\treturn cTime;\n\t}", "public static String TimeConvert(int num) {\n\n int hours;\n int minutes;\n\n if (num < 60){\n\n return \"0:\" + num;\n }\n else {\n\n hours = num / 60;\n minutes = num % 60;\n\n return hours + \":\" + minutes;\n }\n }", "private String formatTime(Date dateObject) {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n return timeFormat.format(dateObject);\n }", "private String getTime(Calendar c) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(EventHelper.getTime(c));\n\t\tif (!sb.toString().equals(\"noon\")) {\n\t\t\tsb.append(\" \");\n\t\t\tsb.append(EventHelper.getAmPm(c));\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t\t\n\t}", "public String timeFormatter(int hour, int min) {\n String minString = String.valueOf(min);\n String amOrPm = \"AM\";\n if (hour > 12) {\n hour -= 12;\n amOrPm = \"PM\";\n }\n if (minString.length() < 2) {\n minString = \"0\" + minString;\n }\n return (String.valueOf(hour) + \":\" + minString + \" \" + amOrPm);\n\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}", "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 time(int time) {\n return time((long)time);\n }", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\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 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}", "public static String tenthsToStringShort(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00\";\r\n\t\t}\r\n\t\t\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d\", min, sec);\r\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 }", "public String getTime() {\n String show = time;\n return show;\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 ConvertToStandardtime(Date date) {\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tformat.setLenient(false);\r\n\t\tif (date == null)\r\n\t\t\treturn \"\";\r\n\t\tString strDate = format.format(date);\r\n\t\treturn strDate;\r\n\t}", "public static String toString(LocalDateTime time) {\n\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"HH:mm dd-MM-yyyy\");\n\t\t\n\t\treturn time.format(formatter);\n\n\t}", "static String createNormalDateTimeString() {\n return NORMAL_STROOM_TIME_FORMATTER.format(ZonedDateTime.now(ZoneOffset.UTC));\n }", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String toString() {\n return hour+\" \"+minute;\r\n }", "public String getFullHour()\n {\n\n String str = \"\";\n\n if (hour < 10)\n {\n str += \"0\";\n }\n str += hour + \":\";\n\n if (minute < 10)\n {\n str += \"0\";\n }\n str += minute;\n\n return str;\n }", "public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }", "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 toString() {\n\t\treturn hours + \"h\" + minutes + \"m\";\n\t}" ]
[ "0.7770099", "0.766827", "0.748694", "0.73785627", "0.7375992", "0.7315918", "0.7280893", "0.7271658", "0.72604984", "0.72172993", "0.7215926", "0.719824", "0.71760523", "0.7153763", "0.71521586", "0.71110487", "0.70760655", "0.7063534", "0.7046052", "0.7015974", "0.69922906", "0.69918007", "0.69877094", "0.69863456", "0.69768655", "0.6949099", "0.69467586", "0.69300276", "0.6925889", "0.6910987", "0.688728", "0.68751323", "0.6860353", "0.6851219", "0.6822179", "0.68005925", "0.6800214", "0.6797117", "0.678497", "0.67802584", "0.6778087", "0.6758294", "0.6717434", "0.6717174", "0.6703177", "0.66895735", "0.6680208", "0.66761243", "0.66395146", "0.6628118", "0.66241497", "0.6607706", "0.6600166", "0.6599515", "0.65983164", "0.6589762", "0.65889627", "0.65886664", "0.6582297", "0.6579008", "0.6565061", "0.6549629", "0.6545422", "0.6537185", "0.65296423", "0.6520814", "0.65169126", "0.6516394", "0.6515429", "0.6513667", "0.6486104", "0.64855695", "0.6462979", "0.6458747", "0.6455504", "0.64549", "0.6452983", "0.6446028", "0.6438527", "0.6435481", "0.64340806", "0.6429094", "0.6426354", "0.6425011", "0.6422375", "0.641031", "0.63957006", "0.63781935", "0.6371148", "0.6369448", "0.6369257", "0.6360391", "0.6357519", "0.63533556", "0.6344785", "0.6339971", "0.6332161", "0.6291802", "0.6289832", "0.6286534" ]
0.6348413
94