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
GPSTracker gpsTracker = new GPSTracker(this);
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); setContentView(R.layout.pratisthan); name= (EditText) findViewById(R.id.P_shopname); description= (EditText) findViewById(R.id.P_shopdescription); address= (EditText) findViewById(R.id.P_address); contact= (EditText) findViewById(R.id.P_contactno); email= (EditText) findViewById(R.id.P_email); latslong= (EditText) findViewById(R.id.P_latslongs); upload = (ImageView) findViewById(R.id.P_image); visitingCard = (ImageView) findViewById(R.id.visitingcard); insideview = (ImageView) findViewById(R.id.insideview); UploadShopImage = (Button) findViewById(R.id.ShopImageUpload); UploadVisitingCardImage = (Button) findViewById(R.id.VisitingCardImageUpload); UploadInsideImage = (Button) findViewById(R.id.InsideViewImageUpload); usrID = new Database().usercode(Pratisthan.this); description.setScroller(new Scroller(getApplicationContext())); description.setVerticalScrollBarEnabled(true); description.setMovementMethod(new ScrollingMovementMethod()); address.setScroller(new Scroller(getApplicationContext())); address.setVerticalScrollBarEnabled(true); address.setMovementMethod(new ScrollingMovementMethod()); timing = (TextView) findViewById(R.id.shoptiming); UploadShopImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { compress(selectedFileUri1,"Shop"); } }); UploadVisitingCardImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { compress(selectedFileUri3,"visiting card"); } }); UploadInsideImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { compress(selectedFileUri2,"inside View"); } }); timing.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PopupFLAG = 1; LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); final View layout = inflater.inflate(R.layout.popuptiming, null); mpopup = new PopupWindow(layout, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, true); mpopup.setBackgroundDrawable(new BitmapDrawable()); // View contentView = mpopup.getContentView(); // contentView.getBackground().setAlpha(150); mpopup.setAnimationStyle(android.R.style.Animation_Translucent); mpopup.setFocusable(true); mpopup.setTouchable(true); mpopup.setOutsideTouchable(true); mpopup.setTouchInterceptor(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_OUTSIDE) { mpopup.dismiss(); return true; } return false; } }); mpopup.showAtLocation(layout, Gravity.CENTER, 0, 0); mont1 = (TextView) layout.findViewById(R.id.mont1); mont2 = (TextView) layout.findViewById(R.id.mont2); tues1 = (TextView) layout.findViewById(R.id.tuest1); tues2 = (TextView) layout.findViewById(R.id.tuest2); wed1 = (TextView) layout.findViewById(R.id.wedt1); wed2 = (TextView) layout.findViewById(R.id.wedt2); thus1 = (TextView) layout.findViewById(R.id.thurt1); thus2 = (TextView) layout.findViewById(R.id.thurt2); fri1 = (TextView) layout.findViewById(R.id.frit1); fri2 = (TextView) layout.findViewById(R.id.frit2); sat1 = (TextView) layout.findViewById(R.id.satt1); sat2 = (TextView) layout.findViewById(R.id.satt2); sunt1 = (TextView) layout.findViewById(R.id.sunt1); sunt2 = (TextView) layout.findViewById(R.id.sunt2); saveTime = (Button) layout.findViewById(R.id.SaveTime); final SetTime Montime1 = new SetTime(mont1,layout.getContext(),Constant.Montime1); final SetTime Montime2 =new SetTime(mont2,layout.getContext(),Constant.Montime2); final SetTime Tuestime1=new SetTime(tues1,layout.getContext(),Constant.Tuestime1); final SetTime Tuestime2=new SetTime(tues2,layout.getContext(),Constant.Tuestime2); final SetTime Wedtime1 =new SetTime(wed1,layout.getContext(),Constant.Wedtime1); final SetTime Wedtime2 =new SetTime(wed2,layout.getContext(),Constant.Wedtime2); final SetTime Thurstime1=new SetTime(thus1,layout.getContext(),Constant.Thurstime1); final SetTime Thurstime2=new SetTime(thus2,layout.getContext(),Constant.Thurstime2); final SetTime Fritime1 =new SetTime(fri1,layout.getContext(),Constant.Fritime1); final SetTime Fritime2 =new SetTime(fri2,layout.getContext(),Constant.Fritime2); final SetTime Sattime1 =new SetTime(sat1,layout.getContext(),Constant.Sattime1); final SetTime Sattime2 =new SetTime(sat2,layout.getContext(),Constant.Sattime2); final SetTime Suntime1 =new SetTime(sunt1,layout.getContext(),Constant.Suntime1); final SetTime Suntime2 =new SetTime(sunt2,layout.getContext(),Constant.Suntime2); saveTime.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mpopup.dismiss(); String str = "Sunday: "+sunt1.getText().toString()+" to "+sunt2.getText().toString()+"\n"+ "monday: "+mont1.getText().toString()+" to "+mont2.getText().toString()+"\n"+ "tuesday: "+tues1.getText().toString()+" to "+tues2.getText().toString()+"\n"+ "wednesday: "+wed1.getText().toString()+" to "+wed2.getText().toString()+"\n"+ "Thrusday: "+thus1.getText().toString()+" to "+thus2.getText().toString()+"\n"+ "Friday: "+fri1.getText().toString()+" to "+fri2.getText().toString()+"\n"+ "Saturday: "+sat1.getText().toString()+" to "+sat2.getText().toString()+"\n"; Constant.Suntime1 = Suntime1.getTime(); Constant.Suntime2 = Suntime2.getTime(); Constant.Montime1 = Montime1.getTime(); Constant.Montime2 = Montime2.getTime(); Constant.Tuestime1 = Tuestime1.getTime(); Constant.Tuestime2 = Tuestime2.getTime(); Constant.Wedtime1 = Wedtime1.getTime(); Constant.Wedtime2 = Wedtime2.getTime(); Constant.Thurstime1 = Thurstime1.getTime(); Constant.Thurstime2 = Thurstime2.getTime(); Constant.Fritime1 = Fritime1.getTime(); Constant.Fritime2 = Fritime2.getTime(); Constant.Sattime1 = Sattime1.getTime(); Constant.Sattime2 = Sattime2.getTime(); timing.setText(str); } }); } }); //spinner type = (Spinner) findViewById(R.id.P_shoptype); parstate = (TextView) findViewById(R.id.P_state); pardistrict = (TextView) findViewById(R.id.P_district); arrayList = new ArrayList<String>(); SQLiteDatabase db1 = openOrCreateDatabase("MyDb", MODE_PRIVATE, null); Cursor c1 = db1.rawQuery("SELECT * FROM Statetable ", null); statecode = new String[c1.getCount()]; if(c1.moveToFirst()){ int i=0; do{ arrayList.add(i,c1.getString(1)); statecode[i] = c1.getString(0); i++; }while(c1.moveToNext()); } c1.close(); db1.close(); final LocationManager manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE ); adapter = new ArrayAdapter<String>(Pratisthan.this, R.layout.spinner, arrayList); adapter4 = new ArrayAdapter<String>(Pratisthan.this, R.layout.spinner, arrayList); pardistrict.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.popuplist, null); mpopup = new PopupWindow(layout, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, true); mpopup.setBackgroundDrawable(new BitmapDrawable()); View contentView = mpopup.getContentView(); contentView.getBackground().setAlpha(150); mpopup.setAnimationStyle(android.R.style.Animation_Translucent); mpopup.setFocusable(true); mpopup.setTouchable(true); mpopup.setOutsideTouchable(true); mpopup.setTouchInterceptor(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_OUTSIDE) { mpopup.dismiss(); return true; } return false; } }); mpopup.showAtLocation(layout, Gravity.CENTER, 0, 0); ListView list = (ListView) layout.findViewById(R.id.listView); list.setAdapter(adapter2); final EditText edit = (EditText) layout.findViewById(R.id.editText12); Button submit = (Button) layout.findViewById(R.id.button10); list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { pardistrict.setText(arrayList2.get(position)); districtcount = position; mpopup.dismiss(); } }); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PopupFLAG=0; if(edit.getText().toString().length()!=0) { pardistrict.setText(edit.getText().toString()); mpopup.dismiss(); }else{ Toast.makeText(Pratisthan.this, "either select from list or write name in text box", Toast.LENGTH_SHORT).show(); } } }); } }); parstate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.popuplist, null); mpopup = new PopupWindow(layout, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, true); mpopup.setBackgroundDrawable(new BitmapDrawable()); View contentView = mpopup.getContentView(); contentView.getBackground().setAlpha(150); mpopup.setAnimationStyle(android.R.style.Animation_Translucent); mpopup.setFocusable(true); mpopup.setTouchable(true); mpopup.setOutsideTouchable(true); mpopup.setTouchInterceptor(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_OUTSIDE) { mpopup.dismiss(); return true; } return false; } }); mpopup.showAtLocation(layout, Gravity.CENTER, 0, 0); ListView list = (ListView) layout.findViewById(R.id.listView); list.setAdapter(adapter); final EditText edit = (EditText) layout.findViewById(R.id.editText12); Button submit = (Button) layout.findViewById(R.id.button10); list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { parstate.setText(arrayList.get(position)); statecount = position; SQLiteDatabase db1 = openOrCreateDatabase("MyDb", MODE_PRIVATE, null); Cursor c1 = db1.rawQuery("SELECT * FROM Districttable where StateCode = '"+statecode[position]+"'", null); arrayList2 = new ArrayList<String>(); districtcode = new String[c1.getCount()]; if(c1.moveToFirst()){ int i=0; do{ arrayList2.add(i,c1.getString(2)); districtcode[i] = c1.getString(3); i++; }while(c1.moveToNext()); } c1.close(); db1.close(); adapter2 = new ArrayAdapter<String>(Pratisthan.this, R.layout.spinner, arrayList2); mpopup.dismiss(); } }); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(edit.getText().toString().length()!=0) { parstate.setText(edit.getText().toString()); mpopup.dismiss(); }else{ Toast.makeText(Pratisthan.this, "Either select from list or write name in text box", Toast.LENGTH_SHORT).show(); } } }); } }); //Button latlong = (Button) findViewById(R.id.button8); submit = (Button) findViewById(R.id.button6); latlong.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { locationmanager gps = new locationmanager(Pratisthan.this); if(gps.canGetLocation()){ // gps enabled} // return boolean true/false latitude = gps.getLatitude(); // returns latitude longitude = gps.getLongitude(); // returns longitude stringlattitude = latitude+""; stringLongitude = longitude+""; latslong.setText(latitude+","+longitude); }else{ gps.showSettingsAlert(); } } }); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // if(name.getText().toString().length()!=0 && description.getText().toString().length()!=0 && address.getText().toString().length()!=0 && contact.getText().toString().length()!=0 && email.getText().toString().length()!=0 && parstate.getText().toString().length()!=0 && pardistrict.getText().toString().length()!=0 && type.getSelectedItem().toString().matches("Select")==false ) // { // update(); // }else{ // Toast.makeText(Pratisthan.this, "Complete All Details", Toast.LENGTH_SHORT).show(); // } } }); userLogin(); upload.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST_1); } }); visitingCard.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST_2); } }); insideview.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST_3); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public S<T> gps(){\n\t\t gps = new GPSTracker(activity);\n\n // Check if GPS enabled\n if(gps.canGetLocation()) {\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n\n // \\n is for new line\n Toast.makeText(activity, \"Your Location is - \\nLat: \" + latitude + \"\\nLong: \" + longitude, Toast.LENGTH_LONG).show();\n } else {\n // Can't get location.\n // GPS or network is not enabled.\n // Ask user to enable GPS/network in settings.\n gps.showSettingsAlert();\n }\n\t\t \n return this;\n }", "public void getCoordinates(){\n\t\t\n\t\t // check if GPS enabled\n GPSTracker gpsTracker = new GPSTracker(this);\n \n if (gpsTracker.canGetLocation())\n {\n latitude = gpsTracker.latitude;\n\n longitude = gpsTracker.longitude;\n }\n else\n {\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gpsTracker.showSettingsAlert();\n }\n\t}", "@Override\r\n public void onGpsStatusChanged(int event) {\n\r\n }", "public Location myLocation() {\n\n // Acquire a reference to the system Location Manager\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n criteria.setHorizontalAccuracy(Criteria.ACCURACY_FINE);\n String provider = locationManager.getBestProvider(criteria, true);\n // Define a listener that responds to location updates\n LocationListener locationListener = new LocationListener() {\n\n //When the location of the device changes\n public void onLocationChanged(Location location) {\n\n //Display the current location\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude,longitude);\n mGPSon.setText(\"Latitude: \"+Math.round(gp.x)+\"\\nLongitude: \"+Math.round(gp.y));\n\n }\n\n //When the status of the GNSS receiver changes\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n\n\n }\n\n //When the location provider is enabled\n public void onProviderEnabled(String provider) {\n\n\n\n }\n\n //When the location provider is disabled\n public void onProviderDisabled(String provider) {\n\n\n\n }\n\n };\n // Register the listener with the Location Manager to receive location updates\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,locationListener);\n // Obtain the current location\n Location myLocation = locationManager.getLastKnownLocation(provider);\n\n //Only if the current location is passed\n if (myLocation != null) {\n\n //Project the Location object to a GridPoint object\n double latitude = myLocation.getLatitude();\n double longitude = myLocation.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude, longitude);\n //Update the real-time latitude and longitude\n mGPSon.setText(\"Latitude: \" + Math.round(gp.x) + \"\\nLongitude: \" + Math.round(gp.y));\n return myLocation;\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n return null;\n\n }\n\n }", "private void getGPSLocation()\n {\n gps_ = new GPSLocator( LoginActivity.this );\n\n // check if GPS enabled\n if ( gps_.canGetLocation() )\n {\n latitude_ = gps_.getLatitude();\n longitude_ = gps_.getLongitude();\n\n // Raises a toast to show the location\n Toast.makeText(\n getApplicationContext(),\n \"Your Location is - \\nLat: \" + latitude_ + \"\\nLong: \"\n + longitude_, Toast.LENGTH_SHORT ).show();\n }\n else\n {\n // There was an error getting the gps information\n gps_.showSettingsAlert();\n }\n }", "public void startTracking()\n\t{\n\t\tthisRoute.timeStart = System.currentTimeMillis();\n\t\t\n\t\tlocationManager.requestLocationUpdates(provider, gpsTimeFreq, 0, locListener);\n\t}", "private void readGPS() {\n }", "public GPSFragment()\n {\n // Required empty public constructor\n }", "LocationTracker getTracker();", "private void startLoggerService() {\n\n // ---use the LocationManager class to obtain GPS locations---\n lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n GPSLoggerService.setLocationManager(lm);\n\n locationListener = new MyLocationListener();\n\n lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n\n }", "public GPSManager(Activity context) {\n this.mContext = context;\n //Get the current location\n getLocation();\n }", "private void getlocation() {\n\t\t\t\ttry {\n\n\t\t\t\t\tgps = new GPSTracker(RegisterActivity.this);\n\t\t\t\t\tLog.d(\"LOgggg\", \"inCurrentlocation\");\n\n\t\t\t\t\t// check if GPS enabled\n\t\t\t\t\tif (gps.canGetLocation()) {\n\n\t\t\t\t\t\tlatitude = gps.getLatitude();\n\t\t\t\t\t\tlongitude = gps.getLongitude();\n\n\t\t\t\t\t\tLog.i(\"latitude\", \"\" + latitude);\n\t\t\t\t\t\tLog.i(\"longitude\", \"\" + longitude);\n\n\t\t\t\t\t\tnew getLoc().execute(\"\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgps.showSettingsAlert();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception 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 void handleGPS()\n {\n\t\t\n\t\tRunnable r2 = new Runnable() {\n\n public void run() {\n \ttry {\n BlackBerryCriteria criteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);\n\n try\n {\n BlackBerryLocationProvider myProvider =\n (BlackBerryLocationProvider)\n LocationProvider.getInstance(criteria);\n\n try\n {\n BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(300);\n\n int satCount = myLocation.getSatelliteCount();\n \n setLat(myLocation.getQualifiedCoordinates().getLatitude());\n setLongt(myLocation.getQualifiedCoordinates().getLongitude());\n \n //data.setVisibleNone();\n \t\tMapLocation test = new MapLocation(myLocation.getQualifiedCoordinates().getLatitude(), myLocation.getQualifiedCoordinates().getLongitude(), \"test\", null);\n \t\tint testId = data.add((Mappable) test, \"test\");\n \t\tdata.tag(testId, \"test\");\n \t\tdata.setVisibleNone();\n \t\tdata.setVisible( \"test\");\n// \t\tMapAction action = map.getAction();\n// \t\taction.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2);\n \t\tmap.getMapField().update(true);\n \n \n \n \n int signalQuality = myLocation.getAverageSatelliteSignalQuality();\n int dataSource = myLocation.getDataSource();\n int gpsMode = myLocation.getGPSMode();\n\n SatelliteInfo si;\n StringBuffer sb = new StringBuffer(\"[Id:SQ:E:A]\\n\");\n String separator = \":\";\n\n for (Enumeration e = myLocation.getSatelliteInfo();\n e!=null && e.hasMoreElements(); )\n {\n si = (SatelliteInfo)e.nextElement();\n sb.append(si.getId() + separator);\n sb.append(si.getSignalQuality() + separator);\n sb.append(si.getElevation() + separator);\n sb.append(si.getAzimuth());\n sb.append('\\n');\n System.out.println(sb);\n }\n }\n catch ( InterruptedException iex )\n {\n Logger.log(iex.toString());\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( UnsupportedOperationException uoex )\n {\n \tLogger.log(uoex.toString());\n }\n\n// return;\n }\n\t\t};\n\t\tcontroller.invokeLater(r2);\n }", "private void initGATracker() {\n\t\t/* get analytics singleton */\n\t\ttracker = GoogleAnalyticsTracker.getInstance();\n\n\t\t/* start tracker. Dispatch every 30 seconds. */\n\t\ttracker.startNewSession(\"UA-20341887-1\", 30, getApplicationContext());\n\t\t\n /* debug GA */\n tracker.setDebug(false);\n tracker.setDryRun(false);\n \n // Determine the screen orientation and set it in a custom variable.\n String orientation = \"unknown\";\n switch (this.getResources().getConfiguration().orientation) {\n case Configuration.ORIENTATION_LANDSCAPE:\n orientation = \"landscape\";\n break;\n case Configuration.ORIENTATION_PORTRAIT:\n orientation = \"portrait\";\n break;\n }\n tracker.setCustomVar(3, \"Screen Orientation\", orientation, 2);\n\t}", "public void stopUsingGPS() {\r\n if (locationManager != null) {\r\n // locationManager.removeUpdates(GPSTracker.this);\r\n }\r\n }", "public GPS newInstace(@Nullable Bundle bundle){\n return new GPS();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.maps);\n \n //Activate the GPS\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); \n locationListener = new GPSListener(this); \n \n //Requests updates each 200 meters\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 200,locationListener);\n \n mlv = (MapViewer) findViewById(R.id.map_view);\n \n \t// Register for events\n addEvents(); \n }", "private GuidoLocationListener() {}", "public GoogleAnalyticsTracker(Tracker tracker) {\n this.tracker = tracker;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\tmButtonGetLocation = (Button) findViewById(R.id.btn_get_location);\n\t\tmTextViewResult = (TextView) findViewById(R.id.tv_result_value);\n\t\tmTextViewGPSStatus = (TextView) findViewById(R.id.tv_gps_status);\n\t\tmMapView = (MapView) findViewById(R.id.map_view);\n\t\tmMapController = mMapView.getController();\n\t\tmMapController.setZoom(11);\n\t\tsetMapCenter(18.04, 59.35);\n\n\t\tmDialog = new ProgressDialog(this);\n\t\tmDialog.setOnCancelListener(new OnCancelListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tmButtonGetLocation.setEnabled(true);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\t\t});\n\t\tmLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n\t\tmLocationListener = new LocationListener() {\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t// Called when a new location is found.\n\t\t\t\tnew PostDogShitTask().execute(location);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase LocationProvider.AVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS available again\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.OUT_OF_SERVICE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS out of service\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.TEMPORARILY_UNAVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS temporarily unavailable\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider enabled\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider disabled\");\n\t\t\t}\n\t\t};\n\n\t\tmapOverlays = mMapView.getOverlays();\n\t\tDrawable drawable = this.getResources().getDrawable(R.drawable.poop);\n\t\titemizedoverlay = new HelloItemizedOverlay(drawable);\n\t}", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "public void stopUsingGPS() {\n if (locationManager != null) {\n locationManager.removeUpdates(GPSTracker.this);\n }\n }", "public void stopUsingGPS() {\r\n if (locationManager != null) {\r\n try {\r\n locationManager.removeUpdates(GPSTracker.this);\r\n } catch (SecurityException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n\r\n gps = new GPSTracker(CaptureService.this);\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n\r\n while (true) {\r\n //startJob();\r\n try {\r\n //Thread.sleep(3600000);\r\n // Thread.sleep(1800000);\r\n Thread.sleep(3600000);\r\n if (gps.canGetLocation()) {\r\n if (gps.canGetLocation()) {\r\n new SendToServer(gps.getLongitude(), gps.getLatitude()).execute();\r\n }\r\n\r\n gps.getLongitude();\r\n gps.getLatitude();\r\n gps.getTime();\r\n sending_latt = String.valueOf(gps.getLatitude());\r\n sending_longg = String.valueOf(gps.getLongitude());\r\n final SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n Date d = new Date(gps.getTime());\r\n str_timestamp = sdf.format(d);\r\n Log.e( \"CaptureService \", \"GPSTIME : \" + str_timestamp);\r\n\r\n }\r\n\r\n } catch (InterruptedException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n }\r\n });\r\n t.start();\r\n return START_STICKY;\r\n }", "public GpsRecordManager()\n {\n registeredListeners = new LinkedHashSet<>();\n }", "protected void trackLocation(View v) {\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"com.tryagain.com.fleetmanagmentsystem.prefs\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n if (!saveUserSettings()) {\n return;\n }\n\n if (!checkIfGooglePlayEnabled()) {\n return;\n }\n\n if (currentlyTracking) {\n cancelAlarmManager();\n\n currentlyTracking = false;\n editor.putBoolean(\"currentlyTracking\", false);\n editor.putString(\"sessionID\", \"\");\n //int totalFuel = sharedPreferences.getInt(\"fuel\", 0);\n //float totalDistance = sharedPreferences.getFloat(\"distance\", -1);\n //Toast.makeText(getApplicationContext(),\"\"+totalFuel+\" \"+totalDistance,Toast.LENGTH_SHORT).show();\n } else {\n startAlarmManager();\n\n currentlyTracking = true;\n editor.putBoolean(\"currentlyTracking\", true);\n //editor.putFloat(\"totalDistanceInMeters\", 0f);\n editor.putBoolean(\"firstTimeGettingPosition\", true);\n editor.putString(\"sessionID\", UUID.randomUUID().toString());\n editor.putInt(\"fuel\", gaugeValue);\n\n mGaugeView.setVisibility(View.INVISIBLE);\n }\n\n editor.apply();\n setTrackingButtonState();\n }", "public static final void activateGps() {\n // This is called first to ensure that multiple instances of the listener aren't actually called and running.\n deactivateGps();\n\n loadLocationManager();\n \n // Load last known location coordinate, if available, so that user doesn't have to wait as long for a location.\n if (isGpsEnabled()) {\n Location gpsLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (gpsLocation != null) {\n mLocationGps = gpsLocation;\n }\n } else if (isNetworkEnabled()) {\n Location networkLocation = mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (networkLocation != null) {\n mLocationNetwork = networkLocation;\n }\n }\n \n mLocationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equalsIgnoreCase(LocationManager.GPS_PROVIDER)) {\n mLocationGps = location;\n } else if (location.getProvider().equalsIgnoreCase(LocationManager.NETWORK_PROVIDER)) {\n mLocationNetwork = location;\n }\n// while (latitudeNowString.length() < 10) { latitudeNowString = latitudeNowString + \"0\"; }\n// while (longitudeNowString.length() < 11) { longitudeNowString = longitudeNowString + \"0\"; }\n }\n\n public void onStatusChanged(String provider, int status, Bundle extras) {}\n\n public void onProviderEnabled(String provider) {}\n\n public void onProviderDisabled(String provider) {}\n\n };\n\n // Register the listener with the Location Manager to receive location updates.\n if (isGpsEnabled()) {\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME, MIN_DISTANCE, mLocationListener); // In milliseconds, meters.\n }\n if (isNetworkEnabled()) {\n mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME, MIN_DISTANCE, mLocationListener); // In milliseconds, meters.\n }\n }", "public String getGPS();", "@Override\n public void run() {\n ((GPSDelegate)delegate).cambioLocalizacion(gps.getLastLocation());\n }", "public void startTracking() {\n reset();\n trackingTask = scheduler.scheduleAtFixedRate(this, 0, 10, TimeUnit.MILLISECONDS);\n }", "public Latitude getLatitude (){\n return trackLat;\n }", "private void comenzarLocalizacionPorGPS() {\n\t\tmLocManagerGPS = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n//\t\tLog.i(LOGTAG, \"mLocManagerGPS: \" + mLocManagerGPS);\n\t\t\n\t\t//Nos registramos para recibir actualizaciones de la posicion\n\t\tmLocListenerGPS = new LocationListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n//\t\t\t\tLog.i(LOGTAG, \"Cambio en estatus GPS: \" + provider + \" status: \" + status);\n//\t\t\t\tToast.makeText(getApplicationContext(), \"Cambio en estatus GPS: \" + provider + \" status: \" + status, Toast.LENGTH_SHORT).show();\n//\t\t\t\tif (status != 1) {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"GPS NA, Iniciar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t} else {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"Se geolocalizo por GPS, no lanzar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Encendido\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsEncendido.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Apagado por favor revise\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsApagado.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\tguardarPosicion(location);\n\t\t\t}\n\t\t};\n//\t\tLog.i(LOGTAG, \"mLocListenerGPS: \" + mLocListenerGPS);\n\t\tmLocManagerGPS.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, mLocListenerGPS);\n\t}", "@Override\n public void run() {\n List<LatLng> trailPoints = new ArrayList<>();\n\n // Get a reference of the LatLng that will be used to mark the start of the trail\n LatLng start = null;\n\n try {\n // Create an InputStream from gpxFile\n FileInputStream inStream = new FileInputStream(gpxFile);\n\n // Parse a Gpx from the FileInputStream\n Gpx parsedGpx = new GPXParser().parse(inStream);\n\n // Close the InputStream\n inStream.close();\n\n\n\n if (parsedGpx != null) {\n // Get the individual points from the Gpx\n List<TrackPoint> points = parsedGpx.getTracks().get(0).getTrackSegments().get(0).getTrackPoints();\n\n // Iterate through and convert the point coordinates to a LatLng\n for (TrackPoint point : points) {\n LatLng trailPoint = new LatLng(point.getLatitude(), point.getLongitude(), point.getElevation());\n\n // Add the LatLng to the List\n trailPoints.add(trailPoint);\n\n if (start == null) {\n // Set the LatLng to be used for the starting coordinate\n start = new LatLng(point.getLatitude(), point.getLongitude());\n }\n }\n }\n } catch (XmlPullParserException | IOException e) {\n e.printStackTrace();\n }\n\n // Create a MarkerOptions for marking the beginning of the trail\n MarkerOptions markerOptions = new MarkerOptions().position(start);\n\n // Create a PolylineOptions from the List\n PolylineOptions polylineOptions = new PolylineOptions().addAll(trailPoints);\n\n listener.onOptionReady(markerOptions, polylineOptions);\n }", "public void startTrackingGeoPushes()\n\t{\n\t\tmContext.startService(new Intent(mContext, GeoLocationService.class));\n\t}", "private void startService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTimeMillis,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\t\tlocationListener.onLocationChanged(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER));\r\n\t}", "private void startTrackingRoute(){\n if(ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n //Starts up alert dialog for getting permission\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOC_PERMISSION);\n }\n else{\n //Start the location updater listener\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, MIN_DISTANCE, this);\n }\n }", "private GPSConst()\n\t{\n\t\t\n\t}", "public GridPoint myGridPoint(){\n\n Location location = myLocation();\n if (location != null){\n\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude,longitude);\n return gp;\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n return null;\n\n }\n\n }", "void startTracking();", "public void myLocationClick() {\n\n //Set the initial camera position to the current location\n GridPoint gridPoint = myGridPoint();\n float mpp = 1;\n\n if (gridPoint != null) {\n\n CameraPosition cameraPosition = new CameraPosition(gridPoint, mpp);\n mMap.moveCamera(cameraPosition, true);\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void startLocationDiscovery() {\n\t\t/*CountDownTimer gpsDelay = new CountDownTimer(\n\t\t\t\tcalculateNextInteraction(failedInteractions) * 60 * 1000, 1000) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTick(long arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFinish() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};*/\n\t\tregisterLocationListener(locationListener);\n\t}", "public PointDistributer() {\n }", "public void injectGps()\r\n\t{\r\n\t\tif (mInjectGps == false) {\r\n\t\t\tLog.d(TAG, \"on injectGps\");\r\n\t\t\tmLocationManager.sendExtraCommand(\"gps\", \"force_xtra_injection\", null);\r\n\t\t\tmInjectGps = true;\r\n\t\t}\r\n\t}", "public interface PIdroneListener {\n\n void onGPSdata(LatLng location);\n void onConnectionLost();\n\n}", "private void startLoggerService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tdevNaam = android.os.Build.MODEL;\r\n\t\tdevNaam = devNaam.replaceAll(\" \", \"\");\r\n\t\t\r\n\t\tnew dbSchrijf(\"project78\", \"sommelsdijk\", extern).execute(\"table\", devNaam);\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\r\n\t\tToast.makeText(getBaseContext(),\r\n\t\t\t\t\"Service gemaakt met interval : \\n\" + minTimeMillis,\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\r\n\t}", "@SuppressLint(\"MissingPermission\")\n private void Locate(){\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 0, (LocationListener) this);\n\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n\n //Initialize fused location\n client = LocationServices.getFusedLocationProviderClient(this);\n }", "private void initialize() {\n\t\tcoords = (TextView) findViewById(R.id.tvcoords);\n\t\tstartgps = (Button) findViewById(R.id.bstartgps);\n\t\tstartgps.setOnClickListener(this);\n\t\tstopgps = (Button) findViewById(R.id.bstopgps);\n\t\tstopgps.setOnClickListener(this);\n\n\t}", "public void GPSStatus() {\n locationManager = (LocationManager) getApplicationContext().getSystemService(getApplicationContext().LOCATION_SERVICE);\n GpsStatus = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n }", "public GpsPoint getGpsLocation() {\n\t\treturn _GPS;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }", "private IActivityResultObserver init(Context application){\n gpsUtil = new GpsUtil(application);\n return gpsUtil.getObserver();\n }", "public PigLocalGame() {\n pgs = new PigGameState();\n }", "private void getLocation() {\n\n }", "private PumpManager() { }", "private void startLocationService() {\n\t\tmLocationMngr = (LocationManager) this\r\n\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tmGpsListener = new GPSListener();\r\n\t\tlong minTime = 10000;\r\n\t\tfloat minDistance = 0;\r\n\r\n\t\tmLocationMngr.requestLocationUpdates(LocationManager.GPS_PROVIDER,\r\n\t\t\t\tminTime, minDistance, mGpsListener);\r\n\t\tmLocationMngr.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,\r\n\t\t\t\tminTime, minDistance, mGpsListener);\r\n\r\n\t\ttry {\r\n\t\t\tLocation lastLocation = mLocationMngr\r\n\t\t\t\t\t.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n\t\t\tif (lastLocation != null) {\r\n\t\t\t\tDouble latitude = lastLocation.getLatitude();\r\n\t\t\t\tDouble longitude = lastLocation.getLongitude();\r\n\t\t\t\tString msg = \"Your Current Location \\nLatitude: \" + latitude\r\n\t\t\t\t\t\t+ \", Longitude: \" + longitude;\r\n\t\t\t\tLog.i(TAG, msg);\r\n\t\t\t\t// this.showToastMsg(msg);\r\n\t\t\t\tshowCurrentLocation(latitude, longitude);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tString msg = \"Failed to get current location. Please try later.\";\r\n\t\t\tLog.e(TAG, msg);\r\n\t\t\tshowToastMsg(msg);\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tLocation myLocation = googleMap.getMyLocation();\r\n\t\t\t\t\t\tif (myLocation != null) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t GPSTracker gpsTracker = new GPSTracker(context); \r\n\t\t\t\t\t\t\t if(gpsTracker.canGetLocation()) \r\n\t\t\t\t\t\t\t { \r\n\t\t\t\t\t\t\t\t String stringLatitude = String.valueOf(gpsTracker.latitude); \r\n\t\t\t\t\t\t\t\t String stringLongitude = String.valueOf(gpsTracker.longitude); \r\n\t\t\t\t\t\t\t\t currentlocation = new LatLng(gpsTracker.latitude,gpsTracker.longitude);\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t/*double dclat = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLatitude();\r\n\t\t\t\t\t\t\tdouble dclon = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLongitude();\r\n\t\t\t\t\t\t\tcurrentlocation = new LatLng(dclat, dclon);*/\r\n\r\n\t\t\t\t\t\t\tif (!myList.contains(currentlocation)\r\n\t\t\t\t\t\t\t\t\t&& (currentlocation != null)) {\r\n\t\t\t\t\t\t\t\tmyList.add(currentlocation);\r\n\r\n\t\t\t\t\t\t\t\tdouble lat = currentlocation.latitude;\r\n\t\t\t\t\t\t\t\tdouble lon = currentlocation.longitude;\r\n\t\t\t\t\t\t\t\tuploadarraylist.add(String.valueOf(lon) + \",\"\r\n\t\t\t\t\t\t\t\t\t\t+ String.valueOf(lat));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() == 1) {\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"First zoom\");\r\n\t\t\t\t\t\t\t\tLatLng CurrentLocation = new LatLng(googleMap\r\n\t\t\t\t\t\t\t\t\t\t.getMyLocation().getLatitude(),\r\n\t\t\t\t\t\t\t\t\t\tgoogleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getLongitude());\r\n\t\t\t\t\t\t\t\tCameraPosition cameraPosition = new CameraPosition.Builder()\r\n\t\t\t\t\t\t\t\t\t\t.target(CurrentLocation).zoom(18)\r\n\t\t\t\t\t\t\t\t\t\t.bearing(70).tilt(25).build();\r\n\t\t\t\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory\r\n\t\t\t\t\t\t\t\t\t\t.newCameraPosition(cameraPosition));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() >= 2) {\r\n\t\t\t\t\t\t\t\tdouble slat = myList.get(myList.size() - 2).latitude;\r\n\t\t\t\t\t\t\t\tdouble slon = myList.get(myList.size() - 2).longitude;\r\n\r\n\t\t\t\t\t\t\t\tdouble dlat = myList.get(myList.size() - 1).latitude;\r\n\t\t\t\t\t\t\t\tdouble dlon = myList.get(myList.size() - 1).latitude;\r\n\r\n\t\t\t\t\t\t\t\tLatLng mmarkersourcelatlng = new LatLng(myList\r\n\t\t\t\t\t\t\t\t\t\t.get(1).latitude,\r\n\t\t\t\t\t\t\t\t\t\tmyList.get(1).longitude);\r\n\t\t\t\t\t\t\t\tmsourcelatlng = new LatLng(slat, slon);\r\n\t\t\t\t\t\t\t\tmdestlatlng = new LatLng(dlat, dlon);\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"myLocation:\"\r\n\t\t\t\t\t\t\t\t\t\t+ currentlocation);\r\n\t\t\t\t\t\t\t\tfor (int i = 1; i < myList.size() - 1; i++) {\r\n\t\t\t\t\t\t\t\t\tLatLng src = myList.get(i);\r\n\t\t\t\t\t\t\t\t\tLatLng dest = myList.get(i + 1);\r\n\t\t\t\t\t\t\t\t\tPolyline line = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addPolyline(new PolylineOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// mMap is the Map Object\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.add(new LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.longitude),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.longitude))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.width(10)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.color(R.color.pink)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.geodesic(true));\r\n\t\t\t\t\t\t\t\t\tmsmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmmarkersourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Source\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n\t\t\t\t\t\t\t\t\tif (mdmarker != null) {\r\n\t\t\t\t\t\t\t\t\t\tmdmarker.remove();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmdmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(msourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Destination\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.err.println(\"Mylocation Empty\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t}", "private void startLocationUpdate()\r\n {\r\n try \r\n {\r\n _locationProvider = LocationProvider.getInstance(null);\r\n \r\n if ( _locationProvider == null ) \r\n {\r\n // We would like to display a dialog box indicating that GPS isn't supported, but because\r\n // the event-dispatcher thread hasn't been started yet, modal screens cannot be pushed onto\r\n // the display stack. So delay this operation until the event-dispatcher thread is running\r\n // by asking it to invoke the following Runnable object as soon as it can.\r\n Runnable showGpsUnsupportedDialog = new Runnable() \r\n {\r\n public void run() \r\n {\r\n Dialog.alert(\"GPS is not supported on this platform, exiting...\");\r\n System.exit( 1 );\r\n }\r\n };\r\n invokeLater( showGpsUnsupportedDialog ); // ask event-dispatcher thread to display dialog ASAP\r\n } \r\n else \r\n {\r\n // only a single listener can be associated with a provider, and unsetting it involves the same\r\n // call but with null, therefore, no need to cache the listener instance\r\n _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);\r\n }\r\n } catch (LocationException le) {\r\n System.err.println(\"Failed to instantiate the LocationProvider object, exiting...\");\r\n System.err.println(le); \r\n System.exit(0);\r\n } \r\n }", "TrackerManager getGaTracker();", "private Gng() {\n }", "public AppsFlyerTracker() {}", "private void getGpsLocation() {\n Log.d(LOG_TAG, \"In getGpsLocation\");\n mLocationMgr = (LocationManager) mContext.getSystemService(mContext.LOCATION_SERVICE);\n try {\n Location mLocation = mLocationMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (null != mLocation) {\n mLatitude = mLocation.getLatitude();\n mLongitude = mLocation.getLongitude();\n }\n } catch (SecurityException se) {\n Log.d(LOG_TAG, \"Security Exception\", se);\n }\n }", "public void getLocation(){\n }", "public void checkGPS()\r\n {\r\n\t\tlm = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\r\n\t\tif (!lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\r\n\t\t\tbuildAlertMessageNoGps();\r\n\t\t} else {\r\n\t\t\tlm = (LocationManager) this\r\n\t\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\r\n\t\t\tlm.getProvider(LocationManager.GPS_PROVIDER);\r\n\t\t\tlocationListener = new UserLocationListener();\r\n\t\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 10,\r\n\t\t\t\t\tlocationListener);\r\n\t\t}\r\n\t}", "Track(){\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n btnWaypoint = (Button) findViewById(R.id.btnNewWalk);\n btnWalk = (Button) findViewById(R.id.btnNewWaypoint);\n btnSaveWalk = (Button) findViewById(R.id.btnSaveWalk);\n\n btnWaypoint.setOnClickListener(this);\n btnWalk.setOnClickListener(this);\n btnSaveWalk.setOnClickListener(this);\n\n\n // Acquire a reference to the system Location Manager\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n // Define a listener that responds to location updates\n LocationListen locationListener = new LocationListen(this);\n\n // Register the listener with the Location Manager to receive location updates\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n\n Location loc = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n\n }", "public void setGpsLocation(GpsPoint gpsLocation) {\n\t\tthis._GPS = gpsLocation;\n\t}", "public void initializeComponents() {\n\n Log.d(LOG_TAG, \"called initializeComponents()\");\n\n vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);\n\n // Set up file for logging session information\n Context context = getApplicationContext();\n logFile = new File(context.getFilesDir(), logFileName);\n if(!logFile.exists()) {\n Log.i(LOG_TAG, \"Session log file does not exist. Creating...\");\n try {\n FileOutputStream outputStream = openFileOutput(logFileName, Context.MODE_PRIVATE);\n outputStream.close();\n Log.i(LOG_TAG, \"Created empty file: \"+logFileName);\n } catch (Exception e){\n e.printStackTrace();\n }\n }\n else {\n sessionLogList = readLogFile(); // Possible to continue on existing file, i.e. if app crashes before ending shift properly (which clears file).\n }\n\n // Set up periodic GPS-location request\n fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n locationRequest = LocationRequest.create();\n locationRequest.setInterval(10000); // Every 10s\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n locationCallback = new LocationCallback() {\n /**\n * Receives and logs the location result and checks if user is currently in the shift's related zone\n * @param locationResult result from location request\n */\n @Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n Log.w(LOG_TAG, \"LocationCallback(): locationResult == null\");\n return;\n }\n\n Location lastLocation = locationResult.getLastLocation();\n\n double latitude = lastLocation.getLatitude();\n double longitude = lastLocation.getLongitude();\n double accuracy = lastLocation.getAccuracy();\n\n userLocation = new LatLng(latitude, longitude);\n Long currentTimestamp = System.currentTimeMillis();\n\n String gpsData = \"\\nlat:\" + latitude + \"\\nlong:\" + longitude + \"\\naccuracy: \" + accuracy + \"m\\ntimestamp: \" + currentTimestamp;\n Log.d(LOG_TAG, \"onLocationResult() called: \" + gpsData);\n\n if (!checkInsideZone()) { // Check current status, but don't update outsideZone yet!\n if (!outsideZone) {\n // Transition to outside zone state (countdown to automatic termination of shift) if not already outside\n leftZoneTimestamp = System.currentTimeMillis();\n outsideZone = true;\n Log.e(LOG_TAG, \"User has left the designated zone area.\");\n\n // Alert user visually and with vibration\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Warning! You have left the zone. Return within 2 minutes.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n\n // Something like this: - du - Du!\n long[] timings = new long[]{0, 200, 200, 200}; // ms\n int[] amplitudes = new int[] {0, 128, 0, 200}; // 0-255\n vibrator.vibrate(VibrationEffect.createWaveform(timings,amplitudes, -1));\n }\n\n if (currentTimestamp - leftZoneTimestamp > leftZoneMaximum) {\n Log.e(LOG_TAG, \"User has been outside of the designated zone area for too long. Terminating shift.\");\n Toast.makeText(getApplicationContext(), \"You left the zone for more than 2 minutes - session terminated.\", Toast.LENGTH_LONG).show();\n endShift();\n }\n } else if (outsideZone) { // Outside -> inside: i.e. user has re-entered zone, transition to safe state\n outsideZone = false;\n Log.e(LOG_TAG, \"User has re-entered the designated zone area.\");\n }\n\n // Log path of user\n sessionLogList.add(new SessionLog(currentTimestamp, userLocation, !outsideZone));\n }\n };\n\n Log.d(LOG_TAG, \" > setup fusedLocationClient\");\n\n // Request periodic location updates\n startLocationUpdates();\n\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n // Set up stopWorkingButton\n stopWorkingButton = findViewById(R.id.stopWorkingButton);\n stopWorkingButton.setOnClickListener(new View.OnClickListener() {\n /**\n * Vibration effect added upon clicking stop working button, and shows end shift dialog\n * @param v button with listener\n */\n @Override\n public void onClick(View v) {\n Log.d(LOG_TAG, \"Pressed stop working button!\");\n vibrator.vibrate(VibrationEffect.createOneShot(30, 30));\n showEndShiftDialog();\n }\n });\n\n // Set up myLocationButton\n fabButton = findViewById(R.id.myLocationButton);\n fabButton.setOnClickListener(new View.OnClickListener() {\n /**\n * Vibration effect added upon clicking fab button, and moves camera to current location on map\n * @param v button with listener\n */\n @Override\n public void onClick(View v) {\n Log.d(LOG_TAG, \"Pressed FAB!\");\n if (userLocation != null){\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(userLocation) // Sets the center of the map to Mountain View\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null); // Animation takes 250ms\n Log.d(LOG_TAG, \"> Moved to current user location.\");\n }\n else {\n Log.w(LOG_TAG, \" > Couldn't move to current user location, userLocation == null\");\n Toast.makeText(getApplicationContext(), \"Unknown location... Please try again.\", Toast.LENGTH_SHORT).show();\n }\n vibrator.vibrate(VibrationEffect.createOneShot(30, 30));\n }\n });\n Log.d(LOG_TAG, \" > setup myLocationButton\");\n\n // Add pulsing animation to \"Tracking your work\" notice\n TextView reminder = (TextView) findViewById(R.id.reminder);\n ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(\n reminder,\n PropertyValuesHolder.ofFloat(\"scaleX\", 1.1f),\n PropertyValuesHolder.ofFloat(\"scaleY\", 1.1f));\n scaleDown.setDuration(800);\n scaleDown.setRepeatCount(ObjectAnimator.INFINITE);\n scaleDown.setRepeatMode(ObjectAnimator.REVERSE);\n scaleDown.start();\n }", "private void registerLocationListeners() {\n// SharedPreferences perfs = PreferenceManager\n// .getDefaultSharedPreferences(getApplicationContext());\n// if (perfs.getBoolean(getString(R.string.gps_pref_key), false)) {\n// registerForGPS();\n// } else {\n// useDefaultLocation(perfs,\n// getString(R.string.state_location_pref_key));\n// }\n registerForGPS();\n onGPSOn();\n SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n Sensor gsensor = mSensorManager\n .getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n Sensor msensor = mSensorManager\n .getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n mSensorManager.registerListener(qiblaManager, gsensor,\n SensorManager.SENSOR_DELAY_GAME);\n mSensorManager.registerListener(qiblaManager, msensor,\n SensorManager.SENSOR_DELAY_GAME);\n schedule();\n isRegistered = true;\n\n }", "@SuppressLint(\"MissingPermission\")\n private void doStuff() {\n LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE);\n if (locationManager != null) {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, (LocationListener) this);\n }\n\n }", "public SensorStation(){\n\n }", "@Override \n\t\tpublic void run() {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIGPSService gpsService = gpsServiceConnection.getServiceIfBound();\n\t\t\t \tif (gpsService != null) {\n\t\t\t \t\ttry {\n\t\t\t \t\t\tmLastSuccess.setText(gpsService.getLastSuccessfulRequest());\n\t\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\t\tLog.d(LocationUtils.APPTAG, e.getLocalizedMessage());\n\t\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void loadData() {\n gps = new GPSTracker(LocationActivity.this);\n if (from.equals(\"home\")) {\n if (lat == 0 && lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n lat = gps.getLatitude();\n lon = gps.getLongitude();\n Log.v(\"lati\", \"lat\" + lat);\n Log.v(\"longi\", \"longi\" + lon);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n } else if (from.equals(\"add\")) {\n if (AddProductDetail.lat == 0 && AddProductDetail.lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n Log.v(\"lati\", \"lat\" + AddProductDetail.lat);\n Log.v(\"longi\", \"longi\" + AddProductDetail.lat);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n }\n\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n Service_GPSInternal.LocalBinder binder = (Service_GPSInternal.LocalBinder) service;\n mGPSTrackingService = binder.getService();\n mGPSServiceBounded = true;\n mGPSTrackingService.setOnServiceListener(mGPSListener);\n }", "public RoadTest()\n {\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n gpsTracker = new GPSTracker(this);\n\n // TODO Cek Permission >= Marshmellow\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&\n checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION\n }, 110);\n return;\n }\n }\n\n if (gpsTracker.canGetLocation()) {\n latawal = gpsTracker.getLatitude();\n lonawal = gpsTracker.getLongitude();\n namelocationawal = myLocation(latawal, lonawal);\n }\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latawal, lonawal);\n locawal.setText(namelocationawal);\n mMap.addMarker(new MarkerOptions().position(myLocation).title(namelocationawal));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.setPadding(30, 80, 30, 80);\n }", "@Override\r\n\tpublic void run() {\n\t\tmLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\r\n\t\t\t\tConstants.GPS_MIN_TIME_MIL_SEC,\r\n\t\t\t\tConstants.GPS_MIN_DISTANCE_METER, myLocationListener);\r\n\t}", "@SuppressLint(\"MissingPermission\")\r\n public void initLocation(){\r\n //LocationManager.NETWORK_PROVIDER Otra opcion\r\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 2, new LocationListener() {\r\n @Override\r\n public void onLocationChanged(@NonNull Location location) {\r\n LatLng pos = new LatLng(location.getLatitude(), location.getLongitude());\r\n myMarker.setPosition(pos);\r\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 16));\r\n }\r\n\r\n @Override\r\n public void onStatusChanged(String provider, int status, Bundle extras) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderDisabled(@NonNull String provider) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderEnabled(@NonNull String provider) {\r\n\r\n }\r\n });\r\n }", "@Override\r\n public void run() {\r\n mLocationManager.removeUpdates(locationListenerGps);\r\n mLocationManager.removeUpdates(locationListenerNetwork);\r\n \r\n try{\r\n \t isGpsEnabled=mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\r\n }catch(Exception ex){\r\n \t//Exception: No suitable permission is present for the provider.\r\n \tConstants.PROVIDER_EXCEPTION = ex.getMessage();\r\n }\r\n try{\r\n \t isNetworkEnabled=mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\r\n }catch(Exception ex){\r\n \tConstants.PROVIDER_EXCEPTION = ex.getMessage();\r\n }\r\n\r\n Location net_loc=null, gps_loc=null;\r\n\r\n if(isGpsEnabled){\r\n \t /*Returns a Location indicating the data from the last known location fix obtained \r\n \t * from the given provider. This can be done without starting the provider. \r\n \t * Note that this location could be out-of-date, \r\n \t * for example if the device was turned off and moved to another location.*/\r\n gps_loc=mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n Constants.LAST_KNOWN_LOCATION = true;\r\n }\r\n if(isNetworkEnabled){\r\n net_loc=mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n Constants.LAST_KNOWN_LOCATION = true;\r\n }\r\n \r\n //if there are both values then use the latest one.\r\n if(gps_loc!=null && net_loc!=null){\r\n if(gps_loc.getTime()>net_loc.getTime())\r\n gotLocation(gps_loc);\r\n else\r\n gotLocation(net_loc);\r\n return;\r\n }\r\n\r\n if(gps_loc!=null){\r\n gotLocation(gps_loc);\r\n return;\r\n }\r\n \r\n if(net_loc!=null){\r\n gotLocation(net_loc);\r\n return;\r\n }\r\n gotLocation(null);\r\n }", "public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }", "public void add_location() {\n if (currentLocationCheckbox.isChecked()) {\n try {\n CurrentLocation locationListener = new CurrentLocation();\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null) {\n int latitude = (int) (location.getLatitude() * 1E6);\n int longitude = (int) (location.getLongitude() * 1E6);\n currentLocation = new GeoPoint(latitude, longitude);\n }\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n } else {\n currentLocation = null;\n }\n\n }", "@TargetApi(Build.VERSION_CODES.M)\n public void stopUsingGPS() {\n if (locationManager != null) {\n if (checkSelfPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // public void requestPermissions(@NonNull String[] permissions, int requestCode)\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for Activity#requestPermissions for more details.\n return;\n }\n // locationManager.removeUpdates(GPSTracker.this);\n }\n }", "public void startTracking() {\n if (mTracker == null) {\n GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(this);\n // Get tracker\n mTracker = googleAnalytics.newTracker(R.xml.track_config);\n // Enable tracking of Activities\n googleAnalytics.enableAutoActivityReports(this);\n googleAnalytics.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);\n }\n }", "private void initLocation() {\n\t\tlocationManager = (LocationManager) this\n\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\n\t\t// Define a listener that responds to location updates\n\t\tnetworkLocListener = new MyLocationListener();\n\t\tgpsLocListener = new MyLocationListener();\n\n\t\tlocationProvider2 = LocationManager.NETWORK_PROVIDER;\n\t\tlocationProvider1 = LocationManager.GPS_PROVIDER;\n\n\t\tgps_enabled = false;\n\t\tnetwork_enabled = false;\n\t\t// exceptions will be thrown if provider is not permitted.\n\n\t\t// try{gps_enabled=mlocManager.isProviderEnabled(LocationManager.GPS_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tgps_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\t\t// try{network_enabled=mlocManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tnetwork_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n\t\t// don't start listeners if no provider is enabled\n\t\tif (!gps_enabled && !network_enabled) {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Either network or GPS not enabled, please check\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t/*\n\t\t\t * Intent gpsOptionsIntent = new\n\t\t\t * Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS\n\t\t\t * ); startActivity(gpsOptionsIntent);\n\t\t\t */\n\t\t}\n\n\t\t// Define a listener that responds to location updates\n\t\t// LocationListener locationListener = new LocationListener() {\n\t\t// @Override\n\t\t// public void onLocationChanged(Location location) {\n\t\t// // Called when a new location is found by the network location\n\t\t// // provider.\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Updating current location\");\n\t\t// Toast.makeText(getApplicationContext(),\n\t\t// \"Updating current location\", Toast.LENGTH_LONG).show();\n\t\t// }\n\t\t//\n\t\t// public void onStatusChanged(String provider, int status,\n\t\t// Bundle extras) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"status changed\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderEnabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"location enabled\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderDisabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Location disabled\");\n\t\t// }\n\t\t// };\n\n\t\tif (network_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.NETWORK_PROVIDER, 1, 1, networkLocListener);\n\t\t}\n\t\tif (gps_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.GPS_PROVIDER, 1, 1, gpsLocListener);\n\t\t}\n\t}", "public FGDistanceStats()\r\n {\r\n \r\n }", "GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }", "public void testGPS() {\n\t\tgps = new GPSTracker(gps);\n \tdouble [] coordinate = new double[2];\n\t\tdouble latitude = gps.getLatitude();\n\t\tdouble longitude = gps.getLongitude();\n\t\tcoordinate[0] = latitude;\n\t\tcoordinate[1] = longitude;\n\t\tassertTrue(Math.floor(latitude) == 0 && Math.floor(longitude) == 0);\n\t\t\n\t\tString address = GeoCoder.toAdress(53.5267620,-113.5271460);\n\t\tLog.d(LOG_TAG, address);\n\t\tString testAddress = \"Edmonton, Alberta/CA\";\n\t\tLog.d(LOG_TAG, testAddress);\n\t\tassertEquals(address, testAddress);\n\t\t\n\t}", "@Override\r\n\tpublic ArrayList<Gps> getAllGpsLocation() {\n\t\treturn null;\r\n\t}", "public Track(){\n\t\tthis.trk = trackGenerator();\n\n\t}", "private TouchPointManager() {\n }", "public boolean getGPS()\n {\n return getLocation;\n }", "@Override\r\n public void onLocationChanged(Location location) {\n\r\n sendLocationUpdates(location);\r\n }", "public RegistroSensor() \n {\n\n }", "private void gpsRequest(){\n new AlertDialog.Builder(this)\n .setTitle(\"Enable GPS\")\n .setMessage(\"Would you like to allow location tracking?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //yes\n\n configLoc();\n Toast.makeText(getApplicationContext(),\"Location tracking is enabled\",Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //no\n Toast.makeText(getApplicationContext(),\"Location Tracking has been disabled\",Toast.LENGTH_SHORT).show();\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public Location() {\r\n \r\n }", "public Game2(Starter starter){\r\n chromaticManager = starter.chromaticManager;\r\n this.starter=starter;\r\n }", "private LocationService() {\n }", "public double getGpsLng() {\n return gpsLng;\n }", "public interface GPScoordinates {\n public void sendCoordinates(double myLat, double myLong);\n}", "@Override\r\n\tpublic void onGpsOpenStatus(boolean arg0) {\n\r\n\t}", "public MTPostEditDistanceReportGenerator()\n {\n\n }", "@Override\n public void onLocationChanged(Location location) {\n if(!firstLocCheck){\n drive = new Drive(location.getLatitude(),location.getLongitude(),Car.carList.get(carIndex),startTime);\n firstLocCheck = true;\n } else {\n Drive.curLat = location.getLatitude();\n Drive.curLong = location.getLongitude();\n }\n System.out.println(\"Location has changed\");\n System.out.println(location.getLatitude() + \" | \" + location.getLongitude());\n\n //updateLoc(location);\n //locProvider = location.getProvider();\n }" ]
[ "0.6822209", "0.6453378", "0.63145965", "0.63072956", "0.62326235", "0.6223749", "0.62154955", "0.61548626", "0.61381984", "0.60731345", "0.6041215", "0.60376704", "0.6021518", "0.6014863", "0.5948089", "0.59412926", "0.5933641", "0.5870668", "0.579983", "0.5790806", "0.5790155", "0.5782981", "0.57706934", "0.57627183", "0.57551867", "0.57446414", "0.5740591", "0.5722063", "0.568753", "0.56854755", "0.568457", "0.5682517", "0.56820333", "0.56798196", "0.5679487", "0.5676759", "0.5675898", "0.567407", "0.56632763", "0.56376386", "0.56281143", "0.56228834", "0.56149715", "0.55789924", "0.5566795", "0.5562037", "0.55605656", "0.5554457", "0.5531959", "0.55246663", "0.5514651", "0.5508289", "0.5507125", "0.5496473", "0.54921234", "0.5490899", "0.5476852", "0.5476075", "0.546395", "0.5456441", "0.5454529", "0.5453165", "0.54425794", "0.54422027", "0.5433149", "0.54176426", "0.54010195", "0.5394934", "0.53894264", "0.5383919", "0.53835297", "0.53740996", "0.5371827", "0.5367321", "0.53578085", "0.5357213", "0.53480667", "0.53450406", "0.5341317", "0.53368574", "0.53345156", "0.53318906", "0.53317934", "0.5322584", "0.53201973", "0.53169376", "0.53167045", "0.5306886", "0.52998406", "0.5296366", "0.52960646", "0.5283264", "0.5282838", "0.52756673", "0.5272404", "0.5255059", "0.5253498", "0.5253154", "0.52518535", "0.52484524", "0.52466226" ]
0.0
-1
messageText.setText("MalformedURLException Exception : check script url.");
public void run() { Toast.makeText(Pratisthan.this, "MalformedURLException",Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void invalidURL() {\r\n\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\talert.setTitle(\"Error!\");\r\n\t\talert.setHeaderText(\"\");\r\n\t\talert.setContentText(\"URL oder Datei konnte nicht geladen werden!\");\r\n\t\talert.showAndWait();\r\n\t}", "public void run() {\n Toast.makeText(getBaseContext(), \"MalformedURLException\", Toast.LENGTH_SHORT).show();\n }", "void pushScriptLoadError(String resourceUrl);", "public static void setString()\n\t{\n\t\turl = getText();\n\t}", "@Override\n public void onFailed(String text) {\n view.onFailed(\"Greska u dohvacanju favorita!\");\n }", "void showErrorMsg(String string);", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }", "public void errorMessage(String text) {\n \t\tErrorMessage msg = new ErrorMessage(this, text);\n \t\tmsg.setAlwaysOnTop(true);\n \t\tmsg.setVisible(true);\n \t\tsetEnabled(false);\n \t}", "@Override\n\t\t\t\t\tpublic void onError(String strUrl) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private String getMessagePlainText() throws BadLocationException{\n\t\treturn textArea.getDocument().getText(0, textArea.getDocument().getLength());\n}", "public void onButtonLoadUrl(View theButton){ \t\n \tEditText edit = (EditText)findViewById(R.id.editUrl);\n \tString url = edit.getText().toString();\n \tif (url.length()>0){\n \t\tbrowser.loadUrl(url);\n \t\toutputWindow.append(\"\\nLoading \"+url);\n \t\ttabhost.setCurrentTab(0);\n \t}else {\n \t\toutputWindow.append(\"\\nURL is null\");\n \t} \t \n }", "@Override\r\n\tpublic DTextArea setHtmlOnError(final String script) {\r\n\t\tsuper.setHtmlOnError(script) ;\r\n\t\treturn this ;\r\n\t}", "public ErrorAlert(String message) {\r\n\r\n JOptionPane.showMessageDialog(MainWindow.getInstance(), message);\r\n\r\n }", "public static void assertURL(String text)\n {\n org.junit.Assert.assertTrue(driver.getCurrentUrl().contains(text));\n }", "public MalformedURIException(String p_msg) {\n super(p_msg);\n }", "public void ShowMessageBox(String text)\n {\n ShowMessageBox(getShell(), \"Error\", text, 0);\n }", "void showError(String errorMessage);", "public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\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 initialize(URL url, ResourceBundle rb) {\n //errImage.setImage(new Image(\"file:src/Assets/error.png\"));\n messageLabel.setText(rb.getString(\"title\"));\n detailsLabel.setText(rb.getString(\"message\"));\n //enter'a basildiginda hata mesaji ekrani kapanir\n okButton.setOnKeyPressed((KeyEvent key)->{\n if (key.getCode() == KeyCode.ENTER) {\n okButton.fire();\n }\n });\n }", "void showError(String message);", "void showError(String message);", "private void catcher() {\n String text;\n\n if (getTextFromEditText(R.id.distanceEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_distance);\n } else if (getTextFromEditText(R.id.fuelEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_fuel);\n } else {\n text = getResourceString(R.string.err_wrong_vals);\n }\n\n makeToast(text);\n }", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "private final synchronized void m46526e(String str) {\n try {\n amv.m46599a(this, str);\n } catch (Exception | IncompatibleClassChangeError | NoClassDefFoundError | UnsatisfiedLinkError e) {\n C14793ay.m42898d().mo39089a(e, \"AdWebViewImpl.loadUrlUnsafe\");\n acd.m45780c(\"Could not call loadUrl. \", e);\n }\n }", "public static String getText()\n\t{\n\t\treturn enterURL.getText().toString();\n\t}", "private void displayError(String errorText) {\n\t\tMessageBox messageBox = new MessageBox(shell, SWT.OK);\n\t\tmessageBox.setMessage(errorText);\n\t\tmessageBox.setText(\"Alert\");\n\t\tmessageBox.open();\n\t}", "public void onReceivedError(WebView view, int errorCode,\n String description, String failingUrl) {\n dialog.dismiss();\n // You can redirect to your own page instead getting the default\n // error page\n Toast.makeText(EpubReaderActivity.this,\n \"The Requested Page Does Not Exist\", Toast.LENGTH_LONG).show();\n web.loadUrl(\"http://arunimmanuel.blogspot.in\");\n super.onReceivedError(view, errorCode, description, failingUrl);\n }", "public String getTextUrl(String text) {\n return StrUtils.createUrlFromString(text);\n }", "public ShowErrorMessage(@NotNull String str) {\n super(null);\n Intrinsics.checkNotNullParameter(str, \"text\");\n this.a = str;\n }", "@Override\n\t\t\t\t\tpublic void onError(String url) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private void setErrorMessage() {\n messageLabel.setText(NbBundle.getMessage(JavaFXPlatformCustomizer.class, \"Customizer_Invalid_Platform_Msg\")); // NOI18N\n }", "protected void handleException(java.lang.Throwable exception) {\n ch.softenvironment.view.BaseDialog.showError((java.awt.Component)this, getResourceString(\"CESyntax\"), exception.toString(), exception); //$NON-NLS-1$\n}", "public abstract void showInitError(String s);", "public void setToolTipText (String string) {\r\n\tcheckWidget();\r\n\ttoolTipText = string;\r\n}", "@Test\r\n public void incorrectUrlTest(){\r\n boolean noException = false;\r\n \r\n try {\r\n extractor = new HTMLExtractor(\"google.co.uk\");\r\n noException = true;\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n assertTrue(\"should not throw an exception\", noException);\r\n }", "private void initText() {\n// urlText.setText(jPAConfig.getUrl());\n// userText.setText(jPAConfig.getUser());\n// dbNameText.setText(jPAConfig.getDbName());\n// portText.setText(jPAConfig.getPort());\n// passText.setText(jPAConfig.getPassword());\n }", "public LinkException(String msg) {\n super(msg);\n }", "public FormAlertSimple(String strMsgText) throws Exception {\n initializeComponent();\n Lan.F(this);\n labelMsg.Text = strMsgText;\n }", "public void showError(String errorMessage);", "private final synchronized void m46525c(String str) {\n if (!mo39703C()) {\n loadUrl(str);\n } else {\n acd.m45783e(\"#004 The webview is destroyed. Ignoring action.\");\n }\n }", "public static void setErrorMessage(String text) {\n\t JOptionPane optionPane = new JOptionPane(text,JOptionPane.ERROR_MESSAGE);\n\t JDialog dialog = optionPane.createDialog(\"Erro\");\n\t dialog.setAlwaysOnTop(true);\n\t dialog.setVisible(true);\n\t}", "@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 }", "public void showError(String error);", "@Test\r\n public void testInvalidURL() {\r\n String[] str = {\"curl\", \"http://www.ub.edu/gilcub/SIMPLE/simple.html\"};\r\n\r\n curl.run(str);\r\n assertTrue(ErrorHandler.checkIfErrorOccurred());\r\n assertEquals(\"invalid URL\\n\", Output.getLastPrinted());\r\n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Failure : \" + caught.getMessage());\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Failure : \" + caught.getMessage());\n\t\t\t\t\t}", "public void mensagemErro(String m) {\r\n Alert alerta = new Alert(Alert.AlertType.ERROR);\r\n alerta.setTitle(\"ERRO!\");\r\n alerta.setHeaderText(null);\r\n alerta.setContentText(m);\r\n alerta.showAndWait();\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void onMalformedURLException(MalformedURLException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void ErrorMessage(String error) {\n \tJOptionPane.showMessageDialog(parent, error);\n }", "@Override\n void assertErrorMessage(String messageText) {\n }", "@Override\n public void setFailed(String msg) {\n Platform.runLater(() -> {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Errore di input\");\n alert.setHeaderText(msg);\n alert.showAndWait();\n });\n if (firstAction) {\n inTurno = false;\n }\n\n }", "public void checkServerErrors() throws NumberFormatException, PluginException {\r\n if (new Regex(brbefore, Pattern.compile(\"No file\", Pattern.CASE_INSENSITIVE)).matches()) {\r\n throw new PluginException(LinkStatus.ERROR_FATAL, getPhrase(\"SERVER_ERROR\"));\r\n }\r\n if (new Regex(brbefore, \"(Not Found|<h1>(404 )?Not Found</h1>)\").matches()) {\r\n logger.warning(\"Server says link offline, please recheck that!\");\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n if (br.containsHTML(\"Twój dzienny limit transferu\")) {\r\n UserIO.getInstance().requestMessageDialog(0, getPhrase(\"PREMIUM_ERROR\"), getPhrase(\"DAILY_LIMIT\") + \"\\r\\n\" + getPhrase(\"PREMIUM_DISABLED\"));\r\n throw new PluginException(LinkStatus.ERROR_PREMIUM, PluginException.VALUE_ID_PREMIUM_TEMP_DISABLE);\r\n } else if (br.containsHTML(\"<input type=\\\"submit\\\" class=\\\"btn btn-large btn-inverse\\\" style=\\\"font-size:30px; font-weight: bold; padding:30px\\\" value=\\\"Pobierz szybko\\\" />\")) {\r\n throw new PluginException(LinkStatus.ERROR_FATAL, getPhrase(\"LINK_BROKEN\"));\r\n }\r\n\r\n }", "@FXML\r\n void ClickSearchScriptBtn(ActionEvent event) throws IOException,\r\n URISyntaxException {\r\n //Create alert\r\n try\r\n {\r\n if(!SearchScriptField.getText().isEmpty())\r\n {\r\n new URL(SearchScriptField.getText()).toURI();\r\n TextInputDialog dialog = new TextInputDialog(\"Command to\"\r\n + \" run script\");\r\n dialog.setTitle(\"Found script online\");\r\n dialog.setHeaderText(\"Enter Command to run\");\r\n Optional<String> result = dialog.showAndWait();\r\n //Wait for response\r\n if(result.isPresent())\r\n {\r\n //if user selects okay, add to \r\n TextInputDialog dialogDescription = new \r\n TextInputDialog(\"Script Description\");\r\n dialogDescription.setTitle(\"Found script online\");\r\n dialogDescription.setHeaderText(\"Enter script description\");\r\n Optional<String>resultDesc =dialogDescription.showAndWait();\r\n if(resultDesc.isPresent())\r\n {\r\n DateTimeFormatter formatter = \r\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\r\n user.getListOfScripts().add(new Script(\r\n SearchScriptField.getText(),\r\n formatter.format(LocalDate.now()), \r\n dialogDescription.getResult(), \r\n dialog.getResult()));\r\n SearchScriptField.setText(\"Online Script Found\");\r\n //add script and reload table\r\n scriptTable.setItems(user.getListOfScripts());\r\n user.setListOfScripts(user.getListOfScripts());\r\n }\r\n }\r\n }\r\n else\r\n {\r\n \r\n }\r\n }\r\n catch(MalformedURLException e)\r\n {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Invalid URL Found\");\r\n alert.setHeaderText(\"Unable to search URL\");\r\n alert.setContentText(\"Please ensure that the URL entered is in a\"\r\n + \" correct format and try again\");\r\n alert.showAndWait();\r\n //Wait for response\r\n SearchScriptField.setText(\"Search Script Online - Enter URL\");\r\n }\r\n \r\n }", "private void setText(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n text_ = value;\n }", "@Override\n protected void onPostExecute(String webUrl) {\n if (webUrl!=null) { // If web access granted\n }\n else\n labelStatus.setText(\"Customer id \" + code + \" not valid\");\n }", "@Override\n public void onReceivedError(WebView view, int errorCode,\n String description, String failingUrl) {\n Toast.makeText(Wb1_access.this, \"Oh no! \" + description, Toast.LENGTH_SHORT).show();\n //super.onReceivedError(view, errorCode, description, failingUrl);\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n this.errorMessage.setVisible(false);\n this.errorMessage.toFront();\n }", "void drawError(String message);", "public void importURLClick() {\n\n //Creates an input dialog for the user to write an URL\n TextInputDialog textInputDialog = new TextInputDialog();\n textInputDialog.setHeaderText(\"Import RLE from URL\");\n textInputDialog.setContentText(\"Enter URL\");\n textInputDialog.showAndWait();\n String url = textInputDialog.getResult();\n\n //If a String is present, will try to load it, and produce warning if not able to.\n if (url != null) {\n timeline.stop();\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n try {\n fileHandler.readGameBoardFromURL(url);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n } catch (IOException ie) {\n PopUpAlerts.ioAlertFromURL();\n }\n }\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 }", "public InvalidURIException()\r\n\t{\r\n\t\tmessage = super.getMessage();\r\n\t}", "void setText(String text);", "void openLinkInSystemBrowser(String url, int errorMsg);", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "@Override\r\n\t\tpublic void onMalformedURLException(MalformedURLException e, Object state) {\n\t\t\t\r\n\t\t}", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "void showResultMoError(String e);", "void setText (String text);", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}", "@Override\n\tpublic void setNetworkError() {\n\t\tnew Customdialog_Base(this, \"네트워크 불안정\").show();\n\t}", "@Test(timeout = 4000)\n public void test343() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n // Undeclared exception!\n try { \n label0.title(\"select\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "public void updateURL(String url) {\n\t\tthis.url = url;\n\t\ttry{\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(new URL(url));\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\t}", "public void setURL(java.lang.CharSequence value) {\n this.URL = value;\n }", "private void error(String string) {\n\t\r\n}", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "public URLButton()\n {\n title = \"\";\n }", "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "public void onError(String cadena) {\r\n\t\tJOptionPane.showMessageDialog(null, cadena, \"Movimiento invalido\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\r\n\t}", "public InvalidURIException(String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t\tthis.message = message;\r\n\t}", "@Override\n\tpublic void SuccessText(String text) {\n\t\tLog.i(TAG, \"==-->text:=\"+text);\n\t\tmain_one.setText(text);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input=JOptionPane.showInputDialog(websiteListTree,\"请输入网址\",\"编辑项目\",JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tif(input!=null)\n\t\t\t\t{\n\t\t\t\t\tString regex = \"^(http|https|ftp)\\\\://([a-zA-Z0-9\\\\.\\\\-]+(\\\\:[a-zA-\"\n\t\t\t\t\t+ \"Z0-9\\\\.&%\\\\$\\\\-]+)*@)?((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{\"\n\t\t\t\t\t+ \"2}|[1-9]{1}[0-9]{1}|[1-9])\\\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}\"\n\t\t\t\t\t+ \"[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\\\.(25[0-5]|2[0-4][0-9]|\"\n\t\t\t\t\t+ \"[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\\\.(25[0-5]|2[0-\"\n\t\t\t\t\t+ \"4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0\"\n\t\t\t\t\t+ \"-9\\\\-]+\\\\.)*[a-zA-Z0-9\\\\-]+\\\\.[a-zA-Z]{2,4})(\\\\:[0-9]+)?(/\"\n\t\t\t\t\t+ \"[^/][a-zA-Z0-9\\\\.\\\\,\\\\?\\\\'\\\\\\\\/\\\\+&%\\\\$\\\\=~_\\\\-@]*)*$\";\n\t\t\t\t\tboolean flag=input.matches(regex);\n\t\t\t\t\tif(flag)\n\t\t\t\t\t{\n\t\t\t\t\t\tCheckBoxTreeNode node=(CheckBoxTreeNode) path.getLastPathComponent();\n\t\t\t\t\t\t\n\t\t\t\t\t\tlist=mainFrame.configList;\n\t\t\t\t\t\tIterator<Configuration> it=list.iterator();\n\t\t\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\t\t\tif(it.next().getURL().equals((String)node.getUserObject()))\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tit.next().setURL(input);\n\t\t\t\t\t\tnode.setUserObject(input);\n\t\t\t\t\t\twebsiteListTree.updateUI();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tImageIcon joptionIcon=new ImageIcon(\"img/info_red.png\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(websiteListTree,\"请输入正确的网址\",\"输入提示\",JOptionPane.ERROR_MESSAGE,joptionIcon);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onRemoteNodeError(String url, String message) {\n\t\t\t\t\n\t\t\t}", "private void errorMessage(String message) {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tAlertDialog dialog = builder.setMessage(message).setTitle(\"Error\").create();\n \tdialog.show();\n }", "public void setErrorMsg(String text) {\n this.errorMsg = text;\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"TAG\", \"smsRetrieverCall FAIL\");\n result.setText(\"Retriever start Fail\");\n }", "@Override\n\t\tpublic void onMalformedURLException(MalformedURLException e,\n \t\t\tObject state) {\n \n \t}", "public void message(String text) {\n if(myGUI==null) return;\n myGUI.message(text);\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "@Override\n public void initialize(URL url, ResourceBundle resources) {\n try {\n Lhello.setText(\"Bonjour \" + Login.getUsername());\n } catch (Exception e) {\n\n }\n\n }", "public void set_url(String url) throws Exception{\n\t\tthis.url = url;\n\t}", "public void setText(String text);", "private void showErroAlert(String errorMessage) {\n LOGGER.log(Level.INFO, \"Showing Alert window with error message...\");\n Alert errorAlert = new Alert(Alert.AlertType.ERROR, errorMessage, ButtonType.OK);\n errorAlert.show();\n }", "public void actionPerformed(ActionEvent e) {\n if (caller != null) {\n String url = fieldURL.getText();\n /* Calls a parsing task in a new thread. */\n caller.extUrlWSDLImport(url);\n }\n setVisible(false);\n dispose();\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n Form form0 = new Form(\"g+0=\");\n TextArea textArea0 = new TextArea(form0, \"g+0=\", \"asset/wheel/components/jquery.js?expires=88\");\n // Undeclared exception!\n try { \n textArea0.sub();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "void displayErrorMessage(String message);", "@Test(timeout = 4000)\n public void test265() throws Throwable {\n Form form0 = new Form(\"Lc7/B.MJD\");\n // Undeclared exception!\n try { \n form0.textInput(\")j6;z$@\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }" ]
[ "0.6796977", "0.6508662", "0.64378613", "0.60334504", "0.58149415", "0.56899256", "0.56813294", "0.5679008", "0.56446815", "0.5636203", "0.563333", "0.5593639", "0.5547349", "0.55387884", "0.55245423", "0.5508687", "0.5472171", "0.5444888", "0.5442041", "0.54335696", "0.5431511", "0.5415451", "0.5414354", "0.5414354", "0.5408732", "0.53987837", "0.5386435", "0.53861463", "0.5355749", "0.53484154", "0.5348411", "0.53429145", "0.53339785", "0.53339297", "0.5332074", "0.5331907", "0.5323926", "0.53141916", "0.5314191", "0.5307436", "0.5303842", "0.53003144", "0.5288295", "0.527667", "0.5275036", "0.52701175", "0.5264341", "0.5262055", "0.5262055", "0.52604896", "0.5260063", "0.5234157", "0.52333623", "0.52267146", "0.5222998", "0.5222881", "0.5218836", "0.521606", "0.520599", "0.52052104", "0.52002215", "0.51977694", "0.519147", "0.5186758", "0.5183318", "0.5172293", "0.517093", "0.51706916", "0.5158967", "0.5157833", "0.51570797", "0.51538646", "0.51534873", "0.51507485", "0.5149681", "0.5148165", "0.51481247", "0.5147743", "0.514771", "0.514332", "0.51335335", "0.5133334", "0.5121189", "0.5118708", "0.5117829", "0.51127195", "0.51111376", "0.510735", "0.51057005", "0.51007056", "0.5096366", "0.50962615", "0.50957793", "0.5093442", "0.5091358", "0.509099", "0.50879824", "0.508359", "0.5077962", "0.5076615" ]
0.6510338
1
messageText.setText("Got Exception : see logcat ");
public void run() { Toast.makeText(Pratisthan.this, "Got Exception : see logcat ",Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onError(Throwable e) {\n Log.e(TAG, e.getMessage());\n _view.showMessage(R.string.msg_erro);\n }", "public void errorMessage(String text) {\n \t\tErrorMessage msg = new ErrorMessage(this, text);\n \t\tmsg.setAlwaysOnTop(true);\n \t\tmsg.setVisible(true);\n \t\tsetEnabled(false);\n \t}", "private void displayError(@NonNull final Exception exception) {\n logTextView.setText(exception.toString());\n }", "private void errorMessage(String message) {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tAlertDialog dialog = builder.setMessage(message).setTitle(\"Error\").create();\n \tdialog.show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "public void unsuccessful()\n {\n inputFundsField.setText(\"An Error Has Occurred\");\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tToast.makeText(mInflatedView.getContext(),\n\t\t\t\t\t\t\t\t\t\"Error Mal\" + e.getMessage(),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}", "public void setMsgText(String msg){\n msgLabel.setText(msg);\n }", "@Override\n public void onCancelled(DatabaseError error) {\n setContentView(R.layout.activity_needs);\n TextView textView = (TextView) findViewById(R.id.textView1);\n textView.setText(\"Failed to read value\");\n\n }", "@Override\n public void onFailed(String text) {\n view.onFailed(\"Greska u dohvacanju favorita!\");\n }", "public void toastError(String mensagem){\n\n Context context = getApplicationContext();\n CharSequence text = mensagem;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n\n View view = toast.getView();\n\n //Obtém o plano de fundo oval real do Toast e, em seguida, define o filtro de cores\n view.getBackground().setColorFilter(getResources().getColor(R.color.colorError), PorterDuff.Mode.SRC_IN);\n\n //Obtém o TextView do Toast para que ele possa ser editado\n TextView newText = view.findViewById(android.R.id.message);\n newText.setShadowLayer(0, 0, 0, Color.TRANSPARENT);\n newText.setTextColor(getResources().getColor(R.color.colorWhite));\n\n toast.show();\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"TAG\", \"smsRetrieverCall FAIL\");\n result.setText(\"Retriever start Fail\");\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void setErrorMessage(String msg) {\r\n\t\terrorMessage.setText(msg);\r\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "public void setException(Exception e){\r\n //build message\r\n String dialog = e+\"\\n\\n\";\r\n StackTraceElement[] trace = e.getStackTrace();\r\n for(int i=0;i<trace.length;i++)\r\n dialog += \" \" + trace[i] + \"\\n\";\r\n //dialog\r\n setMessage(\"Internal error caught.\", dialog);\r\n }", "@Override\n public void onFailure(Call call, final IOException e) {\n activity.runOnUiThread(() -> {\n textView.setText(e.getMessage());\n Toast.makeText(activity, \"fail\", Toast.LENGTH_SHORT).show();\n });\n }", "private void setMessageText(String pMessage) {\n\n TextView tempText = (TextView) findViewById(R.id.tallyDeviceConnectionStatusMessageTextView);\n\n tempText.setText(pMessage);\n\n }", "private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }", "private void displayError(String errorText) {\n\t\tMessageBox messageBox = new MessageBox(shell, SWT.OK);\n\t\tmessageBox.setMessage(errorText);\n\t\tmessageBox.setText(\"Alert\");\n\t\tmessageBox.open();\n\t}", "public void setWarningMessage(String msg) {\n if (this.control != null) {\n TextView tvWarning = (TextView) this.control.findViewById(R.id.tvWarningMessage);\n if (tvWarning != null) {\n tvWarning.setText(msg);\n } else {\n Log.e(getClass().toString(), \"Can not set warning message because warning TextView not found. Maybe this is not the correct tip type?\");\n }\n }\n\n }", "public void exception(String message) {\n JOptionPane.showMessageDialog(frame, message, \"exception\", JOptionPane.ERROR_MESSAGE);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void setFailed(String msg) {\n Platform.runLater(() -> {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Errore di input\");\n alert.setHeaderText(msg);\n alert.showAndWait();\n });\n if (firstAction) {\n inTurno = false;\n }\n\n }", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "void setText(CharSequence s) {\n if (mNextView == null) {\n throw new RuntimeException(\"This Toast was not created with Toast.makeText()\");\n }\n\n final TextView textView = mNextView.findViewById(R.id.message);\n\n if (textView == null) {\n throw new RuntimeException(\"This Toast was not created with Toast.makeText()\");\n }\n\n textView.setText(s);\n }", "public ErrorAlert(String message) {\r\n\r\n JOptionPane.showMessageDialog(MainWindow.getInstance(), message);\r\n\r\n }", "public void setErrorMsg(String text) {\n this.errorMsg = text;\n }", "void drawError(String message);", "private void updateUI(String msg){\n if(msg != null) {\n textViewStatus.setText(msg);\n }\n }", "public void setText(String message) {\n textField.setString(message);\n }", "private void onErrorChanged(String message) {\r\n if (message == null) {\r\n return;\r\n }\r\n\r\n //Display error message\r\n FragmentActivity activity = getActivity();\r\n if (activity == null) {\r\n return;\r\n }\r\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\r\n builder.setTitle(getString(R.string.dialog_title_error))\r\n .setMessage(message)\r\n .setPositiveButton(getString(R.string.dialog_button_ok), null)\r\n .show();\r\n }", "void showError(String message);", "void showError(String message);", "public void mensagemErro(String m) {\r\n Alert alerta = new Alert(Alert.AlertType.ERROR);\r\n alerta.setTitle(\"ERRO!\");\r\n alerta.setHeaderText(null);\r\n alerta.setContentText(m);\r\n alerta.showAndWait();\r\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "private void errorAlert(String msg) {\n Alert dialog = new Alert(Alert.AlertType.ERROR);\n dialog.setTitle(\"Error\");\n dialog.setHeaderText(\"!!\");\n dialog.setContentText(msg);\n dialog.show();\n }", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "public void errorMessage(String CustomErrorMessage){\n Toast toast = Toast.makeText(this, CustomErrorMessage, Toast.LENGTH_SHORT);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n\n return;\n }", "public void setText(CharSequence text) {\n/* 1477 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void ErrorToast(IllegalArgumentException exception) {\n Toast.makeText(this, exception.getMessage(), Toast.LENGTH_SHORT).show();\n }", "void errorMsg(String msg) {\n Alert errorAlert = new Alert(\"error\", msg, null, AlertType.ERROR);\n errorAlert.setCommandListener(this);\n errorAlert.setTimeout(Alert.FOREVER);\n Display.getDisplay(this).setCurrent(errorAlert);\n }", "@Override\n\tpublic void error(CharSequence message) {\n\n\t}", "@Override\n public void onFailure(Call call, IOException e) {\n call.cancel();\n\n // In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n// responseText.setText(\"Failed to Connect to Server\");\n Log.d(\"Flask Server\",\"Failed to connect to server\");\n }\n });\n }", "public void setMsg(String msg){\n messageLabel.setText(msg);\n }", "public static void showMsgError(TextInputLayout textInputLayout, EditText editText, String errText){\n textInputLayout.setError(errText);\n errorStyle(editText, Color.RED);\n }", "private void displayEmailError(String errorMessage)\n {\n ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) etUsername.getLayoutParams();\n params.setMargins(32, 32, 32, 0);\n etUsername.setLayoutParams(params);\n etEmail.setBackgroundResource(R.drawable.edit_text_error);\n tvEmailError.setText(errorMessage);\n tvEmailError.setVisibility(View.VISIBLE);\n }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "private void showAlertResetFail(String msg) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Database error\");\n\n // Header Text: null\n alert.setHeaderText(\"Could not reset database\");\n alert.setContentText(msg);\n alert.showAndWait();\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "public void showInitializationErrorMessage(String message) {\r\n final String errorMessage = message;\r\n runOnUiThread(new Runnable() {\r\n public void run() {\r\n if (mErrorDialog != null)\r\n mErrorDialog.dismiss();\r\n\r\n // Generates an Alert Dialog to show the error message\r\n AlertDialog.Builder builder = new AlertDialog.Builder(ArActivity.this);\r\n builder.setMessage(errorMessage).setTitle(getString(R.string.INIT_ERROR)).setCancelable(false).setIcon(0).setPositiveButton(getString(R.string.button_OK), new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n finish();\r\n }\r\n });\r\n\r\n mErrorDialog = builder.create();\r\n mErrorDialog.show();\r\n }\r\n });\r\n }", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}", "public static void logException(String text, Throwable exc) {\n if (SwingUtilities.isEventDispatchThread()) {\n StringBuilder string = new StringBuilder(512);\n //\n // Display our error message\n //\n string.append(\"<html><b>\");\n string.append(text);\n string.append(\"</b><br><br>\");\n //\n // Display the exception object\n //\n string.append(exc.toString());\n string.append(\"<br>\");\n //\n // Display the stack trace\n //\n StackTraceElement[] trace = exc.getStackTrace();\n int count = 0;\n for (StackTraceElement elem : trace) {\n string.append(elem.toString());\n string.append(\"<br>\");\n if (++count == 25)\n break;\n }\n string.append(\"</html>\");\n JOptionPane.showMessageDialog(Main.mainWindow, string, \"Error\", JOptionPane.ERROR_MESSAGE);\n } else if (deferredException == null) {\n deferredText = text;\n deferredException = exc;\n try {\n javax.swing.SwingUtilities.invokeAndWait(new Runnable() {\n @Override\n public void run() {\n Main.logException(deferredText, deferredException);\n deferredException = null;\n deferredText = null;\n }\n });\n } catch (Exception logexc) {\n log.error(\"Unable to log exception during program initialization\");\n }\n }\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }", "@Override\n\tpublic void SuccessText(String text) {\n\t\tLog.i(TAG, \"==-->text:=\"+text);\n\t\tmain_one.setText(text);\n\t}", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "private void setText(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n text_ = value;\n }", "void setText(String string) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void catcher() {\n String text;\n\n if (getTextFromEditText(R.id.distanceEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_distance);\n } else if (getTextFromEditText(R.id.fuelEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_fuel);\n } else {\n text = getResourceString(R.string.err_wrong_vals);\n }\n\n makeToast(text);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "private void showErrorDialog(String message){\n new AlertDialog.Builder(this)\n .setTitle(\"Error\")\n .setMessage(message)\n .setPositiveButton(android.R.string.ok,null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\n }", "static void errorNotification(Context context,String exception) {\n AlertDialog.Builder errorDialogBox= new AlertDialog.Builder(context);\n errorDialogBox.setTitle(\"Exception\");\n errorDialogBox.setMessage(exception);\n errorDialogBox.setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener(){\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n //Activates the dialog box\n AlertDialog errorDialog = errorDialogBox.create();\n errorDialog.show();\n\n }", "@Override\n\tpublic void error(CharSequence message, Throwable t) {\n\n\t}", "@Override\n public void onAutofocusFailed() {\n displayText(R.string.AutofocusFail);\n }", "public void error(String message) {\n ui.say(\"ERROR: \" + message);\n }", "private void displayMessage(String message) {\n TextView priceTextView = (TextView) findViewById(R.id.price_tv);\n priceTextView.setText(message);\n }", "public void Text_Message(View view) {\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Message Input\");\r\n final EditText eT= new EditText(this);\r\n eT.setHint(\"Type Message Here\");\r\n adb.setView(eT);\r\n adb.setPositiveButton(\"Show\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n String str= eT.getText().toString();\r\n Toast.makeText(MainActivity.this,str,Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n adb.setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "private static void setTextInWidget(String message,Context context){\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(),\n R.layout.widget_layout);\n remoteViews.setTextViewText(R.id.sadness_button, message);\n AppWidgetManager.getInstance(context).updateAppWidget(\n new ComponentName(context, DarknessProvider.class),remoteViews);\n }", "void showError(@StringRes int errorMessage);", "@Override\r\n public void onError(DJIMcErrorType error) {\n StringBuffer sb = new StringBuffer(); \r\n sb.append(getString(R.string.main_controller_error)).append(\"\\n\");\r\n sb.append(getErrorDescriptionByErrorCode(error));\r\n\r\n McErrorString = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mMainControllerErrorBtn.setText(McErrorString);\r\n }\r\n });\r\n }", "void showErrorMsg(String string);", "private void onInvalidateQible(String message) {\n // TextView textView = (TextView)\n // findViewById(R.id.location_text_line1);\n TextView textView = (TextView) findViewById(R.id.location_text_line2);\n // TextView textView3 = (TextView)\n // findViewById(R.id.location_text_line3);\n\n textView.setText(\"\");\n textView.setVisibility(View.INVISIBLE);\n findViewById(R.id.arrowImage)\n .setVisibility(View.INVISIBLE);\n findViewById(R.id.compassImage)\n .setVisibility(View.INVISIBLE);\n findViewById(R.id.frameImage)\n .setVisibility(View.INVISIBLE);\n findViewById(R.id.qiblaLayout)\n .setVisibility(View.INVISIBLE);\n TextView textView3 = (TextView) findViewById(R.id.noLocationText);\n textView3.setText(message);\n findViewById(R.id.noLocationLayout)\n .setVisibility(View.VISIBLE);\n findViewById(R.id.textLayout)\n .setVisibility(View.INVISIBLE);\n\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "public AndroidAppException(String message){\n super(message);\n }", "private void displayErrorDialog(String message) {\n AlertDialog.Builder builder;\n\n builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.er_error))\n .setMessage(message)\n .setNegativeButton(getString(R.string.bt_close), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).setIcon(android.R.drawable.stat_notify_error).show();\n }", "@Override\n public void onError(UiError e) {\n Log.v(\"onError: \" + e.errorMessage, \"e\");\n }", "public abstract void setError(String message);", "public void setTextInTextField(String message) {\r\n\t\ttextField.setText(message);\r\n\t}", "public void message(String message){\n Toast.makeText(getContext(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\r\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\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\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\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}", "private void update () {\n // JST: this can be improved in future...\n String lm = current.getLocalizedMessage ();\n String nm = current.getMessage ();\n boolean isLocalized = lm != null && !lm.equals (nm);\n\n next.setVisible (exceptions.hasMoreElements ());\n details.setText (\n showDetails\n ?\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Hide_Details\")\n :\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Show_Details\")\n );\n\n\n if (current instanceof InvocationTargetException) {\n // go in\n current = ((InvocationTargetException)current).getTargetException ();\n }\n\n // setText (current.getLocalizedMessage ());\n String title = org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Title_Exception\");\n\n if (showDetails) {\n descriptor.setMessage (createDetails ());\n } else {\n if (isLocalized) {\n String msg = current.getLocalizedMessage ();\n if (msg == null || \"\".equals(msg)) { // NOI18N\n msg = org.openide.util.Utilities.wrapString (\n msg, MAXIMUM_TEXT_WIDTH, false, false\n );\n }\n descriptor.setMessage (msg);\n } else {\n // emphasize user-non-friendly exceptions\n // if (this.getMessage() == null || \"\".equals(this.getMessage())) { // NOI18N\n descriptor.setMessage (\n java.text.MessageFormat.format(\n NbBundle.getBundle (NotifyDescriptor.class).getString(\"NTF_ExceptionalException\"),\n new Object[] {\n current.getClass().getName()\n }\n )\n );\n\n title = NbBundle.getBundle (NotifyDescriptor.class).getString(\n \"NTF_ExceptionalExceptionTitle\" // NOI18N\n );\n }\n }\n\n descriptor.setTitle (title);\n }", "@Override\n public void connectionLost(Throwable arg0) {\n DurumLBL.setText(\"Bağlantı koptu\");\n }" ]
[ "0.67436737", "0.67381394", "0.67364806", "0.6664043", "0.665161", "0.66479826", "0.65887433", "0.6585749", "0.6547962", "0.65233153", "0.65208775", "0.65193295", "0.6511309", "0.6503192", "0.6470329", "0.6427029", "0.6423286", "0.64115405", "0.64011574", "0.64011574", "0.6375638", "0.6358804", "0.6356035", "0.63483596", "0.6326811", "0.63204676", "0.6319494", "0.6307503", "0.62999", "0.6298816", "0.62698317", "0.6245348", "0.62435144", "0.6242414", "0.6236103", "0.6234087", "0.6222213", "0.62148565", "0.62148565", "0.6208413", "0.62055933", "0.619248", "0.6187358", "0.61791605", "0.61735654", "0.6168745", "0.61663824", "0.61553496", "0.6152051", "0.6151062", "0.6146378", "0.6137106", "0.61199236", "0.61194646", "0.6117465", "0.61141515", "0.61056113", "0.61053264", "0.6104355", "0.6104355", "0.6104355", "0.6092077", "0.60883236", "0.60883236", "0.6086755", "0.60861564", "0.6080948", "0.6080948", "0.6080948", "0.6080948", "0.6080353", "0.6071625", "0.60677755", "0.6058282", "0.6057864", "0.6056691", "0.6052014", "0.60506177", "0.604742", "0.6046728", "0.6043561", "0.6041797", "0.6034692", "0.6034514", "0.6029387", "0.6027326", "0.6026117", "0.6014587", "0.60098386", "0.6006176", "0.60036653", "0.5996005", "0.5993602", "0.599236", "0.5990858", "0.5990853", "0.5990853", "0.59888285", "0.5986734", "0.5986213" ]
0.66159695
6
Created by Achmad Fauzi on 5/11/2015 : 8:38 PM.
public interface IBaseCustomCard { public void initActions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\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 anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo6081a() {\n }", "public void gored() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo55254a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "protected void mo6255a() {\n }", "@Override\n protected void getExras() {\n }", "public void mo12930a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private void m50366E() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\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\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Pitonyak_09_02() {\r\n }", "public void mo12628c() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "Petunia() {\r\n\t\t}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void m23075a() {\n }", "public void mo1531a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void mo3376r() {\n }", "private void init() {\n\n\t}", "public void mo21878t() {\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 mo21825b() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo97908d() {\n }", "private zza.zza()\n\t\t{\n\t\t}", "public final void mo91715d() {\n }", "static void feladat4() {\n\t}" ]
[ "0.61068916", "0.6086905", "0.6055935", "0.60299426", "0.59912044", "0.59912044", "0.59759617", "0.5973093", "0.5958929", "0.59524757", "0.5947687", "0.5921408", "0.59205717", "0.59118176", "0.5870166", "0.5862924", "0.5836954", "0.57831615", "0.57831615", "0.57831615", "0.57831615", "0.57831615", "0.57831615", "0.57831615", "0.57752436", "0.5749177", "0.5734894", "0.5734894", "0.57222235", "0.5722092", "0.57160705", "0.5700197", "0.56961316", "0.5694672", "0.56727713", "0.5663801", "0.5661387", "0.5658588", "0.5658382", "0.5623695", "0.56196916", "0.56087226", "0.5603555", "0.5595606", "0.55853873", "0.556034", "0.5558486", "0.55570906", "0.55472773", "0.5541365", "0.5540111", "0.5540111", "0.5540111", "0.5540111", "0.5540111", "0.5538801", "0.5527722", "0.551879", "0.5513129", "0.5512623", "0.55039287", "0.55039287", "0.55010885", "0.5496803", "0.54921097", "0.5490724", "0.5489959", "0.54824245", "0.5476428", "0.5472018", "0.546473", "0.54588795", "0.5449998", "0.5449011", "0.5446251", "0.5445192", "0.5442707", "0.5441352", "0.54337287", "0.54314345", "0.5414962", "0.5414962", "0.5414962", "0.5414933", "0.5414212", "0.5412829", "0.54122615", "0.54122615", "0.54122615", "0.5411271", "0.54110104", "0.54110104", "0.54110104", "0.540582", "0.5403141", "0.5401304", "0.5397279", "0.5394978", "0.53867817", "0.5385115", "0.5384311" ]
0.0
-1
TODO Autogenerated method stub
@Override public String toString() { return name+" "+age; }
{ "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 static void main(String[] args) { ImmutableClass ic=new ImmutableClass("Srini", 26); ImmutableClass ic1=new ImmutableClass("fda", 23); System.out.println(ic); System.out.println(ic1); }
{ "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
Define any variables associated with a Piece object here. These variables MUST be private or package private. Initializes a Piece
Piece(int side, Board b) { //YOUR CODE HERE teamSide = side; whichBoard = b; isKinged = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerPiece()\n {\n // initialise instance variables\n //Use the values listed in the comments\n //above that are next to each instance variable\n pieceName = \"no name\";\n pieceType = \"human\";\n currentHealth = 100;\n maxHealth = 100;\n locX = 7;\n locY = 8;\n attackPower = 25;\n defensePower = 20;\n currentSpecialPower = 50;\n maxSpecialPower = 50;\n \n }", "public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }", "public Piece(String name, int x, int y) {\n this.name = name;\n this.x = x;\n this.y = y;\n }", "public Board() {\n this.board = new Piece[16];\n }", "public Piece(String name) {\n this.name = name;\n }", "public Piece(int x, int y, String ID) {\n\t\tcurrentx = x; currenty = y; this.pieceID = ID;\n\t}", "public PiecePenguin(String symbol){\n this(symbol,\"\",0,0);\n }", "public PieceView(Piece piece){\n if (piece.pieceColor == Piece.PColor.red) {\n this.color = Color.RED;\n } else {\n this.color = Color.WHITE;\n }\n\n if (piece.pieceType == Piece.PType.king) {\n this.type = Type.KING;\n } else {\n this.type = Type.SINGLE;\n }\n }", "void init() {\r\n\r\n map = new HashMap<Square, Piece>();\r\n for (Square sq: INITIAL_ATTACKERS) {\r\n map.put(sq, BLACK);\r\n }\r\n for (Square sq: INITIAL_DEFENDERS) {\r\n map.put(sq, WHITE);\r\n }\r\n king = sq(4, 4);\r\n map.put(king, KING);\r\n for (int i = 0; i <= 8; i++) {\r\n for (int j = 0; j <= 8; j++) {\r\n if (!map.containsKey(sq(i, j))) {\r\n map.put(sq(i, j), EMPTY);\r\n }\r\n }\r\n }\r\n\r\n board = new Piece[9][9];\r\n\r\n for (Square keys : map.keySet()) {\r\n board[keys.col()][keys.row()] = map.get(keys);\r\n }\r\n }", "public Piece(boolean a_empty){\n this.empty = a_empty;\n }", "Piece(int a, int b, int player)\n {\n x = a;\n y = b;\n this.player = player;\n }", "public void setPiece(Piece piece){\n this.piece = piece;\n this.pieceName = piece.pieceName;\n this.pieceColor = piece.pieceColor;\n this.firstMove = piece.firstMove;\n this.Enpassant = piece.Enpassant;\n }", "public Piece( Location currentLocation, String side )\r\n\t{\r\n\t\tsuper(currentLocation);\r\n\t\tisJailed = false;\r\n\t\tlocInFlagZone = false;\r\n\t\tisInvincible = false;\r\n\t\tisReversed = false;\r\n\t\thasMoveBoost = false;\r\n\t\thasTagBoost = false;\r\n\t\thasInvisibility = false;\r\n\t\tcanThrowFlag = false;\r\n\t\thasHighJump = false;\r\n\t\thasHighWall = false;\r\n\t\tisParalysed = false;\r\n\t\tisClone = false;\t\r\n\t\thasPowerup = false;\r\n\t\tcurrentPowerup = null;\r\n\t\tthis.side = side;\r\n\t\thasFlag = false;\r\n\t\tflag = null;\r\n\t}", "public Piece(char P) {\r\n\t\tsuper(P);\r\n\t}", "public Piece(int xLoc, int yLoc)\n\t{\n\t\tl = new Location(xLoc, yLoc);\n\t}", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "public GameState() {\n positionToPieceMap = new HashMap<Position, Piece>();\n }", "public void setPiece(PieceIF p);", "protected piece(int x ,int y,Echiquier E) {\n\t\tthis.case_l = new Case(x,y,E);\n\t\t\n\t}", "protected void setupPiece() {\n double radius = (this.size * 2) / 5;\n double height = radius / 1.5;\n\n this.material = new PhongMaterial();\n this.material.setDiffuseMap(\n new Image(getClass().getResourceAsStream(\n team == Controller.Team.BLACK ? \"/assets/piece_black.jpg\" : \"/assets/piece_white.jpg\"\n ))\n );\n\n this.cylinder = new Cylinder(radius, height);\n this.cylinder.setMaterial(this.getMaterial());\n this.cylinder.setRotationAxis(Rotate.X_AXIS);\n this.cylinder.setRotate(90);\n this.cylinder.setTranslateZ(height / 2);\n\n this.cylinderContainer.getChildren().add(this.cylinder);\n }", "public Model() {\n\t\tboolean debug = Constants.getDebugFlag();\n\t\tgameMode = Constants.getGameMode();\n\t\twhitePieces = new PieceArray();\n\t\tblackPieces = new PieceArray();\n\t\tcapturedPieces = new ArrayList<Piece>();\n\t\tmoveList = new ArrayList<Move>();\n\t\tgameTree = new GameTree();\n\n\t\tboard = new Piece[8][8];\n\n\t\t\n\t\t// Easy way to set up nonstandard positions for testing.\n\t\tif(debug)\n\t\t\tinitializeDebugBoard();\n\t\telse\n\t\t\tinitializeBoard();\n\t\t\n\t\tpopulateLists();\n\t}", "@Before\r\n public void setup()\r\n {\r\n board = new Board();\r\n piece = new Pawn(WHITE);\r\n board.putPiece(piece, 0, 0);\r\n }", "public Chess() {\n\t\t// TODO Auto-generated constructor stub\n\t\tchessBoard = new int[BOARD_LENGTH][BOARD_LENGTH];\n\t\tpieces = new AbstractPiece[BOARD_NUM_PIECES];\n\t\toldPosition = new Point();\n\t\tokToMove = false;\n\t\tpieceCounter = 0;\n\t\tpieceChosen = 0;\n\t\tnumClicks = 0; \n\t}", "public GamePiece() //constructor\r\n {\r\n type=\"?\"; //initializes type to ?\r\n symbol='?'; //initializes symbol to ?\r\n }", "private ChessPieceGUIFactory() {\r\n\r\n\t}", "public void setPiece(Piece p) {\n\tpiece = p;\n }", "public PlayerPiece(String name, String type, int curH, int maxH, int x, int y, \n int atkP, int defP, int curSP, int maxSP) {\n pieceName = name;\n //fill in the rest of the values here\n pieceType = type;\n currentHealth = curH;\n maxHealth = maxH;\n locX = x;\n locY = y;\n attackPower = atkP;\n defensePower = defP;\n currentSpecialPower = curSP;\n maxSpecialPower = maxSP;\n }", "GamePiece(int x, int y) {\n this.row = x;\n this.col = y;\n this.left = false;\n this.right = false;\n this.down = false;\n this.up = false;\n this.neighbors = new HashMap<String, GamePiece>();\n this.powerStation = false;\n }", "public Board() {\n this.actionField = new ActionField();\n this.buyField = new BuyField();\n }", "public Piece(int x , int y, PlayerType color,Names type){\n this.x = x;\n this.y = y;\n \n this.color = color;\n this.type = type;\n }", "public Piece(boolean isFire, int x, int y, String type, boolean isKing) {\n side = isFire;\n this.isKing = isKing;\n this.x = x;\n this.y = y;\n this.type = type;\n hasCaptured = false;\n }", "public Pieces(int row, int column, PieceType piece, PieceColor color){\r\n\t\tthis.piece = piece;\r\n\t\tthis.row = row;\r\n\t\tthis.column = column;\r\n\t\tthis.color = color;\r\n\t\tthis.moved = false;\r\n\t}", "public Tile(int row, int column, Piece piece) {\n this.row = row;\n this.column = column;\n this.piece = piece;\n this.setBorder(javax.swing.BorderFactory.createEmptyBorder());\n }", "public void init(){ \n\t\tcreatePieces(); \n\t\taddMouseListener(ChessMousePressListener.getInstance(this));\n\t}", "public Piece(int a_row, int a_col)\n {\n this.tileLocation = Pair.create(a_row,a_col);\n }", "public Piece(Color color) {\r\n this.type = Type.SINGLE;\r\n this.color = color;\r\n }", "public Piece(boolean white) {\n\t\tthis.white = white;\n\t\tthis.moved = false;\n\t}", "@BeforeEach\n public void setup() {\n red_piece = new Piece(Piece.Color.RED);\n white_piece = new Piece(Piece.Color.WHITE);\n }", "public BoardGame()\n\t{\n\t\tplayerPieces = new LinkedHashMap<String, GamePiece>();\n\t\tplayerLocations = new LinkedHashMap<String, Location>();\n\t\t\n\t}", "@BeforeEach\n public void setupFakePiece() {\n fakePiece = new FakePiece(new PieceState(PieceType.PAWN, Colour.WHITE, Square.E1));\n fakePiece.moveableSquares = CollectionUtil.createSet(new Square[] {Square. B6, Square.A8});;\n }", "public TetrisPiece (int shape, int location) {\n\t\t\n\t}", "public GamePiece(Color color, int x, int y){\n king = false;\n this.x = x;\n this.y = y;\n this.color = color;\n // Aligns to correct position on centre of the correct tile\n setCenterX(30 + (x * 60));\n setCenterY(30 + (y * 60));\n setRadius(20);\n // Sets the colour of the piece to visually show who it belongs to\n setFill(color);\n }", "public Piece(int num, byte[] content){\n\t\tpieceNum=num;\n\t\tpieceContent=content;\n\t}", "public void setupPiece() {\n if(this.material == null) {\n this.setupMaterial();\n }\n\n if(this.cylinder == null) {\n this.setupCylinder(false);\n }\n\n if(this.isKing && this.kingCylinder == null) {\n this.setupCylinder(true);\n }\n\n this.cylinderContainer.getChildren().clear();\n\n if(this.isKing) {\n this.cylinderContainer.getChildren().addAll(this.cylinder, this.kingCylinder);\n return;\n }\n\n this.cylinderContainer.getChildren().add(this.cylinder);\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public Echiquier()\n\t{\n\t\ttableau = new Piece[8][8];\n\t}", "public BigLpiece()\r\n\t{\r\n\t\tsuper();\r\n\t\ttype=BIGL_PIECE; \r\n\t\tpositions = new Point[][]{{new Point (0,1), new Point (0,2), new Point (0,3), new Point (1,3)}, \r\n\t\t\t\t{new Point (1,0), new Point (2,0), new Point (3,0), new Point (3,-1)},\r\n\t\t\t\t{new Point (0,-1), new Point (0,-2), new Point (0,-3), new Point (-1,-3)},\r\n\t\t\t\t{new Point (-1,0), new Point (-2,0), new Point (-3,0), new Point (-3,1)},\r\n\t\t\t\t{new Point (0,-1), new Point (0,-2), new Point (0,-3), new Point (1,-3)},\r\n\t\t\t\t{new Point (1,0), new Point (2,0), new Point (3,0), new Point (3,1)},\r\n\t\t\t\t{new Point (0,1), new Point (0,2), new Point (0,3), new Point (-1,3)}, \r\n\t\t\t\t{new Point (-1,0), new Point (-2,0), new Point (-3,0), new Point (-3,-1)}};\r\n\t}", "public void initPieces() {\r\n\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\tif (i < 12) {\r\n\t\t\t\tblackPieces[i] = new ChessPiece(\"black\", \"\");\r\n\t\t\t\tblackPieces[i].setBackground(Color.BLACK);\r\n\t\t\t\tblackPieces[i].addMouseMotionListener(this);\r\n\t\t\t\tblackPieces[i].addMouseListener(this);\r\n\t\t\t\tblackPieces[i].setText(null);\r\n\t\t\t\twhitePieces[i] = new ChessPiece(\"white\", \"\");\r\n\t\t\t\twhitePieces[i].setBackground(Color.WHITE);\r\n\t\t\t\twhitePieces[i].addMouseMotionListener(this);\r\n\t\t\t\twhitePieces[i].addMouseListener(this);\r\n\t\t\t\twhitePieces[i].setText(null);\r\n\t\t\t}\r\n\t\t\tspacePieces[i] = new ChessPiece(\"empty\", \"\");\r\n\t\t\tspacePieces[i].setEnabled(false);\r\n\t\t\tspacePieces[i].setVisible(false);\r\n\t\t\tspacePieces[i].setText(null);\r\n\t\t}\r\n\t}", "public Pawn(String pieceName) {\n\t\t\n\t\tsuper(pieceName);\n\t}", "protected Board(){\n\t\tpool = 0;\n\t\tsquares = new Square[3][61];\n\t\tcommunityCards = new LinkedList<CommunityCard>();\n\t\tchanceCards = new LinkedList<ChanceCard>();\n\t\tmap = new HashMap<String, Integer>();\n\t\tcompanyArray = new Company[6];\n\t\tcreateBoard();\n\t\tfillHashMap();\t\t\t\n\t\tfillChanceCards();\n\t\tfillCommunityChestCards();\n\t\tfillCompanyArray();\n\t\tshuffleChanceCards();\n\t\tshuffleCommunityCards();\n\t}", "public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "public Game() {\n\t\tthis.board = new Board();\n\t\tthis.pieces = new HashMap<Chess.Color, List<Piece>>();\n\t\tthis.pieces.put(Chess.Color.WHITE, new ArrayList<Piece>());\n\t\tthis.pieces.put(Chess.Color.BLACK, new ArrayList<Piece>());\n\t\tthis.moveStack = new Stack<Move>();\n\t}", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }", "public ModifiablePiece(int x, int y)\n\t{\n\t\tthis(Position.fromCoordinates(x, y));\n\t}", "public PentagoGame() {\n // Default size = 3.\n board = new PentagoBoard();\n lastMove = null;\n hasPlacedPiece = false;\n hasRotatedBoard = true;\n }", "Piece(String symbol) {\n this.symbol = symbol;\n }", "public final void initialPosition() {\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.RED, Type.PAWN), new PositionImpl( 38 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.BLACK, Type.PAWN), new PositionImpl( 12 + i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.YELLOW, Type.PAWN), new PositionImpl( 1 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.GREEN, Type.PAWN), new PositionImpl( 48 + i));\n\t\t}\n\t\t\n\t\tsetPiece( new PieceImpl( Color.RED, Type.BOAT), new PositionImpl( 63 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KNIGHT), new PositionImpl( 55 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.ELEPHANT), new PositionImpl( 47 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KING), new PositionImpl( 39 ));\n\t\t\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.BOAT), new PositionImpl( 7 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KNIGHT), new PositionImpl( 6 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.ELEPHANT), new PositionImpl( 5 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KING), new PositionImpl( 4 ));\n\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.BOAT), new PositionImpl( 0 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KNIGHT), new PositionImpl( 8 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.ELEPHANT), new PositionImpl( 16 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KING), new PositionImpl( 24 ));\n\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.BOAT), new PositionImpl( 56 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KNIGHT), new PositionImpl( 57 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.ELEPHANT), new PositionImpl( 58 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KING), new PositionImpl( 59 ));\n\t\t\n }", "public Board() {\n initialize(3, null);\n }", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "public Board(List<List<GamePiece>> pieces, List<Neighborhood> neighborhoods, int emptyState){\n myGamePieces = pieces;\n myNeighborhoods = neighborhoods;\n myEmptyState = emptyState;\n }", "public final void setPiece(String piece){\r\n switch (piece) {\r\n case \"black King\":\r\n {\r\n this.piece = new King(\"black King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Rook\":\r\n {\r\n this.piece = new Rook(\"black Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Knight\":\r\n {\r\n this.piece = new Knight(\"black Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Bishop\":\r\n {\r\n this.piece = new Bishop(\"black Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Queen\":\r\n {\r\n this.piece = new Queen(\"black Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Pawn\":\r\n {\r\n this.piece = new Pawn(\"black Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white King\":\r\n {\r\n this.piece = new King(\"white King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Rook\":\r\n {\r\n this.piece = new Rook(\"white Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Knight\":\r\n {\r\n this.piece = new Knight(\"white Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Bishop\":\r\n {\r\n this.piece = new Bishop(\"white Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Queen\":\r\n {\r\n this.piece = new Queen(\"white Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Pawn\":\r\n {\r\n this.piece = new Pawn(\"white Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n default:\r\n {\r\n this.piece = new Empty(\" \");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n this.piece.color=\"empty\";\r\n this.piece.imageName=\"empty\";\r\n break;\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void init() \r\n\t{\r\n\t\tthis.board = new GameBoard();\r\n\t}", "public Piece(PieceColor color, int y, int x) {\n\t\tthis.color = color;\n\t\tthis.y = y;\n\t\tthis.x = x;\n\t\ttimesMoved = 0;\n\t}", "public Board(ArrayList<Piece> pieces)\n {\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n firstSelected = null;\n mainBoard=true;\n turn = 0;\n fiftyMove = 0;\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j] = new Square(i,j,this);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n add(squares[i][j]);\n }\n positions = new ArrayList<>();\n positions.add(toString());\n }", "protected ChessPiece(ChessPieceName name, ChessPieceColor color, ChessPieceSide side, PiecePosition position) {\n this.name = name;\n this.color = color;\n this.side = side;\n this.position = position;\n }", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public void addNewPiece() {\n\t\t// creates a range from 1-7 to choose from each of the pieces\n\t\tint pieceChoice = (int) (Math.random()*7) + 1; \n\t\tif(pieceChoice == 1) {\n\t\t\tcurrentPiece = new TetrisI();\n\t\t}\n\t\telse if(pieceChoice == 2) {\n\t\t\tcurrentPiece = new TetrisJ();\n\t\t}\n\t\telse if(pieceChoice == 3) {\n\t\t\tcurrentPiece = new TetrisL();\n\t\t}\n\t\telse if(pieceChoice == 4) {\n\t\t\tcurrentPiece = new TetrisO();\n\t\t}\n\t\telse if(pieceChoice == 5) {\n\t\t\tcurrentPiece = new TetrisS();\n\t\t}\n\t\telse if(pieceChoice == 6) {\n\t\t\tcurrentPiece = new TetrisT();\n\t\t}\n\t\telse {\n\t\t\tcurrentPiece = new TetrisZ();\n\t\t}\n\t\tcurrentPiece.pieceRotation = 0;\n\t\tinitCurrentGP();\n\t}", "public Board(GamePieceCreator gamePieces, List<List<Integer>> startingConfiguration,\n List<List<Integer>> objectConfiguration, List<Neighborhood> neighborhoods, int emptyState) {\n myGamePieces = new ArrayList<>();\n myEmptyState = emptyState;\n myStartingConfiguration = startingConfiguration;\n myGamePieceFactory = gamePieces;\n myNeighborhoods = neighborhoods;\n myObjectConfiguration = objectConfiguration;\n createBoardFromStartingConfig();\n }", "public Pawn(int xPosition, int yPosition, Color color, PieceType pieceType) {\n\t\tsuper(xPosition, yPosition, color, pieceType);\n\t}", "public Board(int xLen, int yLen)\r\n {\r\n if(xLen <= 0 || yLen <= 0)\r\n xLen = yLen = 8;\r\n board = new Piece[xLen][yLen];\r\n xLength = xLen;\r\n yLength = yLen;\r\n }", "public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }", "public void initialize_it(){\n\t\treadScoreFromFile();\n\t\twell = new Color[14][25];\n\t\tfor(int i = 0; i < well.length; i++){\n\t\t\tfor(int j = 0; j < well[0].length; j++){\n\t\t\t\tif(i == 0 || i == well.length-1 || j == well[0].length - 1)\n\t\t\t\t\twell[i][j] = Color.GRAY;\n\t\t\t\telse\n\t\t\t\t\twell[i][j] = Color.WHITE;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < next_pieces_array.length; i++){\n\t\t\tfor(int j = 0; j<next_pieces_array[0].length; j++){\n\t\t\t\t\tnext_pieces_array[i][j] = Color.WHITE;\n\t\t\t}\n\t\t}\n\t\tscore = 0;\n\t\tgetNewPiece();\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "private FallingPiece(Point punto, RotatableGrid innerPiece) {\r\n this.coord = punto;\r\n this.innerPiece = innerPiece;\r\n }", "public King(King king, Board board) throws InstantiationException, IllegalAccessException,\n IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {\n super(king, board);\n piece = PieceEnum.KING;\n neverMoved = king.neverMoved;\n }", "public Board(int[][] grid, Tetrimino piece) {\n //initComponents();\n this.grid = grid;\n this.piece = piece;\n setLayout(new GridLayout(grid.length-4, grid[0].length));\n init();\n }", "public Piece getPiece() {\n\treturn piece;\n }", "public Board(List<Piece> pieceList)\n\t{\n\t\tCoordinate aux = new Coordinate();\n\t\t\n\t\tfor (int x = 0; x < board_size; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < board_size; y++)\n\t\t\t{\n\t\t\t\taux.set(x, y);\n\t\t\t\tsetPiece(null, aux);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Piece piece : pieceList) {setPiece(piece, piece.getCoord());}\n\t}", "GameBoardVertex(Piece pieceAtVertex){this.pieceAtVertex = pieceAtVertex;}", "public ChessPiece getPiece(){return piece;}", "@Before\n public void setUp(){\n board = new ChessPiece[8][8];\n p = new Pawn(Player.BLACK);\n board[1][0] = p;\n move = new Move(1,0,2,0);\n }", "public void setPiece(Piece newPiece) {\n this.piece = newPiece;\n }", "public Bot12()\r\n {\r\n super();\r\n includeY = true;\r\n initPieces();\r\n }", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public Piece getPiece()\r\n\t{\r\n\t\treturn piece;\r\n\t}", "public Othello() {\n\t\tmyBoard = new Board(8);\n\t\tplayerBlack = spawnPlayer(Color.BLACK);\n\t\tplayerWhite = spawnPlayer(Color.WHITE);\n\t\tpropertySupport = new PropertyChangeSupport(this);\n\t\tinitialisationBoard();\n\t\tcurrentPlayer = playerBlack;\n\t\tfoeHasPlay = true;\n\t\taiPlay = false;\n\t}", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "public Player() {\r\n\t\tthis.gemPile = new int[4];\r\n\t\tthis.hand = new ArrayList<Card>();\r\n\t\tthis.bag = new ArrayList<Card>();\r\n\t\tthis.discard = new ArrayList<Card>();\r\n\t\tthis.lockedCards = new ArrayList<Card>();\r\n\t\tthis.toUse = new ArrayList<Integer>();\r\n\t\tnewTurn();\r\n\t}", "public ElephantPiece(Side side, int row, int column, String label,\n Color color, ChessBoard chessBoard) {\n super(side, row, column, label, color, chessBoard, 2, 1);\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Board(){\n for(int holeIndex = 0; holeIndex<holes.length; holeIndex++)\n holes[holeIndex] = new Hole(holeIndex);\n for(int kazanIndex = 0; kazanIndex<kazans.length; kazanIndex++)\n kazans[kazanIndex] = new Kazan(kazanIndex);\n nextToPlay = Side.WHITE;\n }", "public void setPiece(Tetrimino piece)\n {\n this.piece = piece;\n }", "public FallingPiece(RotatableGrid innerPiece){\r\n this(new Point(0,0), innerPiece);\r\n }", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public void setPiece(Piece piece, PieceValidator pv);" ]
[ "0.788977", "0.70865834", "0.7037962", "0.70010835", "0.6982032", "0.69796896", "0.690831", "0.6866439", "0.683262", "0.68324786", "0.6818362", "0.6804461", "0.67939204", "0.67906296", "0.6783571", "0.6763456", "0.67490876", "0.6691493", "0.668645", "0.66242963", "0.6618297", "0.65950775", "0.65841633", "0.6579426", "0.6571716", "0.6562579", "0.6554426", "0.65491575", "0.6541284", "0.6535712", "0.6531733", "0.6522436", "0.64979243", "0.64611405", "0.643156", "0.64064765", "0.64018005", "0.6397846", "0.6391205", "0.6389084", "0.637834", "0.63486034", "0.6338097", "0.633044", "0.63283175", "0.631062", "0.63026136", "0.62834775", "0.6278423", "0.62683815", "0.6258618", "0.62508744", "0.6247569", "0.6232027", "0.61954176", "0.61801827", "0.61800957", "0.6170059", "0.6167127", "0.6156971", "0.6155963", "0.61381817", "0.6136519", "0.611694", "0.610013", "0.6098659", "0.60879445", "0.6086509", "0.6083657", "0.60823804", "0.6080371", "0.6063582", "0.6054171", "0.6053368", "0.60460395", "0.60398746", "0.60330313", "0.6032077", "0.6032007", "0.60088354", "0.60086465", "0.60065347", "0.6004843", "0.599741", "0.5994675", "0.598027", "0.5979339", "0.59754145", "0.5970905", "0.5970502", "0.5968691", "0.59498847", "0.5947966", "0.5945584", "0.5944859", "0.59431446", "0.59413755", "0.5941335", "0.59406954", "0.59345144" ]
0.6022448
79
Returns the side that the piece is on
public int side() { //YOUR CODE HERE return teamSide; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Side getSide();", "public String getSide() {\r\n return side;\r\n }", "public double getSide()\n\t{\n\t\treturn this.side;\n\t}", "public int getSide() {\n\t\treturn getLength() ;\n\t}", "public Side getSide() {\r\n\t\treturn side;\r\n\t}", "int side() {\n return s;\n }", "public String getSide() {\n\t\treturn side;\n\t}", "com.cantor.drop.aggregator.model.CFTrade.Side getSide();", "public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }", "public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }", "public int getSide(Line2D.Float segment) {\n if (this == segment) {\n return COLLINEAR;\n }\n int p1Side = getSideThick(segment.x1, segment.y1);\n int p2Side = getSideThick(segment.x2, segment.y2);\n if (p1Side == p2Side) {\n return p1Side;\n }\n else if (p1Side == COLLINEAR) {\n return p2Side;\n }\n else if (p2Side == COLLINEAR) {\n return p1Side;\n }\n else {\n return SPANNING;\n }\n }", "public FluidCuboid getSideEdge() {\n\t\t\treturn this.fluids.get(ChannelModelPart.SIDE_EDGE);\n\t\t}", "@Override\n public Side getSide() {\n return aircraftId.getSide();\n }", "public String getSide()//method to retrive the value of the SideUp String\r\n {//opening code for getSide method\r\n return sideUp;//getting the value for sideUp\r\n }", "public double getSide1() {return side1;}", "public Integer getSides();", "public String getSide2() { return side2; }", "public int getPiece()\n\t{\n\t\treturn this.piece;\n\t}", "public int getPiece() {\n return piece;\n }", "public String getSides()\n\t{\n\t\treturn sides.getText();\n\t}", "public int getSide(BSPPolygon poly) {\n boolean onFront = false;\n boolean onBack = false;\n\n // check every point\n for (int i=0; i<poly.getNumVertices(); i++) {\n Vector3D v = poly.getVertex(i);\n int side = getSideThick(v.x, v.z);\n if (side == BSPLine.FRONT) {\n onFront = true;\n }\n else if (side == BSPLine.BACK) {\n onBack = true;\n }\n }\n\n // classify the polygon\n if (onFront && onBack) {\n return BSPLine.SPANNING;\n }\n else if (onFront) {\n return BSPLine.FRONT;\n }\n else if (onBack) {\n return BSPLine.BACK;\n }\n else {\n return BSPLine.COLLINEAR;\n }\n }", "public int getSideId() {\r\n return sideId;\r\n }", "public FluidCuboid getSideStill() {\n\t\t\treturn this.fluids.get(ChannelModelPart.SIDE_STILL);\n\t\t}", "public int lancer() {\n int side;\n do {\n side = r.nextInt(this.getNbFaces() + 1);\n } while (side == last_value);\n last_value = side;\n\n return side;\n }", "public String getSide1() { return side1; }", "double getside2(){\n\t\treturn side2;\n\t}", "boolean hasSide();", "int getSides()\n\t\t{\n\t\t\treturn sides;\n\t\t}", "public int getSideThick(float x, float y) {\n int frontSide = getSideThin(x-nx/2, y-ny/2);\n if (frontSide == FRONT) {\n return FRONT;\n }\n else if (frontSide == BACK) {\n int backSide = getSideThin(x+nx/2, y+ny/2);\n if (backSide == BACK) {\n return BACK;\n }\n }\n return COLLINEAR;\n }", "double getside1(){\n\t\treturn side1;\n\t}", "public String getNorthSide() {\n return (String) getAttributeInternal(NORTHSIDE);\n }", "public double sideArea()\r\n {\r\n double sideArea = slantHeight() * radius * Math.PI;\r\n return sideArea;\r\n }", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "public double getSideLength() {\n\t\treturn this.sideLength;\n\t}", "public double getSide1() {\r\n\t\treturn side1;\r\n\t}", "@Override\n\tpublic double getPerimeter() {\n\t\treturn 8 * side;\n\t}", "public static short getAdversarySide(short side) {\r\n\treturn (short) Math.abs(side - 1);\r\n }", "private static double downLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && col != 0 && state.getGrid()[row+1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "DoorMat getHingeOnRightSide(boolean onRightSide) throws RuntimeException;", "public double getSide2() {\r\n\t\treturn side2;\r\n\t}", "public int getCover(int side)\r\n/* 184: */ {\r\n/* 185:145 */ if ((this.CoverSides & 1 << side) == 0) {\r\n/* 186:145 */ return -1;\r\n/* 187: */ }\r\n/* 188:146 */ return this.Covers[side];\r\n/* 189: */ }", "public Piece getPiece()\r\n\t{\r\n\t\treturn piece;\r\n\t}", "private static double downRightScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && col != state.getGrid()[row].length-1 && state.getGrid()[row+1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "FloppyDriveSide getCurrentTrackSide() {\n return currentTrackSide;\n }", "public Piece getPiece() {\n\t\treturn _piece;\n\t}", "public static double SideCalculator(float x1, float y1, float x2, float y2){\r\n double coord1 = Math.pow((x1 - x2), 2);\r\n double coord2 = Math.pow((y1 - y2), 2);\r\n double side = Math.pow((coord1 + coord2), 0.5);\r\n return side;\r\n }", "public Piece getPiece() {\n\treturn piece;\n }", "public Piece getPieceInTile() {\n \r\n return pieceInTile;\r\n }", "public Piece getPiece() {\n return this.piece;\n }", "public int getSideThin(float x, float y) {\n // dot product between vector to the point and the normal\n float side = (x - x1)*nx + (y - y1)*ny;\n return (side < 0)?BACK:(side > 0)?FRONT:COLLINEAR;\n }", "public Bearing getLeftNeighbour() {\n return this == N || this == S ? W : N;\n }", "public FluidCuboid getSideFlow(boolean out) {\n\t\t\treturn this.fluids.get(out ? ChannelModelPart.SIDE_OUT : ChannelModelPart.SIDE_IN);\n\t\t}", "public PieceIF getPiece();", "private float calculateSidePixel(double straightDist, double sideDist) {\n double angleToObject = Math.toDegrees(atan(sideDist/straightDist));\n double pixelsToObject = cameraType.hPPA * angleToObject;\n // calculate px\n return (float)((CameraType.imageWidth/2) - pixelsToObject);\n }", "public Squarelotron sideFlip(String side);", "public PieceType getPieceType() {\r\n\t\treturn piece;\r\n\t}", "public double getSideA()\r\n\t{\r\n\t\treturn this.sideA;\r\n\t}", "public String getPiece(){\n\t\tif(piece!=null){\n\t\t\treturn piece.getPiece();\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}", "private static int rightScore(char piece, State state, int row, int col) {\n\t\tif(col != state.getGrid().length-1 && state.getGrid()[row][col+1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "double getside3(){\n\t\treturn side3;\n\t}", "public String getSouthSide() {\n return (String) getAttributeInternal(SOUTHSIDE);\n }", "public String getSideUp()\n {\n return sideUp;\n }", "public int getNumOfSides(){return numOfSides;}", "Side turn() {\n return _turn;\n }", "public abstract boolean ComputeSide( Communicator comm);", "public Bearing getRightNeighbour() {\n return this == N || this == S ? E : S;\n }", "Piece getWinner();", "private Side secondSide(final Cell cell, final Side prev) {\n switch (cell.getCellNdx()) {\n case 8:\n case 12:\n case 14:\n return LEFT;\n case 1:\n case 9:\n case 13:\n return BOTTOM;\n case 2:\n case 3:\n case 11:\n return RIGHT;\n case 4:\n case 6:\n case 7:\n return TOP;\n case 5:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case LEFT:\n return cell.isFlipped() ? BOTTOM : TOP;\n case RIGHT:\n return cell.isFlipped() ? TOP : BOTTOM;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n case 10:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case BOTTOM:\n return cell.isFlipped() ? RIGHT : LEFT;\n case TOP:\n return cell.isFlipped() ? LEFT : RIGHT;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n default:\n final String m = \"Attempt to use a trivial Cell as a node: \" + cell;\n throw new IllegalStateException(m);\n }\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}", "private String parentside(WAVLNode d,WAVLNode y) {\n\t if(d.right==y) {\r\n\t\t return \"right\";\r\n\t }\r\n\t else {\r\n\t\t return \"left\";\r\n\t }\r\n }", "public int getOpponent(int MySide){\n\t\tint opponent = 0;\n\t\tif(MySide == 0) opponent = 1;\n\t\treturn opponent;\n\t}", "BookSide getSide();", "Piece getPieceAt(int col, int row);", "public String getWestSide() {\n return (String) getAttributeInternal(WESTSIDE);\n }", "@Override\n\tpublic String calculateLeftTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}", "public static float area(float side) {\n return side * side;\n }", "@Override\n\tprotected SideWiseType determineSideWiseType(final List<Double> sides) {\n\t\tSideWiseType shapeType = super.determineSideWiseType(sides);\t// first see what superclass found out\n\t\t\n\t\tif (SideWiseType.EQUILATERAL.equals(shapeType)) {\n\t\t\t// determined as equilateral by superclass: this is the most specific side-wise type for a triangle so use it\n\t\t\treturn shapeType;\n\t\t}\n\t\t\n\t\t// not equilateral, must be either isosceles or scalene\n\t\tSet<Double> sidesByLength = sides.stream().collect(Collectors.toSet());\n\t\tif (sidesByLength.size() == 2) {\n\t\t\t// two sides of the same length, one of another length -> isosceles\n\t\t\treturn SideWiseType.ISOSCELES;\n\t\t} \n\t\t\n\t\t// neither equilateral nor isosceles: it is scalene\n\t\treturn SideWiseType.SCALENE;\n\t}", "@Test\n public void testRookSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(north, chessBoard.getPiece(0, 0).getSide());\n assertEquals(north, chessBoard.getPiece(0, 7).getSide());\n assertEquals(south, chessBoard.getPiece(7, 0).getSide());\n assertEquals(south, chessBoard.getPiece(7, 7).getSide());\n }", "public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}", "public int getLength() {\n return this.sideLength;\n }", "public double getPerimeter() {\n\t\treturn sideLength * 8;\n\t}", "private static int leftScore(char piece, State state, int row, int col) {\n\t\tif(col != 0 && state.getGrid()[row][col-1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "final protected Piece getLocalPiece(){\n\t\treturn this.LOCAL_PIECE;\n\t}", "public double[] getSides();", "public int getPiece(int row, int col)\n\t{\n\t\treturn pieces[row][col];\n\t}", "Point3D getLeftUpperBackCorner();", "private double calcSide(int x1,int y1, int x2, int y2){\n \n double distance1 = Math.sqrt(Math.pow(x2 - x1,2) + Math.pow(y2-y1,2));\n \n return distance1;\n \n \n \n }", "public char parentSide() {\n\t\t\tif (this.getParent().getKey() == -1) {\n\t\t\t\treturn 'N';\n\t\t\t}\n\t\t\tif (this.key == this.parent.getRight().getKey()) {\n\t\t\t\treturn 'R';\n\t\t\t}\n\t\t\treturn 'L';\n\t\t}", "public float getSidePressure() {\n return pm.pen.getLevelValue(PLevel.Type.SIDE_PRESSURE);\n }", "HashSet<Square> pieceLocations(Piece side) {\r\n assert side != EMPTY;\r\n HashSet<Square> squareSides = new HashSet<Square>();\r\n for (Square mapSquare : map.keySet()) {\r\n if (get(mapSquare) == side) {\r\n squareSides.add(mapSquare);\r\n }\r\n }\r\n return squareSides;\r\n }", "public Piece[] getRightLine() {\n Piece[] rightLine = new Piece[3];\n for (int i = 0; i < this._board.length; i += 1) {\n rightLine[i] = _board[2][2-i];\n }\n return rightLine;\n }", "private static double upLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != 0 && state.getGrid()[row-1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "private static double upRightScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != state.getGrid()[row].length-1 && state.getGrid()[row-1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "public ChessPiece getPiece(){return piece;}", "public int getMyNumSides(){\r\n return myNumSides;\r\n }", "public int getRightEdge() {\n return rightEdge;\n }", "public String getPieceColor(){\n\t\t\n\t\tif(xPosition>=ColumnNumber.firstColumn.ordinal() && xPosition<=ColumnNumber.eightColumn.ordinal() && xPosition>=RowNumber.firstRow.ordinal() && xPosition<=RowNumber.eightRow.ordinal()){\n\t\t\t\n\t\t\tif(isIcon){\n\t\t\t\treturn piece.getColor();\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}", "public int getSideIndex(Tile adjacent){\r\n for(int i = 0; i < adjTiles.length; i++){\r\n if(adjTiles[i] == adjacent) return i;\r\n }\r\n return -1;\r\n }", "public void setSide(String side) {\n\t\tthis.side = side;\n\t}" ]
[ "0.73738563", "0.72190887", "0.7178469", "0.71540374", "0.70938015", "0.7070299", "0.7008975", "0.70078635", "0.7001238", "0.69972813", "0.6850449", "0.6788458", "0.6750187", "0.6638055", "0.66284895", "0.6575012", "0.65153223", "0.6509599", "0.64869833", "0.6484469", "0.64653426", "0.64547354", "0.64250755", "0.6422858", "0.6417872", "0.640946", "0.63931835", "0.6354153", "0.6334794", "0.63274044", "0.63220197", "0.6300642", "0.62588686", "0.62441164", "0.6227717", "0.6213583", "0.6211019", "0.6186123", "0.6156344", "0.6132423", "0.6124984", "0.6121452", "0.6085671", "0.60621685", "0.60362864", "0.6035616", "0.60320836", "0.60294074", "0.599263", "0.5983995", "0.59673417", "0.5954794", "0.59397054", "0.59318817", "0.5930728", "0.5922158", "0.5877631", "0.5876493", "0.58562225", "0.5847123", "0.58419925", "0.5824454", "0.5823594", "0.5814887", "0.58115387", "0.5796052", "0.579476", "0.5786011", "0.57827485", "0.57712495", "0.57630366", "0.57477814", "0.57395554", "0.57253695", "0.57096326", "0.57064545", "0.57053447", "0.56891984", "0.5684807", "0.5683625", "0.56774753", "0.56653124", "0.5661864", "0.5656793", "0.5656062", "0.5655976", "0.56492054", "0.5641758", "0.5640039", "0.56362605", "0.56362367", "0.56353587", "0.5619295", "0.5614043", "0.5603468", "0.5596556", "0.55883616", "0.55869", "0.5580035", "0.5578772" ]
0.6946913
10
Destroys the piece at x, y. ShieldPieces do not blow up
void getBlowUp(int x, int y) { //YOUR CODE HERE whichBoard.remove(x, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removePiece(int x, int y)\r\n {\r\n if(isValidSqr(x, y)) board[x][y] = null;\r\n }", "public void removeTakenPiece(int xPiece, int yPiece) {\n\t\tSystem.out.println(\"Removing Piece\");\n\t\tChecker checker = model.findChecker(xPiece, yPiece);\n\t\tif((checker.getType() == 1) || (checker.getType() == 3)) {\n\t\t\tmodel.blackPieces.remove(checker);\n\t\t\tblackPieces -= 1;\n\t\t} else {\n\t\t\tmodel.whitePieces.remove(checker);\n\t\t\twhitePieces -= 1;\n\t\t}\n\t\tboard.getBoard()[yPiece][xPiece] = 0;\n\t\t\n\t}", "public Piece remove(int x, int y) {\n\t\tif (x >= 8 || y >= 8 || x < 0 || y < 0) {\n\t\t\tSystem.out.println(\"(\" + x + \", \" + y + \") is out of bounds.\");\n\t\t\treturn null;\n\t\t} else if (pieceAt(x, y) == null) {\n\t\t\tSystem.out.println(\"There is no piece at (\" + x + \", \" + y + \").\");\n\t\t\treturn null;\n\t\t} else {\n\t\t\tprevSelected = pieceAt(x, y);\n\t\t\tb[x][y] = null;\n\t\t\tif (prevSelected.isFire()) {\n\t\t\t\tnumFire -= 1;\n\t\t\t} else {\n\t\t\t\tnumWater -= 1;\n\t\t\t}\n\t\t\treturn prevSelected;\n\t\t}\n\t}", "private void eliminatePiece(BoardPiece boardPiece) {\n\t\tPlayer playerOwner = PlayerObserver.getInstance().getPlayerOwner(boardPiece);\n\t\tplayerOwner.killPiece(boardPiece);\n\t\tboardPiece.destroy();\n\t}", "void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}", "public Piece remove (int x, int y){\n\t\tif (x < 0 || x > N || y < 0 || y > N){\n\t\t\tSystem.out.println(\"Off the board! (Out of Bounds)\");\n\t\t\treturn null;\n\t\t}\n\t\telse if (pieceAt(x,y) == null) {\n\t\t\tSystem.out.println(\"There isn't a piece here! (Null)\");\n\t\t\treturn null;\n\t\t}\t\n\t\telse{\n\t\t\tPiece temp = pieceArray[x][y];\n\t\t\tpieceArray[x][y] = null;\n\t\t\t\n\t\t\treturn temp;\n\t\t}\n\t}", "private void killPiece(Piece piece) {\r\n\t\tif (piece.getPlayer().color == Color.BLACK) {\r\n\t\t\tblack.removeElement(piece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhite.removeElement(piece);\r\n\t\t}\r\n\t\t\r\n\t}", "public void destroyed() {\n\t\twidth = SIZE_INC * width;\n\t\t// make the end points at the new location\n\t\tthis.makeEndPoints(width, (0 - (xSpeed * width)),\n\t\t\t\t(0 - (ySpeed * width)));\n\n\t}", "private void releaseShape(int x, int y) {\n if (holding == null) return;\n\n double newX = holding.getMinX();\n double newY = holding.getMinY();\n\n holding.moveTo(oldX, oldY);\n model.execute(new MoveShape(model.getWhiteBoard(), holding, x - diffX, y - diffY));\n\n holding = null;\n }", "void clean(Player p);", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "@Override\r\n\tpublic void destroy(Sprite collider) {\n\t}", "private void removePiece(Piece piece) {\n addPiece(piece, piece.rowPosition, piece.columnPosition);\n }", "public void destroy()\n {\n GeneticRobots.rmCollider(this.collider);\n GeneticRobots.rmObject(this);\n }", "@Override\n\tpublic void destroy()\n\t{\n\t\tprojectileCount--;\n\t\trbCount--;\n\t}", "public void destroy() {\r\n\t\ttexture.destroy();\r\n\t}", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }", "public void shipDestroyed() {\r\n\t\tplaceDebris(ship.getX(), ship.getY());\r\n\r\n\t\t// Null out the ship\r\n\t\tship = null;\r\n\r\n\t\topenShipSound();\r\n\r\n\t\t// Decrement lives\r\n\t\tlives--;\r\n\t\tdisplay.setLives(lives);\r\n\r\n\t\t// Since the ship was destroyed, schedule a transition\r\n\t\tscheduleTransition(END_DELAY);\r\n\t}", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }", "public void removePawn() {\n lives = 0;\n }", "public void destory(){\n \n }", "public void destroy() {\n this.game.deleteObject(this);\n }", "void positionCleared();", "public Piece removePiece(Position position) {\n return positionToPieceMap.remove(position);\n }", "public static void despawnEntity(Player p, Entity entity){\n despawnEntity(p, entity.getId());\n }", "public void removeNumber(int x, int y) {\r\n\t\tupdateMoves();\r\n\t\tsetOpenTiles(getOpenTiles() + 1);\r\n\t\tint[][] temp = getGameBoard();\r\n\t\tboolean[][] tempX = getXValues();\r\n\t\tboolean[][] tempY = getYValues();\r\n\t\ttempX[x][temp[y][x]] = tempY[y][temp[y][x]] = false;\r\n\t\ttemp[y][x] = 0;\r\n\t\tsetXValues(tempX);\r\n\t\tsetYValues(tempY);\r\n\t\tsetGameBoard(temp);\r\n\t}", "private void removeEquippedItemByCoordinates(int nodeX, int nodeY) {\n world.removeEquippedInventoryItemByCoordinates(nodeX, nodeY);\n }", "public void desenha(int x, int y) {\n id++;\n circulos.add(new Circulo(id,x, y));\n posX = x;\n posY = y;\n desenha = true;\n repaint();\n System.out.println(\"passou\");\n }", "public void removePieceFromPlay(Piece piece) {\n\t\tpiece.removeFromPlay();\n\t\tpieces.get(piece.getColor()).remove(piece);\n\t}", "public void removePawn(Position position) {\n\t\tboardGrid[position.getRow()][position.getColumn()] = new Empty();\n\t}", "public void act() \n {\n move(-2);\n\n if(getX() <= 0)\n {\n getWorld().removeObject(this);\n } \n\n }", "@Override\n \tpublic void collided(Entity x) {\n \t\t\n \t\tx.destroy();\n \t\t\n \t}", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}", "public void erase()\n {\n canvas.eraseCircle(xPosition, yPosition, diameter);\n }", "public void decrement() {\r\n\t\tcurrentSheeps--;\r\n\t}", "public void makesNotHere(){this.piece.unAffect();}", "public void dropPiece(Piece piece, Square square) {\n square.placePiece(piece);\n this.piecesInHand.remove(piece);\n }", "public void removeSpriteOnGrid(Sprite s, int x, int y) {\n\t\tint i;\n\t\tint id=-1;\n\t\tif(s.getDirection()==Sprite.Direction.HORIZONTAL) {\n\t\t\t\n\t\t\tfor(i=0; i<s.getSize(); i++) {\n\t\t\t\t//set squares occupied by the length of the sprite, starting at grid[x][y] to sprite id -1 to\n\t\t\t\t//signal they are now free\n\t\t\t\tgrid[x+i][y].setSpriteID(id);\n\t\t\t}\n\t\t\t\n\t\t}else { \n\t\t\tfor(i=0; i<s.getSize(); i++) {\n\n\t\t\t\tgrid[x][y+i].setSpriteID(id);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void despawn() {\n\t\t\n\t}", "public void erase(double x, double y) {\n Shape test = new Circle(x, y, 10);\n for (int i = collisionBodies.size() - 1; i >= 0; i--) {\n CollisionBody line = collisionBodies.get(i);\n Shape intersect = Shape.intersect(line.getShape(), test);\n if (intersect.getBoundsInLocal().getWidth() != -1 || intersect.getBoundsInLocal().getHeight() != -1) {\n root.getChildren().remove(line.getLine());\n collisionBodies.remove(line);\n }\n }\n }", "public void unassignEnergyToShip(AbstractObject source) {\n\t\tenergyToShip.remove(source.getId());\n\t}", "public void remove(double x, double y) {\n\t\tremove(new GPoint(x, y));\n\t}", "void despawnHitbox() {\n\t\tif (hitbox == null) return;\n\t\thitbox.remove();\n\t\thitbox = null;\n\t}", "public void destroy() {\n\t\tdestroyRadius();\r\n\t\tisDestroyed = true;\r\n\t\ttimer.stop();\r\n\t\tthis.x -= 50;\r\n\t\tthis.y -= 50;\r\n\t\ttimer.setDelay(100);\r\n\t\ttimer.start();\r\n\t}", "private void removeShip(){\n mainPanel.remove(this);\n gbc.gridheight=1;\n gbc.gridwidth=1;\n int placeX = getMy_x();\n int placeY = getMy_y();\n for(int i=0;i<getMy_length();i++){ //put free spaces by the length of the ship.\n if(getMy_dir().equals(\"Horizontal\")){\n placeX = getMy_x()+i;\n }\n if(getMy_dir().equals(\"Vertical\")){\n placeY = getMy_y()+i;\n }\n gbc.gridx = placeX;\n gbc.gridy = placeY;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(placeX,placeY));\n freeSpace.setPreferredSize(new Dimension(58,58));\n mainPanel.add(freeSpace,gbc); //add free space to the board.\n }\n mainPanel.revalidate();\n mainPanel.repaint();\n }", "public void clearItem(final int x, final int y) {\r\n\t\tfor (int i = 2; i < LAYERS; i ++) {\r\n\t\t\tsetTile(x, y, i, Tile.getEmptyTile());\r\n\t\t}\r\n\t}", "public abstract void destroyPlayer();", "public void kill() {\n this.hp = 0;\n }", "public void erasePlayer(Player player) {\n if(player.equals(occupant)) {\n // System.out.println(\"killedToo\");\n revertBlock(player);\n getAdjacent(GameEngine.UP).erasePlayer(player);\n getAdjacent(GameEngine.DOWN).erasePlayer(player);\n getAdjacent(GameEngine.LEFT).erasePlayer(player);\n getAdjacent(GameEngine.RIGHT).erasePlayer(player);\n }\n }", "public void trap(int x, int y) {\n\t\tPiece piece = getPiece(x, y);\n\t\tif (piece != null) {\n\t\t\tint color = piece.getColor();\n\t\t\tfriend = false;\n\t\t\tcheck_enemy_and_friend(x - 1, y, 0, color);\n\t\t\tcheck_enemy_and_friend(x + 1, y, 0, color);\n\t\t\tcheck_enemy_and_friend(x, y - 1, 0, color);\n\t\t\tcheck_enemy_and_friend(x, y + 1, 0, color);\n\t\t\tif (!friend) {\n\t\t\t\tpieces.remove(piece);\n\t\t\t\tif (piece.isRabbit()) {//if rabbit decrease rabbitcount\n\t\t\t\t\trabbitcount[piece.getColor()]--;\n\t\t\t\t}\n\t\t\t\tmessage=\"The piece is caught by the trap.\";\n\t\t\t}\n\n\t\t}\n\t}", "public void die()\n {\n World world;\n world=getWorld();\n world.removeObject(this);\n }", "public void destroy()\r\n\t{\n\t\t\r\n\t}", "synchronized public void destroy() {\n \t\tsuper.destroy();\n \t\tp = null;\n \t\tp_layer = null;\n \t}", "public void destroy() {\r\n }", "public void move(int x, int y){\n universe.erase(this);\n this.yPosition = y;\n this.xPosition = x;\n universe.draw(this);\n }", "public void destroy()\r\n {\r\n }", "public void turnOff(int x, int y);", "@Override\r\n\tpublic void destory() {\n\t\t\r\n\t}", "public static void despawnEntity(Player p, int entityID){\n PacketPlayOutEntityDestroy deadEntity = new PacketPlayOutEntityDestroy(entityID);\n ((CraftPlayer) p.getPlayer()).getHandle().playerConnection.sendPacket(deadEntity);\n\n }", "private void removeItemByCoordinates(int nodeX, int nodeY) {\n world.removeUnequippedInventoryItemByCoordinates(nodeX, nodeY);\n }", "public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }", "public void destruction()\n\t{\n\t\tremove();\n\t}", "public void destroy() {\n destroyIn(0);\n }", "public void destroy() {}", "public void destroy() {}", "public void deplaceSur(int x, int y, Robot r) {\r\n\t\tif(y >= 0 && y < hauteur && x >= 0 && x < largeur)\r\n\t\t\tthis.plateau[y][x].deplaceSur(r);\r\n\t}", "public void destroy()\r\n {\n }", "public void destroyArea(Entity[][] map, int x, int y){\r\n map[y][x] = null;\r\n //check if the area to destroy is within the map\r\n if ((x > 0) && (y > 0)){\r\n checkIfOtherType(map, y-1, x-1);\r\n map[y-1][x-1] = null;\r\n map[y-1][x-1] = new ExplodedArea(3, x-1, y-1);\r\n }\r\n if ((x + 1 < map.length) && (y + 1< map.length)){\r\n checkIfOtherType(map, y+1, x+1);\r\n map[y+1][x+1] = null;\r\n map[y+1][x+1] = new ExplodedArea(3, x+1, y+1);\r\n }\r\n if ((y > 0)){\r\n checkIfOtherType(map, y-1, x);\r\n map[y-1][x] = null;\r\n map[y-1][x] = new ExplodedArea(3, x, y-1);\r\n }\r\n if ((x +1 < map.length) && (y > 0)){\r\n checkIfOtherType(map, y-1, x+1);\r\n map[y-1][x+1] = null;\r\n map[y-1][x+1] = new ExplodedArea(3, x+1, y-1);\r\n }\r\n if ( x < map.length -1){\r\n checkIfOtherType(map, y, x+1);\r\n map[y][x+1] = null;\r\n map[y][x+1] = new ExplodedArea(3, x+1, y);\r\n }\r\n if(x > 0){\r\n checkIfOtherType(map, y, x-1);\r\n map[y][x-1] = null;\r\n map[y][x-1] = new ExplodedArea(3, x-1, y);\r\n }\r\n if (y < map.length-1){\r\n checkIfOtherType(map, y+1, x);\r\n map[y+1][x] = null;\r\n map[y+1][x] = new ExplodedArea(3, x, y+1);\r\n }\r\n if((x > 0) && (y < map.length -1)){\r\n checkIfOtherType(map, y+1, x-1);\r\n map[y+1][x-1] = null;\r\n map[y+1][x-1] = new ExplodedArea(3, x-1, y+1);\r\n }\r\n }", "public void kill () throws GameExceptions.GameException {\n if (!this.hasCounter) {\n this.play ();\n this.power++;\n this.toughness++;\n this.hasCounter = true;\n } else {\n this.power--;\n this.toughness--;\n this.hasCounter = false;\n this.place(GameEnums.Zone.GRAVEYARD);\n }\n }", "public void unassignAsteroidToShip(Asteroid asteroid) {\n\t\tasteroidToShip.remove(asteroid.getId());\n\t}", "public void destroy()\r\n\t{\r\n\t}", "public void unsetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PART$2, 0);\n }\n }", "private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }", "public void attack(int x, int y, int xx, int yy) {\n int result = ((MovablePiece)(controller.getBoard().getPiece(x, y))).attack(controller.getBoard().getPiece(xx,yy));\n int player;\n \n if(result < 4) {\n mc.playMusic(\"sounds\\\\Bomb.wav\");\n }\n \n if(result == 1) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getBoard().setPiece(controller.getBoard().getPiece(x, y), xx, yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(new ImageIcon(\"pieces\\\\\" + this.getName()));\n } else if(result == 2) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(xx,yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(null);\n Cell[xx][yy].setBackground(Color.white);\n } else if(result == 3){\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(x, y);\n } else if(result == 5) {\n mc.playMusic(\"sounds\\\\Sorceress.wav\");\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(Graphics.class.getName()).log(Level.SEVERE, null, ex);\n }\n piece = controller.getBoard().getTable()[xx][yy];\n if(piece.getLevel()< controller.getBoard().getPiece(x, y).getLevel() && piece.getLevel() != 0 ) {\n if(piece.getColour() == 'R') {\n piece.setColour('B');\n piece.setName(piece.getName().replace(\"R\", \"B\"));\n } else {\n piece.setColour('R');\n piece.setName(piece.getName().replace(\"B\", \"R\"));\n }\n piece.setIcon(piece.getName());\n }\n } else {\n /* NOTHING IS CHARGED */\n }\n Cell[x][y].setIcon(null);\n Cell[x][y].setBackground(Color.white);\n for(int i = 0; i < 12; i++) {\n RGrave[i].setToolTipText(controller.getPlayer(2).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('R')).getQuantity(i));\n BGrave[i].setToolTipText(controller.getPlayer(1).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('B')).getQuantity(i));\n }\n }", "public void clear() {\n int var1 = 0;\n if(field_759 || var1 < this.spritePixels.length) {\n do {\n this.spritePixels[var1] = null;\n this.field_736[var1] = 0;\n this.field_737[var1] = 0;\n this.spriteColoursUsed[var1] = null;\n this.spriteColourList[var1] = null;\n ++var1;\n } while(var1 < this.spritePixels.length);\n\n }\n }", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "public void drop(RotatableGrid piece) {\r\n \tif (!hasFalling()) {\r\n\t Point centro = new Point(width / 2, height-1);\r\n\t falling = new FallingPiece(piece).moveTo(centro);\r\n\t if(conflictsWithBoard(falling)){\r\n\t \tgameOver = true;\r\n\t \tfalling = null;\r\n\t } else{\r\n\t\t if(isGhostActivated())\r\n\t\t \tgenerateGhost();\r\n\t }\r\n\t triggerBlockListeners();\r\n \t}\r\n \r\n }", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy()\n\t{\n\t}", "public void wipe(){\n\t \tg2d.setColor(Color.yellow);\n g2d.fillRect(0,0, width, height);\n\t\t\n\n\t }", "public void destroy() {\n }", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}", "public void destroy() {\n\n\t}" ]
[ "0.6906196", "0.6675417", "0.6580117", "0.6405999", "0.6402028", "0.6345896", "0.62826127", "0.6266997", "0.6213591", "0.61146593", "0.6089339", "0.6052058", "0.59956443", "0.5992383", "0.59807086", "0.5960242", "0.5932983", "0.5890725", "0.5842881", "0.58413076", "0.58370924", "0.58239126", "0.5809376", "0.58010453", "0.57862705", "0.57608044", "0.5758802", "0.5754458", "0.5748018", "0.5740293", "0.57391053", "0.57291347", "0.5705171", "0.5690195", "0.5684304", "0.56752384", "0.5668951", "0.566058", "0.5637485", "0.5632909", "0.5628122", "0.56118846", "0.5608747", "0.5608156", "0.5598119", "0.5585983", "0.5582267", "0.5580814", "0.55548584", "0.55452055", "0.5510832", "0.5506192", "0.5506141", "0.54990983", "0.54973644", "0.5493015", "0.54855365", "0.5483646", "0.5476167", "0.54674137", "0.5465248", "0.54640394", "0.5461818", "0.54601073", "0.5456231", "0.5447613", "0.5444516", "0.5442317", "0.5442317", "0.54387456", "0.543466", "0.54340106", "0.5427837", "0.54265183", "0.5419442", "0.5415768", "0.54144675", "0.54087216", "0.5398953", "0.53981924", "0.53969157", "0.5396431", "0.5396431", "0.5396431", "0.5396431", "0.5396431", "0.5396431", "0.5396431", "0.5396431", "0.5393286", "0.5393286", "0.5393286", "0.5393286", "0.53887683", "0.53835654", "0.5377802", "0.53777015", "0.53777015", "0.53777015", "0.53777015", "0.53777015" ]
0.0
-1
Does nothing. For bombs, destroys pieces adjacent to it
void explode(int x, int y) { //Implemented }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "void removeBomb();", "void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}", "public void makesNotHere(){this.piece.unAffect();}", "public void cleanBoard(){\n\n for(PositionInBoard position : positionsThatArePainted){\n int i = position.row();\n int j = position.column();\n if ((i+j)%2==0) {\n board[i][j].setBackground(Color.BLACK);\n }\n else {\n board[i][j].setBackground(Color.WHITE);\n }\n\n board[i][j].setText(null);\n board[i][j].setIcon(null);\n }\n positionsThatArePainted.clear();\n }", "public void cleanPile() {\n while (!emptyPile()) {\n eraseNode();\n }\n }", "public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\n\t}", "private void killPiece(Piece piece) {\r\n\t\tif (piece.getPlayer().color == Color.BLACK) {\r\n\t\t\tblack.removeElement(piece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhite.removeElement(piece);\r\n\t\t}\r\n\t\t\r\n\t}", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "public void clear() {\n for (int row = 0; row < 8; ++row) {\n for (int col = 0; col < 8; ++col) {\n board[row][col] = null;\n }\n }\n whitePieces = new LinkedList<Piece>();\n blackPieces = new LinkedList<Piece>();\n }", "public static void blankBoard() {\r\n\t\tfor (int i = 0; i < Spaces.length; i++) {\r\n\t\t\tSpaces[i] = new Piece();\r\n\t\t}\r\n\t}", "public void wipe(){\n\t \tg2d.setColor(Color.yellow);\n g2d.fillRect(0,0, width, height);\n\t\t\n\n\t }", "private void generateGhost() {\r\n\t\ttry {\r\n\t\t\tghost = (FallingPiece)falling.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(moveIfNoConflict(ghost.moveDown(), ghost));\t\t\r\n\t\tfor (BlockDrawable block : ghost.allBlocks())\r\n\t\t\tblock.setGhost(true);\r\n\t}", "public void removeCards() {\n\t\tthis.content.removeAll(this.content);\n\t}", "void clean(Player p);", "public void clear() {\n head = null;\n tail = null;\n size = 0;\n String name = \"aweseome Frok from Father of MC :) :) :) :) :) :): ): ): ):): ):):): :))::):):)\";\n String smileie = ENOUGH SMILES?;\n }", "public void clearBoard() \n {\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfrontBoard[i][j] = \"00\";\n\t\t\tbackBoard[i][j] = \"00\";\n\t\t }\n\t }\n\tunused = new Piece[pieces.length];\n\tfor(int i=0;i<pieces.length;i++)\n\t {\n\t\t\tunused[i] = pieces[i];\n\t }\n }", "void removeAllSpawn();", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "private void eliminatePiece(BoardPiece boardPiece) {\n\t\tPlayer playerOwner = PlayerObserver.getInstance().getPlayerOwner(boardPiece);\n\t\tplayerOwner.killPiece(boardPiece);\n\t\tboardPiece.destroy();\n\t}", "private void removePiece(Piece piece) {\n addPiece(piece, piece.rowPosition, piece.columnPosition);\n }", "public void clear() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tbeams[i] = null;\n\t\t}\n\t}", "public void removeDead() {\n for (BaseObject object : new ArrayList<BaseObject>(bombs)) {\n if (!object.isAlive())\n bombs.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(rockets)) {\n if (!object.isAlive())\n rockets.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(ufos)) {\n if (!object.isAlive())\n ufos.remove(object);\n }\n }", "public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}", "public void empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}", "public void makesHereBack(){this.piece.affect();}", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }", "public void removeParade(){\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tthis.getChildren().remove(paradeCards[i]);\n\t\t}\n\t}", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "public void clearBoard() {\r\n\t\tbody.removeAll();\r\n\t\tpiece.clear();\r\n\t\t\r\n\t\t// Assign1, Remove 'K' label of all pieces\r\n\t\tfor (int i=0; i<blackPieces.length; i++) {\r\n\t\t\tblackPieces[i].setText(null);\r\n\t\t}\r\n\t\tfor (int i=0; i<whitePieces.length; i++) {\r\n\t\t\twhitePieces[i].setText(null);\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "private void removeDestroyedObjects ()\n {\n Collection<Asteroid> newAsteroids = new ArrayList<>(this.game.getAsteroids().size() * 2); // Avoid reallocation and assume every asteroid spawns successors.\n this.game.getAsteroids().forEach(asteroid -> {\n if (asteroid.isDestroyed()) {\n this.increaseScore();\n newAsteroids.addAll(asteroid.getSuccessors());\n }\n });\n this.game.getAsteroids().addAll(newAsteroids);\n // Remove all asteroids that are destroyed.\n this.game.getAsteroids().removeIf(GameObject::isDestroyed);\n // Remove any bullets that are destroyed.\n this.game.getBullets().removeIf(GameObject::isDestroyed);\n }", "protected void cleanBullets() {\n Set<Bullet> recyclable = new HashSet<Bullet>();\n for (Bullet bullet : this.bullets) {\n bullet.update();\n if (bullet.getPositionY() < SEPARATION_LINE_HEIGHT\n || bullet.getPositionY() > this.height)\n recyclable.add(bullet);\n }\n this.bullets.removeAll(recyclable);\n //BulletPool.recycle(recyclable);\n }", "public void removePiece(int x, int y)\r\n {\r\n if(isValidSqr(x, y)) board[x][y] = null;\r\n }", "public void clearBalls();", "static void hardDrop(Block b) {\n int[] pos = b.pos;\n char[][] piece = b.piece;\n\n while (canPlace(pos[0] + 1, pos[1], piece))\n pos[0]++;\n\n place(pos[0], pos[1], piece);\n }", "public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "private void tileSetSurroundingBombs() {\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n int neighborBombs = neighborBombCount(grid[r][c]);\r\n grid[r][c].setSurroundingBombs(neighborBombs);\r\n }\r\n } \r\n }", "void retainOutlineAndBoundaryGrid() {\n\t\tfor (final PNode child : getChildrenAsPNodeArray()) {\n\t\t\tif (child != selectedThumbOutline && child != yellowSIcolumnOutline && child != boundary) {\n\t\t\t\tremoveChild(child);\n\t\t\t}\n\t\t}\n\t\tcreateOrDeleteBoundary();\n\t}", "public void removeCardToSplit() {\n if (cards.size() == 2) {\n cards.remove(1);\n super.setSize(1);\n }\n }", "public void removeSprites(){\r\n\r\n\t}", "private void removeCastle(PieceColor color, boolean kingSide) {\n \tif(color == PieceColor.White) {\n \t\tif(kingSide) castle[0] = false;\n \t\telse castle[1] = false;\n \t}\n \telse if(color == PieceColor.Black) {\n \t\tif(kingSide) castle[2] = false;\n \t\telse castle[3] = false;\n \t}\n }", "private void tear() {\n\t\tthis.torn = true;\n\t\tthis.getContainer().addToContents(getDucatContent());\n\t\tthis.getContainer().removeFromContents(this);\n\t}", "public void eat() {\r\n\t\tthis.app.getBones().remove(this);\r\n\t}", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.remove(piece);\n\n assertFalse(instance.getBagContent().contains(piece));\n\n }", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "void unsetUnordered();", "public void cleanProposition();", "private void clearBoard() {\n for (int i = 0; i < BOARD_HEIGHT * BOARD_WIDTH; ++i) {\n board[i] = Tetrominoe.NoShape;\n }\n }", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void destroy(int letter) {\r\n Stack<Integer> chain = new Stack<>();\r\n\r\n matrix[letter][letter] = 2;\r\n chain.push(letter);\r\n\r\n while(!chain.isEmpty()) {\r\n int u = chain.pop();\r\n\r\n Integer vertex;\r\n\r\n Iterator it = getIterator(u);\r\n\r\n while((vertex = it.next()) != null) {\r\n if(matrix[vertex][vertex] == 1) {\r\n matrix[vertex][vertex] = 2;\r\n chain.push(vertex);\r\n }\r\n }\r\n }\r\n\r\n for(int i = 0; i < 26; i++) {\r\n if(matrix[i][i] != null && matrix[i][i] == 2) {\r\n // Destroy rows and columns\r\n for(int j = 0; j < 26; j++) {\r\n matrix[i][j] = null;\r\n matrix[j][i] = null;\r\n }\r\n }\r\n }\r\n\r\n }", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "private void removeCards(int pileNumber, List<Card> build) {\n List<Card> pile = cascadePiles.get(pileNumber);\n for (Card c : build) {\n pile.remove(c);\n }\n }", "public void juToTileToBaddieCollide(GameTile tile) {\n\t\tList<Creature> toRemove = new LinkedList<Creature>();\n\t\tfor(Creature c : tile.collidingCreatures()) {\n\t\t\tif(c instanceof Penguin){\n\t\t\t\tc.flip();\n\t\t\t\ttoRemove.add(c);\n\t\t\t} \n\t\t}\n\t\tfor(Creature c : toRemove) { tile.collidingCreatures().remove(c); }\n\t}", "private void moverCarritoGolf() {\n for (AutoGolf carrito : arrEnemigosCarritoGolf) {\n carrito.render(batch);\n\n carrito.moverIzquierda();\n }\n }", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "void cut(int cardPosition);", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "public static void removePieceList(String piece)\n\t{\n\t\tfor(int loop = 0; loop < 32; loop++)\n\t\t{\n\t\t\tif(pieceList[loop] == piece)\n\t\t\t{\n\t\t\t\tpieceList[loop] = \"\";\n\t\t\t}\n\t\t}\n\t}", "public void discardPotion(Bucket b) \n\t{\n\t\t//run through the contents of the potion and then add them to the bucket\n\t\tfor (int i=0; i < this.ingredients.length(); i++ ) \n\t\t{\n\t\t\tb.dumpIngredient(ingredients.charAt(i));\n\t\t}\n\t\t//clear the ingredients in the bottle\n\t\tthis.ingredients=\"\";\n\t}", "void retract()\n\t\t{\n\t\t\tsides = sides-1;\n\t\t\t\n\t\t\tDimension[] dime2 = new Dimension[d.length - 1];\n\t\t\t\n\t\t\tfor (int i=0; i< d.length-1; i++)\n\t\t\t{\n\t\t\t\tdime2[i]= d[i];\n\t\t\t}\n\t\t\t\n\t\t\td = new Dimension[d.length - 1];\n\t\t\tfor(int i = 0; i< dime2.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime2[i];\n\t\t\t}\n\t\t\t\t\n\t\t}", "public void removeKing(){\n this.king = false;\n }", "void positionCleared();", "public void clearGame() {\n //loop through piece array erase pieces\n\n //clear piece array\n for (int i = 0; i < 64; i++) {\n ChessBoard.pieces[i] = null;\n }\n\n //remove all piece components from chessboard\n chessboard.removeAll();\n \n //clear game log\n gamelog.clearLog();\n \n //refresh graphics\n frame.update(frame.getGraphics());\n }", "public static void setPieceTest2() {\n\t\t\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\t\t \tBoard.setBoard();\n\t\t\t\tBoard.decPieceCount();\n\t\t\t \tSystem.out.println(Board.getPieceCount());\t\n\t\t\t\tSystem.out.println(Board.move(\n\t\t\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\t\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tBoard.checkWin();\n\t\t\t\tSystem.out.println(\"Valid inputs\");\n\t\t\t\tSystem.out.println(\"OthelloBoard.clearPieces() - Begin\");\n\t\t\t\tSystem.out.println(\"Expected output: Throws exception\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t}catch(UnsupportedOperationException e){\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\");\n\t\t}", "public void remove() {\r\n\tif (kingdom != null && currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\tcurrentEffect = null;\r\n }", "public void youBrokeSon(){\n\t\tcoinList.clear();\n\t}", "void retract() {\n assert movesMade() > 0;\n Move move = _moves.remove(_moves.size() - 1);\n Piece replaced = move.replacedPiece();\n int c0 = move.getCol0(), c1 = move.getCol1();\n int r0 = move.getRow0(), r1 = move.getRow1();\n Piece movedPiece = move.movedPiece();\n set(c1, r1, replaced);\n set(c0, r0, movedPiece);\n _turn = _turn.opposite();\n }", "private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "public void plantBombsInEmptyCells() {\n\t\tfor (int i = 0; i < r; i++) {\n\t\t\tfor (int j = 0; j < c; j++) {\n\t\t\t\tgrid[i][j] = ( grid[i][j] < 0 ? 0 : grid[i][j] );\n\t\t\t}\n\t\t}\n\t}", "@Override\n public ChessPiece clone() {\n ChessPiece copy = new Bishop(this.owner);\n this.owner.removeChessPiece(copy);\n copy.canCastle = this.canCastle;\n copy.icon = this.icon;\n\n return copy;\n }", "public void removeAllElements() {\n for (int i = 0; i < OLast; i++) O[i] = null;\n ON = OLast = 0;\n Gap = -1;\n }", "public void unsetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PART$2, 0);\n }\n }", "public void emptyBullets() {\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n bossBullets.remove(i);\n }\n }", "public void removePawn(Position position) {\n\t\tboardGrid[position.getRow()][position.getColumn()] = new Empty();\n\t}", "public void clearEnemies() {\n\t\tIterator<Entity> it = entities.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntity e = it.next();\n\t\t\t//Skip playerfish\n\t\t\tif (e instanceof PlayerFish) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Kill and remove the entity\n\t\t\te.kill();\n\t\t\tit.remove();\n\t\t}\n\t\t\n\t\t//Remove all non playerfish from collidables\n\t\tcollidables.removeIf(c -> !(c instanceof PlayerFish));\n\t\tdrawables.removeIf(c -> !(c instanceof PlayerFish));\n\t}", "protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public void reFormatPieceLayer() {\r\n\t\tbody.removeAll();\r\n\t\tfor (int i = 0; i < 8 * 8; i++) {\r\n\t\t\tChessPiece tmpPiece = piece.get(order[i]);\r\n\t\t\tif (tmpPiece == null) {\r\n\t\t\t\tspacePieces[i].position = order[i];\r\n\t\t\t\tpiece.put(order[i], spacePieces[i]);\r\n\t\t\t\tbody.add(spacePieces[i]);\r\n\t\t\t} else {\r\n\t\t\t\tpiece.put(order[i], tmpPiece);\r\n\t\t\t\tbody.add(tmpPiece);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "void unsetSpokes();", "@Override\n\tpublic void destroy()\n\t{\n\t\tprojectileCount--;\n\t\trbCount--;\n\t}", "private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft = null;\n\t\tright = null;\n\t\tg_up = null;\n\t\tg_down = null;\n\t\tg_left = null;\n\t\tg_right = null;\n\t\tgrass = null;\n\t\tcake = null;\n\n\t\t// Call garbage collector to clean up memory.\n\t\tSystem.gc();\n\n\t}", "private void unhilitNode()\n {\n\tif (hilited==null) return;\n\tGraphics g = getGraphics();\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,hilited.x,hilited.y,hilited.diameter+4);\n\thilited = null;\n }", "public void erase() {\n g2.setPaint(Color.white);\r\n }", "public void removeBoat (int index) {\n Boat b = getBoatAt(index);\n int startX = Math.min(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): startX = \" + startX);\n int startY = Math.min(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): startY = \" + startY);\n int endX = Math.max(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): endX = \" + endX);\n int endY = Math.max(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): endY = \" + endY);\n \n //reset cells in grid.\n if (startX == endX) { \n for (int j = startY; j <= endY; j++) {\n System.out.println(\"removeBoat(): X constant. Changing coordinate: \" + j);\n grid[startX-1][j-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[startX-1][j-1]);\n } \n } else if (startY == endY) {\n for (int i = startX; i <= endX; i++) {\n System.out.println(\"removeBoat(): Y constant. Changing coordinate: \" + i);\n grid[i-1][startY-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[i-1][startY-1]);\n }\n }\n \n //reset boat\n b.setStartX(INVALID); \n b.setStartY(INVALID); \n b.setEndX(INVALID); \n b.setEndY(INVALID);\n \n }", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "public void CaptuePiece(int i , int j , int k , int l){\r\n if(GameBoard.get(i,j).getColour() != GameBoard.get(k,l).getColour()){\r\n pos.setPosition(k,l);\r\n GameBoard.get(i,j).capture(pos);\r\n GameBoard.get(k,l).captured();\r\n \r\n\r\n //We need a method to null the (k,l) cell in GameBoard\r\n pos.setPosition(k,l);\r\n GameBoard.setNull(pos);\r\n GameBoard.get(i,j).move(pos); //to move the killer in new cell\r\n\r\n\r\n\r\n }\r\n }", "public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}", "public static void removeIceAndFire(){\r\n for(int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if(board[i][j].isOnFireForTheNextNTurns == currentTurn){\r\n board[i][j].isOnFire = false;\r\n }\r\n if(board[i][j].isFrozenForTheNextNTurns == currentTurn){\r\n board[i][j].isFrozen = false;\r\n }\r\n }\r\n }\r\n }", "public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }", "public List<Piece> blackPieces();", "private void purgeAllOverflowEM_EM() {\n float mass = 0;\n for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n for (GT_MetaTileEntity_Hatch_OutputElemental tHatch : eOutputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n }\n mass += tHatch.overflowMatter;\n tHatch.overflowMatter = 0;\n }\n cleanMassEM_EM(mass);\n }", "public void clearAreaReset() {\n for(int x = 0; x < buildSize; x++) {\n for(int y = 4; y < 7; y++) {\n for(int z = 0; z < buildSize; z++) {\n myIal.removeBlock(x, y, z);\n }\n }\n }\n\n myIal.locx = 0; myIal.locy = 0; myIal.locz = 0;\n my2Ial.locx = 0; my2Ial.locy = 0; my2Ial.locz = 0;\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 setAtomsToUnPlaced(IMolecule molecule) {\n\t\tfor (int i = 0; i < molecule.getAtomCount(); i++) {\n\t\t\tmolecule.getAtom(i).setFlag(CDKConstants.ISPLACED, false);\n\t\t}\n\t}" ]
[ "0.700215", "0.68837935", "0.6409743", "0.63946724", "0.6379068", "0.6256745", "0.62020344", "0.6125689", "0.6107003", "0.6095242", "0.606778", "0.6040858", "0.60126156", "0.59775037", "0.59749985", "0.5920031", "0.5907197", "0.5901396", "0.58476835", "0.5823914", "0.5792641", "0.57794255", "0.57567793", "0.5756696", "0.5749381", "0.5746439", "0.5741798", "0.5740414", "0.57320446", "0.572129", "0.57128865", "0.57125145", "0.57090384", "0.5706286", "0.5693163", "0.56875175", "0.5680534", "0.56783247", "0.56695956", "0.5665168", "0.5661115", "0.56489486", "0.5646705", "0.5641455", "0.56340444", "0.5610842", "0.56055206", "0.5603961", "0.55819464", "0.5578652", "0.5577641", "0.5572155", "0.55612594", "0.5553143", "0.55466115", "0.55464405", "0.55253327", "0.5520661", "0.54979074", "0.54941326", "0.54900575", "0.54877627", "0.5486086", "0.54836357", "0.5469528", "0.54687256", "0.54682714", "0.54657567", "0.5465586", "0.5465499", "0.5462401", "0.54611653", "0.5460049", "0.54598606", "0.5455078", "0.54514974", "0.5438547", "0.54327923", "0.543236", "0.54298073", "0.54269856", "0.5426928", "0.54256827", "0.54244745", "0.54197013", "0.5406636", "0.54012233", "0.5400182", "0.53913826", "0.5388484", "0.53858536", "0.53842235", "0.53817946", "0.5376261", "0.5374866", "0.537411", "0.53693837", "0.5367184", "0.536576", "0.53648216", "0.53640884" ]
0.0
-1
Signals that this Piece has begun to capture (as in it captured a Piece)
void startCapturing() { //YOUR CODE HERE if (hasCaptured() == false) { pieceCaptured = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "public boolean hasCaptured() {\n //YOUR CODE HERE\n\t return pieceCaptured;\n }", "void onMoveTaken(Piece captured);", "private void HandleOnMoveStart(Board board, Piece turn){}", "void onCaptureStart();", "public synchronized void signalStep() {\n s = true;\n notifyAll();\n }", "void onCaptureEnd();", "void notifyCapture(Pit capturedPit);", "@Override\n public void onPourWaterRaised() {\n if (theFSM.getCupPlaced()) {\n pouringState = true;\n }\n }", "@Override\n\tpublic void passedOn(Piece piece) {\n\t\t\n\t}", "public void startTurn() {\r\n\t\tbought.clear();\r\n\t\tdeck.gained.clear();\r\n\t\tfor(int i = deck.duration.size() - 1; i >= 0; i--) {\r\n\t\t\tdeck.duration.get(i).durationAction();\r\n\t\t}\r\n\t\tnotifyObservers();\r\n\t\taccess.log(getPlayerName() + \"'s turn started\");\r\n\t\tif(ai != null) ai.takeTurn();\r\n\t}", "public void beginHold();", "private static void hold(int piece){\n\t\tholdPiece = piece;\n\t\tMain.hold();\n\t}", "public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }", "public void onCompletedGesture(SimpleOpenNI curContext,int gestureType, PVector pos)\n{\n println(\"onCompletedGesture - gestureType: \" + gestureType + \", pos: \" + pos);\n \n int handId = kinect.startTrackingHand(pos);\n println(\"hand stracked: \" + handId);\n}", "public void start() {\n isStarted = true;\n clearBoard();\n newPiece();\n }", "public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}", "@Override\n public void onPourMilkRaised() {\n }", "@Override\n\tpublic void landedOn(Piece piece) {\n\t\t\n\t}", "void onForwardClcked();", "public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }", "public void onTurnBegin() {\n\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "void onHoldPerformed();", "public void fire() {\n writeBit(CAL_START, false);\n writeBit(CAL_COMPLETE, true);\n LOCK_reg.write((byte)((LOCK_reg.read() & 0x0f) | 0x50)); // LOCK = CAL_COMPLETE\n if (radioPrinter.enabled) {\n radioPrinter.println(\"CC1000: Calibration complete \");\n }\n calibrating = false;\n }", "public boolean isCaptured(){\n\t\treturn isCaptured;\n\t}", "void gameWon(Piece piece);", "public void makesHereBack(){this.piece.affect();}", "private void frameProcessed(){\n if(DEBUG) Log.d(TAG, \"Frame Processed\");\n synchronized (mWaitFrame) {\n mWaitFrame.notifyAll();\n }\n }", "private void pieceDropped() {\n for (int i = 0; i < 4; ++i) {\n\n int x = curX + curPiece.x(i);\n int y = curY - curPiece.y(i);\n board[(y * BOARD_WIDTH) + x] = curPiece.getShape();\n }\n//check if any lines can be removed\n removeFullLines();\n//creates a new piece when a piece finished falling\n if (!isFallingFinished) {\n newPiece();\n }\n }", "protected void ACTION_B_STOP(ActionEvent e) {\n\t\tcaptureState=false;\r\n\t\tCAPTAIN.finished();\r\n\t}", "public void handFinished(int position, GameState gs) {\r\n }", "public void endTurn() {\n \tselectedX = -1;\n \tselectedY = -1;\n \tmoveToX = -1;\n \tmoveToY = -1;\n \toneMove = false;\n \thasMoved = false;\n\t\tplayer = 0 - player;\n\t\tfor (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n \tif (pieces[i][j]) {\n \t\tboardPieces[i][j].doneCapturing();\n \t}\n }\n\t\t}\n\t}", "public void onTurnOver() {}", "void startPumpingEvents();", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "public void endTurn() {\n\t\tif (whoseTurn == 0) {\n\t\t\twhoseTurn = 1;\n\t\t} else {\n\t\t\twhoseTurn = 0;\n\t\t}\n\t\thasMoved = false;\n\t\thasSelected = false;\n\t\tif (prevSelected != null) {\n\t\t\tprevSelected.doneCapturing();\n\t\t}\n\t\tprevSelected = null;\n\t\tprevSelectedX = 0;\n\t\tprevSelectedY = 0;\n\t}", "public void endHold();", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "@Override\r\n\tpublic void startMove(PieceType pieceType, boolean isFree, boolean allowDisconnected) {\n\t\t\r\n\t}", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void onBoardEvent(BoardEvent e) {\n\t\tif(e.getId() == BoardEvent.CAPTURE || e.getId() == BoardEvent.DROP){\r\n\t\t\tselected = -1;\r\n\t\t\tb.selectedFromHand(selected);\r\n\t\t\tinvalidate();\r\n\t\t}\r\n\t\telse if(e.getId() == BoardEvent.TURN_END){\r\n\t\t\tplayer = player^1;\r\n\t\t\tinvalidate();\r\n\t\t}\r\n\t}", "private void HandleOnMoveEnd(Board board, Piece turn, boolean success){\n\t}", "private void inZoneSignal(){\n EventHandle[] trackInZone = ECAAgent.getEventHandles(inZoneEventName);\n ECAAgent.insert(trackInZone,\"TrackNumber\",trackNumber);\n ECAAgent.getDefaultECAAgent().raiseEndEvent(trackInZone,this);\n }", "public void onTurnEnd() {\n\n\t}", "public void endOfTurn();", "void pieceAdded(Piece piece);", "public static void signalStart() {\n\t\tif (!instrumenting) return;\n\t\t\n\t\trunning = true;\n\t}", "public void firePartActivated(final IWorkbenchPartReference ref) {\n Object[] array = getListeners();\n for (int i = 0; i < array.length; i++) {\n final IPartListener2 l = (IPartListener2) array[i];\n fireEvent(new SafeRunnable() {\n\n @Override\n public void run() {\n l.partActivated(ref);\n }\n }, l, ref, //$NON-NLS-1$\n \"activated::\");\n }\n }", "public void handStarted(int position, GameState gs, Card[] cards) {\r\n }", "public void onMoveGestureStarted()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_START, null);\n\t}", "public void setIsCaptured(boolean isCaptured){\n\t\tthis.isCaptured = isCaptured;\n\t}", "public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}", "public interface ClipStateListener {\n void clipEnded(Clip clip);\n}", "@Override\n public void onPourSyrupRaised() {\n }", "public abstract void tellStarting();", "public void finishPassing() {\n\t\n\tmyGlass = null;\n controller.donePass();\n // System.out.println(\"done animating\");\n}", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\tSettings.readState = true;\n\t\tSettings.atStartOfMaze = false;\n\t\tpilot.travel(-5);\n\t\tpilot.rotate(100);\n\t\twhile( pilot.isMoving() && !suppressed );\n\t\tpilot.stop();\n\t}", "void onSuccessfulStarted();", "@Override\n\tpublic void holdup() {\n\t\tSystem.out.println(\"Hollup\");\n\t}", "public void handStarted(TrucoEvent event) {\n\n }", "@Override\n public void capture() {\n }", "@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public void notifyPhase(GameModel model) {\n model.onWonderPhaseStart(mediator);\n activePlayer = model.getActivePlayer();\n }", "public void autoGrab(){\n \tif (getTrigger() == true){\n\t \tif(triggerTimer.get() >= TRIGGER_LOCKOUT){\n\t\t \tClawAct.set(true);\n\t\t \tisClosed = true;\n\t \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\t \t}\n \t}\n\n }", "@Override\n public void onSequenceFinish() {\n // Yay\n mShowingTour = false;\n mPresenter.showCaseFinished();\n }", "void captureHold(float[] point, float seconds, int sequenceNumber);", "protected void ACTION_b_CAPTURE(ActionEvent e) {\n\t\ttextArea_1.setText(\"\");\r\n\t\tcaptureState=true;\r\n\t\tCapturePackets();\r\n\t\tsave.setEnabled(true);\r\n\t\t//load.setEnabled(true);\r\n\t\t\r\n\t}", "public void trigger() {\n button.release(true);\n }", "@Override\n public void informPlaneReadyForBoarding() {\n this.lock.lock();\n try {\n // update pilot state\n this.repository.updatePilotState(PilotState.READY_FOR_BOARDING);\n\n // wake up hostess\n this.planeReadyForBoarding = true;\n this.hostessWaitPlaneReadyToTakeOff.signal();\n } finally {\n this.lock.unlock();\n }\n }", "public void step() {\n\t\tpostEvent(new IpcEvent(SimulationEvents.EVENT_TYPE_STEP, this, null));\n\t}", "private boolean moveContinues(Point piece){\r\n boolean result = canEats(piece);\r\n // if move continues, next move has to start with the same piece\r\n model.setCheckPiece((result)?piece:null);\r\n return result;\r\n }", "protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }", "@Override\r\n\tpublic void onStargateOpened(MapElement mapElement, ProjectileType type, Direction direction) {\r\n\t\tControllerEventSource.notifyStargateOpened(mapElement, type, direction);\r\n\t}", "void onHandWaveGesture();", "protected void end() {\n \tRobot.hand.setWrist(0.0);\n }", "@Override\n protected void end() {\n switch (Intake.intakeState) {\n case 2:\n// if (Robot.intake.bannerIR.get()) {\n// Timer.delay(0.25);\n// Robot.wrist.setAbsolutePosition(RobotMap.WRIST_RETRACTED_CARGO_ANGLE);\n//// Timer.delay(0.1);\n//// Robot.intake.setCargoIntakeOutput(RobotMap.CARGO_HOLD_SPEED);\n// } else {\n// Robot.intake.setCargoIntakeOutput(0);\n// }\n break;\n case 1:\n Robot.intake.setHatchIntakeOutput(RobotMap.HATCH_GROUND_HOLD_SPEED);\n break;\n case 0:\n default:\n //Robot.intake.setHarpoonSecure(true);\n Timer.delay(0.25);\n Robot.intake.setHatchIntakeOutput(0);\n break;\n }\n\n Intake.overridePassive = false;\n }", "private void pulse()\n {\n }", "private void handleAutomatonEnded() {\n Platform.runLater(() -> {\n canvas.scheduleUpdate();\n goEndState();\n alertAutomatonEnded();\n });\n }", "public void hold() throws DeviceException {\n \t\ttry {\n \t\t\tcontroller.caput(holdChannel, 1, 2.0);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to stop or hole the JOB\", e);\n \t\t}\n \t}", "public void firePartDeactivated(final IWorkbenchPartReference ref) {\n Object[] array = getListeners();\n for (int i = 0; i < array.length; i++) {\n final IPartListener2 l = (IPartListener2) array[i];\n fireEvent(new SafeRunnable() {\n\n @Override\n public void run() {\n l.partDeactivated(ref);\n }\n }, l, ref, //$NON-NLS-1$\n \"deactivated::\");\n }\n }", "public void playerTurnStart() {\n\r\n\t}", "public void toEndingTurn() {\n }", "void mousePressed() {\n firing = true;\n\n}", "@Override\n public void onCaptureAreaReleased(Point point) {\n switch (this.mCameraType) {\n case 1: {\n StateMachine stateMachine = FastViewFinder.this.mStateMachine;\n StateMachine.TransitterEvent transitterEvent = StateMachine.TransitterEvent.EVENT_CAPTURE_BUTTON_RELEASE;\n Object[] arrobject = new Object[]{StateMachine.TouchEventSource.CAPTURE_AREA};\n stateMachine.sendEvent(transitterEvent, arrobject);\n }\n default: {\n break;\n }\n case 2: {\n if (FastViewFinder.this.mStateMachine.isInModeLessRecording()) {\n StateMachine stateMachine = FastViewFinder.this.mStateMachine;\n StateMachine.TransitterEvent transitterEvent = StateMachine.TransitterEvent.EVENT_CAPTURE_BUTTON_RELEASE;\n Object[] arrobject = new Object[]{StateMachine.TouchEventSource.CAPTURE_AREA};\n stateMachine.sendEvent(transitterEvent, arrobject);\n break;\n }\n FastViewFinder.this.mStateMachine.sendEvent(StateMachine.TransitterEvent.EVENT_CAMCORD_BUTTON_RELEASE, new Object[0]);\n }\n }\n FastViewFinder.this.mStateMachine.sendEvent(StateMachine.TransitterEvent.EVENT_CANCEL_TOUCH_ZOOM, new Object[0]);\n }", "@Override\n protected void end() {\n Robot.hatchIntake.hatchOFF();\n }", "public synchronized void moveStarted(Move move, MoveProvider mp) {\n\t\tangle0 = 0;\n\t\tdistance0 = 0;\n\t\tcurrent = false;\n\t\tthis.m_mover = mp;\n\t}", "@Override\r\n public void fromFearToChase() {\r\n if (afraid()) {\r\n startChase();\r\n }\r\n }", "public void step(){\n if (this.jobs.contains(this.currentFloor)){ //we arrived at our destination\n this.openDoor();\n this.leavePeople();\n this.deleteJob(this.currentFloor);\n } else {\n this.closeDoor();\n this.changeState();\n this.move();\n }\n }", "void composingIndicatorReceived(IMSession session, String sender, int timeout);", "protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }", "public void firePartClosed(final IWorkbenchPartReference ref) {\n Object[] array = getListeners();\n for (int i = 0; i < array.length; i++) {\n final IPartListener2 l = (IPartListener2) array[i];\n fireEvent(new SafeRunnable() {\n\n @Override\n public void run() {\n l.partClosed(ref);\n }\n }, l, ref, //$NON-NLS-1$\n \"closed::\");\n }\n }", "@Override\n\tpublic void mouseReleased(MouseEvent arg0) {\n\t\tif(Piece.selectedPiece != null)\n\t\t{\n\t\t\tPiece.moving = false;\n\t\t\tPiece.selectedPiece.setMoving(false);\n\t\t\tdraw();\n\t\t\trepaint();\n\t\t\t//System.out.println(\"mouseReleased\");\n\t\t}\n\t}", "private void fireOutputRecovered() {\n previousEvent = OUTPUT_RECOVERED;\n ownerPool.getIPCEventProcessor().execute(new OrderedExecutorService.KeyRunnable<StreamOutputChannel<PAYLOAD>>() {\n\n @Override\n public void run() {\n for (IPCEventListener l : outputRecoverListeners) {\n l.triggered(outputRecoveredEvent);\n }\n }\n\n @Override\n public StreamOutputChannel<PAYLOAD> getKey() {\n return StreamOutputChannel.this;\n }\n });\n }", "public GameAboutToStartEvent() {\n this.seconds = FIVE_SECONDS;\n }", "public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }", "@Test\n\tpublic void captureOtherPiece() throws Exception {\n\t\tRook captureTarget1 = new Rook(PieceColor.BLACK, 1, 5);\n\t\tKnight captureTarget2 = new Knight(PieceColor.WHITE, 6, 2);\n\t\tRook captureTarget3 = new Rook(PieceColor.BLACK, 4, 2);\n\t\tQueen captureTarget4 = new Queen(PieceColor.WHITE, 5, 4);\n\t\tgame.board.addPiece(captureTarget1);\n\t\tgame.board.addPiece(captureTarget2);\n\t\tgame.board.addPiece(captureTarget3);\n\t\tgame.board.addPiece(captureTarget4);\n\t\t\n\t\tgame.board.movePiece(knightCorner1White, 1, 5);\n\t\tgame.board.movePiece(knightCorner2Black, 6, 2);\n\t\tgame.board.movePiece(knightSide1White, 4, 2);\n\t\tgame.board.movePiece(knightSide2Black, 5, 4);\n\t\tassertEquals(knightCorner1White, game.board.getPiece(1, 5));\n\t\tassertEquals(knightCorner2Black, game.board.getPiece(6, 2));\n\t\tassertEquals(knightSide1White, game.board.getPiece(4, 2));\n\t\tassertEquals(knightSide2Black, game.board.getPiece(5, 4));\n\t\tassertFalse(captureTarget1.isAlive());\n\t\tassertFalse(captureTarget2.isAlive());\n\t\tassertFalse(captureTarget3.isAlive());\n\t\tassertFalse(captureTarget4.isAlive());\n\t}" ]
[ "0.72458947", "0.65001154", "0.6448025", "0.6201032", "0.6021715", "0.59334606", "0.5923691", "0.58303344", "0.5774576", "0.5774102", "0.57257223", "0.5723131", "0.572299", "0.5685817", "0.564663", "0.56283355", "0.5588448", "0.55395097", "0.55323887", "0.5522229", "0.5520322", "0.55196846", "0.5482514", "0.54770184", "0.54763013", "0.5469228", "0.54640144", "0.5461097", "0.5455044", "0.5452125", "0.5451194", "0.54413027", "0.54274154", "0.5427309", "0.5422138", "0.5420482", "0.5415056", "0.537787", "0.53514475", "0.5346822", "0.53394246", "0.5317566", "0.531594", "0.52959996", "0.5289067", "0.5276157", "0.52713865", "0.5269012", "0.5268614", "0.5263181", "0.5251184", "0.52453566", "0.5243724", "0.52356344", "0.5227747", "0.52227134", "0.5215967", "0.52105373", "0.5209942", "0.5188543", "0.5186354", "0.5184823", "0.5179633", "0.5175773", "0.517571", "0.5173014", "0.5170655", "0.51692754", "0.51640993", "0.51636004", "0.5157228", "0.515722", "0.5152779", "0.51479733", "0.5144768", "0.51347625", "0.51240367", "0.51186013", "0.51117295", "0.51087004", "0.5107688", "0.5090024", "0.50881296", "0.5086495", "0.5086295", "0.50853217", "0.5083457", "0.508309", "0.50794613", "0.50790405", "0.5072328", "0.5071639", "0.5069546", "0.5067207", "0.5066409", "0.5062255", "0.50621575", "0.50621307", "0.50620914", "0.5061706" ]
0.71469694
1
Returns whether or not this piece has captured this turn
public boolean hasCaptured() { //YOUR CODE HERE return pieceCaptured; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canCapture(Piece piece, Point start)\n \t{\n \t\t//Piece.Team team = piece.getTeam();\n \t\tPiece.Team opposite = piece.getOppositeTeam();\n \t\t\n \t\tboolean ahead = false;\n \t\tboolean behind = false;\n \t\tint captureAhead = 0;\n \t\tint captureBehind = 0;\n \t\t\n \t\tfor(Direction d : Direction.values())\n \t\t{\n \t\t\tPoint land = getPoint(start,d); //get point in all directions\n \t\t\t\n \t\t\tif( land == start) //when direction is none\n \t\t\t\tcontinue;\n \t\t\t\n \t\t\tif(board[land.y][land.x] == null) //you will land in an empty spot\n \t\t\t{\n \t\t\t\tPoint target = getPoint(land,d); //look for targets in the same direction you traveled\n \t\t\t\tPoint targetBehind = getPoint(start,getOppositeDirection(d)); //from your starting position get the target behind \n \t\t\t\tif(board[target.y][target.x].getTeam() == opposite) //check position ahead in the same direction you advanced for opposite team\n \t\t\t\t{\n \t\t\t\t\tahead = true;\n \t\t\t\t\t++captureAhead;\n \t\t\t\t}\n \t\t\t\tif(board[targetBehind.y][targetBehind.x].getTeam() == opposite)\n \t\t\t\t{\n \t\t\t\t\tbehind = true;\n \t\t\t\t\t++captureBehind;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (captureAhead+captureBehind > 0)\n \t\t\treturn true;\n \t\telse \n \t\t\treturn false;\n \t}", "public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasFullyTurned() {\r\n return turningPID.onTarget();\r\n }", "public boolean isCaptured(){\n\t\treturn isCaptured;\n\t}", "public boolean isChiefCaptured(){\n Chief chief = establishChief();\n return chief == null;\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}", "private boolean validCapture(int xf, int yf) {\n if (!isPiece(xf, yf)) {\n return false; \n } else if (pieceAt(xf, yf).isFire() == firesTurn) {\n return false;\n } else {\n return true;\n }\n }", "public boolean isTurn() {\n\t\treturn turn;\n\t}", "private boolean isNextMoveEnPassentCapture(Move move)\r\n\t{\r\n\t\tif (!(move.capture instanceof Pawn)) return false;\r\n\t\tif (Math.abs(move.from.coordinate.x - move.to.coordinate.x) != 1) return false;\r\n\t\tif (Math.abs(move.from.coordinate.y - move.to.coordinate.y) != 1) return false;\r\n\t\tif (!move.to.isEmpty()) return false;\r\n\t\treturn true;\r\n\t}", "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "public boolean hasBeenShot(){\n return this.hasBeenShot;\n }", "boolean isPlayerTurn();", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public boolean checkCapture(Move move, Piece board[][]) {\n\n if (board[move.getEnd_column()][move.getEnd_row()] != null) {\n if (board[move.getEnd_column()][move.getEnd_row()].getColor() == getColor()) {\n return false;\n }\n //adds the taken piece to move-object\n move.setTakenPiece(board[move.getEnd_column()][move.getEnd_row()]);\n }\n\n return true;\n }", "public boolean isWin() {\n if (chosen_door.getContains() == Contains.CAR) {\n return true;\n }\n return false;\n }", "public boolean isTurned(){\n\treturn IS_TURNED;\n }", "public boolean isPass() {\n return playerMove != null && playerMove.getTypeOfChoice() == TypeOfChoiceEnum.PASS;\n }", "public boolean hasTurn() {\n\t\treturn world.getCurrentPlayer() == this;\n\t}", "public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isTurning();", "public boolean hasWon() {\n return isGoal(curBoard);\n }", "public boolean hasPassed()\n {\n if (y<=450.0f)\n return false;\n else\n return true;\n }", "@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }", "public boolean canEndTurn(){\n\t\treturn moved;\n\n\t}", "boolean finishRedMoves(int piece) {\n\t\treturn (piece == 0 && curPlayer == 1);\n\t}", "public boolean isTurn()\n\t{\n\t\treturn isTurn;\n\t}", "public boolean hasMoves() {\n if(color != 0){\n activePieces = getPiece();\n\n for(int i = 0; i < activePieces.size(); i++){\n Piece curr = activePieces.get(i);\n\n if(curr.possibleMoves(state).size() > 0){\n //curr.printSpecial();\n return true;\n }\n }\n return false;\n }\n System.out.println(\"Empty stop error\");\n return false;\n }", "public boolean winState() {\n\t\treturn this.numTargets == this.onTargets;\n\t}", "public boolean onEnPassant() {\n\t\tfinal FigureColor opponentColor = FigureColor.getOpponentColor(this.pawnColor);\n\t\tfinal BaseFigure lastUsedFigure = MoveWatcherEvent.getLastUsedFigure(opponentColor);\n\n\t\tif (lastUsedFigure.getFigureType() == FigureSet.PAWN) {\n\t\t\tfinal FigurePawn opponentPawn = (FigurePawn) lastUsedFigure;\n\n\t\t\tif (opponentPawn.getMoveInformation() == PawnMoveInformation.MOVED_TWO_FIELDS) {\n\t\t\t\tif (Matrix.INSTANCE.onPawnNeighbors(this, opponentPawn)) {\n\t\t\t\t\tthis.flagForEnPassant = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.flagForEnPassant = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.flagForEnPassant;\n\t}", "public boolean taken() {\n return pawn.getLives() != 0;\n }", "boolean isMyTurn();", "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 }", "protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }", "public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isWon() {\n return getWinningScenario() != null;\n }", "public boolean getPassed(){\n return passedLastMove;\n }", "public boolean takeShot(Point shot) {\n return opponentsBoard.takeShot(shot);\n }", "boolean finishBlackMoves(int piece) {\n\t\treturn (piece == 0 && curPlayer == 2);\n\t}", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "public boolean is_shot(){\n \treturn this.shot;\n }", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "private boolean canCaptureEnPassant(Board board, Point pt) {\n Piece temp = board.getPieceAt(pt);\n if(temp != null)\n if (temp instanceof Pawn && temp.getColor() != this.color)\n if (((Pawn)temp).enPassantOk)\n return true;\n return false;\n }", "public boolean isPlayerTurn() {\n return playerTurn;\n }", "boolean wasHit();", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "protected boolean isFinished() {\n\tif(this.motionMagicEndPoint >0) {\n \tif(Math.abs(RobotMap.motorLeftTwo.get() )< 0.09 && Math.abs(RobotMap.motorRightTwo.get() )> -0.09&& Timer.getFPGATimestamp()-starttime > 10) {\n \t\treturn true;\n \t}\n\t}\n\t\n return false;\n }", "public boolean CheckForCapture(int landed){\n //player0 captures\n if (this.playerNumber == 0 && landed > -1 && landed < 6){\n if (this.gameBoard[landed] == 1) {\n return true;\n }\n }\n //player2 captures\n if (this.playerNumber == 1 && landed > 6 && landed < 13){\n if (this.gameBoard[landed] == 1) {\n return true;\n }\n }\n return false;\n }", "protected boolean isFinished() {\r\n if (Math.abs(motorWithEncoder.getSetpoint() - motorWithEncoder.getPosition()) < 0.5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean didWin(){\n\t\tswitch(winCondition){\n\t\tcase \"catchEmAll\":\n\t\t\treturn caughtEmAll();\n\t\tdefault:\n\t\t\treturn caughtTwenty();\n\t\t}\n\t}", "public boolean encountered(){\n boolean encounter = false;\n\n int stepsNeeded = player.getDestination().getStepsNeeded();\n\n float percent = (chance * 1.0f / stepsNeeded * 1.0f) * 100;\n float result = r.nextFloat() * 100;\n\n if(result <= percent && percent >= 20) {\n encounter = true;\n }\n\n return encounter;\n }", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "private boolean moveContinues(Point piece){\r\n boolean result = canEats(piece);\r\n // if move continues, next move has to start with the same piece\r\n model.setCheckPiece((result)?piece:null);\r\n return result;\r\n }", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "boolean CanFinishTurn();", "public boolean getContinueFlag()\r\n {\r\n if (curTurn > 1) return false;\r\n return true;\r\n }", "boolean hasCaptureProbabilities();", "public boolean hit()\n\t{\n\t\taddCardToHand(new BlackJackCard());\n\t\treturn getHandValue() <= 21;\n\t}", "public boolean hasGameEnded() {\n return winner != 0;\n }", "public boolean isWin() {\n int counter = 0;\n\n for (int num : maskResultArray) {\n if (num == 1) counter++;\n }\n\n if (counter == 4) return true;\n return false;\n }", "public boolean isPassed() {\r\n\t\treturn passed;\r\n\t}", "protected boolean isFinished() {\n return ((degrees - Robot.gyro.getAngle() <= Robot.acceptedTurnTolerance)&&(degrees - Robot.gyro.getAngle() >= -Robot.acceptedTurnTolerance))||Robot.interrupt;\n }", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "boolean isReactionsRunning()\n {\n return 0 != _currentReactionRound;\n }", "public boolean didLastMoveWin(){\n\t\tboolean flag=false;\n\t\tif(horizontalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\tif(verticalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\tif(diagonalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\treturn flag;\n\t}", "public boolean isHandRaised ( ) {\n\t\treturn extract ( handle -> handle.isHandRaised ( ) );\n\t}", "public boolean isHolding();", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "boolean isRunningReactions()\n {\n return 0 != _currentReactionRound;\n }", "protected boolean isFinished() {\n \treturn Robot.lift.isMotionMagicNearTarget() || totalTimer.get() > 5.0;\n }", "boolean isGameComplete();", "public boolean wasHit() {\n return(_hit);\n }", "public boolean isHisTurn(UnoCard clickedCard) {\n\t\tfor (Player p : getPlayers()) {\n\t\t\tif (p.hasCard(clickedCard) && p.isMyTurn())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean takeControl() {\n\t\treturn Project2a.curState == Project2a.RobotState.Forward && Project2a.getCurTime() - 500 > MoveForward.startTime;\n\t}", "public Boolean checkCapture(ArrayList<Point> points){\n int length = points.size();\n\n for (int i = 1; i < length; i++) {\n Point lineA = points.get(i);\n\n for (int j = i + 1; j < length; j++) {\n Point lineB = points.get(j);\n\n //Check if one of the lines goes through the monster by using its size\n boolean left = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX,mY,mX,mY+monsterHeight);\n boolean right = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX + monsterWidth,mY, mX+monsterWidth,mY+monsterHeight);\n boolean top = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY, mX+monsterWidth,mY);\n boolean bottom = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY+monsterHeight, mX+monsterWidth,mY+monsterHeight);\n\n //If any are true then its captured\n if(left || right || top || bottom){\n return true;\n }\n }\n }\n return false;\n }", "public boolean isFired() {\n\t\t// TODO Auto-generated method stub\n\t\treturn shot;\n\t}", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "protected boolean isFinished() {\r\n if (lineHasBeenFound) {\r\n lineTrackTime = System.currentTimeMillis();\r\n }\r\n if(System.currentTimeMillis()-lineTrackTime > 4000){\r\n return true;\r\n }\r\n return false;\r\n }", "boolean hasWin();", "protected boolean isFinished() {\n //boolean onTarget = Math.abs(\n //encoderValue - Math.abs(Robot.arm.getArmEncoderValue())) <= RobotMap.ArmConstants.ARM_ENCODER_BUFFER;\n boolean hasBeenZeroed = Robot.arm.hasButtonBeenPressed();\n boolean onTarget = false;\n if(initialPos < setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) >= setpoint;\n }else if(initialPos >= setpoint) {\n onTarget = Math.abs(Robot.arm.getArmEncoderValue()) <= setpoint;\n }\n return this.isTimedOut() || !hasBeenZeroed || onTarget;\n }", "public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }", "protected boolean isFinished() {\n \n \tif(Math.abs(RobotMap.navx.getAngle() - this.desiredAngle) <=2) {\n \n \t\treturn true;\n \t}\n return false;\n }", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }", "public boolean extraTurn() {\n\t\tif (isPlayer1() && currentPit == 6 || !isPlayer1() && currentPit == 13) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isPlayerTurn(Move move) {\n return this.turn == move.getPlayer().getId();\n }", "protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "public boolean hasPassed(){\n return hasPassed(0);\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "public boolean hasPlayedBefore ( ) {\n\t\treturn extract ( handle -> handle.hasPlayedBefore ( ) );\n\t}", "private boolean passTurn() {\n\n\t\t// Return Boolean\n\t\tboolean ableToPassTurn = false;\n\n\t\tint playerOnTurn;\n\n\t\t// Get the playerID who is on turn\n\t\tplayerOnTurn = pTSM.playerOnTurn(gameID);\n\n\t\t// Check if the ID is equal to the playerID\n\t\ttry {\n\t\t\tif (playerOnTurn == this.userID && modelClass.gameIsWon(pTSM.getUsername(userID), gameID)) {\n\t\t\t\tthis.message = \"Het is niet jou beurt\";\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (playerOnTurn == this.userID) {\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t}\n\n\n\t\treturn ableToPassTurn;\n\t}", "protected boolean isFinished() {\n \tif (Math.abs(_finalTickTargetLeft - Robot.driveTrain.getEncoderLeft()) <= 0 &&\n \t\t\tMath.abs(_finalTickTargetRight - Robot.driveTrain.getEncoderRight()) <= 0)\n \t{\n \t\treturn true;\n \t}\n return false;\n }", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }", "public boolean isWon() {\r\n\t\tif (winner(CROSS) || winner(NOUGHT))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "boolean hasPass();", "boolean hasPass();", "public boolean won()\n {\n if (currentScore >= PigGame.GOAL)\n {\n return true;\n }\n \n else\n {\n return false;\n }\n }" ]
[ "0.7257361", "0.72159815", "0.71453774", "0.69508255", "0.6908102", "0.67742336", "0.6711286", "0.66959095", "0.6658683", "0.66488886", "0.6634738", "0.66189563", "0.66058505", "0.66022724", "0.65901786", "0.6550114", "0.6535353", "0.6522154", "0.65043366", "0.6494737", "0.64790004", "0.6474073", "0.6471171", "0.644915", "0.64479125", "0.6446614", "0.6411575", "0.63927966", "0.6388018", "0.63681465", "0.6358285", "0.63566685", "0.6352404", "0.63510287", "0.63449174", "0.6338276", "0.6332619", "0.6331874", "0.63075066", "0.630655", "0.63042116", "0.63010836", "0.6283736", "0.6281578", "0.6263543", "0.6252732", "0.6252582", "0.6250421", "0.62479484", "0.6247337", "0.6244364", "0.6243775", "0.624346", "0.62354106", "0.623511", "0.6225173", "0.6224355", "0.6214866", "0.6213862", "0.6206692", "0.61937636", "0.61886716", "0.6176497", "0.6174927", "0.61613226", "0.61603713", "0.6158547", "0.61514103", "0.6148048", "0.6134419", "0.61313254", "0.6129975", "0.6125145", "0.6121744", "0.6116049", "0.61084354", "0.61084044", "0.6105303", "0.6099744", "0.6098353", "0.6097173", "0.60911053", "0.60886645", "0.60876185", "0.6078394", "0.6071739", "0.60695463", "0.6068937", "0.6068571", "0.60635036", "0.60504866", "0.6046113", "0.60378957", "0.60355604", "0.60320604", "0.60307527", "0.60256207", "0.6023139", "0.6023139", "0.6021027" ]
0.8179076
0
Resets the Piece for future turns
public void finishCapturing() { //YOUR CODE HERE pieceCaptured = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }", "public void resetBoard() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tnew GameBoard();\n\t}", "public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\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 }", "private void resetBack(int startX, int startY, int finalX, int finalY, Piece piece, Piece opponentPiece) {\r\n\t\thistory.pop();\r\n\t\tinsertPiece(opponentPiece);\r\n\t\tthis.board[startY][startX] = this.board[finalY][finalX];\r\n\t\tpiece.setXY(startX,startY);\r\n\t\tthis.board[finalY][finalX] = opponentPiece;\r\n\t}", "public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }", "@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}", "private void resetAfterGame() {\n }", "public void reset() {\n\t\t// SimpleTools.processTrackingOutput(\"Resetting TicTacToe.\");\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard[0].length; j++) {\n\t\t\t\tcheckerboard[i][j] = EMPTY;\n\t\t\t} // Of for j\n\t\t} // Of for i\n\t\tcurrentState = 0;\n\t\tcurrentRouteLength = 1;\n\n\t\t// White first\n\t\tcurrentPlayer = WHITE;\n\t}", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\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}", "public static void setPieceTest2() {\n\t\t\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\t\t \tBoard.setBoard();\n\t\t\t\tBoard.decPieceCount();\n\t\t\t \tSystem.out.println(Board.getPieceCount());\t\n\t\t\t\tSystem.out.println(Board.move(\n\t\t\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\t\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tBoard.checkWin();\n\t\t\t\tSystem.out.println(\"Valid inputs\");\n\t\t\t\tSystem.out.println(\"OthelloBoard.clearPieces() - Begin\");\n\t\t\t\tSystem.out.println(\"Expected output: Throws exception\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t}catch(UnsupportedOperationException e){\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\");\n\t\t}", "@Override\n public void clear() {\n beginMyTurn();\n }", "public void resetMove(Move move) {\n board[move.x * LENGTH + move.y] = Player.None;\n numMoves--;\n }", "public void reset() {\n\t\t//reset player to 0\n\t\tplayer = 0;\n\t\t\n\t\tfor(int row = size - 1; row >= 0; row --)\n\t\t\tfor(int col = 0; col < size; col ++)\n\t\t\t\tfor(int dep = 0; dep < size; dep ++)\n\t\t\t\t\t//goes through all board positions and sets to -1\n\t\t\t\t\tboard[row][col][dep] = -1;\n\t}", "public void resetMove() {\n\t\tthis.moveMade = false;\n\t}", "private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "@Override\r\n\tpublic void resetBoard() {\r\n\t\tcontroller.resetGame(player);\r\n\t\tclearBoardView();\r\n\t\tif (ready)\r\n\t\t\tcontroller.playerIsNotReady();\r\n\t}", "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}", "public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "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 reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "public void reset() {\n\t board = new int[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,\n 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,\n 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2};\n\t currentPlayer = 1;\n\t turnCount = 0;\n\t for (int i=0; i<81; i++) {\n\t \n\t\t hash ^= rand[3*i+board[i]]; //row-major order\n\t \n\t }\n }", "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\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 }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "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 }", "@Override\n public void reset() {\n emptyBoard();\n drawNewTiles();\n \n moves = Assistant.WordPlay.boardFindall(board, rack, masterDictionary());\n }", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void reset(){\r\n\t\tif (moveTimer != null) moveTimer.stop();\r\n\t\tmySnake = new Snake(MAX_WIDTH/2, MAX_HEIGHT/2, MAX_WIDTH, MAX_HEIGHT);\r\n\t\tmoveSpeed = mySnake.getList().size();\r\n\t\tmoveTimer = new Timer(1000/moveSpeed, new MoveTimerHelper());\r\n\t\tmoveTimer.start();\r\n\t\tshrooms = new ArrayList<Mushroom>();\r\n\r\n\t\tignoreStrokes = 0;\r\n\t\t\r\n\t\tif (lives <= 0){\r\n\t\t\tgameOver = true;\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "public void resetBoard() {\n //sets current board to a new board\n currentBoard = new Board(7, 6);\n\n //sets all text fields back to white\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n for (int v = 0; v < currentBoard.getSizeY(); v++) {\n squares[i][v].setBackground(Color.white);\n }\n }\n //sets turn to true (first player)\n turn = true;\n }", "public void resetRenderer() {\n\n\t\tanimationComplete = true;\n\t\tif (pieceMove != null) {\n\t\t\tpieceMove.setPiece(null);\n\t\t\tpieceMove.setSquares(-99);\n\t\t}\n\t\tpieceMove = null;\n\t\tmoveFinalIndex = -999;\n\t\tmoveTempIndex = -999;\n\t\tmoveCount = -999;\n\t\tmoveCountHomeSq = 0;\n\t\trestMovedToStart = false;\n\t\tmovedToRest = false;\n\t\thomeSqMovedToHome = false;\n\n\t\tmoveToRestSq = null;\n\t\tmoveToHome = null;\n\n\t\tdiceList = new ArrayList<>();\n\t\tfor (int d = 0; d < selectedPlayer.getRuleEngine().dicePerGame(); d++) {\n\t\t\tDice newDice = createDiceInstance();\n\t\t\tnewDice.setShake(true);\n\t\t\tdiceList.add(newDice);\n\t\t}\n\n\t}", "public void reset() {\n\t\t// Reset the SwipeTile's state data.\n\t\tstartTime = System.nanoTime();\n\t\t// Reset the Tile's State.\n\t\ttileState = defaultTileState;\n\t\t// Reset the opacity\n\t\topacity = 1;\n\t\t// Refresh the arrow's Texture.\n\t\trefreshArrow();\n\t}", "protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}", "public void reset() {\n\t\tmakeSolutionState();\n\t\twhile (isSolution(this.gameBoard)) {\n\t\t\trandomizeBoard();\n\t\t}\n\t\tlog.clear();\n\t\twon =false;\n\t\twasReset=true;\n\t\t\n\t\tsetChanged();\n\t\tnotifyObservers();\t\t\n\t}", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }", "public void restart() {\n this.getPlayerHand().getHandCards().clear();\n this.dealerHand.getHandCards().clear();\n this.getPlayerHand().setActualValue(0);\n this.getDealerHand().setActualValue(0);\n this.gameOver = false;\n this.playerBet = MIN_BET;\n this.roundCount = 0;\n this.isRunning = true;\n this.startGame();\n }", "private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "public void resetGame(){\n initBoard(ROWS, COLS, rand);\n }", "@Override\n public void reset() {\n mMoveButtonActive = true;\n mMoveButtonPressed = false;\n mFireButtonPressed = false;\n droidHitPoints = 0;\n totalKillCollectPoints = 0;\n totalCollectNum = 0;\n// mCoinCount = 0;\n// mRubyCount = 0;\n mTotalKillCollectPointsDigits[0] = 0;\n mTotalKillCollectPointsDigits[1] = -1;\n mTotalCollectNumDigits[0] = 0;\n mTotalCollectNumDigits[1] = -1;\n totalKillCollectPointsDigitsChanged = true;\n totalCollectNumDigitsChanged = true;\n// mCoinDigits[0] = 0;\n// mCoinDigits[1] = -1;\n// mRubyDigits[0] = 0;\n// mRubyDigits[1] = -1;\n// mCoinDigitsChanged = true;\n// mRubyDigitsChanged = true;\n \n levelIntro = false;\n// mLevelIntro = false;\n \n mFPS = 0;\n mFPSDigits[0] = 0;\n mFPSDigits[1] = -1;\n mFPSDigitsChanged = true;\n mShowFPS = false;\n for (int x = 0; x < mDigitDrawables.length; x++) {\n mDigitDrawables[x] = null;\n }\n// mXDrawable = null;\n mFadePendingEventType = GameFlowEvent.EVENT_INVALID;\n mFadePendingEventIndex = 0;\n }", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "private void resetValidMove()\n {\n validMoves = null;\n setToValidMoveColor = false;\n validMoveFlag = false;\n }", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "void refillCards() {\n if (this.gameDeck.isEmpty() && !this.wonDeck.isEmpty()) {\n this.wonDeck.shufffle();\n Deck temp = this.gameDeck;\n this.gameDeck = this.wonDeck;\n this.wonDeck = temp;\n\n }\n\n }", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}", "public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "public TicTacToe() {\n resetBoard();\n }", "void clear() {\n _whoseMove = WHITE;\n _gameOver = false;\n\n for (int i = 0; i <= MAX_INDEX; i += 1) {\n set(i, BLACK);\n }\n for (int i : _initWhite) {\n set(i, WHITE);\n }\n set(12, EMPTY);\n _history.clear();\n\n setInitialDirection(MAX_INDEX);\n\n setChanged();\n notifyObservers();\n }", "public void reset() {\n for (int r = 0; r < size; r++) {\n for (int c = 0; c < size; c++) {\n board[r][c] = null;\n }\n }\n }", "public void gameReset() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setText(\"\");\r\n\t\t\t\tsquares[n][m].setBackground(Color.BLUE);\r\n\t\t\t\tsquares[n][m].setEnabled(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(true);\r\n\t\t\tbuttons[a].setBackground(Color.BLACK);\r\n\r\n\t\t}\r\n\t\tif (gameType == 2) {\r\n\t\t\tboard();\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\tindex[i] = 6;\r\n\t\t\t}\r\n\r\n\t\t} else if (gameType == 1) {\r\n\t\t\tcompAI.setUpArray(ROW, COL);\r\n\t\t}\r\n\t}", "private void resetGame(){\n\n }", "@Override\n public void reset(MiniGame game) {\n }", "private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }", "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}", "public void reset() {\n\tthis.contents = \"\";\n\tthis.isLegalMove = false;\n }", "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 }", "public void resetGame() { \n\t\tInvokeMessage im = new InvokeMessage();\n\t\tim.setMethodName(\"doResetGame\");\n\t\tSheepPhysicsState sps = getSps();\n\t\tnew InvokeCallable(im, sps);\n\t}", "public void newTurn() {\r\n\t\tthis.money = 0;\r\n\t\tthis.blackTurns = 1;\r\n\t\tthis.blueTurns = 0;\r\n\t\tthis.purpleTurns = 0;\r\n\t\tthis.brownTurns = 0;\r\n\t\tthis.redTurns = 0;\r\n\t}", "public void clearBoard() \n {\n\tfor(int i=0;i<rows;i++)\n\t {\n\t\tfor(int j=0;j<cols;j++)\n\t\t {\n\t\t\tfrontBoard[i][j] = \"00\";\n\t\t\tbackBoard[i][j] = \"00\";\n\t\t }\n\t }\n\tunused = new Piece[pieces.length];\n\tfor(int i=0;i<pieces.length;i++)\n\t {\n\t\t\tunused[i] = pieces[i];\n\t }\n }", "public void reset() {\n\t\ttilePath.clear();\n\t}", "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 }", "public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\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 reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "void fullReset();", "public void changePiece() {\n if (piece == 1) {\n piece = 2;\n } else {\n piece = 1;\n }\n //System.out.println(\"Nu ben ik piece \" + piece);\n }", "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 void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "private static void hold(int piece){\n\t\tholdPiece = piece;\n\t\tMain.hold();\n\t}", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\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}", "@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 ResetGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeComputerHand();\n InitializeHumanHand();\n\n topCard = deck.get(0);\n }", "public void RefillDeck()\n\t{\n\t\tRefillDeck(false);\n\t}", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "@Override\n\tpublic void reset(ReadOnlyBoard board, Counter player, Boolean undoPossible) {\n\n\t}", "public void clearCommand() {\r\n _board = new Board();\r\n _playing = false;\r\n }", "public void resetModel() {\n\t\twhitePieces.removeAll();\n\t\tblackPieces.removeAll();\n\t\tcapturedPieces.removeAll(capturedPieces);\n\t\tmoveList.removeAll(moveList);\n\n\t\tinitializeBoard();\n\t\tpopulateLists();\n\t}" ]
[ "0.79925495", "0.76180434", "0.74326044", "0.7364091", "0.73159575", "0.7224876", "0.7118113", "0.703382", "0.70151734", "0.69597554", "0.69110656", "0.68902725", "0.6850069", "0.68184227", "0.6810416", "0.67906094", "0.6789526", "0.6782259", "0.67794603", "0.6775979", "0.67595494", "0.6753496", "0.6733523", "0.67278445", "0.67237157", "0.6710064", "0.66862935", "0.667604", "0.66708636", "0.66640157", "0.6653276", "0.6649847", "0.66319436", "0.66202486", "0.66082853", "0.6600255", "0.65985054", "0.659376", "0.6575753", "0.6573913", "0.6568603", "0.6567222", "0.65627396", "0.6558108", "0.6533625", "0.6532377", "0.65314794", "0.6516547", "0.65090907", "0.65023243", "0.6494407", "0.64939207", "0.64835984", "0.6475912", "0.6469214", "0.64691937", "0.6468323", "0.64571595", "0.64370084", "0.64322877", "0.6431304", "0.64261025", "0.64236385", "0.6419209", "0.6417844", "0.6405108", "0.6383484", "0.63811123", "0.63768077", "0.6374718", "0.6372373", "0.636841", "0.63586825", "0.63460976", "0.63418776", "0.63406515", "0.63397676", "0.6335863", "0.6335827", "0.6331984", "0.63277936", "0.6326991", "0.6323926", "0.63129425", "0.63116854", "0.63110185", "0.6309141", "0.63033587", "0.62991196", "0.62926304", "0.62895083", "0.6287961", "0.62869173", "0.62790674", "0.62772924", "0.626377", "0.62607354", "0.6254228", "0.62485665", "0.62468636", "0.62455904" ]
0.0
-1
Get configuration from database
public interface ConfigurationService { /** * Get configuration by key * * @param configKey * @return */ Configuration getConfigByKey(String configKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getDbConfig(){\n return properties.getProperty(\"dbconfig\");\n }", "private static Configuration getConfigurationFromDb(int conf_id) {\n FrontEndDBInterface db = new FrontEndDBInterface();\n return db.getConfigInformation(conf_id);\n }", "private static Configuration getConfigurationFromDb(String conf_id) {\n FrontEndDBInterface f = new FrontEndDBInterface();\n Configuration config = f.getConfigInformation(Integer.parseInt(conf_id));\n return config;\n }", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "@RolesAllowed(RolesConstants.ADMIN_MANAGE_SETTINGS)\n @Override\n public Configuration getDbConfiguration() {\n return getRepository().getDbConnectionManager().getSqlSessionFactory().getConfiguration();\n }", "private void GetConfigDetails() {\n\t\tCursor c = database.rawQuery(\"select * from config\", null);\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\r\n\t\t\t\t\tmuUid = c.getString(c.getColumnIndex(\"id\"));\r\n\t\t\t\t\tmuUsername = c.getString(c.getColumnIndex(\"username\"));\r\n\t\t\t\t\tmuPassword = c.getString(c.getColumnIndex(\"password\"));\r\n\t\t\t\t\tmuFname = c.getString(c.getColumnIndex(\"fname\"));\r\n\t\t\t\t\tmuLname = c.getString(c.getColumnIndex(\"lname\"));\r\n\t\t\t\t\tmuEmail = c.getString(c.getColumnIndex(\"email\"));\r\n\t\t\t\t\tmuMobile = c.getString(c.getColumnIndex(\"mobile\"));\r\n\t\t\t\t\tmuUrl = c.getString(c.getColumnIndex(\"url\"));\r\n\t\t\t\t\tmuRole = c.getString(c.getColumnIndex(\"role\"));\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\t}", "public Vector getConfigurations() {\n return getConfigurations(DEFAULT_DB_CONFIG_TABLE);\n }", "@Override\n public Configuration getConfiguration(Connection connection, Long configID) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"SELECT * FROM Configuration WHERE configurationID = ?;\";\n ps = connection.prepareStatement(insertSQL);\n ps.setLong(1, configID);\n ResultSet rs = ps.executeQuery();\n \n // Check if the result is empty\n if(!rs.isBeforeFirst()){\n return null;\n }\n \n Configuration configuration = new Configuration();\n rs.next();\n configuration.setConfigurationID(rs.getLong(\"configurationID\"));\n configuration.setDisplayName(rs.getString(\"displayName\"));\n configuration.setDefaultType(rs.getString(\"defaultType\"));\n configuration.setDefaultArg1(rs.getString(\"defaultArg1\"));\n configuration.setDefaultArg2(rs.getString(\"defaultArg2\"));\n \n return configuration;\n }\n catch(Exception ex){\n //ex.printStackTrace();\n System.out.println(\"Exception in ConfigurationDaoImpl.getConfiguration()\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n \n return null;\n }\n }", "private Properties getDbProperties() {\n if (dbProperties == null) {\n // like ~/Dropbox/ACM-UWR/config.properties\n File propertiesFile = getSandbox().inputFile(pathsProvider.getProgramConfigFile().toPath());\n if (propertiesFile.exists()) {\n try {\n BufferedInputStream in = new BufferedInputStream(\n new FileInputStream(propertiesFile));\n Properties props = new Properties();\n props.load(in);\n dbProperties = props;\n } catch (IOException e) {\n throw new RuntimeException(\"Unable to load configuration file: \"\n + propertiesFile.getName(), e);\n }\n }\n }\n return dbProperties;\n }", "private String[] getConfiguration() {\n String[] result = new String[6];\n // Query the latest configuration file made and send it back in an array of strings\n String query = \"SELECT * FROM configuration ORDER BY configuration_id DESC LIMIT 1\";\n sendQuery(query);\n try {\n if(resultSet.next()) {\n for (int i = 1; i < 7; i++) {\n result[i-1] = resultSet.getString(i);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public Vector getConfigurations(String table) {\n if (HAVE_DB) {\n Vector configs = new Vector();\n try {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n\n ResultSet rs = stmt.executeQuery(\"SELECT configName FROM \"+table);\n while(rs.next()) {\n configs.addElement(rs.getString(1));\n }\n rs.close();\n stmt.close();\n con.close();\n } catch (SQLException sqle) {\n System.out.println(\"setup getConfigurations SQLException: \"+sqle);\n System.out.println(\"Trouble interacting with vizConfig database table\");\n System.exit(-2);\n }\n return configs;\n }\n else {\n return new Vector();\n }\n }", "public interface DatabaseConfiguration {\n\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:38): escrever javadoc\n\t *\n\t * @return\n\t */\n\tDatabaseTypes getDatabaseType();\n\t\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:40): escrever javadoc\n\t *\n\t * @return\n\t * @throws DatabaseConfigurationException {@link RuntimeException} throw when not retrieve connection.\n\t */\n\tConnection getConnection();\n\t\n}", "public Config getConfig();", "public void loadConfiguration() {\n Properties prop = new Properties();\n String propFileName = \".env_\" + this.dbmode.name().toLowerCase();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n if (inputStream != null) {\n prop.load(inputStream);\n } else {\n System.err.println(\"property file '\" + propFileName + \"' not found in the classpath\");\n }\n this.jdbc = prop.getProperty(\"jdbc\");\n this.host = prop.getProperty(\"host\");\n this.port = prop.getProperty(\"port\");\n this.database = prop.getProperty(\"database\");\n this.user = prop.getProperty(\"user\");\n this.password = prop.getProperty(\"password\");\n // this.sslFooter = prop.getProperty(\"sslFooter\");\n } catch (Exception e) {\n System.err.println(\"can't read property file\");\n }\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "ConfigData selectByPrimaryKey(Integer id);", "@Override\n public DataSourceConfiguration getConfiguration() {\n return configuration;\n }", "public ConnectionConfiguration loadConnectionConfiguration(){\n\t\tConnectionConfiguration savedconfig = null;\n\t\ttry {\n\t\t FileInputStream propInFile = new FileInputStream( getConnConfigFile());\n\t\t Properties p = new Properties();\n\t\t p.load( propInFile );\n\n\t\t String server = p.getProperty(\"server\");\n\t\t String user = p.getProperty(\"user\");\n\t\t String passwd = p.getProperty(\"passwd\");\n\t\t \n\t\t if (server != null & user != null & passwd != null){\n\t\t\t savedconfig = new ConnectionConfiguration();\n\t\t\t savedconfig.setServer(server);\n\t\t\t savedconfig.setUser(user);\n\t\t\t savedconfig.setPasswd(passwd);\n\t\t }\n\t\t \n\t\t }\n\t\t catch ( FileNotFoundException e ) {\n\t\t //createConnectionConfigurationDialog(Resources.getString(\"msg_no_config_file\"));\n\t\t }\n\t\t catch ( IOException e ) {\n\t\t //createConnectionConfigurationDialog(Resources.getString(\"msg_config_file_not_readable\"));\n\t }\n\t\t return savedconfig; \n\t}", "public static String getDbProps(){\n return properties.getProperty(\"dbprops\");\n }", "public HashMap<Integer, String> getPLNConfigurationFiles() throws SQLException{\n\t\tConnection dbConnection = null;\n\t\tHashMap<Integer,String> configurationFiles = new HashMap<Integer,String>(); \n\n\t\ttry {\t\t\t\t\t\t\t\n\t\t\tString configUrlQuery = \"SELECT config_url, id from plnmonitor.pln\";\n\n\t\t\tdbConnection = getDBConnection();\n\n\t\t\tStatement stmt = dbConnection.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(configUrlQuery);\n\t\t\twhile (rs.next()) {\n\t\t\t\tconfigurationFiles.put(rs.getInt(\"id\"),rs.getString(\"config_url\"));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Please check that the database is running and/or plnmonitor has been properly configured:\");\n\t\t\tLOGGER.error(\"$ java -jar plnmonitor-daemon.jar config\");\n\n\t\t\tLOGGER.error(e.getMessage());\n\t\t} finally {\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\t\t}\n\t\treturn (configurationFiles);\n\t}", "JpaConfig getJpaConfig();", "EntityConfiguration getConfiguration();", "Database getDatabase(Properties properties, ApplicationContext applicationContext);", "static Connection getDatabaseConnection(String path_to_config_json) {\n if (connection == null) {\n Gson gson = new Gson();\n Reader reader;\n try {\n reader = new FileReader(path_to_config_json);\n } catch (FileNotFoundException e) {\n logger.info(\"FileNotFoundException: \" + e.getMessage());\n return null;\n }\n DatabaseConfig config = gson.fromJson(reader, DatabaseConfig.class);\n logger.info(\"Connecting to database \" + config.database + \"...\");\n String username = config.username;\n String password = config.password;\n String database = String.format(\"%s%s:%s/%s%s\", config.jdbc_prefix, config.host, config.port,\n config.database, config.jdbc_setting);\n try {\n connection = DriverManager.getConnection(database, username, password);\n connection.setAutoCommit(false);\n logger.info(\"Connected to \" + config.database);\n } catch (Exception e) {\n logger.info(\"Cannot connect to database:'\" + database + \"' with error \" + e.getMessage());\n }\n }\n return connection;\n }", "@Override\n protected Configration doInBackground(String... params) {\n return TerminalDatabase.getInstance(ConfigrationActivity.this).daoAccess().fetchConfigration(\"1\");\n }", "private final static void getProp() {\n try(InputStream fis = ConnectionBDD.class.getClassLoader().getResourceAsStream(\"conf.properties\")){\n \n props.load(fis);\n \n Class.forName(props.getProperty(\"jdbc.driver.class\"));\n \n url = props.getProperty(\"jdbc.url\");\n login = props.getProperty(\"jdbc.login\");\n password = props.getProperty(\"jdbc.password\");\n \n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }", "@Override\n\tpublic boolean checkdbconfig() {\n\t\t// get path\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tString dbconfig = \"\";\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\tfileInputStreamSystemSettings = new FileInputStream(dbpath);\n\t\t\ttry {\n\t\t\t\tprop.load(fileInputStreamSystemSettings);\n\t\t\t\tdbconfig = prop.getProperty(\"jdbc.dbconfig\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileInputStreamSystemSettings.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif (dbconfig.equalsIgnoreCase(\"Y\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static JdbcOption getDefaultDatabaseFromFile(String configFile) throws Exception {\n\t\tJdbcOption jdbc = new JdbcOption();\n\n\t\tDocument document;\n\t\tFile file = new File(configFile);\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tfactory.setNamespaceAware(true);\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tdocument = builder.parse(file);\n\n\t\tElement root = document.getDocumentElement();\n\n\t\tNodeList nodeList = root.getElementsByTagName(Constants.XML_TAG_DATASOURCE);\n\t\tfor (int i = 0; i < nodeList.getLength(); i++) {\n\t\t\tNode node = nodeList.item(i);\n\t\t\tNamedNodeMap attrs = node.getAttributes();\n\t\t\tString isDefault = getText(attrs, Constants.XML_TAG_DEFAULT);\n\n\t\t\tif (!\"\".equals(nullToString(isDefault)) && Boolean.valueOf(nullToString(isDefault))) {\n\t\t\t\t// isDefault 값이 null이 아니고 true인 경우 - default return\n\t\t\t\tString name = getText(attrs, Constants.XML_TAG_NAME);\n\t\t\t\tString type = getText(attrs, Constants.XML_TAG_TYPE);\n\t\t\t\tString driverJar = getText(attrs, Constants.XML_TAG_DRIVER_PATH);\n\t\t\t\tString driverClassName = getText(attrs, Constants.XML_TAG_DRIVER_CLASS_NAME);\n\t\t\t\tString url = getText(attrs, Constants.XML_TAG_URL);\n\t\t\t\tString username = getText(attrs, Constants.XML_TAG_USERNAME);\n\t\t\t\tString password = EncryptUtil.decrypt(getText(attrs, Constants.XML_TAG_PASSWORD));\n\t\t\t\tString schema = getText(attrs, Constants.XML_TAG_SCHEMA);\n\t\t\t\tString dialect = getText(attrs, Constants.XML_TAG_DIALECT);\n\t\t\t\tString driverGroupId = getText(attrs, Constants.XML_TAG_DRIVER_GROUPID);\n\t\t\t\tString driverArtifactId = getText(attrs, Constants.XML_TAG_DRIVER_ARTIFACTID);\n\t\t\t\tString driverVersion = getText(attrs, Constants.XML_TAG_DRIVER_VERSION);\n\t\t\t\tString useDbSpecific = getText(attrs, Constants.XML_TAG_USE_DB_SPECIFIC);\n\t\t\t\tString runExplainPlan = getText(attrs, Constants.XML_TAG_RUN_EXPLAIN_PLAN);\n\n\t\t\t\tjdbc.setDbName(name);\n\t\t\t\tjdbc.setDbType(type);\n\t\t\t\tjdbc.setDriverJar(driverJar);\n\t\t\t\tjdbc.setDriverClassName(driverClassName);\n\t\t\t\tjdbc.setUrl(url);\n\t\t\t\tjdbc.setUserName(username);\n\t\t\t\tjdbc.setPassword(password);\n\t\t\t\tjdbc.setSchema(schema);\n\t\t\t\tjdbc.setDialect(dialect);\n\t\t\t\tjdbc.setMvnGroupId(driverGroupId);\n\t\t\t\tjdbc.setMvnArtifactId(driverArtifactId);\n\t\t\t\tjdbc.setMvnVersion(driverVersion);\n\t\t\t\tjdbc.setUseDbSpecific(Boolean.valueOf(useDbSpecific));\n\t\t\t\tjdbc.setRunExplainPaln(Boolean.valueOf(runExplainPlan));\n\t\t\t\tjdbc.setDefault(Boolean.valueOf(isDefault));\n\t\t\t}\n\t\t}\n\t\treturn jdbc;\n\t}", "protected Config getConfig () {\n return this.conf;\n }", "public List<Configuration> getAll();", "public DataSource getConfigDatasource() {\n return configDatasource;\n }", "private static HashMap<String, String> settings() {\n HashMap<String, String> settings = new HashMap<String, String>();\n settings.put(\"db.default.url\", \"jdbc:mysql://api.template-java.com:3306/play_test\");\n settings.put(\"db.default.username\", \"root\");\n settings.put(\"db.default.password\", \"\");\n settings.put(\"db.default.jndiName\", \"DefaultDS\");\n settings.put(\"jpa.default\", \"mySqlPersistenceUnit\");\n return(settings);\n }", "public abstract String getConfig();", "public static SQLDBConfig getInstance () {\n\t\tif ( sqldbconf == null ) {\n\t\t\tsynchronized ( SQLDBConfig.class ) {\n\t\t\t\tsqldbconf = new SQLDBConfig ();\n\t\t\t}\n\t\t}\n\t\treturn sqldbconf;\n\t}", "public Configuration GetConfigurationFromProject(String idProject) {\n\t\t//\n\t\treturn this.jdbcTemplate.queryForObject(\n\t\t\t\t\"select TOP 1 * from configurationCrawlers where idProject = \" + idProject + \" ORDER BY id DESC\",\n\t\t\t\tnew ConfigurationMapper());\n\t}", "public static Connection getDBConnection(){\n\t\tConnection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*InputStream is = DBConfig.class.getClass().\r\n\t\t\t\t\tgetResourceAsStream(\"/resources/db.properties\");\r\n\t\t\tprop.load(is);\r\n\t\t\tClass.forName(prop.getProperty(\"drivername\"));\r\n\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"jdbcurl\"),\r\n\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));*/\r\n\t\t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"fred\",\"flintstone\");\r\n\t\t\t/*Statement stmt = conn.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT LOCATION_NAME FROM LOCATIONS\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(\"LOCATION_NAME\"));\r\n\t\t\t}*/\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} /*catch (FileNotFoundException e){\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t\t\r\n\t\treturn conn;\r\n\t}", "public String getDatabase() {\r\n \t\treturn properties.getProperty(KEY_DATABASE);\r\n \t}", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public String getConfig();", "public String getPropertyDACConfig();", "public static Config getConfig(){\n return _Config;\n }", "public DatabaseConfig(String conf) throws InvalidConnectionDataException {\n if (conf == null) {\n throw new InvalidConnectionDataException();\n }\n\n HashMap<String, String> map = new HashMap<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(conf))) {\n stream.forEach(line -> addToMap(line, map));\n } catch (IOException e) {\n throw new InvalidConnectionDataException();\n }\n assignFields(map);\n validateFields();\n }", "public String readDataSourcePreferences(){\n\n String dataSourceURL = \"\";\n\n // Get the preferences\n final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences( context );\n\n Boolean dataSourceEnabled = sharedPreferences.getBoolean(\"data_source_check\", false);\n String dataSourcePreference = sharedPreferences.getString( \"data_source\", \"\" );\n\n if ( dataSourceEnabled ) {\n Log.d(\"DATA SOURCE\", sharedPreferences.getString(\"data_source\", \"\"));\n if ( dataSourcePreference.equals( \"Ninguna\" ) ) {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n else {\n dataSourceURL = dataSourcePreference;\n }\n }\n else {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n\n return dataSourceURL;\n }", "MrpConfigSettingsEntity selectByPrimaryKey(Integer id);", "@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public C getConfig()\n {\n return config;\n }", "public static void readDBProps()\n throws Exception\n {\n BufferedReader br = new BufferedReader(new FileReader(\"/home/ujjwal/Rasp_Dev/Service/db_mdas.properties\"));\n\t \n Properties props = new Properties();\n props.load(br);\n targetDB = props.getProperty(\"target.db\").trim();\n System.out.println(\"Target DB :\" + getTargetDB());\n dbClass = props.getProperty(targetDB + \".\" + \"dbClass\").trim();\n dbURL = props.getProperty(targetDB + \".\" + \"dbURL\").trim();\n dbUser = props.getProperty(targetDB + \".\" + \"dbUser\").trim();\n dbPass = props.getProperty(targetDB + \".\" + \"dbPass\").trim();\n port = Integer.parseInt(props.getProperty(\"port\"));\n time = Integer.parseInt(props.getProperty(\"time\"));\n gt_cnt = Integer.parseInt(props.getProperty(\"gate_count\"));\n g1 = (props.getProperty(\"gate1\"));\n g2 = (props.getProperty(\"gate2\"));\n g3 = (props.getProperty(\"gate3\"));\n imei = (props.getProperty(\"imei\"));\n System.out.println(dbClass);\n System.out.println(dbURL);\n System.out.println(dbUser);\n Class.forName(dbClass);\n \n //Class.forName(\"com.mysql.jdbc.Driver\");\n }", "public BusinessConfig findBusinessConfig(Connection conn, String businessKey)\r\n/* 31: */ throws SQLException\r\n/* 32: */ {\r\n/* 33: 52 */ return this.dao.findBusinessConfig(conn, businessKey);\r\n/* 34: */ }", "public ConnectionConfig getConnectionConfig()\n {\n return _connectionConfig;\n }", "ConfigBlock getConfig();", "RepositoryConfiguration getRepositoryConfiguration();", "public static List<JdbcOption> getDatabaseListFromFile(String configFile) throws Exception {\n\t\tList<JdbcOption> result = new ArrayList<JdbcOption>();\n\n\t\tDocument document;\n\t\tFile file = new File(configFile);\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tfactory.setNamespaceAware(true);\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tdocument = builder.parse(file);\n\n\t\tElement root = document.getDocumentElement();\n\n\t\tNodeList nodeList = root.getElementsByTagName(Constants.XML_TAG_DATASOURCE);\n\t\tfor (int i = 0; i < nodeList.getLength(); i++) {\n\t\t\tJdbcOption jdbc = new JdbcOption();\n\n\t\t\tNode node = nodeList.item(i);\n\t\t\tNamedNodeMap attrs = node.getAttributes();\n\n\t\t\tString name = getText(attrs, Constants.XML_TAG_NAME);\n\t\t\tString type = getText(attrs, Constants.XML_TAG_TYPE);\n\t\t\tString driverJar = getText(attrs, Constants.XML_TAG_DRIVER_PATH);\n\t\t\tString driverClassName = getText(attrs, Constants.XML_TAG_DRIVER_CLASS_NAME);\n\t\t\tString url = getText(attrs, Constants.XML_TAG_URL);\n\t\t\tString username = getText(attrs, Constants.XML_TAG_USERNAME);\n\t\t\tString password = EncryptUtil.decrypt(getText(attrs, Constants.XML_TAG_PASSWORD));\n\t\t\tString schema = getText(attrs, Constants.XML_TAG_SCHEMA);\n\t\t\tString dialect = getText(attrs, Constants.XML_TAG_DIALECT);\n\t\t\tString driverGroupId = getText(attrs, Constants.XML_TAG_DRIVER_GROUPID);\n\t\t\tString driverArtifactId = getText(attrs, Constants.XML_TAG_DRIVER_ARTIFACTID);\n\t\t\tString driverVersion = getText(attrs, Constants.XML_TAG_DRIVER_VERSION);\n\t\t\tString useDbSpecific = getText(attrs, Constants.XML_TAG_USE_DB_SPECIFIC);\n\t\t\tString runExplainPlan = getText(attrs, Constants.XML_TAG_RUN_EXPLAIN_PLAN);\n\t\t\tString isDefault = getText(attrs, Constants.XML_TAG_DEFAULT);\n\n\t\t\tjdbc.setDbName(name);\n\t\t\tjdbc.setDbType(type);\n\t\t\tjdbc.setDriverJar(driverJar);\n\t\t\tjdbc.setDriverClassName(driverClassName);\n\t\t\tjdbc.setUrl(url);\n\t\t\tjdbc.setUserName(username);\n\t\t\tjdbc.setPassword(password);\n\t\t\tjdbc.setSchema(schema);\n\t\t\tjdbc.setDialect(dialect);\n\t\t\tjdbc.setMvnGroupId(driverGroupId);\n\t\t\tjdbc.setMvnArtifactId(driverArtifactId);\n\t\t\tjdbc.setMvnVersion(driverVersion);\n\t\t\tjdbc.setUseDbSpecific(Boolean.valueOf(useDbSpecific));\n\t\t\tjdbc.setRunExplainPaln(Boolean.valueOf(runExplainPlan));\n\t\t\tjdbc.setDefault(Boolean.valueOf(isDefault));\n\n\t\t\tresult.add(jdbc);\n\t\t}\n\t\treturn result;\n\t}", "private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "public Database getDatabase() {\n\t\tDatabase database = null;\n\t\t//TODO fail when more than one provider was found?\n\t\ttry {\n\t\t\tIterator<Database> databaseProviders = loader.iterator();\n\t\t\twhile (database == null && databaseProviders.hasNext()) {\n\t\t\t\tdatabase = databaseProviders.next();\n\t\t\t\tlog.debug(\"Found database service provider {\" + database.getClass() + \"}\");\n\t\t\t}\n\t\t} catch (ServiceConfigurationError serviceError) {\n\t\t\tserviceError.printStackTrace();\n\t\t}\n\t\tif (database == null) {\n\t\t\tthrow new RuntimeException(\"Could not find database provider.\");\n\t\t}\n\t\treturn database;\n\t}", "public String getConfiguration(){\n\t\treturn this.config;\n\t}", "@Bean\r\n public DataSource getDataSource() throws IOException {\r\n\tDriverManagerDataSource dataSource = new DriverManagerDataSource();\r\n\tProperties prop = new Properties();\r\n\tString propFileName = \"config.propertise\";\r\n\r\n\tinputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\r\n\r\n\tif (inputStream != null) {\r\n\t prop.load(inputStream);\r\n\t} else {\r\n\t throw new FileNotFoundException(\"property file '\" + propFileName + \"' not found in the classpath\");\r\n\t}\r\n\r\n\tString url = prop.getProperty(\"database.url\");\r\n\tString driver = prop.getProperty(\"database.driver\");\r\n\tString username = prop.getProperty(\"database.username\");\r\n\tString password = prop.getProperty(\"database.password\");\r\n\r\n\tdataSource.setDriverClassName(driver);\r\n\tdataSource.setUrl(url);\r\n\tdataSource.setUsername(username);\r\n\tdataSource.setPassword(password);\r\n\r\n\treturn dataSource;\r\n }", "public QueryConfigHandler getQueryConfigHandler() {\n return config;\n }", "public static String getConfiguration(String key) {\r\n PersistenceManager pm = PMF.getPersistenceManager();\r\n Query query = pm.newQuery(Configuration.class, \"key == \" + key);\r\n query.setUnique(true);\r\n Configuration config = (Configuration) query.execute(query);\r\n return config.getValue();\r\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "String getDatabase();", "@Override\r\n\tpublic BaseConfig selectByPrimaryKey(Integer id) {\n\t\treturn baseConfigMapper.selectByPrimaryKey(id);\r\n\t}", "public ServiceCosmosDbConfigurationInfo cosmosDbConfiguration() {\n return this.cosmosDbConfiguration;\n }", "public Parameters getConfigParameters();", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() {\n return getDatabaseSettings;\n }", "public String getDatabase();", "Database getDataBase() {\n return database;\n }", "Object getDB();", "public Config getConfig() {\n return config;\n }", "public static void configuration() {\n\t\tProperties prop = new Properties();\n\t\tOutputStream output = null;\n\t\tInputStream input = null;\n\t\tString url = \"\", username = \"\", password;\n\t\tboolean test = false;\n\n\t\ttry {\n\t\t\tFile config = new File(configDirectory);\n\t\t\tif (!config.exists()) {\n\t\t\t\twhile (!test) {\n\t\t\t\t\toutput = new FileOutputStream(configDirectory);\n\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.print(\"Configuration in progress, please answer the next set of questions to setup your database.\"\n\t\t\t\t\t\t\t\t\t+ \"\\n\"\n\t\t\t\t\t\t\t\t\t+ \"\\nDatabase URL: (Default localhost:3306/<database name>)\");\n\t\t\t\t\turl = UserInput.stringUserInput();\n\n\t\t\t\t\tSystem.out.print(\"Database Username: \");\n\t\t\t\t\tusername = UserInput.stringUserInput();\n\n\t\t\t\t\tSystem.out.print(\"Database password: \");\n\t\t\t\t\tpassword = UserInput.stringUserInput();\n\n\t\t\t\t\tDatabaseManager.setUrl(\"jdbc:mariadb://\" + url);\n\t\t\t\t\tDatabaseManager.setUser(username);\n\t\t\t\t\tDatabaseManager.setPass(password);\n\n\t\t\t\t\ttest = DatabaseManager.testDatabaseConnection();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDatabaseManager.createDB();\n\n\t\t\t\ttest = false;\n\n\t\t\t\tString adminPassword = \"\", adminPasswordVerify;\n\n\t\t\t\twhile (!test) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.print(\"Admin Account Password for Application: \");\n\t\t\t\t\tadminPassword = HashGeneratorUtils.generateHash(UserInput\n\t\t\t\t\t\t\t.stringUserInput());\n\n\t\t\t\t\tSystem.out.print(\"Verify Admin Password for Application: \");\n\t\t\t\t\tadminPasswordVerify = UserInput.stringUserInput();\n\n\t\t\t\t\ttest = HashGeneratorUtils.hashCompareTest(\n\t\t\t\t\t\t\tadminPasswordVerify, adminPassword);\n\t\t\t\t}\n\n\t\t\t\t// set the properties value\n\t\t\t\tprop.setProperty(\"database\", \"jdbc:mariadb://\" + url);\n\t\t\t\tprop.setProperty(\"adminpass\", adminPassword);\n\n\t\t\t\t// save properties to project folder\n\t\t\t\tprop.store(output, null);\n\t\t\t} else {\n\t\t\t\tinput = new FileInputStream(configDirectory);\n\n\t\t\t\t// load the property file\n\t\t\t\tprop.load(input);\n\n\t\t\t\t// get and set the property value\n\t\t\t\tDatabaseManager.setUrl(prop.getProperty(\"database\"));\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private DatabaseConnectionService() {\n ds = new HikariDataSource();\n ds.setMaximumPoolSize(20);\n ConfigProperties configProperties = ConfigurationLoader.load();\n if (configProperties == null) {\n throw new RuntimeException(\"Unable to read the config.properties.\");\n }\n ds.setDriverClassName(configProperties.getDatabaseDriverClassName());\n ds.setJdbcUrl(configProperties.getDatabaseConnectionUrl());\n ds.addDataSourceProperty(\"user\", configProperties.getDatabaseUsername());\n ds.addDataSourceProperty(\"password\", configProperties.getDatabasePassword());\n ds.setAutoCommit(false);\n }", "public ConfigurationManagement getConfig() {\r\n\t\treturn config;\r\n\t}", "public Collection<Configuration> findAll() {\n\t\treturn this.configurationRepository.findAll();\n\t}", "public static Config getConfig() {\r\n\t\treturn cfg;\r\n\t}", "C getConfiguration();", "public MessageConfiguration retrieveMessageConfigurationByQryCriteria(MessageConfigQryCriteria messageConfigQryCriteria);", "public Object getConfig() {\n return config;\n }", "private void createDbConfig (String address) {\n\t\tProperties dbConfig = new Properties();\n\t\t\n\t\t/*\n\t\t * Load any previous version of the property file at the address.\n\t\t */\n\t\tFile dbConfigFile = new File(address);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Creates file/directory if it could not be found\n\t\t\t */\n\t\t\tif(dbConfigFile.getParentFile().mkdirs()) System.err.println(\"[WARNING] Database properties directory location was missing and has been created.\");\n\t\t\tif(dbConfigFile.createNewFile()) System.err.println(\"[WARNING] Database properties file was missing and has been created.\");\n\t\t\t\n\t\t\tFileReader dbConfigReader = new FileReader(dbConfigFile);\n\t\t\tdbConfig.load(dbConfigReader);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR]: Could not initialize database properties file: \" + address);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Check to see if any properties are missing.\n\t\t */\n\t\tif(!dbConfig.containsKey(\"useLocal\")) dbConfig.put(\"useLocal\", \"true\");\n\t\t\n\t\t//AWS DynamoDB settings\n\t\tif(!dbConfig.containsKey(\"dynamoDbAccessKey\")) dbConfig.put(\"dynamoDbAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbSecretKey\")) dbConfig.put(\"dynamoDbSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbEndpoint\")) dbConfig.put(\"dynamoDbEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbRegion\")) dbConfig.put(\"dynamoDbRegion\", \"\");\n\t\t\n\t\t//AWS KMS settings\n\t\tif(!dbConfig.containsKey(\"kmsAccessKey\")) dbConfig.put(\"kmsAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsSecretKey\")) dbConfig.put(\"kmsSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsEndpoint\")) dbConfig.put(\"kmsEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsRegion\")) dbConfig.put(\"kmsRegion\", \"\");\n\t\t\n\t\t//Google Drive Settings\n\t\tif(!dbConfig.containsKey(\"driveClientId\")) dbConfig.put(\"driveClientId\", \"\");\n\t\tif(!dbConfig.containsKey(\"driveClientSecret\")) dbConfig.put(\"driveClientSecret\", \"\");\n\t\t\n\n\t\tthis.databaseConfig = dbConfig;\n\t\t\n\t\t/*\n\t\t * Save any changes\n\t\t */\n\t\tthis.saveDbConfig();\n\t}", "private JTable getConfigurationTable() {\n if (configurationTable == null) {\n DefaultTableModel configurationModel = new DefaultTableModel() {\n public boolean isCellEditable(int row, int col) {\n return col == 1;\n }\n };\n configurationModel.addColumn(\"Key\");\n configurationModel.addColumn(\"Value\");\n configurationTable = new JTable(configurationModel);\n \n Enumeration keys = currentConfig.keys();\n while (keys.hasMoreElements()) {\n String key = (String) keys.nextElement();\n String value = currentConfig.getProperty(key);\n Vector row = new Vector(2);\n row.add(key);\n row.add(value);\n configurationModel.addRow(row);\n }\n }\n return configurationTable;\n }", "public interface DBConfig_I {\r\n\r\n /**\r\n * Dateformat the user sends<br/>\r\n * If the DAO receives a DTO that has a column of type DATE/TIMESTAMP\r\n * then it looks up this format to \"know\" the syntax.\r\n * \r\n * @return Java Dateformat\r\n */\r\n public String getGUIDateFormat();\r\n \r\n/**\r\n * This is how the SQL database wants a date to be<br/>\r\n * This depends on the datasource one is using.<br/>\r\n * And it only applies, if one uses a String coded Date,\r\n * recommended is *always* to use a PreparedStatement and a\r\n * setDate()<br/>\r\n * \r\n * @return format of the SQL date\r\n */\r\n public String getSQLDateFormat();\r\n \r\n /**\r\n * User set a Timestamp (as String) inside a DTO<br/>\r\n * \r\n * @return Java Dateformat \r\n */\r\n \r\n public String getGUITimestampFormat();\r\n \r\n/**\r\n * This is how the database \"wants\" a Timestamp in String representation\r\n * \r\n * @return sql timestamp format, *very* database and country dependend...\r\n */\r\n public String getSQLTimestampFormat();\r\n \r\n public String getSQLTimestampFormatQuery();\r\n \r\n/**\r\n * java.sql.Connection\r\n * \r\n * For each instance of this class -> only one connection\r\n * \r\n * This means every call to \"getConnection\" will return the *same*\r\n * Connection object.\r\n * \r\n * This saves massively ressources, but has some other severe drawbacks!\r\n * \r\n * @return instance of java.sql.Connection\r\n */\r\n public Connection getConnection();\r\n \r\n public String getDatabaseType();\r\n \r\n/**\r\n * Class that creates a unique primary key<br/>\r\n * \r\n * Needed, since almost every database has its own mechanism\r\n * to provide a unique numeric value (Autonum, Sequence...)\r\n * \r\n * @return fully qualified classname of the primary key creator\r\n */\r\n public String getPKCClass();\r\n \r\n}", "public static JdbcOption getDefaultDatabase(ProjectConfig projectConfig) throws Exception {\n\t\treturn getDefaultDatabaseFromFile(projectConfig.getDatabasesPath() + Constants.FILE_SEPERATOR + Constants.DB_SETTINGS_XML_FILE);\n\t}", "@Bean\n\tpublic DataSource getDataSource() {\n\t\tEmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();\n\t\tEmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL)\n\t\t\t\t.addScript(\"crate-db.sql\")\n\t\t\t\t.addScript(\"insert-db.sql\")\n\t\t\t\t.build();\n\t\treturn db;\n\t}", "protected Configuration getConfiguration(){\n return configuration;\n }", "public ConfigurationHolder getConfiguration() {\n return this.cfg;\n }", "public ConfigCommon getConfig() {\n return config;\n }", "public Object\tgetConfiguration();", "private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "Configuration getConfigByKey(String configKey);", "public abstract Configuration configuration();", "public String getConfiguration()\r\n\t{\r\n\t\treturn _configuration; \r\n\t}", "public int get(int id) {\r\n return configurations[id];\r\n }", "public static Configuration getConfiguration() {\r\n\t\treturn config;\r\n\t}", "private Configuration getConfiguration() {\n return getPackageData().getConfiguration();\n }", "RootConfig getConfig();", "public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}", "public interface ConfigurationService\n{\n /**\n * 根据配置名称查询配置项, 名称需要唯一\n * @param configName\n * @return\n */\n Configuration selectByConfigName(String configName);\n\n}" ]
[ "0.76334524", "0.7472197", "0.7188032", "0.6987251", "0.6897536", "0.6798064", "0.67953414", "0.6699242", "0.6658738", "0.6536337", "0.6441133", "0.64261883", "0.6409851", "0.6399263", "0.6389567", "0.63638484", "0.63444227", "0.6255721", "0.62379175", "0.62116075", "0.6208581", "0.6193686", "0.61687803", "0.61310524", "0.6117646", "0.6117353", "0.6108101", "0.608226", "0.60771525", "0.6057712", "0.6050288", "0.60410184", "0.60358214", "0.602984", "0.60104877", "0.5997753", "0.59870625", "0.59870625", "0.59870625", "0.59870625", "0.59689647", "0.5965481", "0.59518254", "0.59434927", "0.59298825", "0.59231985", "0.5905921", "0.5893249", "0.58801556", "0.5873165", "0.5867773", "0.5860221", "0.5856812", "0.5854054", "0.5848496", "0.58432835", "0.58404505", "0.5840311", "0.58331984", "0.5828671", "0.58233047", "0.5822129", "0.5816598", "0.5813852", "0.58006114", "0.5781522", "0.57670516", "0.5762442", "0.5759747", "0.57513595", "0.5740208", "0.57294023", "0.57195145", "0.5704384", "0.57023025", "0.5674098", "0.56705856", "0.5669955", "0.5666785", "0.5663884", "0.5659681", "0.56567436", "0.5653416", "0.5653071", "0.5647892", "0.5647047", "0.5642001", "0.5641891", "0.56412023", "0.5639717", "0.56372255", "0.5636761", "0.5634504", "0.5623828", "0.56211513", "0.56201273", "0.5612044", "0.56052333", "0.5597408", "0.5591816", "0.5583641" ]
0.0
-1
Get configuration by key
Configuration getConfigByKey(String configKey);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object lookupConfigurationEntry(String key);", "public static String getConfiguration(String key) {\r\n PersistenceManager pm = PMF.getPersistenceManager();\r\n Query query = pm.newQuery(Configuration.class, \"key == \" + key);\r\n query.setUnique(true);\r\n Configuration config = (Configuration) query.execute(query);\r\n return config.getValue();\r\n }", "String getSettingByKey(String key);", "public String get(String key) {\n\t\tInstant start = Instant.now();\n\t\tString value = getConfig(key);\n\t\tLOGGER.debug(\"Access to config {} to get {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn value;\n\t}", "String get(String key) {\n return settings.get(key);\n }", "public Object get(String key) {\r\n\t\treturn settings.get(key);\r\n\t}", "private String get(String key)\n {\n return settings.getProperty(key);\n }", "public static String getParam(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.get(key);\n }", "public String getConfig(String configKey) {\n\t\t// Do something if key doesn't exist\n\t\t\n\t\treturn serverOptions.get(configKey);\n\t}", "public String get(String key) {\n return cache.containsKey(key) ? cache.get(key) : customConfig.getString(key);\n }", "public static String getConfigValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"config\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "String getSettingByKey(HawkularUser user, String key);", "public String getConfigProperties(String key) {\n String value = null;\n try {\n FileReader fileReader=new FileReader(System.getProperty(\"user.dir\")+\"/src/main/resources/config.properties\");\n Properties properties=new Properties();\n properties.load(fileReader);\n value= properties.getProperty(key);\n }catch (Exception e){\n e.printStackTrace();\n }\n return value;\n }", "public static String get(String key){\n\t\tif(sys_cfg == null){\n\t\t\tsys_cfg = new Configuration(\"text.properties\");\n\t\t}\n\t\tString value = sys_cfg.getValue(key);\n\t\treturn value;\n\t}", "public static String GetConfigData(String key) throws ConfigurationException {\r\n\r\n PropertiesConfiguration properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//configuration.properties\");\r\n return properties.getString(key);\r\n }", "public static String readConfigValue(Context context, String key) {\n Resources resources = context.getResources();\n try {\n InputStream inputStream = resources.openRawResource(R.raw.config);\n Properties properties = new Properties();\n properties.load(inputStream);\n return properties.getProperty(key);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }", "@Override\n\tpublic Object get(Object key) throws Exception {\n\t\treturn propertyConfigMapper.selectByPrimaryKey(key);\n\t}", "public Optional<String> safeGet(String key) {\n\t\tInstant start = Instant.now();\n\t\tOptional<String> result;\n\t\ttry {\n\t\t\tresult = Optional.of(get(key));\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: an Optional.empty() will be returned\", key);\n\t\t\tresult = Optional.empty();\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to safeGet {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\n\t\treturn result;\n\t}", "public String getConfigurationKey() {\n return configurationKey;\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public Object get(String key) {\n return options.get(key);\n }", "public interface ConfigurationService {\n /**\n * Get configuration by key\n *\n * @param configKey\n * @return\n */\n Configuration getConfigByKey(String configKey);\n}", "public ConfigProperty get(final String key) {\n ArgumentChecker.notNull(key, \"key\");\n return _properties.get(key);\n }", "public String getProperty(String key) {\r\n \tif (mConfig.containsKey(key)){\r\n \t\treturn mConfig.getProperty(key);\r\n \t}else{\r\n \t\tSystem.out.println(\"[ERROR] Not defined property key: \" + key);\r\n \t\treturn null;\r\n \t}\r\n \r\n }", "public String getSetting(String key) throws SQLException {\n\t\treturn db.selectItem(\"value\", \"settings\", \"`key`='\"+key+\"'\");\n\t}", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public String getMandatoryString(String key) throws ConfigNotFoundException;", "String getSettingByKey(String key, String defaultValue);", "@Override\r\n\tpublic String getSystemConfig(String key) {\n\t\treturn sysConfigService.getValueBykey(key);\r\n\t}", "public String get(HelixConfigScope scope, String key) {\n Map<String, String> map = get(scope, Arrays.asList(key));\n if (map != null) {\n return map.get(key);\n }\n return null;\n }", "protected String getConfigurationValue(String key) throws KKException\n {\n try\n {\n if (getEng() != null)\n {\n return getConfigMgr().getConfigurationValue(false, key);\n }\n return getAdminConfigMgr().getConfigurationValue(key);\n } catch (KKException kke)\n {\n throw kke;\n } catch (Exception e)\n {\n throw new KKException(e);\n }\n }", "@Override\n public String getString(String key) {\n \n if (overrideConfig.containsKey(key)) {\n return overrideConfig.get(key);\n }\n \n return ConfigurationFactory.getConfiguration().getString(key);\n }", "public Config getConfig();", "public static Configuration paramConfigTree(String key) {\n return getCurrentConfig().getConfigTree(key);\n }", "public String getURL(String key) {\n return propertiesConfiguration.getString(key);\n }", "String getSettingByKey(HawkularUser user, String key, String defaultValue);", "public static String get(String key) {\n return properties.getProperty(key);\n }", "public static List getList(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.getList(key);\n }", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public int get(int id) {\r\n return configurations[id];\r\n }", "Object getProperty(String key);", "public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\n\t\t// Key not in file based settings, try classpath settings instead\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n */\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}", "public Object getOption(String key) {\n\t\tint index = propertyKeys.indexOf(key);\n\t\tif (index == -1)\n throw new IllegalArgumentException(\"Unknown option \" + key);\n\t\treturn currentOption.get(index);\n\t}", "public String getValue(final String key) {\n\n\t\treturn config.getString(StringUtils.lowerCase(key));\n\t\t\t}", "public boolean getBoolean( String key )\n {\n boolean value = false;\n try\n {\n if (config != null)\n {\n value = config.getBoolean(key);\n LOG.debug( \"getBoolean name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getBoolean invalid config, can't read prop [{}], using default [{}]\", key, false );\n }\n }\n catch (java.util.NoSuchElementException e )\n {\n LOG.debug( \"getBoolean - no such element [{}], using default [{}]\", key, false );\n }\n return value;\n }", "Object get(String key);", "Object get(String key);", "@Override\n\tpublic String queryByKey(String key) {\n\t\treturn settingDao.queryByKey(key);\n\t}", "public abstract String getConfigurationFolderKey();", "public String getConfigurationValue(Enum<?> key) {\n // get string key\n String keyStr = key.toString();\n\n // get value\n String value = this.getConfigurationValue(keyStr);\n\n return value;\n }", "public String getConfigurationValue(String name);", "public String readConfiguration(String path);", "public String getProperty(Class type, String key);", "public Object get(String key);", "public static Object getConfigValue(Map config, String key) {\n return getConfigValue(config, key, null);\n }", "@Override\r\n\tpublic String getProperty(String key) {\r\n\t\t\r\n\t\treturn Settings.getProperty(key);\r\n\t\t\r\n\t}", "public abstract String getConfig();", "@NonNull\n public String getString(String key) {\n return mConfigurations.optString(key, \"\");\n }", "public Object get(String path) {\n if (configuration.contains(path))\n return configuration.get(path);\n else return defaultConfig.get(path);\n }", "public String getConfigurationValue(String key) {\n // format property key\n String propertyKey = key;\n if (this.PROPERTY_PART != null) {\n propertyKey = MessageFormat.format(key, new Object[] { this.PROPERTY_PART });\n }\n\n // get value\n String value = this.CONFIGURATION.get(propertyKey);\n\n // trim value\n if (value != null) {\n value = value.trim();\n\n // set as null if empty string\n if (value.length() == 0) {\n value = null;\n }\n }\n\n this.LOGGER.logDebug(new Object[] { \"Extracted configuration for key: \", propertyKey, \" value: \", value },\n null);\n\n return value;\n }", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public abstract T get(String key);", "public interface IConfigurationProvider {\r\n String get(String path);\r\n}", "public String getOrElse(String key, String defaultValue) {\n\t\tInstant start = Instant.now();\n\t\tString result;\n\t\ttry {\n\t\t\tresult = get(key);\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: the default value {} will be returned\", key, defaultValue);\n\t\t\tresult = defaultValue;\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to getOrElse {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn result;\t\t\n\t}", "private DataSource getDataSource(DataSourceConfig key) {\n\t\tDataSource dataSource = adminService.getComponent(key.getBeanName(), DataSource.class);\n\t\treturn dataSource;\n\t}", "String getEnvironmentProperty(String key);", "Object get(Object key);", "public static Object get(String key) {\n return prefs.contains(key) ? prefs.getAll().get(key):null;\n }", "public static String getProperty(String key) {\n\t\tString val = properties.getProperty(key);\n\t\tif (val == null) {\n\t\t\tAlert.raise(null, \"Unable to find config property named '\" + key + \"' in \"\n\t\t\t\t\t+ Configuration.configFileName);\n\t\t}\n\t\treturn val;\n\t}", "T get(String key);", "Map<String, Object> readConfig(Request request, String id);", "T get(@NonNull String key);", "public CommandConfig getCommandConfig(String command) {\n command = command.toLowerCase();\n if(!commands.containsKey(command)) {\n return null;\n }\n\n return commands.get(command);\n }", "private String getApiKey() throws IOException {\n Properties prop = new Properties();\n InputStream loader = getClass().getClassLoader().getResourceAsStream(\"config.properties\");\n prop.load(loader);\n\n return prop.getProperty(\"apiKey\");\n }", "public String get(String key, String def)\n {\n return settings.getProperty(key, def);\n }", "ParameterConfiguration getParameterConfiguration(String name);", "public static String getSetting(Context context, String key) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n return sp.getString(key, null);\n\n }", "public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }", "public String getConfig();", "public static String GetData(String key) throws Exception {\r\n PropertiesConfiguration properties;\r\n if (GetConfigData(\"getDataFromEnvironment\").equals(\"testEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//testEnvironment.properties\");\r\n } else if (GetConfigData(\"getDataFromEnvironment\").equals(\"sandboxEnvironment\")) {\r\n properties = new PropertiesConfiguration(\r\n System.getProperty(\"user.dir\") + \"//src//test//resource//dataRepo//sandboxEnvironment.properties\");\r\n } else {\r\n throw new Exception(\"mentioned environment is not iplemented to get data\");\r\n }\r\n\r\n return properties.getString(key);\r\n }", "Option<AcHost> findByKey(String key) throws Throwable;", "public static String getParam(String key, String dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.get(key, dfault);\n }", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "public T get(K key);", "public BusinessConfig findBusinessConfig(Connection conn, String businessKey)\r\n/* 31: */ throws SQLException\r\n/* 32: */ {\r\n/* 33: 52 */ return this.dao.findBusinessConfig(conn, businessKey);\r\n/* 34: */ }", "public Value get(Key key);", "public CachedConfig get(String path) {\n return confs.get(path);\n }", "String getOptionsOrThrow(\n String key);", "String getOptionsOrThrow(\n String key);", "String getOptionsOrThrow(\n String key);", "public static String loadProperty(String key) {\n Properties prop = new Properties();\n InputStream is;\n\n try {\n is = new FileInputStream(\"./config.properties\");\n prop.load(is);\n } catch (IOException e) {\n System.out.println(\"Error al cargar el archivo\");\n }\n\n return prop.getProperty(key);\n }", "public Object get(Object key)\r\n\t{\r\n\r\n\t\tint index;\r\n\t\tString orDefault = null;\r\n\t\tString k = (String) key;\r\n\t\tif ((index = k.indexOf(DEFAULT_ID)) > 0) {\r\n\t\t\torDefault = k.substring(index+DEFAULT_ID.length());\r\n\t\t\tk = k.substring(0,index);\r\n\t\t\tkey = k;\r\n\t\t}\r\n\t\tValidate.notEmpty(k, \"Empty key passed as parameter for call to get(key)\");\r\n\t\tif ((index = k.indexOf(':')) > 0 && index < k.length() - 1) {\r\n\t\t\tif (index == LANG_REF.length() && k.startsWith(LANG_REF)) {\r\n\t\t\t\treturn new LanguageLocale().getLang(this,k);\r\n\t\t\t} else if (index == REPLACE_REF.length() && k.startsWith(REPLACE_REF)) {\r\n\t\t\t\treturn org.xmlactions.action.utils.StringUtils.replace(this, replace(k));\r\n\t\t\t} else if (index == THEME_REF.length() && k.startsWith(THEME_REF)) {\r\n\t\t\t\treturn getThemeValueQuietly(k.substring(index + 1));\r\n\t\t\t} else if (index == APPLICATIONCONTEXT_REF.length() && k.startsWith(APPLICATIONCONTEXT_REF)) {\r\n\t\t\t\treturn getApplicationContext().getBean(k.substring(index + 1));\r\n\t\t\t} else if (index == CODE_REF.length() && k.startsWith(CODE_REF)) {\r\n\t\t\t\tCodeParser codeParser = new CodeParser();\r\n\t\t\t\treturn codeParser.parseCode(this, k.substring(index + 1));\r\n\t\t\t} else {\r\n\t\t\t\tMap<String, Object> map = getMap(k.substring(0, index));\r\n\t\t\t\tif (map != null) {\r\n\t\t\t\t\tString [] keys = k.substring(index + 1).split(\"/\");\r\n\t\t\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\t\t\tk = keys[keyIndex];\r\n\t\t\t\t\t\tObject obj = map.get(k);\r\n\t\t\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t String s = (String)obj;\r\n\t if (s.startsWith(\"${\") && s.indexOf(k) == 2) {\r\n\t obj = \"[\" + k + \"]\";\r\n\t } else {\r\n\t obj = replace((String)obj);\r\n\t }\r\n\t\t\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\t\t\treturn obj;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn obj;\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\treturn orDefault;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString [] keys = k.split(\"/\");\r\n\t\t\tObject obj = null;\r\n\t\t\tMap map = null;\r\n\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\tk = keys[keyIndex];\r\n\r\n\t\t\t\tif (keyIndex == 0) {\r\n\t\t\t\t\tif (rootMap.containsKey(k)) {\r\n\t\t\t\t\t\tobj = rootMap.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (applicationContext != null) {\r\n\t\t\t\t\t\t\t\tobj = applicationContext.getBean((String)k);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Throwable t) {\r\n\t\t log.info(t.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (map.containsKey(k)) {\r\n\t\t\t\t\t\tobj = map.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t\t\t\t\tobj = replace((String)obj);\r\n\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t}\r\n\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn orDefault;\r\n\t\t}\r\n\t}", "public static String getProperty (String key) {\n return SystemProperties.getProperty(key);\n }", "public boolean getMandatoryBoolean(String key) throws ConfigNotFoundException;" ]
[ "0.80461556", "0.7845842", "0.73940957", "0.72880244", "0.6830015", "0.68245107", "0.6771834", "0.6766857", "0.6735118", "0.6681937", "0.6642401", "0.66110057", "0.65918446", "0.6489649", "0.648038", "0.6459914", "0.6457625", "0.6431876", "0.6430591", "0.6345703", "0.6345703", "0.6345703", "0.63245857", "0.63149667", "0.62603873", "0.6236464", "0.6209797", "0.6192357", "0.6190457", "0.61784667", "0.61518353", "0.6150602", "0.6064317", "0.6062749", "0.6039639", "0.6035259", "0.6023156", "0.6016139", "0.60021013", "0.59774464", "0.597588", "0.5962878", "0.5962173", "0.59538555", "0.5953391", "0.59523654", "0.5941348", "0.5934693", "0.5926587", "0.5926587", "0.5924444", "0.59244245", "0.5920575", "0.5904473", "0.5892993", "0.58808255", "0.586884", "0.58422005", "0.5830693", "0.5829222", "0.58258003", "0.58093745", "0.58053005", "0.578801", "0.578801", "0.578801", "0.578801", "0.57797706", "0.5777943", "0.5772413", "0.5770557", "0.57659554", "0.5761469", "0.5759512", "0.57559514", "0.5753055", "0.5752574", "0.5736613", "0.57171535", "0.5714505", "0.57041425", "0.5702726", "0.5692166", "0.5689914", "0.56861854", "0.56836486", "0.56626457", "0.5662184", "0.5660639", "0.5660096", "0.5659035", "0.56495947", "0.56480116", "0.5646232", "0.5646232", "0.5646232", "0.5643223", "0.56430286", "0.5640869", "0.5638162" ]
0.83242697
0
TODO Autogenerated method stub
public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\Users\\Samsung\\Documents\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.manage().timeouts().pageLoadTimeout(20,TimeUnit.SECONDS); try { driver.get("https://www.nasdaq.com/extended-trading/afterhours-mostactive.aspx"); } catch(Exception x) { } Actions A = new Actions(driver); A.moveToElement(driver.findElement(By.xpath("//a[@id='show-all']/span"))).click().build().perform(); int count = driver.findElements(By.xpath("//div[@id='_declined']/table/tbody/tr")).size(); System.out.println(count); ArrayList<String> SymbolMostDeclined=new ArrayList<String>(); ArrayList<String> CompanyMostDeclined=new ArrayList<String>(); ArrayList<String> LastSaleMostDeclined=new ArrayList<String>(); ArrayList<String> ChangeNetMostDeclined=new ArrayList<String>(); ArrayList<String> ShareVolumeMostDeclined=new ArrayList<String>(); SymbolMostDeclined.add("Symbol"); CompanyMostDeclined.add("Company"); LastSaleMostDeclined.add(" Last Sale "); ChangeNetMostDeclined.add(" Net Change "); ShareVolumeMostDeclined.add("Share Volume"); for(int i = 1; i <= count; i++) { String Xpath = "//div[@id='_declined']/table/tbody/tr[" + String.valueOf(i) + "]/td[1]/h3/a"; //System.out.println(Xpath); SymbolMostDeclined.add(driver.findElement(By.xpath(Xpath)).getText()); Xpath = "//div[@id='_declined']/table/tbody/tr[" + String.valueOf(i) + "]/td[2]/b"; CompanyMostDeclined.add(driver.findElement(By.xpath(Xpath)).getText()); Xpath = "//div[@id='_declined']/table/tbody/tr[" + String.valueOf(i) + "]/td[4]"; LastSaleMostDeclined.add(driver.findElement(By.xpath(Xpath)).getText()); Xpath = "//div[@id='_declined']/table/tbody/tr[" + String.valueOf(i) + "]/td[5]"; String test = driver.findElement(By.xpath(Xpath)).getText(); if(test.contains("unch")) { ChangeNetMostDeclined.add(test); } else { Xpath += "/span"; String className = driver.findElement(By.xpath(Xpath)).getAttribute("class"); // System.out.println("testing >>>>>>>> " + className ); String value = driver.findElement(By.xpath(Xpath)).getText(); value.replace("[?]", ""); if(className.contains("green")) { value += " Up "; } else { value += " Down "; } ChangeNetMostDeclined.add(value); } Xpath = "//div[@id='_declined']/table/tbody/tr[" + String.valueOf(i) + "]/td[6]"; ShareVolumeMostDeclined.add(driver.findElement(By.xpath(Xpath)).getText()); //SymbolMostActive.add(driver.findElement(By.xpath("//div[@id='_active']/table/tbody/tr[i]/td[1]/h3/a")).getText()); } // for(String obj:SymbolMostDeclined) { // System.out.println(obj); // } // // for(String obj:CompanyMostDeclined) { // System.out.println(obj); // } // for(String obj:LastSaleMostDeclined) { // System.out.println(obj); // } // for(String obj:ChangeNetMostDeclined) { // System.out.println(obj); // } // for(String obj:ShareVolumeMostDeclined) { // System.out.println(obj); // } //System.out.println(count); driver.close(); XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet sheet = workbook.createSheet("Most-Declined"); for(int i = 0; i <= count; i++) { Row row = sheet.createRow(i); int col = 0; Cell cell = row.createCell(col++); cell.setCellValue((String) SymbolMostDeclined.get(i)); cell = row.createCell(col++); cell.setCellValue((String) CompanyMostDeclined.get(i)); cell = row.createCell(col++); cell.setCellValue((String) LastSaleMostDeclined.get(i)); cell = row.createCell(col++); cell.setCellValue((String) ChangeNetMostDeclined.get(i)); cell = row.createCell(col++); cell.setCellValue((String) ShareVolumeMostDeclined.get(i)); } try { FileOutputStream outputStream = new FileOutputStream(MostDeclinedFile); workbook.write(outputStream); workbook.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } System.out.println("Done"); }
{ "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
This test checks that the iterators that are returned by GetElements are consistent Previously there were bugs in some stores (2519) where calling GetElements would change the data in the store This meant that the iterator would work when first used, but returned no results when used again Given
@Test @TraitRequirement(StoreTrait.VISIBILITY) public void shouldHaveConsistentIteratorWithVisibilityAndNoAggregation() throws Exception { final Graph noAggregationGraph = createGraphVisibilityNoAggregation(); final Entity testEntity = new Entity(TestGroups.ENTITY, "A"); noAggregationGraph.execute(new AddElements.Builder() .input(testEntity) .build(), getUser()); // When final Iterable<? extends Element> elementsIterator = noAggregationGraph.execute(new GetElements.Builder() .input(new EntitySeed("A")) .view(new View.Builder() .entity(TestGroups.ENTITY) .build()) .build(), getUser()); final Entity expectedEntity = testEntity; expectedEntity.putProperty(TestTypes.VISIBILITY, ""); // Then // Create a new iterator that should have 1 result, A final Iterator<? extends Element> firstIt = elementsIterator.iterator(); assertThat(firstIt.hasNext()).isTrue(); assertThat(firstIt.next()).isEqualTo(expectedEntity); // Check that a new iterator still has a result and the first GetElements did not change any data final Iterator<? extends Element> secondIt = elementsIterator.iterator(); assertThat(secondIt.hasNext()).isTrue(); assertThat(secondIt.next()).isEqualTo(expectedEntity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test19() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1339,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test19\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n NodeListIterator nodeListIterator0 = IteratorUtils.nodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(false, nodeListIterator0.hasNext());\n }", "@Test\n public void test27() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1348,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test27\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getNodeValue();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) null);\n assertEquals(false, iterator0.hasNext());\n }", "@Test\n public void test4() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1350,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test4\");\n OrderedIterator<Object> orderedIterator0 = IteratorUtils.emptyOrderedIterator();\n assertEquals(false, orderedIterator0.hasNext());\n }", "@Test\n public void test3() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(578,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test3\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n NodeListIterator nodeListIterator0 = new NodeListIterator((Node) iIOMetadataNode0);\n boolean boolean0 = nodeListIterator0.hasNext();\n assertEquals(false, boolean0);\n }", "@Test\n public void test17() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1337,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test17\");\n LinkedHashSet<Object> linkedHashSet0 = new LinkedHashSet<Object>();\n ResettableIterator<Object> resettableIterator0 = IteratorUtils.loopingIterator((Collection<?>) linkedHashSet0);\n assertEquals(false, resettableIterator0.hasNext());\n }", "@Test\n public void test4() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(579,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test4\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n iIOMetadataNode0.insertBefore((Node) iIOMetadataNode0, (Node) iIOMetadataNode0);\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n boolean boolean0 = nodeListIterator0.hasNext();\n assertEquals(true, boolean0);\n }", "@Test\n public void whenAddThreeDifferentElementsThenSetHasThreeTheSameElements() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "@Test\n public void test5() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(580,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test5\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n // Undeclared exception!\n try {\n nodeListIterator0.next();\n fail(\"Expecting exception: NoSuchElementException\");\n \n } catch(NoSuchElementException e) {\n //\n // underlying nodeList has no more elements\n //\n }\n }", "@Test\n public void test11() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1331,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test11\");\n Properties[] propertiesArray0 = new Properties[2];\n ResettableListIterator<Properties> resettableListIterator0 = IteratorUtils.arrayListIterator(propertiesArray0, 0, 0);\n assertNotNull(resettableListIterator0);\n assertEquals(false, resettableListIterator0.hasNext());\n }", "@Test\r\n\tpublic void testIterator()\r\n\t{\r\n\t\tInteger[] results =\r\n\t\t{ 5, 7, 3 };\r\n\t\tint i = 0;\r\n\t\tfor (Integer item : threeElementsInOrder)\r\n\t\t{\r\n\t\t\tassertEquals(results[i], item);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\n public void testIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "@Test\n public void test8() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1354,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test8\");\n Integer[] integerArray0 = new Integer[9];\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.arrayListIterator(integerArray0);\n assertEquals(true, resettableListIterator0.hasNext());\n }", "@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(581,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test6\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n iIOMetadataNode0.insertBefore((Node) iIOMetadataNode0, (Node) iIOMetadataNode0);\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(true, nodeListIterator0.hasNext());\n \n nodeListIterator0.next();\n assertEquals(false, nodeListIterator0.hasNext());\n }", "@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1328,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test0\");\n HashMap<String, StringTokenizer>[] hashMapArray0 = (HashMap<String, StringTokenizer>[]) Array.newInstance(HashMap.class, 3);\n ObjectArrayListIterator<HashMap<String, StringTokenizer>> objectArrayListIterator0 = new ObjectArrayListIterator<HashMap<String, StringTokenizer>>(hashMapArray0, 0, 0);\n List<HashMap<String, StringTokenizer>> list0 = IteratorUtils.toList((Iterator<? extends HashMap<String, StringTokenizer>>) objectArrayListIterator0);\n LoopingListIterator<HashMap<String, StringTokenizer>> loopingListIterator0 = new LoopingListIterator<HashMap<String, StringTokenizer>>(list0);\n ListIterator<HashMap<String, StringTokenizer>> listIterator0 = IteratorUtils.unmodifiableListIterator((ListIterator<HashMap<String, StringTokenizer>>) loopingListIterator0);\n assertEquals(false, listIterator0.hasPrevious());\n }", "@Test\n public void Board_creteHouseAndStoreArray_shouldCreateArrayList()\n {\n int actual = 0;\n Iterator<Integer> iterator = sut.getHousesAndStores();\n int expected = sut.getBoardRows()*sut.getBoardHousesPerSide() + sut.getStoreSize();\n while(iterator.hasNext())\n {\n iterator.next();\n actual++;\n }\n assertEquals(expected,actual);\n }", "@Test\n public void test18() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1338,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test18\");\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.loopingListIterator((List<Integer>) linkedList0);\n assertEquals(false, resettableListIterator0.hasPrevious());\n }", "@Test\n public void test22() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1343,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test22\");\n Properties[] propertiesArray0 = new Properties[9];\n ResettableIterator<Properties> resettableIterator0 = IteratorUtils.arrayIterator(propertiesArray0);\n Iterable<Properties> iterable0 = IteratorUtils.asIterable((Iterator<? extends Properties>) resettableIterator0);\n assertNotNull(iterable0);\n }", "public void testIter() {\r\n sl.add(song1);\r\n sl.add(song2);\r\n sl.add(song3);\r\n\r\n assertTrue(iter.hasNext());\r\n assertEquals(iter.next(), song1);\r\n assertTrue(iter.hasNext());\r\n assertEquals(iter.next(), song2);\r\n assertTrue(iter.hasNext());\r\n assertEquals(iter.next(), song3);\r\n assertFalse(iter.hasNext());\r\n }", "@Test\n public void testGetElmtlReactions_IParticle() {\n System.out.println(\"getElmtlReactions of order 1\");\n IParticle p = new Particle(0, 3, new double[]{0, 0, 0});\n int[] expElmtlRkToCheck_id = new int[]{8};\n double[] expElmtlRkToCheck_p = new double[]{1.4999998876330523E-7};\n int expNCounts = 1;\n\n Iterator<IElementalReactionToCheck> resultIter = elementalReactionManager.getElmtlReactions(p);\n int counter = 0;\n while (resultIter.hasNext()) {\n\n IElementalReactionToCheck elmtlRkToCheck = resultIter.next();\n System.out.println(\"elmtlRkToCheck_id: \" + elmtlRkToCheck.get_elmtlRkId() + \" p: \" + elmtlRkToCheck.get_p());\n assertEquals(expElmtlRkToCheck_id[counter], elmtlRkToCheck.get_elmtlRkId());\n assertEquals(expElmtlRkToCheck_p[counter], elmtlRkToCheck.get_p(), 0.0001);\n counter++;\n }\n assertEquals(expNCounts, counter);\n\n p = new Particle(0, 5, new double[]{0, 0, 0});\n expElmtlRkToCheck_id = new int[]{10};\n expElmtlRkToCheck_p = new double[]{1.5999998714821828E-7};\n expNCounts = 1;\n\n resultIter = elementalReactionManager.getElmtlReactions(p);\n counter = 0;\n while (resultIter.hasNext()) {\n\n IElementalReactionToCheck elmtlRkToCheck = resultIter.next();\n System.out.println(\"elmtlRkToCheck_id: \" + elmtlRkToCheck.get_elmtlRkId() + \" p: \" + elmtlRkToCheck.get_p());\n assertEquals(expElmtlRkToCheck_id[counter], elmtlRkToCheck.get_elmtlRkId());\n assertEquals(expElmtlRkToCheck_p[counter], elmtlRkToCheck.get_p(), 0.0001);\n counter++;\n }\n assertEquals(expNCounts, counter);\n\n p = new Particle(0, 10, new double[]{0, 0, 0});\n expElmtlRkToCheck_id = new int[]{15};\n expElmtlRkToCheck_p = new double[]{6.999999757617559E-8};\n expNCounts = 1;\n\n resultIter = elementalReactionManager.getElmtlReactions(p);\n counter = 0;\n while (resultIter.hasNext()) {\n\n IElementalReactionToCheck elmtlRkToCheck = resultIter.next();\n System.out.println(\"elmtlRkToCheck_id: \" + elmtlRkToCheck.get_elmtlRkId() + \" p: \" + elmtlRkToCheck.get_p());\n assertEquals(expElmtlRkToCheck_id[counter], elmtlRkToCheck.get_elmtlRkId());\n assertEquals(expElmtlRkToCheck_p[counter], elmtlRkToCheck.get_p(), 0.0001);\n counter++;\n }\n assertEquals(expNCounts, counter);\n\n\n }", "@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "@Override\r\n\tprotected void runTest() throws Throwable {\n\t\tList<Node> element = null;\r\n\t\ttry {\r\n\t\t\tSelectors selectors = new Selectors(new W3CNode(_page));\r\n\t\t\telement = (List<Node>) selectors.querySelectorAll(_elementSelector);\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\t// it ain't there\r\n\t\t\tfail(\"DOM element \" + _elementSelector + \" must exist \" + _n + \" times\");\r\n\t\t}\r\n\r\n\t\t// make sure the element exists\r\n\t\tassertEquals(\"DOM element \" + _elementSelector + \" must exist \" + _n + \" times\", _n, element.size());\r\n\t}", "@Test\n public void test12() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1332,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test12\");\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator0 = IteratorUtils.emptyMapIterator();\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator1 = IteratorUtils.unmodifiableMapIterator(mapIterator0);\n assertNotSame(mapIterator1, mapIterator0);\n }", "@Test\n public void test10() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1330,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test10\");\n HashMap<String, StringTokenizer>[] hashMapArray0 = (HashMap<String, StringTokenizer>[]) Array.newInstance(HashMap.class, 3);\n ObjectArrayListIterator<HashMap<String, StringTokenizer>> objectArrayListIterator0 = new ObjectArrayListIterator<HashMap<String, StringTokenizer>>(hashMapArray0, 0, 0);\n Iterator<HashMap<String, StringTokenizer>> iterator0 = IteratorUtils.unmodifiableIterator((Iterator<HashMap<String, StringTokenizer>>) objectArrayListIterator0);\n assertEquals(false, iterator0.hasNext());\n }", "@Test\n public void test21() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1342,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test21\");\n SingletonListIterator<String> singletonListIterator0 = new SingletonListIterator<String>(\"\");\n Enumeration<String> enumeration0 = IteratorUtils.asEnumeration((Iterator<? extends String>) singletonListIterator0);\n Iterator<String> iterator0 = IteratorUtils.asIterator((Enumeration<? extends String>) enumeration0);\n assertEquals(true, iterator0.hasNext());\n }", "@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "@Test\n public void iterate0() {\n runAndWait(() -> {\n int err = 0;\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> list = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n Collections.shuffle(list);\n tree.addAll(list);\n Collections.sort(list);\n int i = 0;\n for (int val : tree) {\n if (i >= list.size()) {\n fail(\"The tree iterated over more elements than the initial list!\");\n }\n if (val != list.get(i)) {\n System.err.println(\"Expected the value \" + list.get(i) + \", but found \" + val);\n err++;\n }\n i++;\n }\n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n }, 64, 1000);\n \n }", "public void testPersistence() {\n ImmutableSet<Integer> set = new ImmutableSet();\n for (int i = -50; i < 51; i++) {\n set.add(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n for(int i = -50; i < 51; i++) {\n set.remove(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n }", "@Test\n public void test3() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(547,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test3\");\n HashMap<Integer, Object> hashMap0 = new HashMap<Integer, Object>();\n EntrySetMapIterator<Integer, Object> entrySetMapIterator0 = new EntrySetMapIterator<Integer, Object>((Map<Integer, Object>) hashMap0);\n IteratorIterable<Object> iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) entrySetMapIterator0);\n Iterator<Object> iterator0 = iteratorIterable0.iterator();\n assertEquals(false, iterator0.hasNext());\n }", "@Test\n public void testIterator() {\n SessionCache sessionCache = SessionCache.getInstance();\n\n Iterator<Session> iterator0 = sessionCache.iterator();\n assertFalse(iterator0.hasNext());\n try {\n testSession = iterator0.next();\n fail(\"Expected NoSuchElementException to be thrown\");\n } catch (NoSuchElementException e) {\n // This exception is expected.\n }\n\n sessionCache.put(sessionId1, session1);\n Iterator<Session> iterator1 = sessionCache.iterator();\n assertTrue(iterator1.hasNext());\n testSession = iterator1.next();\n assertEquals(testSession, session1);\n assertFalse(iterator1.hasNext());\n try {\n testSession = iterator1.next();\n fail(\"Expected NoSuchElementException to be thrown\");\n } catch (NoSuchElementException e) {\n // This exception is expected.\n }\n iterator1.remove();\n assertEquals(sessionCache.size(), 0);\n assertFalse(iterator1.hasNext());\n try {\n testSession = iterator1.next();\n fail(\"Expected NoSuchElementException to be thrown\");\n } catch (NoSuchElementException e) {\n // This exception is expected.\n }\n try {\n iterator1.remove();\n fail(\"Expected IllegalStateException to be thrown\");\n } catch (IllegalStateException e) {\n // This exception is expected.\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 }", "@Test\n public void loopTest() {\n Object[] resultActual = new Object[] {this.work1, this.work2, this.work3, this.work4};\n Object[] resultExpected = new Object[4];\n int index = 0;\n while (this.it.hasNext()) {\n resultExpected[index++] = this.it.next();\n }\n assertThat(resultActual, is(resultExpected));\n }", "@Test\n\tpublic void testStorage() {\n\t\tBag<Object> bag = new Bag<>();\n\t\tObject element0 = new Object();\n\t\tObject element1 = new Object();\n\t\tObject element2 = new Object();\n\t\tObject element3 = new Object();\n\t\tObject element4 = new Object();\n\t\tObject element5 = new Object();\n\t\tObject element6 = new Object();\n\t\tObject element7 = new Object();\n\n\t\tbag.set(0, element0);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(null, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(1, element1);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(2, element2);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(3, element3);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(4, element4);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(5, element5);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(6, element6);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(element6, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(7, element7);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(element6, bag.get(6));\n\t\tassertSame(element7, bag.get(7));\n\n\t\tbag.clear();\n\n\t\tassertSame(null, bag.get(0));\n\t\tassertSame(null, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\t}", "@Test\n public void test24() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1345,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test24\");\n try {\n IteratorUtils.toListIterator((Iterator<? extends Properties>) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }", "@Test\n public void testGet2() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(100).iterator();\n assertEquals(Long.valueOf(89), fibs.next());\n assertEquals(Long.valueOf(8), fibs.next());\n assertEquals(Long.valueOf(3), fibs.next());\n assertFalse(fibs.hasNext());\n }", "public static void testIteratorEqualsOtherMethods(RatingsDataset<Rating> ratingsDataset) {\n\n int errors = 0;\n try {\n\n Map<Integer, Integer> numRatingsUsers_byIterator = new TreeMap<Integer, Integer>();\n Map<Integer, Integer> numRatingsItems_byIterator = new TreeMap<Integer, Integer>();\n\n for (Rating r : ratingsDataset) {\n int idUser = r.getIdUser();\n int idItem = r.getIdItem();\n\n ratingsDataset.getRating(idUser, idItem);\n\n if (numRatingsUsers_byIterator.containsKey(idUser)) {\n numRatingsUsers_byIterator.put(idUser, numRatingsUsers_byIterator.get(idUser) + 1);\n } else {\n numRatingsUsers_byIterator.put(idUser, 1);\n }\n\n if (numRatingsItems_byIterator.containsKey(idItem)) {\n numRatingsItems_byIterator.put(idItem, numRatingsItems_byIterator.get(idItem) + 1);\n } else {\n numRatingsItems_byIterator.put(idItem, 1);\n }\n\n }\n\n for (int idUser : ratingsDataset.allUsers()) {\n int numRatingsUser_byGetRatings = ratingsDataset.getUserRatingsRated(idUser).size();\n int numRatingsUser_ByIterator = numRatingsUsers_byIterator.get(idUser);\n\n if (numRatingsUser_byGetRatings != numRatingsUser_ByIterator) {\n Global.showWarning(\"El usuario \" + idUser + \" tiene:\\n\"\n + \"\\t\" + numRatingsUser_byGetRatings + \" valoraciones según el método getUserRatingsRated(idUser) \\n\"\n + \"\\t\" + numRatingsUser_ByIterator + \" valoraciones según el iterador\");\n errors++;\n }\n }\n\n final Set<Integer> allRatedItems = new TreeSet<Integer>(ratingsDataset.allRatedItems());\n\n for (int idItem : allRatedItems) {\n\n int numRatingsItem_byGetRatings = ratingsDataset.getItemRatingsRated(idItem).size();\n int numRatingsItem_ByIterator = numRatingsItems_byIterator.get(idItem);\n\n if (numRatingsItem_byGetRatings != numRatingsItem_ByIterator) {\n Global.showWarning(\"El producto \" + idItem + \" tiene:\\n\"\n + \"\\t\" + numRatingsItem_byGetRatings + \" valoraciones según el método getItemRatingsRated(idItem) \\n\"\n + \"\\t\" + numRatingsItem_ByIterator + \" valoraciones según el iterador\");\n errors++;\n }\n }\n\n if (numRatingsItems_byIterator.keySet().equals(allRatedItems)) {\n } else {\n errors++;\n Global.showWarning(\"El conjunto de items valorados es distinto.\");\n\n Set<Integer> AMinusB = new TreeSet<Integer>(numRatingsItems_byIterator.keySet());\n AMinusB.removeAll(allRatedItems);\n\n Set<Integer> BMinusA = new TreeSet<Integer>(allRatedItems);\n BMinusA.removeAll(numRatingsItems_byIterator.keySet());\n\n if (!AMinusB.isEmpty()) {\n Global.showWarning(\"Produtos que no están en el allItemsRated --> \" + AMinusB.toString());\n }\n if (!BMinusA.isEmpty()) {\n Global.showWarning(\"Produtos que no están según el iterador --> \" + BMinusA.toString());\n }\n }\n\n if (numRatingsUsers_byIterator.keySet().equals(ratingsDataset.allUsers())) {\n } else {\n errors++;\n Global.showWarning(\"El conjunto de usuarios es distinto.\");\n }\n\n } catch (UserNotFound ex) {\n ERROR_CODES.USER_NOT_FOUND.exit(ex);\n } catch (ItemNotFound ex) {\n ERROR_CODES.ITEM_NOT_FOUND.exit(ex);\n }\n if (errors == 0) {\n Global.showWarning(\"Finished the dataset test.\");\n } else {\n Global.showWarning(\"Finished the dataset test with \" + errors + \" errors.\");\n }\n }", "@Test\n\tpublic void testGetAllElementsUsingPaginationOfSecondPage() throws Exception {\n\t\tint size = 100;\n\t\tIntStream.range(1, size + 1).mapToObj(i -> \"element\" + i).map(ElementEntity::new)\n\t\t\t\t.forEach(this.elementDao::create);\n\n\t\t// WHEN I get elements of the page 1 and size 90\n\t\tElementBoundary[] result = this.restTemplate.getForObject(this.baseUrl + \"?page={page}&size={size}\",\n\t\t\t\tElementBoundary[].class, this.userEntity.getUserSmartspace(),\n\t\t\t\tthis.userEntity.getUserEmail(), 1, 90);\n\n\t\t// THEN I receive 10 elements\n\t\tassertThat(result).hasSize(10);\n\t\t\n\t\t\n\t}", "@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1352,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test6\");\n LinkedList<String> linkedList0 = new LinkedList<String>();\n SingletonListIterator<LinkedList<String>> singletonListIterator0 = new SingletonListIterator<LinkedList<String>>(linkedList0);\n Iterator<Object> iterator0 = IteratorUtils.peekingIterator((Iterator<?>) singletonListIterator0);\n assertEquals(true, iterator0.hasNext());\n }", "@Test\n\tpublic void testGetAllElementsUsingPagination() throws Exception {\n\t\tint size = 3;\n\t\tIntStream.range(1, size + 1).mapToObj(i->new ElementEntity(\"demo\" + i))\n\t\t\t\t.forEach(this.elementDao::create);\n\n\t\t// WHEN I GET elements of size 10 and page 0\n\t\tElementBoundary[] response = this.restTemplate.getForObject(this.baseUrl + \"?page={page}&size={size}\",\n\t\t\t\tElementBoundary[].class, this.userEntity.getUserSmartspace(),\n\t\t\t\tthis.userEntity.getUserEmail(), 0, 10);\n\n\t\t// THEN I receive 3 elements\n\t\tassertThat(response).hasSize(size);\n\t}", "@Test\n public void test3() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1349,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test3\");\n ListIterator<String> listIterator0 = IteratorUtils.singletonListIterator(\"Predicate must not be null\");\n assertEquals(-1, listIterator0.previousIndex());\n }", "@Test\n public void test2() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(546,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test2\");\n IteratorIterable<Object> iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) null);\n Iterator<Object> iterator0 = iteratorIterable0.iterator();\n assertNotNull(iterator0);\n }", "private void assertEqual(Iterator expected, Iterator actual) {\n\t\t\n\t}", "@Test\n public void test2() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1340,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test2\");\n Class<Object>[] classArray0 = (Class<Object>[]) Array.newInstance(Class.class, 3);\n ResettableIterator<Class<Object>> resettableIterator0 = IteratorUtils.arrayIterator(classArray0, 0, 0);\n assertEquals(false, resettableIterator0.hasNext());\n assertNotNull(resettableIterator0);\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 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 }", "@Test\n public void test23() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1344,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test23\");\n OrderedMapIterator<Class<StringTokenizer>, Properties> orderedMapIterator0 = IteratorUtils.emptyOrderedMapIterator();\n AbstractOrderedMapIteratorDecorator<Class<StringTokenizer>, Properties> abstractOrderedMapIteratorDecorator0 = new AbstractOrderedMapIteratorDecorator<Class<StringTokenizer>, Properties>(orderedMapIterator0);\n Iterable<Object> iterable0 = IteratorUtils.asMultipleUseIterable((Iterator<?>) abstractOrderedMapIteratorDecorator0);\n assertNotNull(iterable0);\n }", "@Test\r\n public void sequentialHasNextInvocationDoesntAffectRetrievalOrder() {\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.next(), is(6));\r\n }", "@Test\n public void test20() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1341,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test20\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getParentNode();\n // Undeclared exception!\n try {\n IteratorUtils.nodeListIterator((Node) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Node must not be null\n //\n }\n }", "@Test\n public void testGet3() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(1000).iterator();\n assertEquals(Long.valueOf(987), fibs.next());\n assertEquals(Long.valueOf(13), fibs.next());\n assertFalse(fibs.hasNext());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[4];\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Iterator<Nucleotide> iterator0 = defaultNucleotideCodec1.iterator(byteArray0);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.encode(11, iterator0);\n fail(\"Expecting exception: NoSuchElementException\");\n \n } catch(NoSuchElementException e) {\n //\n // no more elements\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }", "@Test\n public void test25() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1346,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test25\");\n HashMap<StringTokenizer, Properties> hashMap0 = new HashMap<StringTokenizer, Properties>();\n EntrySetMapIterator<StringTokenizer, Properties> entrySetMapIterator0 = new EntrySetMapIterator<StringTokenizer, Properties>((Map<StringTokenizer, Properties>) hashMap0);\n Object[] objectArray0 = IteratorUtils.toArray((Iterator<?>) entrySetMapIterator0);\n assertNotNull(objectArray0);\n }", "public void testIterator01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\t\tList<String> words = TestUtils.randomWords(256, 3);\r\n\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tbt.set(words.get(i), i);\r\n\t\t}\r\n\r\n\t\tCollections.sort(words);\r\n\t\tStringBuilder expected = new StringBuilder();\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\texpected.append(words.get(i)).append(',');\r\n\t\t}\r\n\r\n\t\tStringBuilder actual = new StringBuilder();\r\n\t\tfor (Entry<String, Integer> e : bt) {\r\n\t\t\tactual.append(e.getKey()).append(',');\r\n\t\t}\r\n\r\n\t\tassertEquals(actual.toString(), expected.toString());\r\n\t}", "@Test\r\n\tpublic void testIterator() {\r\n\t\tIterator<Munitions> iter = list.iterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tAssert.assertNotNull(iter.next());\r\n\t\t}\r\n\t}", "@Test\n public void test2() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(577,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test2\");\n NodeListIterator nodeListIterator0 = null;\n try {\n nodeListIterator0 = new NodeListIterator((NodeList) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // nodeList must not be null!\n //\n }\n }", "@Test\n public void testGet1() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(10).iterator();\n assertEquals(Long.valueOf(8), fibs.next());\n assertEquals(Long.valueOf(2), fibs.next());\n assertFalse(fibs.hasNext());\n }", "@Test\n public void test26() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1347,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test26\");\n ResettableListIterator<StringTokenizer> resettableListIterator0 = IteratorUtils.emptyListIterator();\n // Undeclared exception!\n try {\n IteratorUtils.toList((Iterator<? extends StringTokenizer>) resettableListIterator0, 0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Estimated size must be greater than 0\n //\n }\n }", "@Test\n\tpublic void testGetAccessReodersElement() {\n\t\tmap.get(\"key1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the bottom\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.get(\"key2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the bottom\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}", "@Test\r\n\tpublic void testIntegerSequenceCache_2() {\n\t\tRandomOrgCache<String[][]> c = rocs[0].createIntegerSequenceCache(2, 5, 0, 10, false, 16, 3);\r\n\t\tc.stop();\r\n\r\n\t\ttry {\r\n\t\t\tc.get();\r\n\t\t\tcollector.addError(new Error(\"should have thrown NoSuchElementException\"));\r\n\t\t} catch (NoSuchElementException e) {}\r\n\t\t\r\n\t\tc.resume();\r\n\t\t\r\n\t\tString[][] got = null;\r\n\t\t\r\n\t\twhile (got == null) {\r\n\t\t\ttry {\r\n\t\t\t\tgot = c.get();\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcollector.addError(new Error(\"shouldn't have been interrupted!\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcollector.checkThat(got, notNullValue());\r\n\t}", "@Test\r\n\tpublic void testIntegerCache_2() {\n\t\tRandomOrgCache<String[]> c = rocs[0].createIntegerCache(5, 50, 100, false, 16, 5);\r\n\t\tc.stop();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tc.get();\r\n\t\t\tcollector.addError(new Error(\"should have thrown NoSuchElementException\"));\r\n\t\t} catch (NoSuchElementException e) {}\r\n\t\t\r\n\t\tcollector.checkThat(c.isPaused(), equalTo(true));\r\n\t\tc.resume();\r\n\t\t\r\n\t\tString[] got = null;\r\n\t\t\r\n\t\t// Testing RandomOrgCache function get()\r\n\t\twhile (got == null) {\r\n\t\t\ttry {\r\n\t\t\t\tgot = c.get();\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcollector.addError(new Error(\"shouldn't have been interrupted!\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcollector.checkThat(got, notNullValue());\r\n\t}", "@Test\n public void testGet4() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(10000).iterator();\n assertEquals(Long.valueOf(6765), fibs.next());\n assertEquals(Long.valueOf(2584), fibs.next());\n assertEquals(Long.valueOf(610), fibs.next());\n assertEquals(Long.valueOf(34), fibs.next());\n assertEquals(Long.valueOf(5), fibs.next());\n assertEquals(Long.valueOf(2), fibs.next());\n assertFalse(fibs.hasNext());\n }", "public void testGetValue() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.prev();\n test1.moveToPos(8);\n assertTrue(test1.getValue().inRange(8));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n try {\n test1.getValue();\n }\n catch (Exception e) {\n assertTrue(e instanceof NoSuchElementException);\n }\n }", "@Test\n public void testGetElmtlReactions_IParticle_IParticle() {\n System.out.println(\"getElmtlReactions of order 2\");\n IParticle p1 = new Particle(0, 0, new double[]{0, 0, 0});\n IParticle p2 = new Particle(1, 0, new double[]{0, 0, 0});\n int[] expElmtlRkToCheck_id = new int[]{0};\n double[] expElmtlRkToCheck_p = new double[]{0.9999999999993086};\n int expNCounts = 8;\n\n Iterator<IElementalReactionToCheck> resultIter = elementalReactionManager.getElmtlReactions(p1, p2);\n int counter = 0;\n while (resultIter.hasNext()) {\n resultIter.next();\n counter++;\n }\n assertEquals(expNCounts, counter);\n\n\n }", "@Test\n public void testIterator() {\n this.sPQ.insert(\"a\");\n this.sPQ.insert(\"b\");\n this.sPQ.insert(\"c\");\n this.sPQ.insert(\"d\");\n this.sPQ.insert(\"e\");\n\n \n Iterator<String> iter = this.sPQ.iterator();\n assertEquals(\"a\", iter.next());\n assertTrue(iter.hasNext());\n assertEquals(\"b\", iter.next());\n assertEquals(\"c\", iter.next());\n assertEquals(\"d\", iter.next());\n assertTrue(iter.hasNext());\n assertEquals(\"e\", iter.next());\n assertFalse(iter.hasNext());\n }", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "@Test\n public void test1() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(545,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test1\");\n IteratorIterable<Object> iteratorIterable0 = null;\n try {\n iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }", "@Test\n public void whenAddTwoNodesAndNextTwiceThenHasNextFalse() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n iter.next();\n iter.next();\n assertThat(iter.hasNext(), is(false));\n }", "@Test\n public void testAdd_After_Set() {\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\n instance.set(3);\n instance.add(9);\n int expResult = 2;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test(expected = NoSuchElementException.class)\n public void testNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n }", "@Test\n public void iterator() {\n }", "@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(544,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test0\");\n EntrySetMapIterator<Integer, Object>[] entrySetMapIteratorArray0 = (EntrySetMapIterator<Integer, Object>[]) Array.newInstance(EntrySetMapIterator.class, 7);\n ObjectArrayIterator<EntrySetMapIterator<Integer, Object>> objectArrayIterator0 = new ObjectArrayIterator<EntrySetMapIterator<Integer, Object>>(entrySetMapIteratorArray0, 0, 0);\n IteratorIterable<Object> iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) objectArrayIterator0, true);\n }", "@Test\n public void test14() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1334,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test14\");\n Iterator<Properties>[] iteratorArray0 = (Iterator<Properties>[]) Array.newInstance(Iterator.class, 2);\n // Undeclared exception!\n try {\n IteratorUtils.chainedIterator((Iterator<? extends Properties>[]) iteratorArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Iterator must not be null\n //\n }\n }", "@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(575,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test0\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n NodeListIterator nodeListIterator0 = new NodeListIterator((Node) iIOMetadataNode0);\n // Undeclared exception!\n try {\n nodeListIterator0.remove();\n fail(\"Expecting exception: UnsupportedOperationException\");\n \n } catch(UnsupportedOperationException e) {\n //\n // remove() method not supported for an NodeListIterator.\n //\n }\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 }", "@org.junit.Test\n public void k2ComputeConElem9() {\n final XQuery query = new XQuery(\n \"element e {\\\"content\\\"} instance of element(*, xs:untyped)\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n (\n assertBoolean(false)\n ||\n assertBoolean(true)\n )\n );\n }", "@Override\n public synchronized Enumeration elements() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.elements();\n }", "@Test\n public void testGetAll() throws Exception {\n JumpCloneImplant existing;\n Map<Integer, Map<Integer, JumpCloneImplant>> listCheck = new HashMap<>();\n\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID, new HashMap<>());\n listCheck.get(jumpCloneID)\n .put(typeID, existing);\n\n existing = new JumpCloneImplant(jumpCloneID + 10, typeID + 10);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID + 10, new HashMap<>());\n listCheck.get(jumpCloneID + 10)\n .put(typeID + 10, existing);\n\n // Associated with different account\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(otherAccount, 7777L);\n CachedData.update(existing);\n\n // Not live at the given time\n existing = new JumpCloneImplant(jumpCloneID + 3, typeID + 3);\n existing.setup(testAccount, 9999L);\n CachedData.update(existing);\n\n // EOL before the given time\n existing = new JumpCloneImplant(jumpCloneID + 4, typeID + 4);\n existing.setup(testAccount, 7777L);\n existing.evolve(null, 7977L);\n CachedData.update(existing);\n\n List<JumpCloneImplant> result = CachedData.retrieveAll(8888L,\n (contid, at) -> JumpCloneImplant.accessQuery(testAccount,\n contid, 1000,\n false, at,\n AttributeSelector.any(),\n AttributeSelector.any()));\n Assert.assertEquals(listCheck.size(), result.size());\n for (JumpCloneImplant next : result) {\n int jumpCloneID = next.getJumpCloneID();\n int typeID = next.getTypeID();\n Assert.assertTrue(listCheck.containsKey(jumpCloneID));\n Assert.assertTrue(listCheck.get(jumpCloneID)\n .containsKey(typeID));\n Assert.assertEquals(listCheck.get(jumpCloneID)\n .get(typeID), next);\n }\n\n }", "@Test\n public void test1() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(576,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test1\");\n NodeListIterator nodeListIterator0 = null;\n try {\n nodeListIterator0 = new NodeListIterator((Node) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // node must not be null!\n //\n }\n }", "@Test\n public void testCoh3710_entrySetIterator()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet().iterator();\n assertFalse(iter.hasNext());\n validateIndex(cache);\n }\n });\n }", "@Test\n public void testListIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 4, 9, 67, 87));\n\n ListIterator<Integer> instance = baseList.listIterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "@Test\n public void testIterator(){\n while(ROW_ITR.hasNext()){\n ROW_ITR.next();\n }\n }", "@Test\n public void test16() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1336,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test16\");\n File file0 = new File(\"\");\n file0.toString();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) \"\");\n assertEquals(true, iterator0.hasNext());\n assertNotNull(iterator0);\n }", "@Test\n\tpublic final void testGetInnerIterator() {\n\t\tFieldIterator iterator = block.getInnerIterator();\n\t\t// Verify type\n\t\tassertEquals(ValueFieldIterator.class, iterator.getClass());\n\t\t// Verify size\n\t\tfor (int i=0; i<DIMENSIONALITY; i++) {\n\t\t\tassertEquals(elementsPerDim, iterator.size(i));\n\t\t}\n\t\t// Verify (first) value\n\t\titerator.first();\n\t\tassertEquals(values[0], iterator.currentValue(), 4*Math.ulp(values[0]));\n\t}", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "public void testIterator() {\n SynchronousQueue q = new SynchronousQueue();\n\tIterator it = q.iterator();\n assertFalse(it.hasNext());\n try {\n Object x = it.next();\n shouldThrow();\n }\n catch (NoSuchElementException success) {}\n }", "@Test\n public void TestIfNoCycle() {\n final int NUMBER_OF_ELEMENTS = 100;\n TripleList<Integer> tripleList = new TripleList<>();\n for (int i = 0; i < NUMBER_OF_ELEMENTS; ++i) {\n tripleList.add(i);\n }\n /**\n * Created 2 TripleLists, first jumps every single element, another\n * every two elements, in out case every two elements means every\n * NextElement*\n */\n TripleList<Integer> tripleListEverySingleNode = tripleList;\n TripleList<Integer> tripleListEveryTwoNodes = tripleList.getNext();\n for (int i = 0; i < NUMBER_OF_ELEMENTS * NUMBER_OF_ELEMENTS; ++i) {\n Assert.assertNotSame(tripleListEverySingleNode, tripleListEveryTwoNodes);\n //JumpToNextElement(ref tripleListEverySingleNode);\n if (null == tripleListEveryTwoNodes.getNext()) {\n // if list has end means there are no cycles\n break;\n } else {\n tripleListEveryTwoNodes = tripleListEveryTwoNodes.getNext();\n }\n }\n }", "@Test\n public void testHasNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n instance.next();\n instance.next();\n\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "public interface ElementsGetter {\n\t\n\t/**\n\t * Tests if this ElementsGetter contains more elements.\n\t * @return true if this ElementsGetter contains at least one more element to provide, false otherwise.\n\t */\n\tboolean hasNextElement();\n\t\n\t/**\n\t * Returns the next element of this ElementsGetter if it has at least one more element to provide.\n\t * @return the next element of this ElementsGetter if exists.\n\t * @throws NoSuchElementException if no more elements exist.\n\t */\n\tObject getNextElement() throws NoSuchElementException;\n\t\n\t/**\n\t * Processes all the remaining elements in this ElementsGetter using the given processor object.\n\t * @param p Processor object that processes the remaining elements.\n\t */\n\tdefault void processRemaining(Processor p) {\n\t\twhile(hasNextElement()) {\n\t\t\tp.process(getNextElement());\n\t\t}\n\t}\n}", "@Test\n public void testXSDElement() {\n ArrayList<String> target = new ArrayList<String>();\n target.add(\"subscriber-name\");\n target.add(\"global-customer-id\");\n target.add(\"subscriber-type\");\n target.add(\"service-type\");\n\n Vector<String> indexedProps = new Vector<String>();\n for (int i = 0; i < javaTypeNodes.getLength(); ++i) {\n XSDElement javaTypeElement = new XSDElement((Element) javaTypeNodes.item(i));\n indexedProps.addAll(javaTypeElement.getIndexedProps());\n }\n assertThat(new ArrayList<>(indexedProps),\n both(everyItem(is(in(target.toArray())))).and(containsInAnyOrder(target.toArray())));\n }", "public Iterator<T> getPageElements();", "public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }", "public void testIterEnd() {\r\n list.add(\"A\");\r\n list.add(\"B\");\r\n assertTrue(iter.hasNext());\r\n iter.next();\r\n assertTrue(iter.hasNext());\r\n iter.next();\r\n assertFalse(iter.hasNext());\r\n \r\n Exception e = null;\r\n try {\r\n iter.next();\r\n }\r\n catch (Exception no) {\r\n e = no;\r\n }\r\n assertNotNull(e);\r\n assertTrue(e instanceof NoSuchElementException);\r\n }", "@Test\n public void testHasNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = true;\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void testIntegerSequenceCache_1() {\n\t\tRandomOrgCache<int[][]> c = rocs[0].createIntegerSequenceCache(2, 5, 0, 10);\r\n\t\tc.stop();\r\n\r\n\t\ttry {\r\n\t\t\tc.get();\r\n\t\t\tcollector.addError(new Error(\"should have thrown NoSuchElementException\"));\r\n\t\t} catch (NoSuchElementException e) {}\r\n\t\t\r\n\t\tc.resume();\r\n\t\t\r\n\t\tint[][] got = null;\r\n\t\t\r\n\t\twhile (got == null) {\r\n\t\t\ttry {\r\n\t\t\t\tgot = c.get();\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcollector.addError(new Error(\"shouldn't have been interrupted!\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcollector.checkThat(got, notNullValue());\r\n\t}", "@org.junit.Test\n public void k2ComputeConElem8() {\n final XQuery query = new XQuery(\n \"element e {\\\"content\\\"} instance of element(*, xs:anyType)\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(true)\n );\n }", "@Test\n public void testHasPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n instance.next();\n instance.next();\n\n boolean expResult = true;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void testIntegerSequenceCache_4() {\n\t\tboolean[] replacement = {true, true, true, true};\r\n\t\tRandomOrgCache<String[][]> c = rocs[0].createIntegerSequenceCache(4, LENGTH, MIN, MAX, replacement, BASE, 10);\r\n\t\tc.stop();\r\n\r\n\t\ttry {\r\n\t\t\tc.get();\r\n\t\t\tcollector.addError(new Error(\"should have thrown NoSuchElementException\"));\r\n\t\t} catch (NoSuchElementException e) {}\r\n\t\t\r\n\t\tc.resume();\r\n\t\t\r\n\t\tString[][] got = null;\r\n\t\t\r\n\t\twhile (got == null) {\r\n\t\t\ttry {\r\n\t\t\t\tgot = c.get();\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcollector.addError(new Error(\"shouldn't have been interrupted!\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < got.length; i++) {\r\n\t\t\tcollector.checkThat(got[i].length == LENGTH[i], equalTo(true));\r\n\t\t}\r\n\t\t\r\n\t\tcollector.checkThat(got, notNullValue());\r\n\t}", "@Test\n public void testListIterator() {\n DoubleLinkedList<Integer> list = new DoubleLinkedList<Integer>();\n for (int i = 5; i > 0; i--)\n list.addToFront(i);\n \n /* checking that we get out what we put it */\n int i = 1;\n for (Integer x: list)\n assertEquals(\"Testing value returned by iterator\", new Integer(i++), x);\n \n if (i != 6)\n fail(\"The iterator did not run through all the elements of the list\");\n }", "@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 }", "@Test\r\n public void iteratorWorksGood() throws Exception {\r\n int[] expected1 = {1, 2, 3, 4, 5};\r\n int i = 0;\r\n for (int el : sInt) {\r\n assertEquals(expected1[i], el);\r\n i++;\r\n }\r\n i = 0;\r\n String[] expected2 = {\"kek\", \"lel\", \"lol\"};\r\n for (String el : sStr) {\r\n assertEquals(expected2[i], el);\r\n i++;\r\n }\r\n }", "@org.junit.Test\n public void k2ComputeConElem11() {\n final XQuery query = new XQuery(\n \"element e {\\\"content\\\"} instance of element(a, xs:anyType)\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertBoolean(false)\n );\n }" ]
[ "0.64328104", "0.6348959", "0.6218935", "0.62139773", "0.6212879", "0.6212325", "0.61668545", "0.6152534", "0.6146053", "0.6124383", "0.61240184", "0.6068414", "0.6067032", "0.60545254", "0.604676", "0.6027256", "0.60248196", "0.6019212", "0.5983469", "0.5964698", "0.5948606", "0.5912943", "0.58872926", "0.587599", "0.58628094", "0.58542603", "0.5840101", "0.5837131", "0.5818201", "0.58061546", "0.58038986", "0.580024", "0.57952386", "0.5787373", "0.5782035", "0.5777406", "0.5772133", "0.57691747", "0.57556653", "0.5751638", "0.5751415", "0.574789", "0.57400405", "0.57197994", "0.57124925", "0.5700608", "0.56919926", "0.5689735", "0.5680439", "0.56681854", "0.5665979", "0.56614006", "0.56390935", "0.5630375", "0.56276006", "0.56104684", "0.5597792", "0.55977637", "0.5573268", "0.5565942", "0.5558868", "0.5550847", "0.5536186", "0.5533761", "0.5525844", "0.55254", "0.5524975", "0.5517673", "0.5517028", "0.55148995", "0.5506766", "0.55058426", "0.5504417", "0.55034304", "0.5498383", "0.5496123", "0.5494822", "0.548985", "0.54754174", "0.5472385", "0.54614145", "0.5459488", "0.54566", "0.54356134", "0.54300183", "0.5405302", "0.5405039", "0.5395544", "0.53932315", "0.53929365", "0.5391677", "0.5389784", "0.5385078", "0.53809613", "0.53669345", "0.53620017", "0.5358164", "0.5356368", "0.535228", "0.53481585" ]
0.66111994
0
Test of iniciar method, of class ControladorEmpleados.
@Test public void testIniciar() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testResponderEjercicio1(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tassertTrue(ej1.responderEjercicio(nacho, array));\n\t\tassertFalse(nacho.getEstadisticas().isEmpty());\n\t}", "@Test\r\n public void testIniciarSesion() {\r\n System.out.println(\"iniciarSesion\");\r\n String usuario = \"\";\r\n String contrasenia = \"\";\r\n Usuario instance = new Usuario();\r\n instance.iniciarSesion(usuario, contrasenia);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "private void controladorInicio(Controlador controlador){\n this.inicioRegistro = controlador.getInicioRegistro();\n inicio.setControlRegistro(inicioRegistro);\n this.inicioLogin = controlador.getInicioLogin();\n inicio.setControlLogin(inicioLogin);\n }", "private void iniciar() {\r\n\t\tprincipal = new Principal();\r\n\t\tgestionCientificos=new GestionCientificos();\r\n\t\tgestionProyectos=new GestionProyectos();\r\n\t\tgestionAsignado= new GestionAsignado();\r\n\t\tcontroller= new Controller();\r\n\t\tcientificoServ = new CientificoServ();\r\n\t\tproyectoServ = new ProyectoServ();\r\n\t\tasignadoA_Serv = new AsignadoA_Serv();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tprincipal.setControlador(controller);\r\n\t\tgestionCientificos.setControlador(controller);\r\n\t\tgestionProyectos.setControlador(controller);\r\n\t\tgestionAsignado.setControlador(controller);\r\n\t\tcientificoServ.setControlador(controller);\r\n\t\tproyectoServ.setControlador(controller);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tcontroller.setPrincipal(principal);\r\n\t\tcontroller.setGestionCientificos(gestionCientificos);\r\n\t\tcontroller.setGestionProyectos(gestionProyectos);\r\n\t\tcontroller.setGestionAsignado(gestionAsignado);\r\n\t\tcontroller.setCientificoService(cientificoServ);\r\n\t\tcontroller.setProyectoService(proyectoServ);\r\n\t\tcontroller.setAsignadoService(asignadoA_Serv);\r\n\t\t\t\t\r\n\t\tprincipal.setVisible(true);\r\n\t}", "public ModificarEmpleado() {\n initComponents();\n con=dbConnection.conectDB();\n llenarpuesto();\n llenaridentificacion();\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(ModificarEmpleado.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void iniciar() {\n abrirPuerto();\n\n while (true) {\n esperarCliente();\n lanzarHilo();\n }\n }", "@Test\n\tpublic void testResponderEjercicio6(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tassertTrue(ej1.responderEjercicio(nacho, array));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t}", "@Test\r\n public void testAlterarDados() {\r\n System.out.println(\"alterarDados\");\r\n \r\n String nome = \"nomee\";\r\n String username = \"usernamee\";\r\n String email = \"[email protected]\";\r\n String password = \"passwordd\";\r\n \r\n CentroExposicoes ce = new CentroExposicoes();\r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n \r\n Utilizador uti = new Utilizador(\"nome\", \"username\", \"[email protected]\", \"password\");\r\n ce.getRegistoUtilizadores().addUtilizador(uti);\r\n instance.getUtilizador(uti.getEmail());\r\n \r\n boolean expResult = true;\r\n boolean result = instance.alterarDados(nome, username, email, password);\r\n \r\n assertEquals(expResult, result);\r\n }", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "public void realizaSimulacion(){\r\n\t\t\r\n\t\tEntradaDeDatos entradaDatosUsuario = new EntradaDeDatos();\r\n\t\tEnum_Instrucciones ordenUsuarioEnEnumerado;\r\n\t\tint filaEntrada, columnaEntrada;\r\n\t\tboolean salir = false;\r\n\t\t\r\n\t\t// Mostramos la superficie.\r\n\t\tmundo.mostrarSuperficie();\r\n\t\t\t\r\n\t\twhile(!salir) {\r\n\t\t\t\r\n\t\t\tordenUsuarioEnEnumerado = entradaDatosUsuario.pedirComandoPorConsolaAlUsuario();\r\n\t\t\t\r\n\t\t\t// Dependiendo del enumerado haremos que se ejecute una accion u otra.\r\n\t\t\tswitch(ordenUsuarioEnEnumerado) {\r\n\t\t\tcase PASO:\r\n\t\t\t\t\r\n\t\t\t\tmundo.evoluciona();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase INICIAR:\r\n\t\r\n\t\t\t\tmundo.iniciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase CREARCELULA:\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la celula, si se ha podido nos notifica exito, y si no, nos informa de un error.\r\n\t\t\t\tif(mundo.crearCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Creamos nueva celula en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido crear la celula\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase ELIMINARCELULA:\r\n\t\t\t\r\n\t\t\t\t// Almacenamos en la variable filaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tfilaEntrada = entradaDatosUsuario.devuelveFilaIntroducidaPorConsolaAlUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Almacenamos en la variable columnaEntrada el valor que haya introducido el usuario.\r\n\t\t\t\tcolumnaEntrada = entradaDatosUsuario.devuelveColumnaIntroducidaPorConsolaUsuario();\r\n\t\t\t\t\r\n\t\t\t\t// Creamos la c�lula, si se ha podido nos notifica exito, y si no error.\r\n\t\t\t\tif(mundo.eliminarCelula(filaEntrada, columnaEntrada)) {\r\n\t\t\t\t\tSystem.out.println(\"Celula eliminada con exito en la posicion: (\" +\r\n\t\t\t\t\t\t\t\t\t\tfilaEntrada + \",\" + columnaEntrada + \").\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Error, no se ha podido eliminar la celula\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase AYUDA:\r\n\t\t\t\t\r\n\t\t\t\tmostrarAyuda();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase VACIAR:\r\n\t\t\t\t\r\n\t\t\t\tmundo.vaciar();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase SALIR:\r\n\t\t\t\t\r\n\t\t\t\tsalir = true;\r\n\t\t\t\t \r\n\t\t\t\tbreak;\r\n\t\t\tcase DESCONOCIDO:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Error de entrada.\");\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!salir) {\r\n\t\t\t\t\r\n\t\t\t\t// Muestra la superficie.\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tmundo.mostrarSuperficie();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Fin de la simulacion......\");\r\n\t}", "private void iniciar() {\r\n\t\t/*Se instancian las clases*/\r\n\t\tmiVentanaPrincipal=new VentanaPrincipal();\r\n\t\tmiVentanaRegistro=new VentanaRegistro();\r\n\t\tmiVentanaBuscar= new VentanaBuscar();\r\n\t\tmiLogica=new Logica();\r\n\t\tmiCoordinador= new Coordinador();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tmiVentanaPrincipal.setCoordinador(miCoordinador);\r\n\t\tmiVentanaRegistro.setCoordinador(miCoordinador);\r\n\t\tmiVentanaBuscar.setCoordinador(miCoordinador);\r\n\t\tmiLogica.setCoordinador(miCoordinador);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tmiCoordinador.setMiVentanaPrincipal(miVentanaPrincipal);\r\n\t\tmiCoordinador.setMiVentanaRegistro(miVentanaRegistro);\r\n\t\tmiCoordinador.setMiVentanaBuscar(miVentanaBuscar);\r\n\t\tmiCoordinador.setMiLogica(miLogica);\r\n\t\t\t\t\r\n\t\tmiVentanaPrincipal.setVisible(true);\r\n\t}", "@Test\n\tpublic void testResponderEjercicio4(){\n\t\tAlumno oscar = Alumno.CreaAlumno(\"2\", \"Oscar\", \"Password\", \"[email protected]\");\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tassertFalse(ej1.responderEjercicio(oscar, array));\n\t\tassertTrue(oscar.getEstadisticas().isEmpty());\n\t}", "@Dado(\"^Que o usuario esteja na tela inicial com a intencao de realizar uma pesquisa por categoria ou uma compra$\")\n\tpublic void que_o_usuario_esteja_na_tela_inicial_com_a_intencao_de_realizar_uma_pesquisa_por_categoria_ou_uma_compra()\n\t\t\tthrows Throwable {\n\t\tdriver = DriverFactory.iniciaBrowser(DriverType.Chrome, Constantes.URL);\n\n\t\t/* Comando responsavel por iniciar os elementos dentro da pageFactory\n\t\t \tespecificada.*/\n\t\thomePage = PageFactory.initElements(driver, HomePage.class);\n\t\tpesquisaPage = PageFactory.initElements(driver, PesquisaPage.class);\n\t\tpagamentoPage = PageFactory.initElements(driver, PagamentoPage.class);\n\t\tpegaMassa = new PegaMassa();\n\t}", "public void iniciar() {\n\t\tcrearElementos();\n\t\tcrearVista();\n\n\t}", "@Test\r\n\tpublic void CT01CadastrarUsuarioComDadosValidos() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\tUsuario usuario = new Usuario();\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comDadosValidos();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tfail(\"nao deve falhar\");\r\n\t\t}\r\n\t}", "protected void accionUsuario() {\n\t\t\r\n\t}", "@Test\r\n\tpublic void CT05CadastrarUsuarioComNomeNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeNulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }", "public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }", "@Test\r\n @Ignore\r\n public void testEnfermeiroLogar() {\r\n for (int i = 0; i < 10; i++) {\r\n enfermeiro = new Enfermeiro();\r\n enfermeiro.setNome(Testes.nomeAleatorio());\r\n enfermeiro.setCpf(\"186.402.484-3\" + i);\r\n enfermeiro.setDataNascimento(new Date(System.currentTimeMillis()));\r\n enfermeiro.setSexo(Sexo.MASCULINO);\r\n enfermeiro.setEndereco(new Endereco(\"88131-743\", \"Braulina Goulart\", \"48\", \"RioGrande\", \"Palhoça\", \"SC\"));\r\n enfermeiro.setTipoSanguineo(\"O+\");\r\n enfermeiro.setTelefone(\"48996850323\");\r\n enfermeiro.setCorenCofen(\"12346\" + i);\r\n enfermeiro.setEspecialidade(especialidadeDaoImpl.buscar(1 + i));\r\n enfermeiro.setUsuario(new Usuario(\"enfermeiroo\" + i, \"123\"));\r\n dao.salvar(enfermeiro);\r\n }\r\n }", "private void RealizarAccion() {\n if (ValidarCampos()) {\n\n persona.setPrimerNombre(txtPrimerNombre.getText());\n persona.setSegundoNombre(txtSegundoNombre.getText());\n persona.setPrimerApellido(txtPrimerApellido.getText());\n persona.setSegundoApellido(txtSegundoApellido.getText());\n persona.setTelefono(txtTelefono.getText());\n persona.setCedula(txtCedula.getText());\n persona.setCorreo(txtCorreo.getText());\n persona.setDireccion(txtDireccion.getText());\n\n empleado.setFechaInicio(dcFechaInicio.getDate());\n empleado.setSalario(Double.parseDouble(txtSalario.getText()));\n empleado.setCargo(txtCargo.getText());\n empleado.setUsuarioByUserModificacion(SessionHelper.usuario);\n empleado.setFechaModificacion(new Date());\n empleado.setRegAnulado(false);\n\n switch (btnAction.getText()) {\n case \"Guardar\":\n int maxid = personaBean.MaxId() + 1;\n persona.setIdPersona(maxid);\n\n Dbcontext.guardar(persona);\n\n empleado.setIdEmpleado(maxid);\n empleado.setPersona(persona);\n empleado.setUsuarioByUserCreacion(SessionHelper.usuario);\n empleado.setFechaCreacion(new Date());\n\n Dbcontext.guardar(empleado);\n break;\n\n case \"Actualizar\":\n\n Dbcontext.actualizar(persona);\n\n Dbcontext.actualizar(empleado);\n break;\n }\n if (ifrRegistroEmpleados.isActive) {\n ifrRegistroEmpleados.CargarTabla();\n }\n\n Mensajes.OperacionExitosa(this);\n dispose();\n } else {\n Mensajes.InformacionIncompleta(this);\n }\n }", "@Test\n public void testCSesionInicioxData() throws Exception {\n System.out.println(\"testCSesionInicioxData\");\n CSesion instance = new CSesion();\n DataUsuario dU = instance.inicioSesion(\"[email protected]\", \"tim123\");\n CSesion otra = new CSesion();\n otra.inicioSesion(dU);\n }", "public TelaEmpresa() {\n initComponents();\n conexao = ModuloConexao.conector();\n }", "public void salir() {\n LoginManager.getInstance().logOut();\n irInicio();\n }", "public void acessarBuscaCep() throws InterruptedException {\n navegador.findElement(By.xpath(\"//*[@class='bt-link-ic bt-login link-btn-meu-correios']\")).click();\n\n // REALIZAR O LOGIN COM USUARIO E SENHA\n navegador.findElement(By.id(\"username\")).click();\n navegador.findElement(By.id(\"username\")).sendKeys(\"31403971862\");\n navegador.findElement(By.id(\"password\")).click();\n navegador.findElement(By.id(\"password\")).sendKeys(\"haenois001\");\n\n //CLICAR NO BOTÃO ENTRAR\n navegador.findElement(By.xpath(\"//button[@class='primario']\")).click();\n\n // ESPERAR OPÇÕES E CLICAR EM BUSCA CEP\n WebDriverWait wait = new WebDriverWait(navegador, 20);\n wait.until(ExpectedConditions.elementToBeClickable(By.id(\"opcoes\")));\n navegador.findElement(By.id(\"busca-cep\")).click();\n Thread.sleep(1000);\n\n }", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public void ejecutarConsola() {\n\n try {\n this._agente = new SearchAgent(this._problema, this._busqueda);\n this._problema.getInitialState().toString();\n this.imprimir(this._agente.getActions());\n this.imprimirPropiedades(this._agente.getInstrumentation());\n if (_esSolucion) {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"SOLUCIONADO\");\n } else {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"No lo he podido solucionar...\");\n }\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }", "public VentanaModificarEmpleado(ControladorEmpleado controladorEmpleado) {\n initComponents();\n this.controladorEmpleado = controladorEmpleado;\n }", "@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void entrar() {\n\n Connection con = Conexao.abrirConexao();\n UsuarioDAO ud = new UsuarioDAO(con);\n String login = txtLOGIN.getText();\n String senha = txtSENHA.getText();\n String nome;\n\n if (txtLOGIN.getText().equals(\"admin\")) {\n nome = \"Administrador\";\n } else {\n nome = ud.retornarUsuario(login);\n }\n\n if (/*ud.logar(login, senha) == 0 ||*/ login.equals(\"admin\") && senha.equals(\"admin\")) {\n lblERRO.setText(\"\");\n JFrame principal = new frm_PRINCIPAL(login, nome);\n this.dispose();\n principal.setVisible(true);\n\n } else {\n\n lblERRO.setText(\"Usuário e/ou Senha Inválidos!\");\n }\n Conexao.fecharConexao(con);\n }", "@Test\n public void testObtenerControladorUsuario() throws Exception {\n System.out.println(\"obtenerControladorUsuario\");\n Fabrica instance = Fabrica.getInstance();\n IControladorUsuario icu = instance.obtenerControladorUsuario();\n \n //Damos de alta un cliente\n Date date = new Date(1988, 12, 05);\n DataDireccion direccion = new DataDireccion(\"Pedernal\",\"2145\",\"2\");\n icu.CargarDatosUsuario(\"Jose\",\"[email protected]\", \"pepe\", \"pepe123\",direccion,\"Villa\",date, \"/home/jose/d.png\");\n icu.altaUsuario();\n \n boolean existe = true;\n existe = icu.existeUsuario(\"pepe\",\"[email protected]\"); \n assertTrue(existe);\n \n DataDireccion dire = new DataDireccion(\"Rivera\",\"2000\",\"0\");\n String [] rutaImagen = {\"/home/jose/imagenes/a.png\",\"/home/jose/imagenes/b.png\"}; \n icu.seleccionarCategoria(\"Minutas\");\n \n icu.CargarDatosUsuario(\"elrey\",\"[email protected]\", \"El rey de las minutas\", \"elrey123\", dire, rutaImagen);\n icu.altaUsuario();\n existe = icu.existeUsuario(\"elrey\",\"[email protected]\"); \n assertTrue(existe);\n \n /*ArrayList<DataCliente> dcResult = icu.listarClientes();\n ArrayList<DataCliente> dcExpResult = new ArrayList<>();\n \n DataCliente dc = new DataCliente(\"Villa\", date,\"/home/jose/d.png\", \"pepe\", \"[email protected]\",\"Jose\", \"pepe123\", direccion);\n dcExpResult.add(dc);\n for(int x=0; x<dcResult.size(); x++)\n {\n \n assertTrue(dcExpResult.get(x).getApellido().equals(dcResult.get(x).getApellido()));\n assertTrue(dcExpResult.get(x).getMail().equals(dcResult.get(x).getMail()));\n assertTrue(dcExpResult.get(x).getRutaImagen().equals(dcResult.get(x).getRutaImagen()));\n }\n \n boolean exption = false;\n String [] rutaImagen = {\"/home/jose/imagenes/a.png\",\"/home/jose/imagenes/b.png\"}; \n try { \n icu.CargarDatosUsuario(\"elrey\",\"[email protected]\", \"El rey de las minutas\", \"elrey123\", direccion, rutaImagen);\n } catch (Exception ex) { \n exption = true;\n }\n assertTrue(exption);*/\n \n \n \n \n}", "public void iniciar()\n {\n }", "public static void menuEmpleados() throws EmpleadoException, PersistenciaException, DniException, DireccionException, PersonaException {\n boolean salir = false;\n int opcion;\n Empleado empleado;\n String dni=null;\n\n while (!salir) {\n System.out.println(\"\\n1. Insertar empleado\");\n System.out.println(\"2. Modificar empleado\");\n System.out.println(\"3. Eliminar empleado\");\n System.out.println(\"4. Listado de empleados\");\n System.out.println(\"5. Obtener datos empleado\");\n System.out.println(\"6. Salir\\n\");\n empleado = null;\n\n try {\n\n System.out.print(\"Introduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n\n switch (opcion) {\n case 1:\n empleado = generarDatosEmpleado(true);\n empleadoController.insertar(empleado);\n System.out.println(\"\\nEmpleado insertado\");\n break;\n case 2:\n System.out.println(\"Proceda a introducir los datos, el DNI debe mantenerse igual\");\n empleado = generarDatosEmpleado(false);\n empleadoController.modificar(empleado);\n System.out.println(\"\\nCliente modificado\");\n break;\n case 3:\n System.out.print(\"Introduzca el dni del empleado: \");\n dni = teclado.next();\n validarDni(dni);\n empleadoController.eliminar(empleadoController.buscar(dni));\n System.out.println(\"\\nEmpleado eliminado\");\n break;\n case 4:\n System.out.println(\"Lista de empleados: \");\n ArrayList<Empleado> empleados = empleadoController.listadoEmpleados();\n for (Empleado empleado2 : empleados) {\n System.out.println(empleado2.toString());\n }\n break;\n case 5:\n System.out.print(\"Introduzca el dni del empleado: \");\n dni = teclado.next();\n validarDni(dni);\n empleado = empleadoController.buscar(dni);\n System.out.println(empleado.toString());\n break;\n case 6:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 6\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }", "@Test\r\n public void testGetUtilizador() {\r\n System.out.println(\"getUtilizador\");\r\n CentroExposicoes ce = new CentroExposicoes();\r\n \r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n instance.getUtilizador(\"[email protected]\");\r\n }", "@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}", "@Override\r\n\tpublic void iniciarSesion() {\n\t\tthis.contextoOrdenMenosUno = new Contexto();\r\n\t\t//Obtengo el orden del xml de configuración\r\n\t\tthis.orden = Constantes.ORDER_MAX_PPMC;\r\n\t\t//Creo tantos Ordenes como dice el XML\r\n\t\tthis.listaOrdenes = new ArrayList<Orden>(this.orden+1);\r\n\t\tthis.inicializarListas();\r\n\t\tthis.compresorAritmetico = new LogicaAritmetica();\r\n\t\tthis.initSession = true;\r\n\t\tthis.tiraBits = \"\";\r\n\t\tthis.bitsBuffer = new StringBuffer();\r\n\t\tthis.finalizada = false;\r\n\t\tthis.contextoPrevio = false;\r\n\t\tthis.contextoActual = new String();\r\n\t}", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public void ligar() {\n\t\t\n\t\ttry {\n\t\t\tthis.sistemaOperacional.iniciarSistema();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Nao foi possivel iniciar o sistema:\");\n\t\t\tSystem.out.println(\"\\t\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Test(expected = Exception.class)\n public void testCSesionAgregarLiena1() throws Exception {\n System.out.println(\"testCSesionAgregarLiena No Login\");\n CSesion instance = new CSesion();\n instance.agregaLinea(1, 2);\n }", "private void controladorLogin(Controlador controlador){\n this.contLogin = controlador.getLogin();\n login.setControlContinuar(contLogin);\n }", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "@Test\n public void testCSesionInicioxNick() throws Exception {\n System.out.println(\"testCSesionInicioxNick\");\n CSesion instance = new CSesion();\n DataUsuario dU = instance.inicioSesion(\"Tim1\", \"tim123\");\n }", "public static void menuEmpleado() throws ClienteException, PersistenciaException, DniException, VehiculoException, DireccionException, VentaException, PersonaException {\n boolean salir = false;\n int opcion;\n\n while (!salir) {\n System.out.println(\"\\n1. Realizar ventas\");\n System.out.println(\"2. Gestionar clientes\");\n System.out.println(\"3. Salir\\n\");\n\n try {\n System.out.print(\"Introduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n\n switch (opcion) {\n case 1:\n menuVentas();\n break;\n case 2:\n menuClientes();\n break;\n case 3:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 3\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "@Test\n public void testCSesionVerInfoUsuario() throws Exception {\n System.out.println(\"testCSesionVerInfoUsuario\");\n CSesion instance = new CSesion();\n instance.inicioSesion(\"[email protected]\", \"tim123\");\n DataUsuario dU = instance.verInfoPerfil();\n }", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "@Test\n public void testExecutarAcao() {\n try {\n SBCore.configurar(new ConfiguradorCoreShortMessageService(), SBCore.ESTADO_APP.DESENVOLVIMENTO);\n ItfResposta resposta = FabIntegracaoSMS.ENVIAR_MENSAGEM.getAcao(\"+5531971125577\", \"Teste\").getResposta();\n Assert.notNull(resposta, \"A resposta foi nula\");\n\n if (!resposta.isSucesso()) {\n resposta.dispararMensagens();\n }\n Assert.isTrue(resposta.isSucesso(), \"Falha enviando SMS\");\n\n } catch (Throwable t) {\n SBCore.RelatarErro(FabErro.SOLICITAR_REPARO, \"Erro \" + t.getMessage(), t);\n }\n }", "public static void inicializacionPartidaConsola() {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\tControladorConsola c = new ControladorConsola(f, p, in);\n\n\t\tnew VistaConsola(c);\n\n\t\tc.run();\n\t}", "@Test\n public void testSetOrcamento() throws Exception {\n System.out.println(\"setOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamento expResult = null;\n Orcamento result = instance.setOrcamento(orc);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCSesionInicioxMail() throws Exception {\n System.out.println(\"testCSesionInicioxMail\");\n CSesion instance = new CSesion();\n DataUsuario dU = instance.inicioSesion(\"[email protected]\", \"tim123\");\n }", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public void mostrarDatos(Object obj) throws Exception {\r\n Hospitalizacion hospitalizacion = (Hospitalizacion) obj;\r\n try {\r\n deshabilitarCampos(false);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n listarIngresos(lbxNro_ingreso,\r\n listarAdmisiones(hospitalizacion, true), false);\r\n Utilidades.seleccionarListitem(lbxNro_ingreso,\r\n hospitalizacion.getNro_ingreso());\r\n\r\n Paciente paciente = new Paciente();\r\n paciente.setCodigo_empresa(hospitalizacion.getCodigo_empresa());\r\n paciente.setCodigo_sucursal(hospitalizacion.getCodigo_sucursal());\r\n paciente.setNro_identificacion(hospitalizacion\r\n .getNro_identificacion());\r\n paciente = getServiceLocator().getPacienteService().consultar(\r\n paciente);\r\n tbxNro_identificacion.seleccionarRegistro(paciente, hospitalizacion\r\n .getNro_identificacion(),\r\n (paciente != null ? paciente.getNombreCompleto() : \"\"));\r\n datos_seleccion\r\n .put(\"tipo_identificacion\",\r\n (paciente != null ? paciente\r\n .getTipo_identificacion() : \"\"));\r\n datos_seleccion.put(\"sexo\", (paciente != null ? paciente.getSexo()\r\n : \"\"));\r\n datos_seleccion.put(\r\n \"fecha_nac\",\r\n (paciente != null ? new SimpleDateFormat(\"dd/MM/yyyy\")\r\n .format(paciente.getFecha_nacimiento()) : \"\"));\r\n tbxNacimiento.setValue(new java.text.SimpleDateFormat(\"dd/MM/yyyy\")\r\n .format(paciente.getFecha_nacimiento()));\r\n tbxSexo.setValue(Utilidades.getNombreElemento(paciente.getSexo(),\r\n \"sexo\", HospitalizacionAction.this));\r\n tbxEstrato.setValue(paciente.getEstrato());\r\n tbxEdad.setValue(Util.getEdad(new java.text.SimpleDateFormat(\r\n \"dd/MM/yyyy\").format(paciente.getFecha_nacimiento()), \"1\",\r\n true));\r\n tbxTipo_afiliado.setValue(Utilidades.getNombreElemento(\r\n paciente.getTipo_afiliado(), \"tipo_afiliado\",\r\n HospitalizacionAction.this));\r\n\r\n Prestadores prestadores = new Prestadores();\r\n prestadores.setCodigo_empresa(hospitalizacion.getCodigo_empresa());\r\n prestadores\r\n .setCodigo_sucursal(hospitalizacion.getCodigo_sucursal());\r\n prestadores.setNro_identificacion(hospitalizacion\r\n .getCodigo_prestador());\r\n prestadores = getServiceLocator().getPrestadoresService()\r\n .consultar(prestadores);\r\n\r\n tbxCodigo_prestador.seleccionarRegistro(prestadores,\r\n hospitalizacion.getCodigo_prestador(),\r\n (prestadores != null ? prestadores.getNombres() + \" \"\r\n + prestadores.getApellidos() : \"\"));\r\n\r\n datos_seleccion.put(\"codigo_administradora\",\r\n hospitalizacion.getCodigo_administradora());\r\n datos_seleccion.put(\"id_plan\", hospitalizacion.getId_plan());\r\n\r\n Administradora administradora = new Administradora();\r\n administradora.setCodigo_empresa(hospitalizacion\r\n .getCodigo_empresa());\r\n administradora.setCodigo_sucursal(hospitalizacion\r\n .getCodigo_sucursal());\r\n administradora\r\n .setCodigo(hospitalizacion.getCodigo_administradora());\r\n administradora = getServiceLocator().getAdministradoraService()\r\n .consultar(administradora);\r\n\r\n Contratos contratos = new Contratos();\r\n contratos.setCodigo_empresa(hospitalizacion.getCodigo_empresa());\r\n contratos.setCodigo_sucursal(hospitalizacion.getCodigo_sucursal());\r\n contratos.setCodigo_administradora(hospitalizacion\r\n .getCodigo_administradora());\r\n contratos.setId_plan(hospitalizacion.getId_plan());\r\n contratos = getServiceLocator().getContratosService().consultar(\r\n contratos);\r\n tbxAseguradora.setValue((administradora != null ? administradora\r\n .getNombre() : \"\")\r\n + \" - \"\r\n + (contratos != null ? contratos.getNombre() : \"\"));\r\n\r\n Utilidades.seleccionarListitem(lbxVia_ingreso,\r\n hospitalizacion.getVia_ingreso());\r\n dtbxFecha_ingreso.setValue(hospitalizacion.getFecha_ingreso());\r\n tbxNumero_autorizacion.setValue(hospitalizacion\r\n .getNumero_autorizacion());\r\n Utilidades.seleccionarListitem(lbxCausa_externa,\r\n hospitalizacion.getCausa_externa());\r\n Utilidades.seleccionarListitem(lbxEstado_salida,\r\n hospitalizacion.getEstado_salida());\r\n dtbxFecha_egreso.setValue(hospitalizacion.getFecha_egreso());\r\n\r\n Cie cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getCodigo_diagnostico_principal());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxCodigo_diagnostico_principal.seleccionarRegistro(cie,\r\n hospitalizacion.getCodigo_diagnostico_principal(),\r\n (cie != null ? cie.getNombre() : \"\"));\r\n datos_seleccion.put(\"cie_diagnostico_principal\", cie);\r\n\r\n cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getCodigo_diagnostico1());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxCodigo_diagnostico1.seleccionarRegistro(cie, hospitalizacion\r\n .getCodigo_diagnostico1(), (cie != null ? cie.getNombre()\r\n : \"\"));\r\n datos_seleccion.put(\"cie_diagnostico_1\", cie);\r\n\r\n cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getCodigo_diagnostico2());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxCodigo_diagnostico2.seleccionarRegistro(cie, hospitalizacion\r\n .getCodigo_diagnostico2(), (cie != null ? cie.getNombre()\r\n : \"\"));\r\n datos_seleccion.put(\"cie_diagnostico_2\", cie);\r\n\r\n cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getCodigo_diagnostico3());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxCodigo_diagnostico3.seleccionarRegistro(cie, hospitalizacion\r\n .getCodigo_diagnostico3(), (cie != null ? cie.getNombre()\r\n : \"\"));\r\n datos_seleccion.put(\"cie_diagnostico_3\", cie);\r\n\r\n cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getComplicacion());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxComplicacion.seleccionarRegistro(cie,\r\n hospitalizacion.getComplicacion(),\r\n (cie != null ? cie.getNombre() : \"\"));\r\n datos_seleccion.put(\"cie_complicacion\", cie);\r\n\r\n cie = new Cie();\r\n cie.setCodigo(hospitalizacion.getCausa_muerte());\r\n cie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n tbxCausa_muerte.seleccionarRegistro(cie,\r\n hospitalizacion.getCausa_muerte(),\r\n (cie != null ? cie.getNombre() : \"\"));\r\n\r\n datos_seleccion.put(\"cie_causa_muerte\", cie);\r\n\r\n validarRegistroEditar(hospitalizacion);\r\n\r\n // Mostramos la vista //\r\n tbxAccion.setText(\"modificar\");\r\n accionForm(true, tbxAccion.getText());\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }", "@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}", "@PostConstruct\n\tpublic void inicia() {\n\t\t\n\t\tinicializaBD();\n\t\tcontrolPrincipal.inicia();\n\t}", "private static void iniciarAmbienteDeUsuario() {\r\n\r\n\t\tnew AmbienteParaUsuarioEscolherGerenciamento(user);\r\n\r\n\t}", "@BeforeEach\n\tpublic void cadastrar() {\n\t\tescola = new Escola( null, \"Test School\", true);\n\t\tdiretor = new Diretor(escola, \"Rodrigo\", 1000, new GregorianCalendar(1998, Calendar.APRIL, 2));\n\t\t\n\t\t\n\t\tSala sala1 = new Sala(301, 20);\n\t\tSala sala2 = new Sala(304, 40);\n\t\t\n\t\tescola.addSala(sala1);\n\t\tescola.addSala(sala2);\n\t\t\n\t\tProfessor prof1 = new Professor(\"Barcelos\", Formacao.MESTRADO);\n\t\tProfessor prof2 = new Professor(\"Salvio\" , Formacao.ESPECIALIZACAO);\n\t\t\n\t\tList<Professor> professores = new ArrayList<>();\n\t\tprofessores.add(prof1);\n\t\tprofessores.add(prof2);\n\t\t\n\t\tescola.setProfessores(professores);\n\t\t\n\t\ttry {\n\t\t\t//escolaDao.cadastrar(escola);\n\t\t\tdiretorDao.cadastrar(diretor);\n\t\t\tdiretorDao.commit();\n\t\t} catch (CommitException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Falha no teste\");\n\t\t}\n\t}", "@Test\n public void testLocar() {\n System.out.println(\"locar\");\n Usuario instance = null;\n instance.locar();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "void testeAcessos() {\n System.out.println(formaDeFalar);// acessa por herança\n System.out.println(todosSabem);\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "@SuppressWarnings(\"static-access\")\n\t@Test\n\tpublic void testRegistraEmpleado() throws Exception {\n\t\tString guid = uid.generateGUID(altaEmpleado);\n\t\ttry {\n\t\t\tdataEmpleado.registraEmpleado(altaEmpleado);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.debug(guid, this.getClass(), \"Error\");\n\t\t}\n\t}", "@Test\n\tpublic void testActualizaEmp() {\n\n\t\tboolean valor = serv.actualizaEmp(empl, \"tel\", \"55677354\");\n\t\tassertEquals(\"Se esperaba un false\",valor, true);\n\t}", "public CadastroDeEmpresa() {\n initComponents();\n preencherTabela(\"select * from empresa order by id\");\n }", "private void enviarRequisicaoAdicionar() {\n servidor.adicionarPalito(nomeJogador);\n atualizarPalitos();\n }", "@Test\n public void testGetOrcamentos() throws Exception {\n System.out.println(\"getOrcamentos\");\n Integer idOfCostumer = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n List<Orcamento> expResult = null;\n List<Orcamento> result = instance.getOrcamentos(idOfCostumer);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void inizia() throws Exception {\n\n try { // prova ad eseguire il codice\n\n /* questo dialogo non e' modale */\n this.getDialogo().setModal(false);\n\n this.setTitolo(TITOLO_DIALOGO);\n this.addBottoneStampa();\n this.addBottoneChiudi();\n\n /* crea il modulo con db in memoria */\n this.creaModuloMem();\n\n /* crea i pannelli del dialogo */\n this.creaPannelli();\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "public void inicializar(Coleccion coleccion){\n cargador.inicializar();\n analizador.inicializar();\n gestorAlmacenamiento.inicializar(coleccion);\n\n }", "@Test\n\tpublic void testCrearEjercicio1(){\n\t\tEjercicio ej = new Ejercicio(1, true, Plataforma.getFechaActual().plusDays(1), Plataforma.getFechaActual().plusDays(4),\n\t\t\t\ttema1, \"Ejercicio1\", true, mates);\n\t\t\n\t\tassertTrue(tema1.getSubcontenido().contains(ej));\n\t\tassertEquals(ej.getAsignatura(), mates);\n\t\tassertEquals(ej.getEstado(), EstadoEjercicio.ESPERA);\n\t\tassertEquals(ej.getFechaFin(), Plataforma.getFechaActual().plusDays(4));\n\t\tassertEquals(ej.getFechaIni(), Plataforma.getFechaActual().plusDays(1));\n\t\tassertTrue(ej.getNotaMedia() == 0);\n\t\tassertTrue(ej.getNumTerminados() == 0);\n\t\tassertTrue(ej.getPadre() == tema1);\n\t\tassertTrue(ej.getPeso() == 1);\n\t\tassertEquals(ej.getTitulo(), \"Ejercicio1\");\n\t}", "@Test\n public void testPrestarEjemplar() {\n System.out.println(\"prestarEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(1);\n Usuario usuario = new UsuariosList().getUsuarios().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar result = instance.prestarEjemplar(ejemplar, usuario);\n Ejemplar expResult = ejemplar;\n expResult.setUsuarioId(usuario);\n \n assertEquals(expResult, result);\n\n }", "public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }", "@Given(\"^El usuario quiere acceder al sistema$\")\n\tpublic void El_usuario_quiere_acceder_al_sistema() throws Throwable {\n\t\tdao = new DAOPersona();\n\t p=new Persona(\"Carlos\", \"Delgado\", \"carlitos93\", \"[email protected]\", \"a1Zs7s2DM\", \"Calle Jane Doe\", \"0\", \"photo\", false, null, null, null);\n\t assert(true);\n\t}", "@Test\n public void testInicioSesion_String_String() throws Exception {\n System.out.println(\"inicioSesion\");\n String nm = \"Dan\";\n String contra = \"danr\";\n CSesion instance = new CSesion();\n DataUsuario result = instance.inicioSesion(nm, contra);\n Usuario user = instance.getUsuario();\n DataUsuario infoP = instance.verInfoPerfil();\n\n Integer cant = 2;\n Integer num = 2;\n instance.agregaLinea(cant, num);\n\n DataOrdenCompra carrito = instance.verCarrito();\n instance.generarOrden();\n\n boolean puedeComent = instance.puedeComentar(2); // lo compro asi que puede\n instance.comentar(2, \"Yo lo compré\");\n\n //instance.responder(2, \"Si\", 1);\n }", "@Test\n\tpublic void testeLocacao_UsuarioVazio() throws Exception {\n\t\tList<Filme> filme = Arrays.asList(new Filme(\"Filme 1\", 2, 5.0));\n\t\t\n\t\ttry {\n\t\t\tservice.alugarFilme(null, filme);\n\t\t\tAssert.fail();\n\t\t} catch (LocadoraException e) {\n\t\t\tassertThat(e.getMessage(), CoreMatchers.is(\"Usuario vazio!\"));\n\t\t}\n\t}", "public void localizarDados(int idOrcamento){\n OrcamentoCursoController orcamentoCursoController = new OrcamentoCursoController();\n this.orcamentocurso = orcamentoCursoController.consultar(idOrcamento);\n if (orcamentocurso!=null){\n ClienteController clienteController = new ClienteController();\n cliente = clienteController.consultar(orcamentocurso.getCliente());\n if (cliente!=null){\n parajTextField.setText(cliente.getEmail());\n }\n }\n }", "@Test\n\tpublic void testResponderEjercicio2(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(0));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t\tassertTrue(nacho.getEstadisticas().isEmpty());\n\t}", "public Pn_Nuevo_Empleado() {\n initComponents();\n RowApariencia();\n RowHeaderApariencia();\n \n\n aparenciaTabs();\n bloquearComponentes();\n ComponenteNoEditable();\n cbIndexInicial();\n cargarTabla();\n cargarDepartamentos();\n cargarCargos();\n cargarHorarios();\n tamañoTabla();\n\n }", "@Test\n public void testConnectionEchec() {\n try {\n dao.seConnecter(loginInvalide, mdpValide);\n Assert.fail(\"c'est pas normal...\");\n } catch (QualitException paramE) {\n Assert.assertEquals(\n QualitEnum.PROBLEME_IDENTIFICATION,\n paramE.getCodeErreur());\n }\n }", "private void teclouEnter() {\n //menu principal\n if (this.getFocusOwner() == listaMenuPrincipal) {\n if (listaMenuPrincipal.getSelectedIndex() == 0 || listaMenuPrincipal.getSelectedIndex() == 1) {\n LoginGerenteSupervisor janelaLoginGerenteSupervisor = new LoginGerenteSupervisor(this, true);\n janelaLoginGerenteSupervisor.setLocationRelativeTo(null);\n janelaLoginGerenteSupervisor.setVisible(true);\n //supervisor\n if (listaMenuPrincipal.getSelectedIndex() == 0) {\n if (janelaLoginGerenteSupervisor.loginSupervisor(true)) {\n panelSubMenu.setVisible(true);\n ((CardLayout) panelCard.getLayout()).show(panelCard, \"cardSupervisor\");\n listaSubMenuSupervisor.requestFocus();\n listaSubMenuSupervisor.setSelectedIndex(0);\n }\n }\n //gerente\n if (listaMenuPrincipal.getSelectedIndex() == 1) {\n if (janelaLoginGerenteSupervisor.loginGerente(true)) {\n panelSubMenu.setVisible(true);\n ((CardLayout) panelCard.getLayout()).show(panelCard, \"cardGerente\");\n listaSubMenuGerente.requestFocus();\n listaSubMenuGerente.setSelectedIndex(0);\n }\n }\n }\n //saida temporaria\n if (listaMenuPrincipal.getSelectedIndex() == 2) {\n if ((SessaoUsuario.statusCaixa == SC_ABERTO)) {\n int escolha = JOptionPane.showOptionDialog(this, \"Deseja fechar o caixa temporariamente?\", \"Pergunta do Sistema\",\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,\n null, opcoesResposta, null);\n if (escolha == JOptionPane.YES_OPTION) {\n try {\n NfceControllerGenerico<NfceMovimentoVO> movimentoController = new NfceControllerGenerico<>();\n SessaoUsuario.movimento.setStatusMovimento(\"T\");\n SessaoUsuario.usuario = null;\n movimentoController.atualizar(SessaoUsuario.movimento);\n\n telaPadrao();\n\n MovimentoAberto ma = new MovimentoAberto(this, true);\n ma.setLocationRelativeTo(null);\n ma.setVisible(true);\n telaPadrao();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"Erro ao registrar a saída temporária.\\n\" + ex.getMessage(), \"Aviso do Sistema\", JOptionPane.ERROR_MESSAGE);\n }\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Status do caixa não permite saída temporária.\", \"Aviso do Sistema\", JOptionPane.WARNING_MESSAGE);\n }\n }\n }\n //menu principal - submenu supervisor\n if (this.getFocusOwner() == listaSubMenuSupervisor) {\n //inicia movimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 0) {\n iniciaMovimento();\n }\n //encerra movimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 1) {\n encerraMovimento();\n }\n //suprimento\n if (listaSubMenuSupervisor.getSelectedIndex() == 3) {\n suprimento();\n }\n //sangria\n if (listaSubMenuSupervisor.getSelectedIndex() == 4) {\n sangria();\n }\n\n }\n //menu principal - submenu gerente\n if (this.getFocusOwner() == listaSubMenuGerente) {\n //inicia movimento\n if (listaSubMenuGerente.getSelectedIndex() == 0) {\n iniciaMovimento();\n }\n //encerra movimento\n if (listaSubMenuGerente.getSelectedIndex() == 1) {\n encerraMovimento();\n }\n //suprimento\n if (listaSubMenuGerente.getSelectedIndex() == 3) {\n suprimento();\n }\n //sangria\n if (listaSubMenuGerente.getSelectedIndex() == 4) {\n sangria();\n }\n }\n //menu operacoes\n if (this.getFocusOwner() == listaMenuOperacoes) {\n //carrega dav\n if (listaMenuOperacoes.getSelectedIndex() == 0) {\n if (SessaoUsuario.statusCaixa == SC_ABERTO) {\n CarregaOrcamento janelaCarregaOrcamento = new CarregaOrcamento(this, true);\n janelaCarregaOrcamento.setLocationRelativeTo(null);\n janelaCarregaOrcamento.setVisible(true);\n if (!janelaCarregaOrcamento.cancelado) {\n dav = janelaCarregaOrcamento.getOrcamento();\n if (dav != null) {\n fechaMenuOperacoes();\n try {\n carregaDAV();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro ao carregar o orçamento.\\n\" + e.getMessage(), \"Erro do Sistema\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Já existe uma venda em andamento.\", \"Aviso do Sistema\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n\n //seleciona certificado digital\n if (listaMenuOperacoes.getSelectedIndex() == 1) {\n if (SessaoUsuario.statusCaixa != SC_VENDA_EM_ANDAMENTO) {\n selecionaCertificado();\n } else {\n JOptionPane.showMessageDialog(this, \"Existe uma venda em andamento.\", \"Aviso do Sistema\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n\n //consulta status serviço\n if (listaMenuOperacoes.getSelectedIndex() == 2) {\n SessaoUsuario.statusServico();\n }\n\n }\n }", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "public void iniciarPartida() {\n\t\tJuego juegoActual = controladorJuego.getJuego();\n\t\t// Recuperamos Tablero de juego para obtener las dimensiones\n\t\tTablero tableroActual = juegoActual.getTablero();\n\n\t\t// Creamos el layout para introducir la matriz con las casillas\n\t\tthis.setLayout(new BorderLayout());\n\t\tpaneltablero = new JPanel(new GridLayout(tableroActual.getNumFilas(), tableroActual.getNumCols()));\n\t\tthis.add(paneltablero);\n\n\t\t// Creamos la matriz de JButton que nos permetira interacctuar\n\t\ttablero = new JButton[tableroActual.getNumFilas()][tableroActual.getNumCols()];\n\t\tfor (int x = 0; x < tableroActual.getNumFilas(); x++) {\n\t\t\tfor (int y = 0; y < tableroActual.getNumCols(); y++) {\n\t\t\t\ttablero[x][y] = new JButton();\n\t\t\t\ttablero[x][y].setName(\"Casilla\");\n\t\t\t\ttablero[x][y].setPreferredSize(new Dimension(32, 32));\n\t\t\t\ttablero[x][y].addMouseListener((MouseListener) this.getControladorJuego());\n\t\t\t\tpaneltablero.add(tablero[x][y]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tbarraMenu();\n\n\t\tventana.setContentPane(this);\n\t\tventana.setResizable(false);\n\t\tventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tventana.pack();\n\t\tventana.setVisible(true);\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void initHis_atencion_embarazada() throws Exception {\n\t\ttry {\r\n\t\t\taccionForm(true, \"registrar\");\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Error !!\", Messagebox.OK,\r\n\t\t\t\t\tMessagebox.ERROR);\r\n\t\t}\r\n\r\n\t}", "private void inizia() throws Exception {\n this.setNomeChiave(CHIAVE_NAV);\n this.setUsaNuovo(false);\n this.setUsaElimina(false);\n this.setUsaRicerca(true);\n this.setUsaSelezione(true);\n this.setUsaStampaLista(false);\n this.setUsaProietta(false);\n this.setAggiornamentoTotaliContinuo(true);\n }", "@Test\r\n\tpublic void CT04CadastrarUsuarioComNomeEmBranco() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeEmBranco();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}", "@Test\r\n\tpublic void CT03CadastrarUsuarioComRaNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRAInvalido_nulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "public conectar(){\r\n \r\n }", "@PostConstruct\r\n public void iniciar() {\n notaEntrada.setIdnotaentrada(0);\r\n notaEntrada.setOrdenCompra(new OrdenCompra());\r\n notaEntrada.setNumero(maxNumero() + 1);\r\n notaEntrada.setFechaReg(new Date());\r\n notaEntrada.setFechaDocref(null);\r\n notaEntrada.setNroDocref(\"\");\r\n notaEntrada.setObservacion(\"\");\r\n notaEntrada.setTipoIngreso(\"\");\r\n notaEntrada.setProveedor(new Proveedor());\r\n notaEntrada.setAlmacenDestino(new Almacen());\r\n listNotaEntradaDetalle.clear();\r\n this.producto = null;\r\n }", "private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }", "@Test\n public void testDevolverEjemplar() {\n System.out.println(\"devolverEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar result = instance.devolverEjemplar(ejemplar);\n Ejemplar expResult = ejemplar;\n expResult.setUsuarioId(null);\n \n assertEquals(expResult, result);\n\n }", "@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}", "private void enviarDatos() {\n try {\n if (validarDatos()) { // verificar si todos los datos obligatorios tienen informacion\n // verificar que el usuario de la pantalla presiono el boton YES\n if (obtenerMensajeDeConfirmacion() == JOptionPane.YES_OPTION) {\n llenarEntidadConLosDatosDeLosControles(); // llenar la entidad de Rol con los datos de la caja de texto del formulario\n int resultado = 0;\n switch (opcionForm) {\n case FormEscOpcion.CREAR:\n resultado = ClienteDAL.crear(clienteActual); // si la propiedad opcionForm es CREAR guardar esos datos en la base de datos\n break;\n case FormEscOpcion.MODIFICAR:\n resultado = ClienteDAL.modificar(clienteActual);// si la propiedad opcionForm es MODIFICAR actualizar esos datos en la base de datos\n break;\n case FormEscOpcion.ELIMINAR:\n // si la propiedad opcionForm es ELIMINAR entonces quitamos ese registro de la base de datos\n resultado = ClienteDAL.eliminar(clienteActual);\n break;\n default:\n break;\n }\n if (resultado != 0) {\n // notificar al usuario que \"Los datos fueron correctamente actualizados\"\n JOptionPane.showMessageDialog(this, \"Los datos fueron correctamente actualizados\");\n if (frmPadre != null) {\n // limpiar los datos de la tabla de datos del formulario FrmRolLec\n frmPadre.iniciarDatosDeLaTabla(new ArrayList());\n }\n this.cerrarFormulario(false); // Cerrar el formulario utilizando el metodo \"cerrarFormulario\"\n } else {\n // En el caso que las filas modificadas en el la base de datos sean cero \n // mostrar el siguiente mensaje al usuario \"Sucedio un error al momento de actualizar los datos\"\n JOptionPane.showMessageDialog(this, \"Sucedio un error al momento de actualizar los datos\");\n }\n }\n }\n } catch (Exception ex) {\n // En el caso que suceda un error al ejecutar la consulta en la base de datos \n // mostrar el siguiente mensaje al usuario \"Sucedio un error al momento de actualizar los datos\"\n JOptionPane.showMessageDialog(this, \"Sucedio el siguiente error: \" + ex.getMessage());\n }\n\n }", "public void inicio(){\n }", "public void turnoIniciado() {\n\t\t\n\t\tfor (Partida.Observer o : observers) {\n\n\t\t\to.turnoIniciado(tablero, turno);\n\t\t}\n\t}", "@Test\n\tpublic void testIrParaCarrinho_InformacoesPersistidas() {\n\t\ttestIncluirProdutoNoCarrinho_ProdutoIncluidoComSucesso();\n\t\tcarrinhoPage = modalProdutoPage.clicarBotaoProceedToCheckout();\n\t\t\t\n\t\tassertEquals(esperado_nomeDoProduto, carrinhoPage.obter_nomeDoProduto());\n\t\tassertEquals(esperado_precoDoProduto, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_precoDoProduto()));\n\t\tassertEquals(esperado_tamanhoDoProduto, carrinhoPage.obter_tamanhoDoProduto());\n\t\tassertEquals(esperado_corDoProduto, carrinhoPage.obter_corDoProduto());\n\t\tassertEquals(esperado_inputQuantidadeDoProduto, Integer.parseInt(carrinhoPage.obter_inputQuantidadeDoProduto()));\n\t\tassertEquals(esperado_subTotalDoProduto, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_subTotalDoProduto()));\n\t\t\n\t\tassertEquals(esperado_numeroItensTotal, Funcoes.removeTextoItemsDevolveInt(carrinhoPage.obter_numeroItensTotal()));\n\t\tassertEquals(esperado_subtotalTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_subtotalTotal()));\n\t\tassertEquals(esperado_shippingTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_shippingTotal()));\n\t\tassertEquals(esperado_totalTaxExclTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_totalTaxExclTotal()));\n\t\tassertEquals(esperado_totalTaxInclTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_totalTaxInclTotal()));\n\t\tassertEquals(esperado_taxesTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_taxesTotal()));\n\t\t\n\t}", "public void cadastrarInteresse(String nome, String email, String tituloImovel) throws SQLException {\t\t\n\t\tif(buscaInteressado(nome, email) == true) {\n\t\t\tString sql = \"INSERT INTO interesse(nomeInteressado, emailInteressado, titulo) VALUES(?,?,?)\";\n\t\t\ttry { \n\t PreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t stmt.setString(1, nome); \n\t stmt.setString(2, email); \n\t stmt.setString(3, tituloImovel); \n\t stmt.execute();\n\t stmt.close(); \n\t JOptionPane.showMessageDialog(null, \"Interesse cadastrado com sucesso!\");\n\t } catch (SQLException e) { \n\t System.out.println(e.getMessage()); \n\t }\t\n\t\t}else {\n\t\t\tif(verificarEmail(email)==false) {\n\t\t\t\tcadastrarInteressado(nome, email);\n\t\t\t\tString sql = \"INSERT INTO interesse(nomeInteressado, emailInteressado, titulo) VALUES(?,?,?)\";\n\t\t\t\ttry { \n\t\t PreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t\t stmt.setString(1, nome); \n\t\t stmt.setString(2, email); \n\t\t stmt.setString(3, tituloImovel); \n\t\t stmt.execute();\n\t\t stmt.close(); \n\t\t JOptionPane.showMessageDialog(null, \"Interesse cadastrado com sucesso!\");\n\t\t\t\t} catch (SQLException e) { \n\t\t\t System.out.println(e.getMessage()); \n\t\t\t }\n\t\t\t}\n\t\t\telse {\n\t\t\t \tJOptionPane.showMessageDialog(null, \"Este email já está cadastrado, favor utilizar outro.\");\n\t\t }\n\t\t}\n\t}", "@Test\n public void testAltaEjemplar() {\n System.out.println(\"AltaEjemplar\");\n Date fechaAdquisicion = new Date(1, 10, 2223);\n Date fechaDevolucion = new Date(1, 10, 2220);\n Date fechaPrestamo = new Date(1, 10, 2222);\n String idEjemplar = \"idEjemplar\";\n String localizacion = \"localizacion\";\n String observaciones = \"observaciones\";\n BibliotecarioController instance = new BibliotecarioController();\n \n Ejemplar result = instance.AltaEjemplar(fechaAdquisicion, fechaDevolucion, fechaPrestamo, idEjemplar, localizacion, observaciones);\n assertEquals(fechaAdquisicion, result.getFechaAdquisicion());\n assertEquals(fechaDevolucion, result.getFechaDevolucion());\n assertEquals(fechaPrestamo, result.getFechaPrestamo());\n assertEquals(idEjemplar, result.getIdEjemplar());\n assertEquals(localizacion, result.getLocalizacion());\n assertEquals(observaciones, result.getObservaciones());\n\n }" ]
[ "0.6781296", "0.6723464", "0.6717733", "0.67102927", "0.6675218", "0.65793765", "0.6491765", "0.64802414", "0.64779633", "0.6474259", "0.6470109", "0.6383852", "0.63701034", "0.63687587", "0.63533217", "0.6350182", "0.6349105", "0.6296869", "0.626096", "0.626096", "0.62580806", "0.62525284", "0.624441", "0.620755", "0.6207344", "0.6193176", "0.6188329", "0.6168417", "0.61679244", "0.61676526", "0.616716", "0.6153895", "0.61502844", "0.61483", "0.61478347", "0.61316335", "0.6125819", "0.61149424", "0.6114008", "0.60993356", "0.6091111", "0.609018", "0.6089615", "0.60854274", "0.6081873", "0.6076329", "0.60706425", "0.60705996", "0.6054353", "0.60491335", "0.6043774", "0.6041774", "0.6039499", "0.60364616", "0.6016759", "0.6016421", "0.6014537", "0.6001514", "0.5997312", "0.59926677", "0.59895873", "0.59884644", "0.5983167", "0.59773827", "0.5970697", "0.5970674", "0.5959185", "0.59562826", "0.595369", "0.5951133", "0.5944923", "0.5942451", "0.59407663", "0.59317416", "0.59292126", "0.59257495", "0.5922531", "0.5915961", "0.5913196", "0.59026027", "0.5900967", "0.58975476", "0.5893803", "0.5889506", "0.5889052", "0.58879924", "0.58796924", "0.587432", "0.585936", "0.58586603", "0.58501846", "0.58475995", "0.58462495", "0.58435655", "0.5843413", "0.58429176", "0.5842884", "0.58408314", "0.5837046", "0.583041", "0.58270264" ]
0.0
-1
Test of actionPerformed method, of class ControladorEmpleados.
@Test public void testActionPerformed() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\r\n\t\t\t\t\tif(\"\".equals(descripcionTF.getText())) {\r\n\t\t\t\t\t\tthrow new Exception(\"La descripcion debe rellenarse\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!validarNumero(horasTF.getText())) {\r\n\t\t\t\t\t\tthrow new Exception(\"Las horas deben ser positivo\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!validarNumero(nivelTF.getText())) {\r\n\t\t\t\t\t\tthrow new Exception(\"El nivel debe ser un número positivo\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(\"\".equals(nombreTF.getText())) {\r\n\t\t\t\t\t\tthrow new Exception(\"El nombre debe rellenarse\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(\"\".equals(tipoTF.getText())) {\r\n\t\t\t\t\t\tthrow new Exception(\"El tipo debe rellenarse\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString nombre = (String) nombreTF.getText();\r\n\t\t\t\t\tInteger horas = Integer.parseInt(horasTF.getText());\r\n\t\t\t\t\tInteger nivel = Integer.parseInt(nivelTF.getText());\r\n\t\t\t\t\tString descripcion = (String) descripcionTF.getText();\r\n\t\t\t\t\tString tipo = (String) tipoTF.getText();\r\n\t\t\t\t\tInteger idEm= Integer.parseInt(empTF.getText());\r\n\t\t\t\t\tController.getInstance().action(\r\n\t\t\t\t\t\t\tnew Contexto(\r\n\t\t\t\t\t\t\t\tEvents.ALTA_CURSO, new TCurso(nombre, true, tipo, descripcion, horas, nivel,idEm)));\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, ex.getMessage(),\"ERROR\",JOptionPane.WARNING_MESSAGE);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirExemplaire() ;}", "abstract void botonEnviar_actionPerformed(ActionEvent e);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). ConsultOuvrage() ;}", "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}", "@Override\r\n public void actionPerformed(ActionEvent nomeDoEvento) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirParution() ;}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\tobjGestorConjunto = new GestorConjuntos();\t\t\t\n\t\t\tobjFecha = new Fecha(currentYear, currentMonth+1, valueInCell);\t\t\t\t\t\n\t\t\tboolean semaforo = objGestorConjunto.anyadriFechaCalendario(objFecha.getAño(), objFecha.getMes(), objFecha.getDia());\n\t\t\t\n\t\t\tif(semaforo==true) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Conjunto añadido al calendario con éxito\",\"Correcto\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\t\t\t\t\n\t\t\t\t//frmMain.dispatchEvent(new WindowEvent(frmMain, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t//frmMain.dispose(); //Destroy the JFrame object\t\t\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El conjunto no ha podido ser añadido al calendario, vuelva a intentarlo. \",\"Incorrecto\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getActionCommand().equals(\"Agregar\")){\r\n\t\t\tboolean validacion =camposPrecios();\r\n\t\t\t\r\n\t\t\tif(validacion==true){\r\n\t\t\t\tagregarJTable();\r\n\t\t\t\tvc.habilitarBotones();\r\n\t\t\t\tvc.cantidadProductos();\r\n\t\t\t\tthis.vc.total();\r\n\t\t\t\tthis.vc.tipoPago();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else if(e.getActionCommand().equals(\"Eliminar Producto\")){\r\n\t\t\tvc.eliminacionFila();\r\n\t\t\tvc.cantidadProductos();\r\n\t\t\tthis.vc.total();\r\n\t\t\r\n\t\t}else if(e.getActionCommand().equals(\"Eliminar Todo\")){\r\n\t\t\tvc.borrarJtable(\"todo\");\r\n\t\t\tvc.cantidadProductos();\r\n\t\t\tthis.vc.total();\r\n\t\t}else if(e.getActionCommand().equals(\"Guardar\")){\r\n\t\t\tagregarCompra();\r\n\t\t\tvc.dispose();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tgetControleur(). saisirOuvrage() ;}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t//Lo pongo a la escucha, y cuando llamo al constructor, quiero que me\n\t\t\t//cree un marco, creado previamente creada la CLASE\n\t\t\tMarco_Emergente marco= new Marco_Emergente(boton_cerrar);\n\t\t\tmarco.setVisible(true);\n\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint edad = Integer.parseInt(edad_necesaria.getText());\r\n\t\t\t\tdouble valor = Double.parseDouble(precio.getText());\r\n\r\n\t\t\t\tif (BaseDeDatos.insertarJuego(new Juego(nombre.getText(), edad, categoria.getSelectedItem().toString(),\r\n\t\t\t\t\t\tvalor, false, null))) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Juego añadido\", \"Atencion\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Problemas a la hora de añadir el juego\", \"Atencion\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString ev = e.getActionCommand();\n\t\tif(ev.equals(\"Buscar Influyentes\")) {\n\t\t\tprincipal.buscarInfluyentes();\n\n\t\t}\n\t\telse if(ev.equals(\"Nivel De Alcance\")){\n\t\t\tprincipal.nivelDeAlcance();\n\t\t}\n\t\t\t\t\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent ae) {\n String command = ae.getActionCommand();\n switch (command) {\n case \"Conferma\":\n if (convalidaCampi()) {\n salvaPrescrizione(creaPrescrizione());\n Utility.chiudiDialog(ae);\n }\n break;\n case \"Annulla\":\n Utility.chiudiDialog(ae);\n break;\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPedidoMesa pedidomesa;\n\t\t\t\ttry {\n\t\t\t\t\tpedidomesa = new PedidoMesa();\n\t\t\t\t\tpedidomesa.setLocationRelativeTo(null);\n\t\t\t\t\tpedidomesa.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tpedidomesa.setVisible(true);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "protected void actionPerformedBtnProcesarVenta(ActionEvent e) {\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n a = crear.guardarAlumno();\n //en la base de datos envio un alumno a guardar\n basealumno.guardarAlumnoBD(a);\n //envio en la venta a limpiar los campos\n crear.limpiarCampos();\n crear.bloquearCampos();\n \n// System.out.println(\"objeto: \"+vca.getName());\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String comando = e.getActionCommand();\n\n if (comando == \"Novo labirinto\")\n this.btnNovoLabirinto();\n else if (comando == \"Abrir labirinto\")\n this.btnAbrirLabirinto();\n else if (comando == \"Salvar labirinto\")\n this.btnSalvarLabirinto();\n else // comando==\"Executar labirinto\"\n this.btnExecutarLabirinto();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPedidoMesa pedidomesa;\n\t\t\t\ttry {\n\t\t\t\t\tpedidomesa = new PedidoMesa();\n\t\t\t\t\tpedidomesa.setLocationRelativeTo(null);\n\t\t\t\t\tpedidomesa.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tpedidomesa.setVisible(true);\n\n\t\t\t\t} catch (Exception 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\tOcultarCasillero(false);\n\t\t\t\tReiniciarPalabra();\n\t\t\t\t\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroMesas cadastromesas;\n\t\t\t\ttry {\n\t\t\t\t\tcadastromesas = new CadastroMesas();\n\t\t\t\t\tcadastromesas.setLocationRelativeTo(null);\n\t\t\t\t\tcadastromesas.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastromesas.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\tMetodos.iniciarJuego();\n\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroMesas cadastromesas;\n\t\t\t\ttry {\n\t\t\t\t\tcadastromesas = new CadastroMesas();\n\t\t\t\t\tcadastromesas.setLocationRelativeTo(null);\n\t\t\t\t\tcadastromesas.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastromesas.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}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tjoueur.piocherCarte(partie.getPioche());\n\n\n\n\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == menu.MenusCliente) {\n vista.setVisible(true);\n }\n if (e.getSource() == vista.btnGuardar) {\n this.insertar();\n }\n if (e.getSource() == vista.btnEliminar) {\n JOptionPane.showMessageDialog(null, \"Hacer doble clic en el registro que desea eliminar\");\n }\n if (e.getSource() == vista.btnEditar) {\n this.modi();\n }\n if (e.getSource() == menu.jmiClientesR) {\n this.reporte();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "public void actionPerformed(ActionEvent ae) {\r\n //----Valida txt de Intentario---//\r\n validaTxt();\r\n //----Valida txt de Intentario---//\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere modificar este producto?\");\r\n if (i == 0) {\r\n modificaDato();\r\n DTM.setRowCount(0);\r\n llenartabla();\r\n }\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tInterfazP p=new InterfazP();\n\t\t\t\tcerrar();\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tRedactarEvaluacionEmpresa emp = new RedactarEvaluacionEmpresa();\r\n\t\t\t\temp.setVisible(true);\r\n\t\t\t}", "private void btnAtualizarTabelaActionPerformed(ActionEvent e) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\t\n\t\tJButton button = (JButton)e.getSource();\n\t\t\n\t\tif(button.equals(buttonInvia))\n\t\t{\n\t\t\tareaRisposta.setText(this.getTestoRisposta(areaDomanda.getText()));\t\t\n\t\t}\t\t\t\t\n\t\telse\n\t\t\tif(button.equals(buttonReset))\n\t\t\t{\n\t\t\t\tareaDomanda.setText(\"\");\n\t\t\t\tareaRisposta.setText(\"\");\n\t\t\t}\n\t\t\t\n\t}", "@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}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tswitch (e.getActionCommand()) {\n\t\tcase ACTION_COMMAND_REGISTRARSE:\n\t\t\tif (!(txtnombreequipo.getText().equals(\"\"))) {\n\t\t\t\ttry {\n\t\t\t\t\tgestor.anadirEquipo(txtnombreequipo.getText(), dateChooser.getDate());\n\t\t\t\t} catch (clsExcepcionEquipoRepetido exv) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this, exv.getMessage());\n\t\t\t\t}\n\n\t\t\t\ttxtnombreequipo.setText(\"\");\n\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El usuario es el DNI\");\n\n\t\t\t\tthis.dispose();\n\t\t\t\tsetModal(true);\n\n\t\t\t\t/**\n\t\t\t\t * Sirve para que no puedas usar la ventana anterior\n\t\t\t\t */\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes rellenar todos los campos\");\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tString comando = e.getActionCommand();\n\n\t\tif (comando.equals(\"addCurso\")) {\n\t\t\tinsertarCurso();\n\t\t} else if (comando.equals(\"addPeriodo\")) {\n\t\t\tcrearPeriodo();\n\t\t} else if (comando.equals(\"actualizarTabla\")) {\n\t\t\tactualizarTablaPeriodos();\n\t\t} else if (comando.equals(\"modificar\")) {\n\t\t\tmodificarPeriodo();\n\t\t} else if (comando.equals(\"reservasPeriodo\")) {\n\t\t\tmostrarReservas();\n\t\t} else if (comando.equals(\"actualizarCorreo\")) {\n\t\t\tactualizarMensajeEnvio();\n\t\t}\n\t}", "abstract void botonAyuda_actionPerformed(ActionEvent e);", "public void actionPerformed(ActionEvent e) {\n\t\tadaptee.botonAyuda_actionPerformed(e);\n\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\r\n \t\tpublic void actionPerformed(ActionEvent e) {\n \t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mniBuscarPrestamoActionPerformed(ActionEvent e) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\n\t\t\t\tProduto prod = null;\n\t\t\t\ttry {\n\t\t\t\t\tif (txtTipo.getText().equals(\"\")) {\n\t\t\t\t\t\tprod = new Produto(txtNome.getText(), txtCodigo.getText(), Integer.parseInt(txtValor.getText()),\n\t\t\t\t\t\t\t\tInteger.parseInt(txtQuantidade.getText()));\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tprod = new Produto(txtNome.getText(), txtCodigo.getText(), Integer.parseInt(txtValor.getText()),\n\t\t\t\t\t\t\t\ttxtTipo.getText(), Integer.parseInt(txtQuantidade.getText()));\n\t\t\t\t\t}\n\t\t\t\t\tlistas.adicionarProduto(prod);\n\t\t\t\t\tSystem.out.println(\"BLZ\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Produto Cadastrado com sucesso!\", \"OK!!\",\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t} catch (Exception e2) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO! Digite um valor valido\", \"ERRO!!\",\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}", "abstract void boton1Jugador_actionPerformed(ActionEvent e);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void actionPerformed(ActionEvent e)\n {\n }", "@Override\n\tpublic void actionPerformed(\n\t\t\tActionEvent e)\n\t\t{\n\t\t\t\n\t\t}", "private void tiendasButtonActionPerformed(java.awt.event.ActionEvent evt) {\n actualizarTiendas();\n }", "public void actionPerformed(ActionEvent e) {\n\t\tadaptee.boton1Jugador_actionPerformed(e);\n\t}", "private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(final java.awt.event.ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tif ( validarCampos() )\n\t\t\t\t\t{\n\t\t\t\t\t\t// obtem uma instacia do menu principal\n\t\t\t\t\t\tfinal ProVMBD proVMBD = ProVMBD.getInstancia();\n\n\t\t\t\t\t\tfinal Map<Long, List<EnumTipoVM>> mapTotalAProcessarPorTipoVM = getMapTotalAProcessarPorTipoVM();\n\n\t\t\t\t\t\t// obtem o tempo de SLA definido em segundos\n\t\t\t\t\t\tfinal Integer slaps = NumberUtils.getInt(jTFSlaps.getText());\n\n\t\t\t\t\t\t// executa os processos e retorna o map com resultado da simulacao\n\t\t\t\t\t\tfinal SortedMap<Long, List<ResultadoVO>> mapResultadoSimulacao = proVMBD\n\t\t\t\t\t\t\t\t.simularVMs(mapTotalAProcessarPorTipoVM, slaps, 1);\n\n\t\t\t\t\t\tatualizarGraficos(mapResultadoSimulacao);\n\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t/**Método que actua cuando nos pulsan el botón del mainActivity\n\t * @param el evento que tenemos que hacer\n\t * */\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tlaKCalResult.setText(this.calculaKCal(Float.parseFloat(this.tfMinutos.getText()), Float.parseFloat(tfKgs.getText()), (String)cbEjercicios.getSelectedItem())) ;\n\t\t\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t{\n\t\t\t\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\tadaptee.botonEditar_actionPerformed(e);\n\t}", "private void numeroDaFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\tadaptee.botonDescargaSobre_actionPerformed(e);\n\t}", "protected void do_btnModificar_actionPerformed(ActionEvent e) {\t\n\t\n\t\tint intIdSistemaEspecificoSeleccionado = (Integer)idSistemaEspecificoSeleccionado;\n\t\t//Asi solo funciona si se ha seleccionado una fila\t\t\t\n\t\tif ( intIdSistemaEspecificoSeleccionado> 0){\n\t\t\tboolean bl1 = listUniqueIdVerModificarSistemaEspecifico.add(intIdSistemaEspecificoSeleccionado);\t\n\t\t\tif (bl1){\n\t\t\t\t//Se le pasa el cbFabricante, para que al actualizar la tabla desde miModificarXXX, lo haga desde el comboBox que el usuario a escogido\n\t\t\t\tModificarSistemaEspecifico miModificarSistemaEspecifico = new ModificarSistemaEspecifico(objetoSistemaEspecifico, miVerModificarController, miConsultaController,miIdSistemaEspecifico,cbFabricante, cbModelo, cbSerie, listUniqueIdVerModificarSistemaEspecifico );\n\t\t\t\tmiVerModificarController.getActualizarElemento().addPropertyChangeListener(PROP_ACTUALIZAR_SISTEMA_ESPECIFICO, miModificarSistemaEspecifico);\n\t\t\t\tidSistemaEspecificoSeleccionado =0;\n\t\t\t}\n\t\t}\n\t}", "private void comCosasActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent e) {\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "private void btnInventarioActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroCardapio cadastrocardapio;\n\t\t\t\ttry {\n\t\t\t\t\tcadastrocardapio = new CadastroCardapio();\n\t\t\t\t\tcadastrocardapio.setLocationRelativeTo(null);\n\t\t\t\t\tcadastrocardapio.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastrocardapio.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}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.7324477", "0.72631603", "0.7116372", "0.7110261", "0.6961706", "0.695753", "0.69573593", "0.688887", "0.6872895", "0.6857445", "0.68117315", "0.67915666", "0.67809904", "0.6768793", "0.67564195", "0.67497593", "0.67467815", "0.6746186", "0.6734945", "0.6731255", "0.6726788", "0.672511", "0.67146355", "0.67066085", "0.66971844", "0.66971844", "0.66971844", "0.669272", "0.6679867", "0.66756344", "0.66756344", "0.66756344", "0.66756344", "0.6671662", "0.6671662", "0.6671136", "0.666923", "0.666817", "0.66651136", "0.66589105", "0.66526294", "0.6651631", "0.6649887", "0.6646765", "0.6645677", "0.6642167", "0.66419685", "0.66419685", "0.6632337", "0.6624024", "0.6615105", "0.66136485", "0.6609969", "0.6609969", "0.6609969", "0.6609969", "0.6609969", "0.6609969", "0.6609969", "0.6609969", "0.66028047", "0.659581", "0.659581", "0.65930486", "0.6590239", "0.6582688", "0.65798366", "0.6576113", "0.6574292", "0.65667033", "0.6566388", "0.6562581", "0.6561571", "0.6560831", "0.655748", "0.6556188", "0.6548427", "0.6547189", "0.6545038", "0.6543562", "0.6542965", "0.6541041", "0.65407807", "0.6539111", "0.65377206", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.65370953", "0.6536553", "0.65314233", "0.65309256", "0.65309256", "0.65309256", "0.65309256" ]
0.0
-1
Test of mouseClicked method, of class ControladorEmpleados.
@Test public void testMouseClicked() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"clicko no butão\");\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tif(telaAtiva!=null){\n\t\t\t\ttelaAtiva.mouseClicked(e);\n\t\t\t}\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"OK\");\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Test\n public void testMouseClicked() {\n System.out.println(\"mouseClicked\");\n MouseEvent e = null; \n //instance.mouseClicked(e);\n \n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\r\n\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"Evento click ratón\");\n }", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n //kolo.clicked();\n //square.clicked();\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) { }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}", "public void mouseClicked(MouseEvent e)\n {}", "@Override\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}" ]
[ "0.71109194", "0.705442", "0.7046648", "0.7046648", "0.7046648", "0.701727", "0.7012667", "0.7007732", "0.69978756", "0.69978756", "0.69958305", "0.69954985", "0.6995238", "0.69912034", "0.69848126", "0.6983125", "0.6983125", "0.69826865", "0.6981006", "0.69715655", "0.6964226", "0.6962004", "0.69568604", "0.69543743", "0.69543743", "0.69543743", "0.6942716", "0.6942716", "0.6937895", "0.69378746", "0.6937792", "0.693319", "0.693319", "0.69210654", "0.69210654", "0.69210654", "0.69210654", "0.69210654", "0.69210654", "0.69210654", "0.69198316", "0.6914873", "0.6914196", "0.6914196", "0.6908965", "0.69068885", "0.69068885", "0.69068885", "0.6901127", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887722", "0.6887621", "0.68816555", "0.68816036", "0.68816036", "0.68816036", "0.68816036", "0.68800026", "0.68800026", "0.68800026", "0.68725777", "0.68702555", "0.68700194", "0.6863759", "0.6863242", "0.6863242", "0.6863242", "0.6862119", "0.6862119", "0.685688", "0.6851908", "0.6851908", "0.6851908", "0.6851908", "0.6851908", "0.6851908", "0.6851908", "0.6851908", "0.6835963", "0.6832775", "0.6821779", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.68192667", "0.6812313", "0.6811705" ]
0.0
-1
Test of mousePressed method, of class ControladorEmpleados.
@Test public void testMousePressed() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mousePressed(MouseEvent e) {\n }", "@Override\n\t\tpublic void mousePressed(MouseEvent e) {}", "@Override\n public void mousePressed(MouseEvent e)\n {\n }", "@Override\n public void mousePressed(MouseEvent e)\n {\n }", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void mousePressed(MouseEvent e) {\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n }", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t}", "@Override\n public void mousePressed(MouseEvent e) {\n }", "@Override\n public void mousePressed(MouseEvent arg0) {\n \n }", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n \t\t\r\n \t}", "@Override\n public void mousePressed(final MouseEvent e)\n {\n }", "@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "@Override\n\t\t\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\n\t\t\t\t\t}", "@Override\r\n public void mousePressed(MouseEvent e) {\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n }", "@Override\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Test\n public void testMousePressed() {\n System.out.println(\"mousePressed\");\n MouseEvent e = null; \n //instance.mousePressed(e);\n \n }", "@Override\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t}", "@Override\n public void mousePressed(MouseEvent e) {\n }", "@Override\n\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n public void mousePressed(MouseEvent e) {\r\n\r\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\r\n\r\n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "public void mousePressed(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\r\n\tpublic void mousePressed(MouseEvent arg0) {\n\t}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n }", "@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}" ]
[ "0.7089948", "0.7077832", "0.70531416", "0.70531416", "0.70494264", "0.70494264", "0.7036521", "0.70359856", "0.70219094", "0.70219094", "0.70219094", "0.7021758", "0.70188516", "0.701247", "0.701247", "0.701247", "0.701247", "0.701247", "0.7009364", "0.70090437", "0.7001915", "0.6998668", "0.6998668", "0.6998668", "0.6998668", "0.69969463", "0.6990628", "0.6987791", "0.6987791", "0.69838357", "0.69838357", "0.69838357", "0.69838357", "0.6981252", "0.69809425", "0.6978289", "0.6978289", "0.69721", "0.69721", "0.69695455", "0.6968", "0.69646585", "0.6963051", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.69623685", "0.6959953", "0.69566596", "0.69566596", "0.69566596", "0.69566596", "0.6950687", "0.6950687", "0.69487697", "0.69487697", "0.69487697", "0.6947966", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.6944457", "0.69401956", "0.69401956", "0.69382954", "0.69374883", "0.69368094", "0.69368094", "0.69368094", "0.69349474", "0.69349474", "0.69349474", "0.69345886", "0.6930362", "0.6930362", "0.6930362" ]
0.0
-1
Test of mouseReleased method, of class ControladorEmpleados.
@Test public void testMouseReleased() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseReleased(MouseEvent e) {}", "public void mouseReleased(MouseEvent e) {}", "public void mouseReleased(MouseEvent e) {}", "public void mouseReleased(MouseEvent e) {\r\n\t}", "public void mouseReleased(MouseEvent e) {\n }", "public void mouseReleased(MouseEvent e) {\n\t\t\n\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\n\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\n\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\n\t}", "public void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseReleased(MouseEvent e) {\n \t\t\r\n \t}", "@Override\n public void mouseReleased(MouseEvent e)\n {\n }", "@Override\n public void mouseReleased(MouseEvent e)\n {\n }", "@Override\n public void mouseReleased(MouseEvent e) {\n }", "public void mouseReleased(MouseEvent e) {\n\t}", "public void mouseReleased(MouseEvent e) {\n\n\t}", "public void mouseReleased(MouseEvent e) {\n\n\t}", "public void mouseReleased(MouseEvent e)\r\n\t{\r\n\t}", "@Override\n public void mouseReleased(MouseEvent e) {\n }", "public void mouseReleased(MouseEvent e) {\n\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\r\n\t}", "@Test\n public void testMouseReleased() {\n System.out.println(\"mouseReleased\");\n MouseEvent e = null; \n //instance.mouseReleased(e);\n \n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t}", "public void mouseReleased(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"solto ermano\");\n\t\t\t}", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t}", "@Override\n public void mouseReleased(final MouseEvent e)\n {\n }", "public void mouseReleased(MouseEvent e)\n\t{\n\t}", "@Override\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t\t}", "@Override\r\n public void mouseReleased(MouseEvent e) {\r\n\r\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\r\n\r\n }", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t}", "@Override\n public void mouseReleased(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseReleased(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"solta o butão\");\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void mouseReleased( MouseEvent e )\n {\n }", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseReleased(MouseEvent e) {\n }", "@Override\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\n\t\t}" ]
[ "0.7494204", "0.74875045", "0.74875045", "0.74516505", "0.74516505", "0.74516505", "0.74514234", "0.74472284", "0.74410695", "0.74410695", "0.74410695", "0.74410695", "0.7438173", "0.7432033", "0.7432033", "0.7432033", "0.7423329", "0.742131", "0.742131", "0.74208474", "0.7400131", "0.7395768", "0.7395768", "0.73937243", "0.7391506", "0.7389767", "0.7387173", "0.7386308", "0.7385616", "0.7385616", "0.7385616", "0.73827654", "0.7382645", "0.7377822", "0.7374942", "0.7359747", "0.7358389", "0.7357952", "0.73554313", "0.7350197", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.734828", "0.7344985", "0.7344985", "0.73387843", "0.73387843", "0.73332465", "0.73332465", "0.73332465", "0.73332465", "0.73332465", "0.73332465", "0.73332465", "0.7327019", "0.7320195", "0.7320195", "0.7319619", "0.7316196", "0.73143476", "0.73130465", "0.73129404", "0.73077327", "0.7305032", "0.7305032", "0.7305032", "0.7305032", "0.7305032", "0.73049396", "0.72999996", "0.72999996", "0.7294559", "0.7294559", "0.7294559", "0.72881967", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72869515", "0.72864723", "0.7283094", "0.7281067", "0.7281067", "0.7281067", "0.7281067", "0.7281067", "0.7281067", "0.7281067" ]
0.0
-1
Test of mouseEntered method, of class ControladorEmpleados.
@Test public void testMouseEntered() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseEntered(MouseEvent e) {\n }", "public void mouseEntered(MouseEvent e) {\n\n }", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseEntered(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\r\n\t}", "public void mouseEntered(MouseEvent e) {\n }", "public void mouseEntered(MouseEvent e)\n {}", "public void mouseEntered(MouseEvent mouseEnter)\r\n\t{\r\n\t\t\r\n\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\r\n\t\t}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n\t}", "public void mouseEntered(MouseEvent e) {\n\n\t}", "public void mouseEntered(MouseEvent e)\r\n\t{\r\n\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e)\n {\n }", "@Override\n public void mouseEntered(MouseEvent e)\n {\n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t}", "public void mouseEntered(MouseEvent e)\n\t{\n\t}", "public void mouseEntered(MouseEvent e) {\n\t\tadaptee.botGuardarComo_mouseEntered(e);\n\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "@Override\n public void mouseEntered(final MouseEvent e)\n {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"ENTREI ermano\");\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\t}", "public void mouseEntered(MouseEvent arg0) {\r\n\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\n\t\t\t\t\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\r\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseEntered(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\n\t\t}" ]
[ "0.77000153", "0.7673298", "0.7631734", "0.7631734", "0.7631734", "0.75962114", "0.75962114", "0.75962114", "0.75962114", "0.75893", "0.7584682", "0.7584682", "0.75817937", "0.7574346", "0.7574346", "0.7574346", "0.7574346", "0.75737196", "0.7571217", "0.7565345", "0.7562819", "0.75560915", "0.75422215", "0.7526894", "0.751643", "0.7512282", "0.7507371", "0.7501825", "0.7501825", "0.7498077", "0.7494408", "0.7493622", "0.7493622", "0.7493622", "0.7483319", "0.7483319", "0.74819785", "0.74763966", "0.7468726", "0.74665666", "0.7463571", "0.7463372", "0.7463372", "0.7463372", "0.7463372", "0.7463372", "0.7463372", "0.7463372", "0.745967", "0.745967", "0.745967", "0.745967", "0.745967", "0.745967", "0.745967", "0.74560434", "0.74539894", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7448358", "0.7446752", "0.74464226", "0.74440265", "0.7442528", "0.7442528", "0.7442528", "0.7442528", "0.74424297", "0.7432005", "0.74289817", "0.74289817", "0.74247366", "0.7422136", "0.7422136", "0.7422136", "0.7422136", "0.7422136", "0.7421141", "0.7407138", "0.739997", "0.7397609", "0.7397609", "0.7397609", "0.7392347", "0.73893696", "0.73893696", "0.73893696", "0.73873293", "0.73873293", "0.73873293", "0.73873293", "0.7378955", "0.7378955", "0.7378955", "0.7378955" ]
0.0
-1
Test of mouseExited method, of class ControladorEmpleados.
@Test public void testMouseExited() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseExited(MouseEvent e) {\n }", "public void mouseExited(MouseEvent e) {\n }", "public void mouseExited(MouseEvent e) {\n\n }", "public void mouseExited(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseExited(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseExited(MouseEvent e)\n {}", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\r\n\t}", "public void mouseExited(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {\n\t\t\n\t}", "public void mouseExited(MouseEvent e) {\n\t\t\n\t}", "public void mouseExited(MouseEvent e) {\n\t\t\n\t}", "public void mouseExited(MouseEvent e) {\n\t\t\n\t}", "@Override\r\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "public void mouseExited(MouseEvent e)\r\n\t{\r\n\t}", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t}", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "public void mouseExited(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n public void mouseExited(final MouseEvent e)\n {\n }", "public void mouseExited(MouseEvent e) {\n\t\t\t\r\n\t\t}", "public void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t\t}", "public void mouseExited(MouseEvent e) {\n\t}", "public void mouseExited(MouseEvent e) {\n\t\t}", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t}", "public void mouseExited(MouseEvent e)\n\t{\n\t}", "public void mouseExited(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseExited(MouseEvent e)\n\t\t{\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\n }", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void mouseExited (MouseEvent m) {}", "@Override\r\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\r\n\t\t}", "public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseExited(MouseEvent e)\n\t\t{\n\t\t\treturn;\n\t\t}", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t}", "@Override\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\n\t\t\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\t\r\n\t}" ]
[ "0.81618994", "0.815396", "0.8148067", "0.8140647", "0.8125385", "0.81169003", "0.8104532", "0.8104532", "0.8104532", "0.80886483", "0.8084946", "0.80847394", "0.80847394", "0.80847394", "0.80847394", "0.80782884", "0.80782884", "0.80782884", "0.80782884", "0.8072867", "0.80692375", "0.80692375", "0.8068802", "0.80677414", "0.8067263", "0.80671626", "0.80669075", "0.80669075", "0.80669075", "0.80664855", "0.8066042", "0.8064037", "0.80628496", "0.8059396", "0.80504036", "0.8048193", "0.80434066", "0.80392885", "0.8035867", "0.8035867", "0.8029276", "0.8029276", "0.8026738", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.8025197", "0.80249923", "0.80227846", "0.8013408", "0.80115944", "0.8006667", "0.79966414", "0.79966414", "0.79966414", "0.79966414", "0.79966414", "0.79904264", "0.7990426", "0.7990426", "0.7990425", "0.7987938", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986825", "0.7986543", "0.79846936", "0.79846936", "0.79846936", "0.79846936", "0.79846936", "0.79819167", "0.7978549", "0.7978549", "0.7978549", "0.7978549", "0.7977492", "0.7977492", "0.7977492", "0.7977492", "0.7977492", "0.7977492", "0.7977492", "0.7974747", "0.7974747", "0.7974747" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Question2 test = new Question2(); System.out.println(test.repeatEnd("Hello", 3)); System.out.println(test.repeatEnd("Hello", 2)); System.out.println(test.repeatEnd("Hello", 1)); }
{ "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
Creates new form pn_InfoServer
public pn_InfoServer(JPanel parent, JPanel container) { this.parent = parent; this.container= container; initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupServerInfo() {\n\t\tlogger.trace(\"setupServerInfo() is called\");\n\t\t\n\t\t Object[] message = {\n\t\t \"Server Port:\", kkServerPortField,\n\t\t };\n\n\t\t int option = JOptionPane.showConfirmDialog(null, message, \"Setup Server\", JOptionPane.OK_CANCEL_OPTION);\n\t\t if (option == JOptionPane.OK_OPTION) {\t\t \n\t\t\t String portStr = kkServerPortField.getText().trim();\n\t\t\t if(Utility.isNumeric(portStr)){\n\t\t\t\t int port = Integer.valueOf(portStr);\n\t\t\t\t kkServerPort = (port > 0 && port < 65536?port:kkServerPort);\n\t\t\t }\n\t\t }\n\t\t kkServerPortField.setText(String.valueOf(kkServerPort));\n\t}", "public void addServerManually() {\n JTextField address = new JTextField();\n address.setText(client.getIpv4());\n JTextField port = new JTextField();\n port.setText(\"2019\");\n\n JPanel serverPanel = new JPanel();\n serverPanel.add(new JLabel(\"Address:\"));\n serverPanel.add(address);\n serverPanel.add(Box.createHorizontalStrut(15));\n serverPanel.add(new JLabel(\"Port:\"));\n serverPanel.add(port);\n int result = JOptionPane.showConfirmDialog(frame, serverPanel, \"Please enter the address and the port\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) {\n client.searchForServer(address.getText(), Integer.parseInt(port.getText()));\n }\n }", "Information createInformation();", "public ServerInfo(Server server) {\n if (server == null) {\n throw new NullArgumentException(\"Server must not be null\");\n }\n\n this.logger = server.getLogger();\n\n BufferedImage image;\n\n try {\n image = ImageIO.read(new File(\"server-icon.png\"));\n }\n catch (Exception e) {\n image = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);\n }\n\n this.setImage(image);\n this.setMotd(server.getMotd());\n }", "void askServerInfo();", "public Info() {\n super();\n }", "private InfoCommand()\n\t{\n\t\t\n\t\t\n\t}", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void updateServerInfo() {\n ServerInfo serverInfo = new ServerInfo(serverConfig.getBaseURL(), serverConfig.getInfoURL(), serverRepositories.keySet());\n String serverInfoJson = new GsonBuilder().setPrettyPrinting().create().toJson(serverInfo);\n try {\n Files.write(Paths.get(\"\").resolve(Filenames.FILENAME_SERVERINFO), serverInfoJson.getBytes(StandardCharsets.UTF_8));\n } catch (IOException e) {\n log.error(\"could not write serverinfo file.\", e);\n }\n }", "public InfoMessage createInfoMessage();", "ServiceInfo(ServiceInfo info)\n {\n if (info != null)\n {\n this.type = info.type;\n this.name = info.name;\n this.port = info.port;\n this.weight = info.weight;\n this.priority = info.priority;\n this.text = info.text;\n }\n }", "@Override\n public void newConnection(String information) {\n information=information.substring(4).trim();\n slave=new SlaveInformation();\n slave.setCapacity(Long.parseLong(information.split(\",\")[0]));\n slave.setSize(Long.parseLong(information.split(\",\")[1]));\n IP=information.split(\",\")[2];\n Port=information.split(\",\")[3];\n slave.setSlaveName(information.split(\",\")[4]);\n /**\n * get a connection to client\n */\n jMemKitClient=JMemKitClient.getInstance(IP,Integer.parseInt(Port));\n slave.setClient(jMemKitClient);\n /**\n * add it\n */\n SlaveList.putSlave(slave);\n }", "private void constructInfoPanel() {\n try {\n Runnable doUpdate = new Runnable() {\n public void run() {\n infoPanel = new JPanel();\n infoPanel.setPreferredSize(relativeSize(0.8f, 0.04f));\n \n infoLabel = new JLabel(\"Waiting for Clients\");\n infoLabel.setForeground(new Color(0, 51, 102));\n infoLabel.setFont(new Font(\"Garamond\", Font.BOLD, 17));\n \n infoPanel.add(infoLabel);\n }\n };\n if (SwingUtilities.isEventDispatchThread())\n doUpdate.run();\n else\n SwingUtilities.invokeAndWait(doUpdate);\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "public AddDeviceInfo() {\n //super(parent, modal);\n initComponents();\n snosprop= bis.getALLSNOS();\n this.RegisteredSnos();\n }", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "public InfoPanel()\n\t\t{\n\t\t\t//setting color and instantiating textfield and button\n\t\t\tsetBackground(bCol);\n\t\t\tnameJF = new JTextField(\"Type Your Name\", 20);\n\t\t\tFont naFont = new Font(\"Serif\", Font.PLAIN, 25);\n\t\t\tnameJF.setFont(naFont);\n\t\t\tsub = new JButton(\"Submit\");\n\t\t\tsub.addActionListener(this);\n\t\t\tsub.setFont(naFont);\n\t\t\tname = new String(\"\");\n\t\t\tadd(nameJF);\n\t\t\tadd(sub);\n\t\t}", "public InfoProvider()\n {\n }", "public void setInfoId(java.lang.String infoId) {\n this.infoId = infoId;\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}", "public ServerInfo() {\n this.logger = null;\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.POST, produces = \"application/json\")\n public DatasetInfo create(@RequestBody DatasetInfo info) {\n return this.datasetService.create(info);\n }", "public ServerDef() {}", "public FormaServer() {\n initComponents();\n srediFormu();\n \n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "@Override\n public void addServer(String address, String port, String name) {\n model.addElement(\"Server name: #\" + name + \"# Server address: #\" + address + \"# Server port: #\" + port + \"#\");\n }", "@Override\r\n\tpublic void createControl(Composite parent) {\r\n\t\t// the container\r\n\t\tcontainer = new Composite(parent, SWT.NULL);\r\n\t\tFillLayout fillLayout = new FillLayout();\r\n\t\tfillLayout.type = SWT.VERTICAL;\r\n\t\tcontainer.setLayout(fillLayout);\r\n\r\n\t\t// the status of the connection\r\n\t\tconnectionStatus = new CLabel(container, SWT.LEFT);\r\n\t\t// the image to display\r\n\t\tif (NetSource.getInstance().getConnection() != null) {\r\n\t\t\tsetTitle(\"Verbindung hergestellt\");\r\n\t\t\tsetDescription(\"Die Ausführung des Assistenten ist nicht notwendig\");\r\n\t\t\t// show true image\r\n\t\t\tconnectionStatus.setText(\"Es besteht bereits eine Verbindung zum Server.\\n\" + \"Die Ausführung des Assistenten is nicht nötig\");\r\n\t\t\tconnectionStatus.setImage(ImageFactory.getInstance().getRegisteredImage(\"wizars.server.connected\"));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetTitle(\"Verbindung zum Server unterbrochen\");\r\n\t\t\tsetDescription(\"Mit diesem Assistenten können sie eine neue Verbindung aufbauen\");\r\n\t\t\t// show true image\r\n\t\t\tconnectionStatus.setText(\"Verbindung zum Server wurde unterbrochen.\\n\"\r\n\t\t\t\t\t+ \"Mit diesem Wizard kann die Verbindung zum Server wiederhergstellt werden\");\r\n\t\t\tconnectionStatus.setImage(ImageFactory.getInstance().getRegisteredImage(\"wizard.server.disconnected\"));\r\n\r\n\t\t\t// the label\r\n\t\t\tinfoText = new CLabel(container, SWT.LEFT);\r\n\t\t\tinfoText.setText(\"Klicken Sie auf weiter um einen neuen Server auszuwählen.\");\r\n\t\t}\r\n\t\t// Required to avoid an error in the system\r\n\t\tsetControl(container);\r\n\t}", "public InventoryNew(String server, String username, String password, float itemCostFromSup, float itemCostToCust, String itemDesc, int itemInsCovg, int itemPrescription, int supNum){\n\t\tcreateConnection(server,username,password,pharmacyName);\n\t\tinsert(itemCostFromSup,itemCostToCust,itemDesc,itemInsCovg,itemPrescription, supNum,false);\n\t}", "@Override\n\tpublic void create(UserServer obj) {\n\t\tcreateClient(obj);// INSERE USUARIO NA ENTIDADE CLIENT\n\t\ttry {\n\t\t\tfinal ResultSet result = stat.getGeneratedKeys();\n\t\t\twhile (result.next()) {\n\t\t\t\tobj.setId(result.getInt(\"idclient\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcreatePhone(obj);// INSERE PHONE INFORMADO PELO CLIENT CADASTRADO\n\t\tcreateEmail(obj);// INSERE EMAIL INFORMADO PELO CLIENT CADASTRADO\n\t\tencerrarConexao();\n\t}", "public ServerInfo(Guild server){\n this.serverID = server.getIdLong();\n this.serverName = server.getName();\n ServerInfoCache.add(this);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n removerButton = new javax.swing.JButton();\n addButton = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n serverList = new javax.swing.JList();\n serverInfoPane = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n server_textField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n port_formattedText = new javax.swing.JFormattedTextField();\n jLabel2 = new javax.swing.JLabel();\n account_textField = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n user_textField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n email_textField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n queue_textField = new javax.swing.JFormattedTextField();\n javax.swing.JLabel max_cpu_label = new javax.swing.JLabel();\n max_cpu_formattedText = new javax.swing.JFormattedTextField();\n javax.swing.JLabel cpu_label = new javax.swing.JLabel();\n cpu_formattedText = new javax.swing.JFormattedTextField();\n password_checkBox = new javax.swing.JCheckBox();\n closeButton = new javax.swing.JButton();\n autoConfigSerevrButton = new javax.swing.JButton();\n serverInstallInfoButton = new javax.swing.JButton();\n\n FormListener formListener = new FormListener();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"Setup Servers\"); // NOI18N\n setResizable(false);\n addWindowListener(formListener);\n\n removerButton.setText(\"Remove server\"); // NOI18N\n removerButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nRemove selected server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n removerButton.setName(\"removerButton\"); // NOI18N\n removerButton.addActionListener(formListener);\n\n addButton.setText(\"Add server\"); // NOI18N\n addButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nAdd new server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n addButton.setName(\"addButton\"); // NOI18N\n addButton.addActionListener(formListener);\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n serverList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n serverList.setName(\"serverList\"); // NOI18N\n serverList.addListSelectionListener(formListener);\n jScrollPane1.setViewportView(serverList);\n\n serverInfoPane.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n serverInfoPane.setName(\"serverInfoPane\"); // NOI18N\n serverInfoPane.setLayout(new java.awt.GridLayout(17, 1, 0, 1));\n\n jLabel8.setText(\"Server\"); // NOI18N\n jLabel8.setName(\"jLabel8\"); // NOI18N\n serverInfoPane.add(jLabel8);\n\n server_textField.setBackground(new java.awt.Color(192, 192, 192));\n server_textField.setEditable(false);\n server_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nServer hostname.\\n\\n\\n</font></p><html>\"); // NOI18N\n server_textField.setName(\"server_textField\"); // NOI18N\n serverInfoPane.add(server_textField);\n\n jLabel5.setText(\"Port\"); // NOI18N\n jLabel5.setName(\"jLabel5\"); // NOI18N\n serverInfoPane.add(jLabel5);\n\n port_formattedText.setBackground(new java.awt.Color(192, 192, 192));\n port_formattedText.setEditable(false);\n port_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n port_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nServer port.\\n\\n\\n</font></p><html>\"); // NOI18N\n port_formattedText.setName(\"port_formattedText\"); // NOI18N\n port_formattedText.addPropertyChangeListener(formListener);\n serverInfoPane.add(port_formattedText);\n\n jLabel2.setText(\"Remote Processing Account\"); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n serverInfoPane.add(jLabel2);\n\n account_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nAccount on server that is setup to<br>\\nrun Bayesian Analysis Software.\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n account_textField.setName(\"account_textField\"); // NOI18N\n account_textField.addKeyListener(formListener);\n serverInfoPane.add(account_textField);\n\n jLabel7.setText(\"User\"); // NOI18N\n jLabel7.setName(\"jLabel7\"); // NOI18N\n serverInfoPane.add(jLabel7);\n\n user_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nCurrent user account (on local machine).\\n\\n\\n</font></p><html>\\n\"); // NOI18N\n user_textField.setName(\"user_textField\"); // NOI18N\n user_textField.addKeyListener(formListener);\n serverInfoPane.add(user_textField);\n\n jLabel4.setText(\"Email\"); // NOI18N\n jLabel4.setName(\"jLabel4\"); // NOI18N\n serverInfoPane.add(jLabel4);\n\n email_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nEmail account that will be used<br>\\nto send job status notifications.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n email_textField.setInputVerifier(new EmailInputVerifier());\n email_textField.setName(\"email_textField\"); // NOI18N\n email_textField.addPropertyChangeListener(formListener);\n email_textField.addKeyListener(formListener);\n serverInfoPane.add(email_textField);\n\n jLabel6.setText(\"Queue\"); // NOI18N\n jLabel6.setName(\"jLabel6\"); // NOI18N\n serverInfoPane.add(jLabel6);\n\n queue_textField.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nQueue type for scheduling job on server.<br>\\nQueue type varies from server to server. <br>\\nBy defautl queue is set to None.\\n\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n queue_textField.setInputVerifier(new QueueInputVerifier());\n queue_textField.setName(\"queue_textField\"); // NOI18N\n queue_textField.addPropertyChangeListener(formListener);\n queue_textField.addKeyListener(formListener);\n serverInfoPane.add(queue_textField);\n\n max_cpu_label.setText(\"Maximum CPUs\"); // NOI18N\n max_cpu_label.setName(\"max_cpu_label\"); // NOI18N\n serverInfoPane.add(max_cpu_label);\n\n max_cpu_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"\"))));\n max_cpu_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nNumber of CPUs for current server.<br>\\nPress TAB button after new value is set<br>\\nto save it.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n max_cpu_formattedText.setName(\"max_cpu_formattedText\"); // NOI18N\n max_cpu_formattedText.setValue(1);\n max_cpu_formattedText.addPropertyChangeListener(formListener);\n max_cpu_formattedText.addKeyListener(formListener);\n serverInfoPane.add(max_cpu_formattedText);\n\n cpu_label.setText(\"Use CPUs\"); // NOI18N\n cpu_label.setName(\"cpu_label\"); // NOI18N\n serverInfoPane.add(cpu_label);\n\n cpu_formattedText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n cpu_formattedText.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\n\\nNumber of server CPUs that will be used <br>\\nin Bayesian analysis calculations.<br>\\nPress TAB button after new value is set<br>\\nto save it.\\n\\n\\n</font></p><html>\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n cpu_formattedText.setName(\"cpu_formattedText\"); // NOI18N\n cpu_formattedText.setValue(1);\n cpu_formattedText.addPropertyChangeListener(formListener);\n cpu_formattedText.addKeyListener(formListener);\n serverInfoPane.add(cpu_formattedText);\n\n password_checkBox.setText(\"Password required \"); // NOI18N\n password_checkBox.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nCheckbox that controls whether a password<br>\\nverificaton is required on the server.\\n\\n\\n</font></p><html>\\n\\n\\n\"); // NOI18N\n password_checkBox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);\n password_checkBox.setName(\"password_checkBox\"); // NOI18N\n password_checkBox.addActionListener(formListener);\n serverInfoPane.add(password_checkBox);\n\n closeButton.setFont(new java.awt.Font(\"Lucida Grande\", 1, 18));\n closeButton.setText(\"OK\"); // NOI18N\n closeButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\n\\nSave server information <br>\\nand close the window.\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n closeButton.setName(\"closeButton\"); // NOI18N\n closeButton.addActionListener(formListener);\n\n autoConfigSerevrButton.setText(\"Auto Configure Server\"); // NOI18N\n autoConfigSerevrButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nConfigure server in accordance with the server<br>\\ninstallation settings retrieved over the network<br>\\n\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n autoConfigSerevrButton.setName(\"autoConfigSerevrButton\"); // NOI18N\n autoConfigSerevrButton.addActionListener(formListener);\n\n serverInstallInfoButton.setText(\"View Server Installation Info\"); // NOI18N\n serverInstallInfoButton.setToolTipText(\"<html><p style=\\\"margin: 6px;\\\"><font size=\\\"4\\\">\\n\\nRetrieve installation information<br>\\nfor currently selected server. <br>\\n\\n\\n</font></p><html>\\n\\n\"); // NOI18N\n serverInstallInfoButton.setName(\"serverInstallInfoButton\"); // NOI18N\n serverInstallInfoButton.addActionListener(formListener);\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(addButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(removerButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE))\n .add(18, 18, 18)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverInfoPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 229, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverInstallInfoButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)\n .add(autoConfigSerevrButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)))\n .add(layout.createSequentialGroup()\n .add(394, 394, 394)\n .add(closeButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n layout.linkSize(new java.awt.Component[] {autoConfigSerevrButton, serverInfoPane, serverInstallInfoButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.linkSize(new java.awt.Component[] {addButton, jScrollPane1, removerButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverInfoPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 479, Short.MAX_VALUE)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(addButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(removerButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(serverInstallInfoButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(autoConfigSerevrButton)))\n .add(17, 17, 17)\n .add(closeButton))\n );\n\n layout.linkSize(new java.awt.Component[] {addButton, removerButton}, org.jdesktop.layout.GroupLayout.VERTICAL);\n\n pack();\n }", "@Override\n\tpublic void setUpInfoPanel() {\n\t\t\n\t}", "public InfoCommand() {\n super(\"info\", \"info <Spieler>\", \"Gib dir Informationen über den Chunk oder Spieler\", SubCommand.NONE_PERMISSION);\n }", "public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }", "public void setInfo(String info) {\n this.info = info;\n }", "public ServerInfo(String urlEndPoint, Store store, Crypto crypto)\n {\n\tthis.urlEndPoint = urlEndPoint;\n\tthis.store = store;\n\tthis.crypto = crypto;\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 }", "@PostMapping(\"/new\")\n public ResponseEntity create(@RequestBody CityInfo cityInfo){\n service.create(cityInfo);\n return new ResponseEntity(HttpStatus.CREATED);\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public InfoCommand() {\n\n\t\tsuper(\"info\", Command.ArgumentType.NONE, Command.Category.UTILITY);\n\t}", "public EditXNATServer(ChildManager c, UpdateServerTable t) {\n this.t = t;\n initComponents();\n this.c = c;\n device = (XNATServer) t.get_selected_device();\n this.edit_server_label.setText(\"Edit XNAT Server :\" + device.getName());\n this.edit_hostname_textfield.setText(device.getHostname());\n this.edit_username_textfield.setText(device.getUsername());\n this.edit_password_textfield.setText(device.getPassword());\n }", "public PIInfo() {\n }", "private void mandaInfoIPP(Interfaz_Principal vtn){\n vtn.Actual_Nombre_Usuario=Actual_Nombre_Usuario;\n vtn.Actual_Apellido_Usuario=Actual_Apellido_Usuario;\n vtn.Actual_Telefono=Actual_Telefono;\n vtn.Actual_U=Actual_U;\n vtn.Actual_C=Actual_C;\n vtn.Actual_Correo=Actual_Correo;\n vtn.Actual_Direccion=Actual_Direccion;\n vtn.Actual_Cargo=Actual_Cargo;\n vtn.Actual_Fecha=Actual_Fecha;\n vtn.Actual_Status=Actual_Status;\n this.dispose();\n vtn.setVisible(true);\n }", "@Override\n public String getServletInfo() {\n return \"Servet to handle creation of new posts\";\n }", "public void markSrvPortCreate() throws JNCException {\n markLeafCreate(\"srvPort\");\n }", "public ServiceInfo() {\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "protected void createRegistrationInfo() {\n registrationInfo.put(\"email\", email.getText().toString());\n registrationInfo.put(\"password\", password.getText().toString());\n }", "public Information()\n\t{\n\t\t// empty constructor\n\t}", "@SuppressWarnings(\"ConstantConditions\")\n @Inject(method = \"setupServer()Z\", at = @At(\"RETURN\"))\n public void setupServer(CallbackInfoReturnable<Boolean> info) {\n // Make sure that the server successfully started\n if (info.getReturnValueZ()) {\n IdleShutdownServer.INSTANCE.getShutdownController().notifyServerStart((MinecraftDedicatedServer)(Object)this);\n }\n }", "private void initInfo(Map<String, String> _info) {\n this.jlCPU.setText(_info.get(\"Model\"));// FIXME may be very long name\n this.jlCores.setText(_info.get(\"TotalCores\"));\n this.jlVendor.setText(_info.get(\"Vendor\"));\n this.jlFrequency.setText(_info.get(\"Mhz\") + \" MHz\");\n this.jlRAM.setText(_info.get(\"Free\").substring(0, 3) + \" / \" + _info.get(\"Ram\") + \" MB\");\n this.jlHostname.setText(_info.get(\"HostName\"));\n this.jlIP.setText(_info.get(\"IP\"));\n this.jlGateway.setText(_info.get(\"DefaultGateway\"));\n this.jlPrimDNS.setText(_info.get(\"PrimaryDns\"));\n }", "public JPanelCreateClient() {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.title = new CustomLabel(ConstantView.TITLE_CREATE_CLIENT, null, Color.decode(\"#2E5569\"));\r\n\t\tthis.okButton = new JButton(\"REGISTRAR CLIENTE\");\r\n\t\tthis.returnButton = new JButton(ConstantView.BUTTON_RETURN_SIGNIN);\r\n\t\tthis.jPanelFormClient = new JPanelFormClient();\r\n\t\tControlClient.getInstance().setjPanelCreateClient(this);\r\n\t\tthis.init();\r\n\t}", "public boolean create(Info_laboral il){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n boolean var;\n try{\n CallableStatement cs = c.prepareCall(\"{call P_INSINFO(?,?,?,?,?,?,?,?,?)}\");\n \n cs.setString(1, il.getJefe());\n cs.setString(2, il.getCargo());\n cs.setString(3, il.getFuncion());\n cs.setDate(4, il.getFecha_ini());\n cs.setDate(5, il.getFecha_fin());\n cs.setString(6, il.getMotivo_retiro());\n cs.setLong(7, il.getId_egresado().getId());\n cs.setString(8, il.getPerfil());\n cs.registerOutParameter(9, Types.VARCHAR);\n var = cs.execute();\n System.out.println(cs.getString(9));\n \n }catch(SQLException e){\n System.out.println(\"Error\"+ e);\n var = false;\n }\n con.CerrarCon();\n return var;\n }", "public int create(MemberInfoDTO dto) {\n\t\treturn sqlSessionTemplate.insert(\"memberInfo.create\", dto);\r\n\t}", "public GameSummary(final com.google.gson.JsonObject infoFromServer) {\n\n data = infoFromServer;\n\n id = data.get(\"id\").getAsString();\n mode = data.get(\"mode\").getAsString();\n owner = data.get(\"owner\").getAsString();\n players = data.get(\"players\").getAsJsonArray();\n\n }", "public LVInfo() {\r\n }", "public InfoPanel() {\n setPreferredSize(new Dimension(500, 860));\n }", "protected void databaseInsertServer() {\n\t\ttry {\r\n\t\t\t Socket server=new Socket(ipAddress,portNumer);\r\n\t //Socket server=new Socket(\"localhost\",8800);\r\n\t BufferedReader sin=new BufferedReader(new InputStreamReader(server.getInputStream()));\r\n\t PrintStream sout=new PrintStream(server.getOutputStream());\r\n\t BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));\r\n\t \r\n\t String sendMessage =requestMessage+'-'+','+carType+','+balancePost+','+paymentType+\r\n\t \t\t','+phoneno.getText(); \r\n\r\n\t sout.println(sendMessage);\r\n\t \r\n\t String s1=sin.readLine(); \r\n\t String[] splitResult=s1.split(\",\");\r\n\t \r\n\t //System.out.println(\"Return Message:\"+s1);\r\n\t if(splitResult[0].equals(\"Insert Done\")) {\r\n\t \tJOptionPane.showMessageDialog(null,\"New VIP User Is Registered with RFID No: \"+splitResult[1]);\r\n\t }\r\n\t else if(splitResult[0].equals(\"Insert Error\")) {\r\n\t \tJOptionPane.showMessageDialog(null,\"Registration Cannot be done;Try Again\");\r\n\t }\r\n\t /*\r\n\t if(s1.equals(\"Aleadt\")) {\r\n\t \tSystem.out.println(\"\");\r\n\t \t\r\n\t }\r\n\t else {\r\n\t \tSystem.out.println(\"Insert is not done\");\r\n\t }*/\r\n\t // cardno.setText(null);\r\n\t \r\n\t server.close();\r\n\t sin.close();\r\n\t sout.close();\r\n\t stdin.close();\r\n\t } catch (UnknownHostException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t } catch (IOException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t }\r\n\t}", "public New_shipment() {\n initComponents();\n init();\n \n }", "public ServerInfo(String serverImageBase64, String motd) {\n this.logger = null;\n this.setImageBase64(serverImageBase64);\n this.setMotd(motd);\n }", "public EditInfo() {\n initComponents();\n }", "public ConnectToServerGUI() {\n super(\"Connect to Server\");\n initComponents();\n setVisible(true);\n }", "@RequestMapping(value = \"/hrProjectInfos\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<HrProjectInfo> createHrProjectInfo(@Valid @RequestBody HrProjectInfo hrProjectInfo) throws URISyntaxException {\n log.debug(\"REST request to save HrProjectInfo : {}\", hrProjectInfo);\n if (hrProjectInfo.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"hrProjectInfo\", \"idexists\", \"A new hrProjectInfo cannot already have an ID\")).body(null);\n }\n HrProjectInfo result = hrProjectInfoRepository.save(hrProjectInfo);\n hrProjectInfoSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/hrProjectInfos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"hrProjectInfo\", result.getId().toString()))\n .body(result);\n }", "public ServerMap(int nameServerPort) {\n servers = new HashMap<String, Server>();\n this.nameServerPort = nameServerPort;\n nameServer = new Server(ComsFormat.nameserver_hostname\n , ComsFormat.nameserver_ip, nameServerPort);\n }", "public CreateServerDialog(java.awt.Frame parent, boolean modal) {\r\n super(parent, modal);\r\n initComponents();\r\n }", "private void sendNameToServer() {\n\t\t\t\t// First, we validate the input.\n\t\t\t\terrorLabel.setText(\"\");\n\t\t\t\tString textToServer = nameField.getText();\n\t\t\t\tif (!FieldVerifier.isValidName(textToServer)) {\n\t\t\t\t\terrorLabel.setText(\"Please enter at least four characters\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Then, we send the input to the server.\n\t\t\t\t// sendButton.setEnabled(false);\n\t\t\t\tSearchRequest request = new SearchRequest();\n\t\t\t\tDate twoMinsAgo = new Date(new Date().getTime() - 1000*60*2);\n\t\t\t\trequest.setFetchTime(Interval.after(twoMinsAgo));\n\t\t\t\tgreetingService.greetServer(request,\n\t\t\t\t\t\tnew AsyncCallback<Collection<Place>>() {\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\tnotification.handleFailure(caught);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onSuccess(Collection<Place> result) {\n\t\t\t\t\t\t\t\t// TODO: sign of utter stupidity\n\t\t\t\t\t\t\t\tfinal MapWidget map = (MapWidget) RootPanel\n\t\t\t\t\t\t\t\t\t\t.get(\"mapsTutorial\").getWidget(0);\n\t\t\t\t\t\t\t\tmap.clearOverlays();\n\n\t\t\t\t\t\t\t\tLatLng markerPos = null;\n\t\t\t\t\t\t\t\tfor (final Place place : result) {\n\t\t\t\t\t\t\t\t\tLocation coordinates = place.getCoordinates();\n\t\t\t\t\t\t\t\t\tmarkerPos = LatLng.newInstance(\n\t\t\t\t\t\t\t\t\t\t\tcoordinates.getLatitude(), coordinates.getLongitude());\n\n\t\t\t\t\t\t\t\t\t// Add a marker\n\t\t\t\t\t\t\t\t\tMarkerOptions options = MarkerOptions\n\t\t\t\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\t\t\t\toptions.setTitle(place.getAddress());\n\t\t\t\t\t\t\t\t\tMarker marker = new Marker(markerPos,\n\t\t\t\t\t\t\t\t\t\t\toptions);\n\t\t\t\t\t\t\t\t\tfinal LatLng currMarkerPos = markerPos;\n\t\t\t\t\t\t\t\t\tmarker.addMarkerClickHandler(new MarkerClickHandler() {\n\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tMarkerClickEvent event) {\n\t\t\t\t\t\t\t\t\t\t\tPlaceFormatter places = new PlaceFormatter();\n\t\t\t\t\t\t\t\t\t\t\tInfoWindowContent wnd = new InfoWindowContent(places.format(place));\n\t\t\t\t\t\t\t\t\t\t\twnd.setMaxWidth(200);\n\t\t\t\t\t\t\t\t\t\t\tmap.getInfoWindow().open(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrMarkerPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\twnd);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tmap.addOverlay(marker);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (markerPos != null) {\n\t\t\t\t\t\t\t\t\tmap.setCenter(markerPos);\n\t\t\t\t\t\t\t\t\tmap.setZoomLevel(12);\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}", "public SetInfoWindow() {\n super(BasicWindow.curWindow,\"Stage Info\", true);\n //setTitle(\"Inventory Manager\");\n proj_class=(project)project.oClass;\n \n addComponents();\n populateComponents();\n setBounds(10,50, iScreenHeight,iScreenWidth);\n //setSize(500,500);\n setResizable(true);\n setVisible(true);\n }", "public ClientEditPage createNewClient() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n newClientButton.click();\n Thread.sleep(Browser.getDelayAfterNewItemClick());\n return Pages.getClientEditPage();\n }", "@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public ServerForm() throws Exception {\n myServer = new Server(2525);\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Não foi possível alterar o LookAndFeel: \" + e);\n }\n setResizable(false);\n initComponents();\n }", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\r\n\tpublic ItemInfo createItemInfo() {\n\t\treturn new HpInfo();\r\n\t}", "protected void createControl() {\n\t\tGridLayout layout = new GridLayout(1, true);\n\t\tsetLayout(layout);\n\t\tsetLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\tComposite nameGroup = new Composite(this, SWT.NONE);\n\t\tlayout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tnameGroup.setLayout(layout);\n\t\tnameGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n\t\tLabel label = new Label(nameGroup, SWT.NONE);\n\t\tlabel.setText(PHPServerUIMessages\n\t\t\t\t.getString(\"ServerCompositeFragment.nameLabel\")); //$NON-NLS-1$\n\t\tGridData data = new GridData();\n\t\tlabel.setLayoutData(data);\n\n\t\tname = new Text(nameGroup, SWT.BORDER);\n\t\tdata = new GridData(GridData.FILL_HORIZONTAL);\n\t\tname.setLayoutData(data);\n\t\tname.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (getServer() != null)\n\t\t\t\t\tmodifiedValuesCache.serverName = name.getText();\n\t\t\t\tvalidate();\n\t\t\t}\n\t\t});\n\t\tcreateURLGroup(this);\n\t\tinit();\n\t\tvalidate();\n\n\t\tDialog.applyDialogFont(this);\n\n\t\tname.forceFocus();\n\t}", "public ServerskaForma() {\n initComponents();\n \n \n \n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public Info(String json) {\n super(json);\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "ServerInfo stub()\n {\n return new ServerInfo(NAMING_IP, REGISTRATION_PORT);\n }", "public Record_InfoChoice() {\n super();\n _id_NoList = new Vector();\n }", "public void createAgent(ConfigDialogInfo info) {\n configDialogInfo = info;\n createAgent = true;\n }", "public void setInfo_json(String info_json) {\n this.info_json = info_json;\n }", "public NetworkGUI(final GUIManager listener, JTextField tfield, JButton bttn, JLabel lbl){\n super();\n serverAddress = new JTextField(\"localhost\");\n connectButton = new JButton(\"Połącz\");\n connStatus = new JLabel(\"Rozłączony\");\n if (tfield != null && bttn != null && lbl != null) {\n \tserverAddress = tfield;\n \tconnectButton = bttn;\n \tconnStatus = lbl;\n }\n add(serverAddress);\n add(connectButton);\n add(connStatus);\n\n connectButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e){\n listener.handleConnectServer(serverAddress.getText());\n }\n });\n\n }", "@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "public Server processAction(Long serverId, ApiV1ServerActionDTO action) {\n\n Optional<Server> optionalServer = serverRepository.findById(serverId);\n\n Server server = optionalServer.orElse(null);\n\n if ( server == null ) {\n log.error(\"Server not found\");\n return null;\n }\n\n if (action.getAction().equals(\"CreationRequest\")) {\n if ( server.getCreationRequest() == null ) {\n server.setCreationRequest();\n server = serverRepository.save(server);\n }\n\n } else if (action.getAction().equals(\"CreationReady\") && action.getIpv4() != null) {\n\n if ( server.isBuilding() ) {\n server.setCreationCompleted();\n server.setIpv4(action.getIpv4());\n server.setId_external(action.getId_external());\n server = serverRepository.save(server);\n\n\n // if it is the first server in the location, just make sure that we have\n // the domain record created and that it is pointing to the correct server\n DomainRecord locationDns = digitalOceanGateway.find(server.getSupplierLocation().getLocation());\n if (locationDns == null) {\n digitalOceanGateway.create(server.getSupplierLocation().getLocation(), server);\n } else {\n digitalOceanGateway.update(server.getSupplierLocation().getLocation(), server);\n }\n\n // a user requested the creation of the server. We need to configure the system\n // so this user can start using it.\n if (server.getUser().getId() != -1) {\n\n // notify the user who has requested the server\n Email serverBuilt = Email.builder()\n .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse(\"\"))\n .fromSupport()\n .to(server.getUser().getEmail())\n .subject(\"Your VPN location is now ready to use\")\n .withTextBody(\"Thanks for using TheVPNCompany. You have requested to use the location \" + server.getSupplierLocation().getLocation().getName() +\n \" and we have build a new server just for you.\")\n .build();\n\n mailUtil.sendEmail(serverBuilt);\n\n // change the user location\n UserLocation userLocation = userLocationRepository.findByUser(server.getUser()).orElseThrow();\n userLocation.setLocation(server.getSupplierLocation().getLocation());\n userLocationRepository.save(userLocation);\n\n // update DNS\n digitalOceanGateway.updateCNAME(userLocation);\n }\n }\n\n\n\n } else if (action.getAction().equals(\"CreationFailed\")) {\n\n server.setCreationFailed();\n server = serverRepository.save(server);\n\n Email errorEmail = Email.builder()\n .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse(\"\"))\n .fromSupport()\n .to(Email.Account.TECH)\n .subject(CoreUtils.getEnvironemnt() + \" - TheVPNCompany Error While Creating Server \" + server.getId())\n .withTextBody(\"An error has happened while creating the server \" + server.getId())\n .build();\n\n mailUtil.sendEmail(errorEmail);\n\n }\n\n return server;\n\n }", "public InfoPopup() {\n initComponents();\n }", "public ContractorInfoPanel() {\n\t\tinitComponents();\n\t}", "void infoSetUp() {\r\n\t\tJPanel imageInfo = new JPanel();\r\n\t\timageInfo.setLayout(new GridLayout(2, 0));\r\n\t\tJPanel mButtons = new JPanel();\r\n\r\n\t\tJButton save = new JButton(\"save\");\r\n\t\tJButton upload = new JButton(\"upload\");\r\n\t\tJButton delete = new JButton(\"delete\");\r\n\t\tJButton view = new JButton(\"open\");\r\n\r\n\t\tupload.setActionCommand(\"upload\");\r\n\t\tview.setActionCommand(\"view\");\r\n\t\tActionListener upList = new UpList();\r\n\t\tupload.addActionListener(upList);\r\n\t\tview.addActionListener(upList);\r\n\t\tmButtons.add(save);\r\n\t\tmButtons.add(upload);\r\n\t\tmButtons.add(delete);\r\n\t\tmButtons.add(view);\r\n\r\n\t\tJTextArea info = new JTextArea(\"Path: \");\r\n\t\tinfo.setEditable(false);\r\n\t\timageInfo.add(info);\r\n\t\timageInfo.add(mButtons);\r\n\t\tmainFrame.add(imageInfo);\r\n\t\tinfoText = info;\r\n\t}", "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }", "public void create(){}", "public NoticeInfo() {\n this(DSL.name(\"notice_info\"), null);\n }", "public InventoryNew(String server, String username, String password) {\n\t\tcreateConnection(server,username,password,pharmacyName);\n\t\tinitialize();\n\t}", "public void setInfo(InformationField i)\n\tthrows SdpException {\n\tif (i == null)\n\t throw new SdpException(\"The info is null\");\n\tthis.informationField = i;\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n portTextField = new javax.swing.JFormattedTextField();\n serverNameTextField = new javax.swing.JFormattedTextField();\n serverLabel = new javax.swing.JLabel();\n serverLabel1 = new javax.swing.JLabel();\n closeButton = new javax.swing.JButton();\n addButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Add New Server\"); // NOI18N\n setName(\"Form\"); // NOI18N\n\n portTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"##0\"))));\n portTextField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n portTextField.setName(\"portTextField\"); // NOI18N\n portTextField.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n portTextFieldPropertyChange(evt);\n }\n });\n\n serverNameTextField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n serverNameTextField.setName(\"serverNameTextField\"); // NOI18N\n\n serverLabel.setText(\"Server\");\n serverLabel.setName(\"serverLabel\"); // NOI18N\n\n serverLabel1.setText(\"Port\");\n serverLabel1.setName(\"serverLabel1\"); // NOI18N\n\n closeButton.setText(\"Close\");\n closeButton.setName(\"closeButton\"); // NOI18N\n closeButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n closeButtonActionPerformed(evt);\n }\n });\n\n addButton.setText(\"Add\");\n addButton.setName(\"addButton\"); // NOI18N\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(layout.createSequentialGroup()\n .add(closeButton)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(addButton))\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(serverLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(portTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 158, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .add(26, 26, Short.MAX_VALUE))\n );\n\n layout.linkSize(new java.awt.Component[] {serverLabel, serverLabel1}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.linkSize(new java.awt.Component[] {portTextField, serverNameTextField}, org.jdesktop.layout.GroupLayout.HORIZONTAL);\n\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(serverNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(portTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serverLabel1))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(closeButton)\n .add(addButton))\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }" ]
[ "0.6072799", "0.58523417", "0.57409376", "0.5733246", "0.5677541", "0.564137", "0.5632024", "0.55820155", "0.55728346", "0.55317974", "0.54756397", "0.5451982", "0.54402816", "0.5426349", "0.54042274", "0.53988457", "0.53911495", "0.5366951", "0.5316949", "0.5312736", "0.53084016", "0.5296277", "0.5296027", "0.528415", "0.528064", "0.52747893", "0.52591485", "0.52569175", "0.52567613", "0.5250633", "0.5248271", "0.52473056", "0.52268714", "0.52266103", "0.520355", "0.5195541", "0.5182764", "0.5178338", "0.5177056", "0.5168185", "0.5160495", "0.51559514", "0.5134169", "0.5121469", "0.51152843", "0.5095984", "0.50939924", "0.5085116", "0.50767833", "0.50585264", "0.50515074", "0.5042391", "0.5025011", "0.50237566", "0.5023149", "0.5010099", "0.50002825", "0.49991903", "0.4998433", "0.497635", "0.49744546", "0.49722317", "0.49662173", "0.4964507", "0.49590623", "0.4956856", "0.4955679", "0.4955362", "0.49507338", "0.49506345", "0.49377146", "0.49287465", "0.49270853", "0.4924876", "0.49227524", "0.4922643", "0.49171084", "0.4914263", "0.4914132", "0.491324", "0.49126118", "0.49066892", "0.4903962", "0.48987", "0.4891751", "0.48836407", "0.48833385", "0.487931", "0.4878402", "0.48776624", "0.4873578", "0.48730618", "0.48728505", "0.48725522", "0.4868919", "0.48689112", "0.48681238", "0.48638183", "0.48600116", "0.48561057" ]
0.5713161
4
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() { pn_Data = new javax.swing.JPanel(); btn_Back = new javax.swing.JButton(); setOpaque(false); pn_Data.setOpaque(false); pn_Data.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent evt) { pn_DataComponentResized(evt); } }); javax.swing.GroupLayout pn_DataLayout = new javax.swing.GroupLayout(pn_Data); pn_Data.setLayout(pn_DataLayout); pn_DataLayout.setHorizontalGroup( pn_DataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 667, Short.MAX_VALUE) ); pn_DataLayout.setVerticalGroup( pn_DataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 337, Short.MAX_VALUE) ); btn_Back.setBackground(new java.awt.Color(0, 0, 0)); btn_Back.setForeground(new java.awt.Color(204, 204, 204)); btn_Back.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kuasar/plugin/servermanager/icons/previous.png"))); // NOI18N btn_Back.setText("Back"); btn_Back.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_BackActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(566, Short.MAX_VALUE) .addComponent(btn_Back) .addContainerGap()) .addComponent(pn_Data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(pn_Data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btn_Back) .addContainerGap()) ); }
{ "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 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 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 FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
End of variables declaration//GENEND:variables
private void loadPanel(String address, String port) { pn_Hvs pn_hvs = new pn_Hvs(address, port); pn_Data.removeAll(); pn_hvs.setBounds(0, 0, pn_Data.getWidth(), pn_Data.getHeight()); pn_Data.add(pn_hvs); pn_Data.updateUI(); pn_hvs.loadData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.58814824", "0.5854075", "0.5851759", "0.58514243", "0.58418584", "0.58395296", "0.5835063", "0.582234", "0.58090156", "0.5802706", "0.5793836", "0.57862717", "0.5784062", "0.5783567", "0.5782131", "0.57758564", "0.5762871", "0.5759349", "0.5745087", "0.57427835", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.57326084", "0.57301426", "0.57266665", "0.57229686", "0.57175463", "0.5705802", "0.5698347", "0.5697827", "0.569054", "0.5689405", "0.5686434", "0.56738997", "0.5662217", "0.56531453", "0.5645255", "0.5644223", "0.5642628", "0.5642476", "0.5640595", "0.56317437", "0.56294966", "0.56289655", "0.56220204", "0.56180173", "0.56134313", "0.5611337", "0.56112075", "0.56058615", "0.5604383", "0.5602629", "0.56002104", "0.5591573", "0.55856615", "0.5576992", "0.55707216", "0.5569681", "0.55570376", "0.55531484", "0.5551123", "0.5550893", "0.55482954", "0.5547471", "0.55469507", "0.5545719", "0.5543553", "0.55424106", "0.5542057", "0.55410767", "0.5537739", "0.55269134", "0.55236584", "0.55170715", "0.55035424", "0.55020875" ]
0.0
-1
Validation of User and Check if user already exist or not
public void valid()throws Exception { String login=br.readLine(); boolean alertlogin=true; while(alertlogin) { if(login.equalsIgnoreCase("register"))//if Client select register { String name=br.readLine(); if(serve.nameandpass.containsKey(name)) { //Push Notification System.out.println("Already Exist Try Another One"); } else { //Successfull Added String pass=br.readLine(); serve.nameandpass.put(name,pass); // Push Notification System.out.println("Succesfull Register"); } } else if(login.equalsIgnoreCase("LogIn"))//if client select old user { boolean validuser=true; boolean validpass=true; //Old User Chat Page while(validuser) { String name=br.readLine(); String pass=br.readLine(); if(serve.nameandpass.containsKey(name)) { validuser=false; while(validpass){ if(serve.nameandpass.get(name).equals(pass)) { validpass=false; alertlogin=false; System.out.println("Welcome Again"); Message msg=new Message(s); msg.run(); //Class Third Initate //Give A new Thread } else { System.out.println("Enter Password Again"); } } } else { System.out.println("Not a valid username or not found in database"); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "public User userExist(User user);", "public boolean existUser(String id);", "private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }", "private void validateUserObject(User user) {\n }", "private void validateUserObject(User user) {\n\t }", "@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}", "@Override\n\tpublic boolean isValid(UsersDto dto) {\n\t\tString id=session.selectOne(\"users.isValid\",dto);\n\t\tif(id==null) {//잘못된 아이디와 비밀번호\n\t\t\treturn false;\n\t\t}else {//유효한 아이디와 비밀번호\n\t\t\treturn true;\n\t\t}\n\t}", "@Test\n public void testUserIdExists() {\n\n String userInput = \"guest.login\";\n Owner testUser = ownerHelper.validateUser(userInput, \"Pa$$w0rd\");\n assertEquals(testUser.getPassword(), owner3.getPassword());\n assertEquals(testUser.getFirstName(), owner3.getFirstName());\n assertEquals(testUser.getLastName(), owner3.getLastName());\n\n }", "public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }", "@Test\n\tpublic void testUserValidationIfThere() {\n\t\tUserFunctions userCollections = new UserFunctions();\n\t\t\n\t\tassertNotEquals(-1, userCollections.validatePotentialUser(\"jonasanJosuta\", \"zaPasshon\"));\n\t}", "private void validateUserObject(User user) {\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "public boolean existUser(String campo1, String campo2);", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "@Override\n\tpublic boolean isUserExist(StudentForm student) {\n\t\treturn false;\n\t}", "public boolean testUser(){\n VallidateUserName validator = new VallidateUserName();\n return validator.isValidUser(UserName);\n }", "public boolean verifyUser(User user) {\n GetUserTask getUserTask = new GetUserTask();\n User temp = new User();\n\n try {\n temp = getUserTask.execute(user.getUserName()).get();\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n //if user did not exist, add one\n if(temp == null){\n ElasticSearchUserController.AddUserTask addUserTask = new ElasticSearchUserController.AddUserTask();\n addUserTask.execute(user);\n return true;\n }\n return false;\n }", "boolean userExists(HttpServletRequest request, String userId);", "public User validUser(User user) {\n User u = userRepository.findByuser_id(user.getuId());\n if(u.equals(user)){\n return u;\n }\n else{\n throw new RuntimeException();\n }\n\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isUserExist(String email, String Password);", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "Boolean checkUserExists(String userName) throws AppException;", "boolean exists(User user);", "Boolean checkUserExists(Integer userId) throws AppException;", "@Test(expected = UserAlreadyExists.class)\n public void registryUserExists() throws Exception {\n\n User user_expected = new User();\n user_expected.setId(1L);\n user_expected.setName(\"nametest\");\n user_expected.setLast_name(\"lastnametest\");\n user_expected.setUsername(\"usernametest\");\n user_expected.setPassword(\"a7574a42198b7d7eee2c037703a0b95558f195457908d6975e681e2055fd5eb9\");\n\n given(userRepository.findByUsername(anyString())).willReturn(Optional.of(user_expected));\n\n User user_saved = userServiceImpl.registryUser(this.user);\n\n }", "Boolean registerNewUser(User user);", "public boolean createUser() {\r\n\t\tboolean signupSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection signupConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tinsert data into table\r\n\t\t\t*/\r\n\t\t\tsignupSuccess = signupConn.executeInsertIntoUsers(uName, password, fullName, phone, email);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn signupSuccess;\r\n\t}", "private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic void validate() {\n\t\tif(name==null||name.trim().equals(\"\")){\n\t\t\taddActionError(\"用户必须填写!\");\n\t\t}\n\t\t\n\t\tList l=new ArrayList();\n\t\tl=userService.QueryByTabId(\"Xxuser\", \"id\", id);\n\t\t//判断是否修改\n\t\tif(l.size()!=0){\n\t\t\t\n\t\t\tfor(int i=0;i<l.size();i++){\n\t\t\t\tXxuser xxuser=new Xxuser();\n\t\t\t\txxuser=(Xxuser)l.get(i);\n\t\t\t\tif(xxuser.getName().equals(name.trim())){\n\t\t\t\t\tSystem.out.println(\"mei gai\");\n\t\t\t\t}else{\n\t\t\t\t\tList n=new ArrayList();\n\t\t\t\t\tn=userService.QueryByTab(\"Xxuser\", \"name\", name);\n\t\t\t\t\tif(n.size()!=0){\n\t\t\t\t\t\taddActionError(\"该用户已经存在!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t\t\n\t\t}\n\t}", "void ensureUserCreationAllowed(String email, String userName) throws BadRequestException, ConflictException, ServerException;", "public boolean create(UserDTO user){\r\n error = \"\";\r\n boolean check = checkMail(user.getEmail());\r\n if(check){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlInsertUser);\r\n preSta.setString(1, user.getEmail());\r\n preSta.setString(2, user.getPassword());\r\n preSta.setInt(3, user.getRole());\r\n if(preSta.executeUpdate() > 0){\r\n return true;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }\r\n return false;\r\n \r\n }", "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "public boolean validateUsernameExist(String username) {\n return userRepository.findUsername(username);\n }", "@PostMapping\n public User addUser(@Validated(value = Create.class) @RequestBody User user) {\n try {\n return userService.addUser(user);\n }catch (UserIdAlreadyExistsException exception){\n throw new UserIdAlreadyExistsException(\"User Id Already Exists\");\n }\n }", "public boolean isExistingUser() {\r\n return isExistingUser;\r\n }", "boolean isUserExist(String username, String password);", "public boolean existsUser(String username);", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "boolean create(User user) throws Exception;", "User getUserUnderValidation();", "@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}", "public boolean checkUserId() {\n if (userIdEditText.getText().toString().isEmpty()) {\n userIdContainer.setError(getString(R.string.error_user_id));\n } else {\n userIdContainer.setError(null);\n }\n return !userIdEditText.getText().toString().isEmpty();\n }", "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "boolean isUserExists(Username username);", "public User userExists(IDatabase db) {\n\t\tUser doesExist = db.userExists(model);\n\t\treturn doesExist;\n\t}", "@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }", "@Override\n\tpublic boolean register(User user) {\n\t\tboolean flag = false;\n\t\tList<User> list = this.userDao.findAll(\"and userName = ?\", user.getUserName());\n\t\t//System.out.println(list.size());\n\t\tif(list.size() <= 0){\n\t\t\tthis.userDao.register(user);\n\t\t\tflag = true;\n\t\t}\n\t\treturn flag;\n\t}", "private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }", "public User validate(String emailID , String password);", "User checkUser(String username, String password);", "public boolean register(String u_Name, String u_pw, String f_name){\n List<User> userList = userDao.getUserFromUsername(u_Name);\n //1.check if userName is used\n if (userList.size() != 0){ \n return false;\n }\n //2.create user and add to the DB\n User user = new User(u_Name, u_pw, f_name);\n userDao.addUser(user);\n //3.return true\n return true;\n }", "@Override\n public ResponseEntity<String> createUser(@ApiParam(value = \"\" ,required=true ) @Valid @RequestBody User user) {\n String problem = detectFormatProblemInUser(user);\n if(problem != null) {\n return new ResponseEntity<>(problem, HttpStatus.BAD_REQUEST);\n }\n // Used to prevent bruteforce listing of existing emails\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // Ensure the email is not already taken by another user\n if(userRepository.findById(user.getEmail()).isPresent()) {\n return new ResponseEntity<>(\"The email address is already taken\", HttpStatus.CONFLICT);\n }\n // We can store the new user in the database\n userRepository.save(userToUserEntity(user));\n return new ResponseEntity<>(\"User created successfully\", HttpStatus.CREATED);\n }", "@Override\n\tpublic boolean registeringUser(UserDetails userDetails) {\n\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\tif ((ud.getEmailId()).equalsIgnoreCase(userDetails.getEmailId())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tRepository.USER_DETAILS.add(userDetails);\n\t\treturn true;\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic int checkUser(User u) {\n\t\treturn userdao.checkUser(u);\n\t}", "private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "public static boolean checkUser(User dto){\n\t\t//Filters by first name\n\t\tFilter firstNameFilter = new FilterPredicate(\n\t\t\t\t\"firstName\", FilterOperator.EQUAL, dto.getFirstName()\n\t\t\t\t);\n\t\t//Filters by last name\n\t\tFilter lastNameFilter = new FilterPredicate(\n\t\t\t\t\"lastName\", FilterOperator.EQUAL, dto.getLastName()\n\t\t\t\t);\n\t\t//Combines the filters into one so that it checks against ALL 3\n\t\tFilter combinedFilter = CompositeFilterOperator.and(firstNameFilter, lastNameFilter);\n\t\t\n\t\t//Prepare the Query\n\t\tQuery q = new Query(\"User\").setFilter(combinedFilter);\n\t\tlog.warning(\"Query = \" + q.toString());\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\t\n\t\t//Create the username/ pw structure like we did when we created it\n\t\tString username = dto.getFirstName() + \" \" + dto.getLastName();\n\t\tusername = username.toLowerCase();\n\t\t\n\t\t//Passwords, we will maintain their caps\n\t\tString superUsernamePassword = username + dto.getPassword();\n\t\t\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\t//Loops through all results. In our case, we are going to just use the first one\n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.warning(\"Entity returned, found user\");\n\t\t\t/*\n\t\t\tNow that we have the user, loop through the result(s) and check if the pw\n\t\t\tmatches via a special method call. Note, generally we would want to write\n\t\t\tsome code when a user is entered to check for duplicates, but for now, \n\t\t\tlet's stick with the simple stuff. Keep in mind that this will only check\n\t\t\tfor the FIRST result, so if you enter your name twice, you won't be able \n\t\t\tto pass validation without deleting one first. \n\t\t\t */\n\t\t\tString storedPassword = (String) result.getProperty(\"password\");\n\t\t\t\n\t\t\t//Now, compare the passed and stored passwords\n\t\t\tif(BCrypt.checkpw(superUsernamePassword, storedPassword)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t}\n\t\t//Nothing was returned, return false\n\t\tlog.warning(\"Entity not returned, found nothing\");\n\t\treturn false;\n\t}", "public boolean registerNewUser(String un, String pw, String fn, String ln, String sq, String sa, int age) {\n\n boolean success;\n\n if (isUsernameExist(un)) {\n success = false;\n }\n else {\n // encrypting input password\n SHAEncryption sha = new SHAEncryption();\n String shaPW = sha.getSHA(pw);\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n // creating new user document based on the input from UI\n Document newUser = new Document(\"username\", un)\n .append(\"password\", shaPW)\n .append(\"firstName\", fn)\n .append(\"lastName\", ln)\n .append(\"age\", age)\n .append(\"secureQ\", sq)\n .append(\"secureA\", sa.toLowerCase())\n .append(\"status\", \"\")\n .append(\"hidefriends\",false)\n .append(\"hideposts\",false)\n .append(\"hideage\",false)\n .append(\"hidestatus\",false);\n\n // insert newUser into registeredUser collection\n collRU.insertOne(newUser);\n System.out.println(\"Username \" + un + \" is registered!\");\n success = true;\n \n // create followList for new user\n db.getCollection(\"followList\").insertOne(\n new Document(\"username\", un).append(\"following\", new ArrayList<String>()));\n }\n\n return success;\n }", "public boolean isUserExisted(String _fbEmail);", "private boolean isValidUser(OfferRequest offerRequest) {\n String currentUser = securityContextService.getCurrentUser();\n Optional<User> optionalUser = userRepository.findByUsername(currentUser);\n\n if (optionalUser.isPresent()) {\n\n String organisationalUnitNameFromOffer = offerRequest.getOrganisationalUnit();\n\n String userOrganisationalUnit = optionalUser.get().getOrganisationalUnit().getName();\n\n if (userOrganisationalUnit.equals(organisationalUnitNameFromOffer)) {\n return true;\n } else {\n throw new UnauthorizedException(String.format(\"Access to Organisational Unit %s not permitted\",\n organisationalUnitNameFromOffer));\n }\n }\n throw new NotFoundException(\"User not found\");\n\n }", "public boolean doesTheUserExist(String user)\r\n\t {\r\n\t\t if (!users.get(user).equals(null))\r\n\t\t return true;\r\n\t\t return false;\r\n\t }", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "@Override\n\tpublic boolean create(User user) {\n\t\treturn false;\n\t}", "boolean createAccount(String username,String email,String password){\n boolean isEmailExist = checkEmailExist(email);\n boolean isnewUser = false;\n if(isEmailExist){\n System.out.println(\"email already exists\");\n }\n else{\n if(email !=\"\" && email !=null && username !=\"\" && username !=null && password !=\"\" && password !=null){\n try{\n stmt = con.prepareStatement(\"INSERT INTO users(name,email,password) VALUES(?,?,?)\");\n stmt.setString(1,username);\n stmt.setString(2,email);\n stmt.setString(3,password);\n stmt.executeUpdate();\n isnewUser = true;\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n else{\n System.out.println(\"Please check the value\");\n }\n }\n return isnewUser;\n }", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "@Test\n public void testCreateUserWithExistingUsername() {\n final String username = \"[email protected]\";\n final CreateUserRequest request1 = new CreateUserRequest(username, \"Michael\", \"Pickelbauer\");\n final CreateUserRequest request2 = new CreateUserRequest(username, \"Hugo\", \"Mayer\");\n\n // Now let's create the two user accounts\n final CreateUserResponse response1 = administration.createUser(token, request1);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n\n // The first request should work like a charm\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n\n // The second request should fail, as we already have a user with this\n // username in the system\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(false));\n assertThat(response2.getError(), is(IWSErrors.USER_ACCOUNT_EXISTS));\n assertThat(response2.getMessage(), is(\"An account for the user with username \" + username + \" already exists.\"));\n }", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\r\n public String saveUser(@Valid User user, BindingResult result,\r\n ModelMap model) {\r\n if (result.hasErrors()) {\r\n return \"registration\";\r\n }\r\n\r\n // Preferred way to achieve uniqueness of field [loginID] should be implementing custom @Unique annotation\r\n // and applying it on field [loginID] of Model class [User].Below mentioned peace of code [if block] is\r\n // to demonstrate that you can fill custom errors outside the validation\r\n // framework as well while still using internationalised messages.\r\n\r\n if(!service.isLoginIDUnique(user.getId(), user.getLoginID())){\r\n FieldError loginIDError =new FieldError(\"user\",\"loginID\",messageSource.getMessage(\"non.unique.loginID\", new String[]{user.getLoginID()}, Locale.getDefault()));\r\n result.addError(loginIDError);\r\n return \"registration\";\r\n }\r\n\r\n service.saveUser(user);\r\n model.addAttribute(\"success\", \"user \" + user.getLoginID() + \" registered successfully\");\r\n return \"success\";\r\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExists(String username) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"username\", username));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n\n }", "@Test (priority = 1)\n\tpublic void TC1_CheckCreateNewuser_Exists ()\n\n\t{\n\t\tCreateUserPage UserObj = new CreateUserPage (driver);\n\n\t\t// This is to Validate If Create user button exists to Create a new User\n\t\tUserObj.Validate_CreateUserButton_Exsist();\n\n\t}", "boolean userRegistration(UserDTO user) throws UserException,ConnectException;", "private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}", "@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@Valid @RequestBody SignupRequest signupRequest) {\n System.out.println(\"Creating User \" + signupRequest);\n\n if (userAccountDetailsService.isUserExistByUsername(signupRequest.getUsername())) {\n System.out.println(\"A User with username: \" + signupRequest.getUsername() + \" already exist\");\n return new ResponseEntity<Void>(HttpStatus.CONFLICT);\n }\n\n UserAccount userAccount = new UserAccount();\n userAccount.setName(signupRequest.getName());\n userAccount.setUsername(signupRequest.getUsername());\n userAccount.setAge(signupRequest.getAge());\n userAccount.setPassword(passwordEncoder.encode(signupRequest.getPassword()));\n\n Set<String> roles = signupRequest.getRole();\n Set<Authorities> authorities = new HashSet<>();\n for(String role: roles) {\n Authorities authority = new Authorities();\n authority.setAuthority(role);\n authority.setUserAccount(userAccount);\n authorities.add(authority);\n }\n userAccount.setAuthorities(authorities);\n\n userAccountDetailsService.saveUser(userAccount);\n\n return new ResponseEntity<Void>(HttpStatus.CREATED);\n }", "@Test\n public final void testCreateUserInJSONUserAlreadyExists() {\n \n try {\n \tUserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Txuso\\\", \\\"password\\\": \\\"213\\\"}\";\n \tfixture.createUserInJSON(input);\n } catch (WebApplicationException e) {\n \tassertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode());\n }\n }", "public boolean isExistingUser(String email){\n Long count = userRepository.countByEmail(email);\n\n return count > 0;\n }", "@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }", "@Test(priority = 1)\r\n\tpublic void validUserTest() {\t\t\t\r\n\r\n\t\tAdminDashboardPage adminPage=new AdminDashboardPage(driver);\r\n\t\tadminPage.clickUsersTab();\t\r\n\t\t\r\n\t\tUsersListViewPage ulPage=new UsersListViewPage(driver);\r\n\t\tulPage.clickNewUser();\r\n\t\t\r\n\t\tCreateNewUserPage crUserPage=new CreateNewUserPage(driver);\r\n\t\tcrUserPage.enterUserDetails(\"Kathy\",\"pass\",\"[email protected]\");\r\n\t\tcrUserPage.clickCreateUser();\t\t\r\n\t\t\r\n\t\tadminPage.clickUsersTab();\r\n\t\tString actUserCreated=ulPage.verifyCreatedUser();\r\n\t\tAssert.assertEquals(actUserCreated,\"Kathy\");\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean validateUser(String userName) throws FetchException{\n\t\ttry{\n\t\treturn new DishDaoImpl().validateUser( userName) ;\n\t\t}\n\t\tcatch(DaoException e){\n\t\t\te.printStackTrace();\n\t\t\tthrow new FetchException(e.getMessage());\n\t\t}\n\t\t\n\t}", "@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"[email protected]\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }", "@Override\n public void onClick(View v) {\n String usernanme=et_username.getText().toString().trim();\n String password=et_password.getText().toString().trim();\n if(usernanme.equals(\"\")||password.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n String msg=repo.CheckUserAlreadyExist(usernanme,password);\n if(!msg.equals(\"exist\"))\n {\n repo.addUser(usernanme,password);\n dialog.dismiss();\n }\n else\n {\n Toast.makeText(AdminHomeActivity.this, \"Username or Password Already Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n\n\n }", "@Test\n public void testInvalidInput() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"SUPERHUMAN\");\n } catch (Exception e) {\n Assert.assertEquals(0, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }", "@Test\n public void createNewUserAndCheckIt() {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserLogin(\"068-068-68-68\");\n userLogin.setUserPassword(\"12345\");\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Successful registration\n userLogin.setUserPasswordNew(\"12345\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n\n assertThat(userResponse.getUserPhone().equals(usersService.normalizeAndCheckPhoneFormat(userLogin.getUserLogin())));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }", "public String validateUser(String un) {\n\t\tUser checkForUser = userDao.findByUsername(un);\n\t\tif (checkForUser != null) {\t\t\t\t\t//user exists\n\t\t\treturn \"That username already exists\";\n\t\t}\n\t\telse {\n\t\t\t//validate username\n\t\t\tif(!User.isValidUsername(un)) {\n\t\t\t\treturn \"Username must be between 5 and 11 characters and contain 1 alpha\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public boolean checkUser(User u) {\n if (users.isEmpty()) {\n u.addError(\"No user in hash map\");\n return false;\n }\n if (users.containsKey(u.getUsername())) {\n if (users.get(u.getUsername()).equals(u.getPassword())) {\n return true;\n }\n u.addError(\"Wrong password\");\n return false;\n }\n u.addError(\"User not exists\");\n return false;\n }" ]
[ "0.74149436", "0.7377473", "0.71549356", "0.7070444", "0.70695215", "0.70622814", "0.704935", "0.7013171", "0.69989467", "0.6973484", "0.6941182", "0.6920571", "0.69199014", "0.6913807", "0.69036245", "0.6902774", "0.68934244", "0.68838537", "0.6882131", "0.68740636", "0.68722034", "0.68489337", "0.68346685", "0.6827111", "0.68045735", "0.6783752", "0.6765148", "0.6765148", "0.6765148", "0.6765148", "0.6765148", "0.6765148", "0.6765148", "0.6759859", "0.6754666", "0.6747467", "0.6741121", "0.67406124", "0.67223155", "0.671406", "0.66959965", "0.66775", "0.66556334", "0.6643955", "0.66419125", "0.6641795", "0.66265345", "0.6599827", "0.65989226", "0.65939397", "0.6591043", "0.65834606", "0.65823203", "0.65801734", "0.65796816", "0.6578916", "0.6559999", "0.65584975", "0.654899", "0.65427184", "0.6534797", "0.6529451", "0.652255", "0.65203094", "0.6520013", "0.6517173", "0.65139997", "0.6508439", "0.64717436", "0.64685947", "0.6460602", "0.64596605", "0.64383334", "0.64227587", "0.642113", "0.64195", "0.6402393", "0.6402393", "0.6402393", "0.6385261", "0.6377843", "0.6377364", "0.637108", "0.6365156", "0.6363815", "0.63608116", "0.63571775", "0.6353686", "0.63489884", "0.63473153", "0.63427746", "0.634103", "0.6339128", "0.6338086", "0.63281155", "0.63248116", "0.63235897", "0.63223755", "0.63100433", "0.6308011", "0.6303751" ]
0.0
-1
/ JADX WARNING: Code restructure failed: missing block: B:13:0x002b, code lost: if (r4 != 6) goto L_0x008f; / Code decompiled incorrectly, please refer to instructions dump.
public boolean onTouch(android.view.View r4, android.view.MotionEvent r5) { /* r3 = this; boolean r4 = r3.mAnimatingZoomEnding r0 = 1 if (r4 != 0) goto L_0x008f int r4 = r5.getPointerCount() r1 = 2 if (r4 <= r1) goto L_0x000e goto L_0x008f L_0x000e: android.view.ScaleGestureDetector r4 = r3.mScaleGestureDetector r4.onTouchEvent(r5) android.view.GestureDetector r4 = r3.mGestureDetector r4.onTouchEvent(r5) int r4 = r5.getAction() r4 = r4 & 255(0xff, float:3.57E-43) if (r4 == 0) goto L_0x0079 if (r4 == r0) goto L_0x006a if (r4 == r1) goto L_0x002e r2 = 3 if (r4 == r2) goto L_0x006a r2 = 5 if (r4 == r2) goto L_0x0079 r5 = 6 if (r4 == r5) goto L_0x006a goto L_0x008f L_0x002e: int r4 = r3.mState if (r4 != r1) goto L_0x008f android.graphics.PointF r4 = r3.mCurrentMovementMidPoint com.ablanco.zoomy.MotionUtils.midPointOfEvent(r4, r5) android.graphics.PointF r4 = r3.mCurrentMovementMidPoint float r5 = r4.x android.graphics.PointF r1 = r3.mInitialPinchMidPoint float r2 = r1.x float r5 = r5 - r2 r4.x = r5 float r5 = r4.y float r1 = r1.y float r5 = r5 - r1 r4.y = r5 float r5 = r4.x android.graphics.Point r1 = r3.mTargetViewCords int r2 = r1.x float r2 = (float) r2 float r5 = r5 + r2 r4.x = r5 float r5 = r4.y int r1 = r1.y float r1 = (float) r1 float r5 = r5 + r1 r4.y = r5 float r5 = r4.x float r4 = r4.y android.widget.ImageView r1 = r3.mZoomableView r1.setX(r5) android.widget.ImageView r5 = r3.mZoomableView r5.setY(r4) goto L_0x008f L_0x006a: int r4 = r3.mState if (r4 == r0) goto L_0x0075 if (r4 == r1) goto L_0x0071 goto L_0x008f L_0x0071: r3.endZoomingView() goto L_0x008f L_0x0075: r4 = 0 r3.mState = r4 goto L_0x008f L_0x0079: int r4 = r3.mState if (r4 == 0) goto L_0x008d if (r4 == r0) goto L_0x0080 goto L_0x008f L_0x0080: r3.mState = r1 android.graphics.PointF r4 = r3.mInitialPinchMidPoint com.ablanco.zoomy.MotionUtils.midPointOfEvent(r4, r5) android.view.View r4 = r3.mTarget r3.startZoomingView(r4) goto L_0x008f L_0x008d: r3.mState = r0 L_0x008f: return r0 */ throw new UnsupportedOperationException("Method not decompiled: com.ablanco.zoomy.ZoomableTouchListener.onTouch(android.view.View, android.view.MotionEvent):boolean"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "public boolean mo9310a(java.lang.Exception r4) {\n /*\n r3 = this;\n java.lang.Object r0 = r3.f8650a\n monitor-enter(r0)\n boolean r1 = r3.f8651b // Catch:{ all -> 0x002c }\n r2 = 0\n if (r1 == 0) goto L_0x000a\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r2\n L_0x000a:\n r1 = 1\n r3.f8651b = r1 // Catch:{ all -> 0x002c }\n r3.f8654e = r4 // Catch:{ all -> 0x002c }\n r3.f8655f = r2 // Catch:{ all -> 0x002c }\n java.lang.Object r4 = r3.f8650a // Catch:{ all -> 0x002c }\n r4.notifyAll() // Catch:{ all -> 0x002c }\n r3.m11250m() // Catch:{ all -> 0x002c }\n boolean r4 = r3.f8655f // Catch:{ all -> 0x002c }\n if (r4 != 0) goto L_0x002a\n bolts.n$q r4 = m11249l() // Catch:{ all -> 0x002c }\n if (r4 == 0) goto L_0x002a\n bolts.p r4 = new bolts.p // Catch:{ all -> 0x002c }\n r4.<init>(r3) // Catch:{ all -> 0x002c }\n r3.f8656g = r4 // Catch:{ all -> 0x002c }\n L_0x002a:\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r1\n L_0x002c:\n r4 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: bolts.C2177n.mo9310a(java.lang.Exception):boolean\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void c() {\n /*\n r4 = this;\n com.shopee.app.data.store.o r0 = r4.f16997c\n boolean r0 = r0.c()\n r1 = 1\n r2 = 0\n if (r0 == 0) goto L_0x000c\n L_0x000a:\n r0 = 0\n goto L_0x0023\n L_0x000c:\n com.shopee.app.data.store.o r0 = r4.f16997c\n boolean r0 = r0.a()\n if (r0 != 0) goto L_0x001c\n com.shopee.app.data.store.o r0 = r4.f16997c\n int r0 = r0.b()\n r2 = r0\n goto L_0x000a\n L_0x001c:\n com.shopee.app.data.store.o r0 = r4.f16997c\n int r2 = r0.e()\n r0 = 1\n L_0x0023:\n boolean r3 = r4.f16998d\n if (r3 == 0) goto L_0x0032\n if (r0 == 0) goto L_0x003a\n com.shopee.app.network.d.c.d r0 = new com.shopee.app.network.d.c.d\n r0.<init>()\n r0.a(r2, r1)\n goto L_0x003a\n L_0x0032:\n com.shopee.app.network.d.c.d r1 = new com.shopee.app.network.d.c.d\n r1.<init>()\n r1.a(r2, r0)\n L_0x003a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.shopee.app.d.c.f.m.c():void\");\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "public static boolean a(android.content.Context r4, byte[] r5) {\n /*\n r1 = d;\n r0 = 0;\n L_0x0003:\n r2 = c();\t Catch:{ Exception -> 0x003a }\n if (r2 != 0) goto L_0x0010;\n L_0x0009:\n r2 = e;\t Catch:{ Exception -> 0x003a }\n r2.block();\t Catch:{ Exception -> 0x003a }\n if (r1 == 0) goto L_0x0003;\n L_0x0010:\n r1 = z;\t Catch:{ Exception -> 0x003a }\n r2 = 22;\n r1 = r1[r2];\t Catch:{ Exception -> 0x003a }\n com.whatsapp.util.Log.i(r1);\t Catch:{ Exception -> 0x003a }\n r1 = com.whatsapp.contact.o.NOTIFICATION_DELTA;\t Catch:{ Exception -> 0x003a }\n r0 = a(r4, r1, r5);\t Catch:{ Exception -> 0x003a }\n r1 = b();\t Catch:{ Exception -> 0x0038 }\n if (r1 != 0) goto L_0x002e;\n L_0x0025:\n r1 = z;\t Catch:{ Exception -> 0x0038 }\n r2 = 16;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0038 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0038 }\n L_0x002e:\n r1 = z;\n r2 = 18;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n L_0x0037:\n return r0;\n L_0x0038:\n r0 = move-exception;\n throw r0;\n L_0x003a:\n r1 = move-exception;\n r2 = z;\t Catch:{ all -> 0x005d }\n r3 = 20;\n r2 = r2[r3];\t Catch:{ all -> 0x005d }\n com.whatsapp.util.Log.b(r2, r1);\t Catch:{ all -> 0x005d }\n r1 = b();\n if (r1 != 0) goto L_0x0053;\n L_0x004a:\n r1 = z;\n r2 = 19;\n r1 = r1[r2];\n com.whatsapp.util.Log.e(r1);\n L_0x0053:\n r1 = z;\n r2 = 23;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n goto L_0x0037;\n L_0x005d:\n r0 = move-exception;\n r1 = b();\t Catch:{ Exception -> 0x0077 }\n if (r1 != 0) goto L_0x006d;\n L_0x0064:\n r1 = z;\t Catch:{ Exception -> 0x0077 }\n r2 = 21;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0077 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0077 }\n L_0x006d:\n r1 = z;\n r2 = 17;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n throw r0;\n L_0x0077:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.contact.i.a(android.content.Context, byte[]):boolean\");\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "private final com.google.wireless.android.finsky.dfe.p515h.p516a.ae m35733b(com.google.protobuf.nano.C7213a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.m33550a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 18: goto L_0x001f;\n case 26: goto L_0x002c;\n case 34: goto L_0x0039;\n case 42: goto L_0x004a;\n case 50: goto L_0x0057;\n case 56: goto L_0x0064;\n case 64: goto L_0x00a3;\n case 72: goto L_0x00b1;\n case 82: goto L_0x00bf;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r6.f38026c;\n if (r0 != 0) goto L_0x0019;\n L_0x0012:\n r0 = new com.google.android.finsky.cv.a.bd;\n r0.<init>();\n r6.f38026c = r0;\n L_0x0019:\n r0 = r6.f38026c;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x001f:\n r0 = r7.m33564f();\n r6.f38027d = r0;\n r0 = r6.f38025b;\n r0 = r0 | 1;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x002c:\n r0 = r7.m33564f();\n r6.f38028e = r0;\n r0 = r6.f38025b;\n r0 = r0 | 2;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0039:\n r0 = r6.f38029f;\n if (r0 != 0) goto L_0x0044;\n L_0x003d:\n r0 = new com.google.android.finsky.cv.a.ax;\n r0.<init>();\n r6.f38029f = r0;\n L_0x0044:\n r0 = r6.f38029f;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x004a:\n r0 = r7.m33564f();\n r6.f38030g = r0;\n r0 = r6.f38025b;\n r0 = r0 | 4;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0057:\n r0 = r7.m33564f();\n r6.f38031h = r0;\n r0 = r6.f38025b;\n r0 = r0 | 8;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0064:\n r1 = r6.f38025b;\n r1 = r1 | 16;\n r6.f38025b = r1;\n r1 = r7.m33573o();\n r2 = r7.m33567i();\t Catch:{ IllegalArgumentException -> 0x0090 }\n switch(r2) {\n case 0: goto L_0x0099;\n case 1: goto L_0x0099;\n case 2: goto L_0x0099;\n case 3: goto L_0x0099;\n case 4: goto L_0x0099;\n default: goto L_0x0075;\n };\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0075:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = 36;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = \" is not a valid enum Type\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0090 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0090:\n r2 = move-exception;\n r7.m33562e(r1);\n r6.a(r7, r0);\n goto L_0x0000;\n L_0x0099:\n r6.f38032i = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r6.f38025b;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2 | 16;\n r6.f38025b = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n goto L_0x0000;\n L_0x00a3:\n r0 = r7.m33563e();\n r6.f38033j = r0;\n r0 = r6.f38025b;\n r0 = r0 | 32;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00b1:\n r0 = r7.m33563e();\n r6.f38034k = r0;\n r0 = r6.f38025b;\n r0 = r0 | 64;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00bf:\n r0 = r6.f38035l;\n if (r0 != 0) goto L_0x00ca;\n L_0x00c3:\n r0 = new com.google.android.finsky.cv.a.cv;\n r0.<init>();\n r6.f38035l = r0;\n L_0x00ca:\n r0 = r6.f38035l;\n r7.m33552a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.h.a.ae.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.h.a.ae\");\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "public void run() {\n /*\n r8 = this;\n r1 = com.umeng.commonsdk.proguard.b.b;\t Catch:{ Throwable -> 0x00c9 }\n monitor-enter(r1);\t Catch:{ Throwable -> 0x00c9 }\n r0 = r8.a;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x0009:\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x000d:\n r0 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n if (r0 != 0) goto L_0x00c4;\n L_0x0013:\n r0 = 1;\n com.umeng.commonsdk.proguard.b.a = r0;\t Catch:{ all -> 0x00c6 }\n r0 = \"walle-crash\";\n r2 = 1;\n r2 = new java.lang.Object[r2];\t Catch:{ all -> 0x00c6 }\n r3 = 0;\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r4.<init>();\t Catch:{ all -> 0x00c6 }\n r5 = \"report thread is \";\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r5 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r4 = r4.toString();\t Catch:{ all -> 0x00c6 }\n r2[r3] = r4;\t Catch:{ all -> 0x00c6 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c6 }\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n r0 = com.umeng.commonsdk.proguard.c.a(r0);\t Catch:{ all -> 0x00c6 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x00c6 }\n if (r2 != 0) goto L_0x00c4;\n L_0x0045:\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r3.getFilesDir();\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"stateless\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"umpx_internal\";\n r3 = r3.getBytes();\t Catch:{ all -> 0x00c6 }\n r4 = 0;\n r3 = android.util.Base64.encodeToString(r3, r4);\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r2 = r2.toString();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r4 = 10;\n com.umeng.commonsdk.stateless.f.a(r3, r2, r4);\t Catch:{ all -> 0x00c6 }\n r2 = new com.umeng.commonsdk.stateless.UMSLEnvelopeBuild;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r2.buildSLBaseHeader(r3);\t Catch:{ all -> 0x00c6 }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"content\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = \"ts\";\n r6 = java.lang.System.currentTimeMillis();\t Catch:{ JSONException -> 0x00cb }\n r4.put(r0, r6);\t Catch:{ JSONException -> 0x00cb }\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r0.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"crash\";\n r0.put(r5, r4);\t Catch:{ JSONException -> 0x00cb }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"tp\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = r8.a;\t Catch:{ JSONException -> 0x00cb }\n r5 = \"umpx_internal\";\n r0 = r2.buildSLEnvelope(r0, r3, r4, r5);\t Catch:{ JSONException -> 0x00cb }\n if (r0 == 0) goto L_0x00c4;\n L_0x00bc:\n r2 = \"exception\";\n r0 = r0.has(r2);\t Catch:{ JSONException -> 0x00cb }\n if (r0 != 0) goto L_0x00c4;\n L_0x00c4:\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n L_0x00c5:\n return;\n L_0x00c6:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n throw r0;\t Catch:{ Throwable -> 0x00c9 }\n L_0x00c9:\n r0 = move-exception;\n goto L_0x00c5;\n L_0x00cb:\n r0 = move-exception;\n goto L_0x00c4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.bb.run():void\");\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "public final void m15744a(com.p111d.p112a.p114b.C5301g r9) {\n /*\n r8 = this;\n r0 = r8.f17783i;\n r1 = r8.f17781g;\n r2 = 0;\n r3 = 1;\n if (r1 == 0) goto L_0x0010;\n L_0x0008:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0010;\n L_0x000e:\n r4 = r3;\n goto L_0x0011;\n L_0x0010:\n r4 = r2;\n L_0x0011:\n r5 = -1;\n L_0x0012:\n r5 = r5 + r3;\n r6 = 16;\n if (r5 < r6) goto L_0x0029;\n L_0x0017:\n r0 = r0.m4032a();\n if (r0 == 0) goto L_0x0148;\n L_0x001d:\n if (r1 == 0) goto L_0x0027;\n L_0x001f:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0027;\n L_0x0025:\n r4 = r3;\n goto L_0x0028;\n L_0x0027:\n r4 = r2;\n L_0x0028:\n r5 = r2;\n L_0x0029:\n r6 = r0.m4031a(r5);\n if (r6 == 0) goto L_0x0148;\n L_0x002f:\n if (r4 == 0) goto L_0x0043;\n L_0x0031:\n r7 = r0.m4039c(r5);\n if (r7 == 0) goto L_0x003a;\n L_0x0037:\n r9.writeObjectId(r7);\n L_0x003a:\n r7 = r0.m4040d(r5);\n if (r7 == 0) goto L_0x0043;\n L_0x0040:\n r9.writeTypeId(r7);\n L_0x0043:\n r7 = com.p111d.p112a.p121c.p138m.C6523u.C15401.f4807a;\n r6 = r6.ordinal();\n r6 = r7[r6];\n switch(r6) {\n case 1: goto L_0x0143;\n case 2: goto L_0x013e;\n case 3: goto L_0x0139;\n case 4: goto L_0x0134;\n case 5: goto L_0x011e;\n case 6: goto L_0x0108;\n case 7: goto L_0x00c5;\n case 8: goto L_0x0074;\n case 9: goto L_0x0070;\n case 10: goto L_0x006c;\n case 11: goto L_0x0068;\n case 12: goto L_0x0056;\n default: goto L_0x004e;\n };\n L_0x004e:\n r9 = new java.lang.RuntimeException;\n r0 = \"Internal error: should never end up through this code path\";\n r9.<init>(r0);\n throw r9;\n L_0x0056:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p121c.p138m.C5378q;\n if (r7 == 0) goto L_0x0064;\n L_0x005e:\n r6 = (com.p111d.p112a.p121c.p138m.C5378q) r6;\n r6.m11598a(r9);\n goto L_0x0012;\n L_0x0064:\n r9.writeObject(r6);\n goto L_0x0012;\n L_0x0068:\n r9.writeNull();\n goto L_0x0012;\n L_0x006c:\n r9.writeBoolean(r2);\n goto L_0x0012;\n L_0x0070:\n r9.writeBoolean(r3);\n goto L_0x0012;\n L_0x0074:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Double;\n if (r7 == 0) goto L_0x0086;\n L_0x007c:\n r6 = (java.lang.Double) r6;\n r6 = r6.doubleValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0086:\n r7 = r6 instanceof java.math.BigDecimal;\n if (r7 == 0) goto L_0x0090;\n L_0x008a:\n r6 = (java.math.BigDecimal) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0090:\n r7 = r6 instanceof java.lang.Float;\n if (r7 == 0) goto L_0x009f;\n L_0x0094:\n r6 = (java.lang.Float) r6;\n r6 = r6.floatValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x009f:\n if (r6 != 0) goto L_0x00a2;\n L_0x00a1:\n goto L_0x0068;\n L_0x00a2:\n r7 = r6 instanceof java.lang.String;\n if (r7 == 0) goto L_0x00ad;\n L_0x00a6:\n r6 = (java.lang.String) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00ad:\n r0 = new com.d.a.b.f;\n r1 = \"Unrecognized value type for VALUE_NUMBER_FLOAT: %s, can not serialize\";\n r3 = new java.lang.Object[r3];\n r4 = r6.getClass();\n r4 = r4.getName();\n r3[r2] = r4;\n r1 = java.lang.String.format(r1, r3);\n r0.<init>(r1, r9);\n throw r0;\n L_0x00c5:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Integer;\n if (r7 == 0) goto L_0x00d8;\n L_0x00cd:\n r6 = (java.lang.Integer) r6;\n r6 = r6.intValue();\n L_0x00d3:\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00d8:\n r7 = r6 instanceof java.math.BigInteger;\n if (r7 == 0) goto L_0x00e3;\n L_0x00dc:\n r6 = (java.math.BigInteger) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00e3:\n r7 = r6 instanceof java.lang.Long;\n if (r7 == 0) goto L_0x00f2;\n L_0x00e7:\n r6 = (java.lang.Long) r6;\n r6 = r6.longValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00f2:\n r7 = r6 instanceof java.lang.Short;\n if (r7 == 0) goto L_0x0101;\n L_0x00f6:\n r6 = (java.lang.Short) r6;\n r6 = r6.shortValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0101:\n r6 = (java.lang.Number) r6;\n r6 = r6.intValue();\n goto L_0x00d3;\n L_0x0108:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x0117;\n L_0x0110:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x0117:\n r6 = (java.lang.String) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x011e:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x012d;\n L_0x0126:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x012d:\n r6 = (java.lang.String) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x0134:\n r9.writeEndArray();\n goto L_0x0012;\n L_0x0139:\n r9.writeStartArray();\n goto L_0x0012;\n L_0x013e:\n r9.writeEndObject();\n goto L_0x0012;\n L_0x0143:\n r9.writeStartObject();\n goto L_0x0012;\n L_0x0148:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.m.u.a(com.d.a.b.g):void\");\n }", "public int mo4452e() {\n /*\n r7 = this;\n int r0 = r7.f2518c\n r7.f2519d = r0\n r0 = 0\n r1 = 0\n r2 = 0\n L_0x0007:\n int r3 = r7.f2519d\n if (r3 <= 0) goto L_0x003b\n byte r3 = r7.mo4449a()\n r4 = -1\n if (r3 == 0) goto L_0x0034\n r5 = 1\n if (r3 == r5) goto L_0x002e\n r6 = 2\n if (r3 == r6) goto L_0x002e\n r6 = 9\n if (r3 == r6) goto L_0x0007\n switch(r3) {\n case 14: goto L_0x0028;\n case 15: goto L_0x0028;\n case 16: goto L_0x0025;\n case 17: goto L_0x0025;\n case 18: goto L_0x0022;\n default: goto L_0x001f;\n }\n L_0x001f:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0022:\n int r1 = r1 + 1\n goto L_0x0007\n L_0x0025:\n if (r2 != r1) goto L_0x002b\n return r5\n L_0x0028:\n if (r2 != r1) goto L_0x002b\n return r4\n L_0x002b:\n int r1 = r1 + -1\n goto L_0x0007\n L_0x002e:\n if (r1 != 0) goto L_0x0031\n return r5\n L_0x0031:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0034:\n if (r1 != 0) goto L_0x0037\n return r4\n L_0x0037:\n if (r2 != 0) goto L_0x0007\n L_0x0039:\n r2 = r1\n goto L_0x0007\n L_0x003b:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.core.text.BidiFormatter.C0510a.mo4452e():int\");\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "public void mo5832b(android.content.Context r4) {\n /*\n r3 = this;\n r0 = 1\n java.lang.String r1 = m3304x() // Catch:{ a -> 0x002f, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x002f, IOException -> 0x0027 }\n L_0x0008:\n r0 = 2\n java.lang.String r1 = m3302v() // Catch:{ a -> 0x002d, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x002d, IOException -> 0x0027 }\n L_0x0010:\n r0 = 25\n java.lang.Long r1 = m3303w() // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n long r1 = r1.longValue() // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n r3.mo5829a(r0, r1) // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n L_0x001d:\n r0 = 24\n java.lang.String r1 = m3300d(r4) // Catch:{ a -> 0x0029, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x0029, IOException -> 0x0027 }\n L_0x0026:\n return\n L_0x0027:\n r0 = move-exception\n goto L_0x0026\n L_0x0029:\n r0 = move-exception\n goto L_0x0026\n L_0x002b:\n r0 = move-exception\n goto L_0x001d\n L_0x002d:\n r0 = move-exception\n goto L_0x0010\n L_0x002f:\n r0 = move-exception\n goto L_0x0008\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.C1107j.mo5832b(android.content.Context):void\");\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public void a(com.xiaomi.push.jc r6) {\n /*\n r5 = this;\n r6.a()\n L_0x0003:\n com.xiaomi.push.iz r0 = r6.a()\n byte r1 = r0.a\n if (r1 != 0) goto L_0x0012\n r6.f()\n r5.a()\n return\n L_0x0012:\n short r1 = r0.f784a\n r2 = 11\n switch(r1) {\n case 1: goto L_0x00b6;\n case 2: goto L_0x00a3;\n case 3: goto L_0x0098;\n case 4: goto L_0x008d;\n case 5: goto L_0x0082;\n case 6: goto L_0x0019;\n case 7: goto L_0x0071;\n case 8: goto L_0x0066;\n case 9: goto L_0x0038;\n case 10: goto L_0x002c;\n case 11: goto L_0x0020;\n default: goto L_0x0019;\n }\n L_0x0019:\n byte r0 = r0.a\n com.xiaomi.push.jf.a(r6, r0)\n goto L_0x00c0\n L_0x0020:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f573g = r0\n goto L_0x00c0\n L_0x002c:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f572f = r0\n goto L_0x00c0\n L_0x0038:\n byte r1 = r0.a\n r2 = 13\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.jb r0 = r6.a()\n java.util.HashMap r1 = new java.util.HashMap\n int r2 = r0.f788a\n int r2 = r2 * 2\n r1.<init>(r2)\n r5.f567a = r1\n r1 = 0\n L_0x004e:\n int r2 = r0.f788a\n if (r1 >= r2) goto L_0x0062\n java.lang.String r2 = r6.a()\n java.lang.String r3 = r6.a()\n java.util.Map<java.lang.String, java.lang.String> r4 = r5.f567a\n r4.put(r2, r3)\n int r1 = r1 + 1\n goto L_0x004e\n L_0x0062:\n r6.h()\n goto L_0x00c0\n L_0x0066:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f571e = r0\n goto L_0x00c0\n L_0x0071:\n byte r1 = r0.a\n r2 = 10\n if (r1 != r2) goto L_0x0019\n long r0 = r6.a()\n r5.f563a = r0\n r0 = 1\n r5.a((boolean) r0)\n goto L_0x00c0\n L_0x0082:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f570d = r0\n goto L_0x00c0\n L_0x008d:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f569c = r0\n goto L_0x00c0\n L_0x0098:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f568b = r0\n goto L_0x00c0\n L_0x00a3:\n byte r1 = r0.a\n r2 = 12\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.hv r0 = new com.xiaomi.push.hv\n r0.<init>()\n r5.f564a = r0\n com.xiaomi.push.hv r0 = r5.f564a\n r0.a((com.xiaomi.push.jc) r6)\n goto L_0x00c0\n L_0x00b6:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f565a = r0\n L_0x00c0:\n r6.g()\n goto L_0x0003\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.hx.a(com.xiaomi.push.jc):void\");\n }", "@Override\n public void a() {\n block25 : {\n block24 : {\n block22 : {\n var17_1 = a.a;\n var3_2 = this.c.i();\n var4_3 = var3_2.a().a();\n this.d = new w();\n this.e = new y.f.h.D(this.d);\n this.h = M.a(new Object[this.b.e()]);\n this.i = M.b(new Object[this.b.g()]);\n var5_4 = this.b.o();\n while (var5_4.f()) {\n var6_5 = var5_4.e();\n if (var17_1 == 0) {\n if (var6_5.c() <= this.l) {\n var7_6 = this.d.d();\n this.h.a(var6_5, var7_6);\n }\n var5_4.g();\n if (var17_1 == 0) continue;\n }\n break block22;\n }\n this.j = M.b(new Object[this.b.g()]);\n this.k = M.b(new Object[this.b.g()]);\n this.a(this.j, this.k);\n }\n var2_8 = this.b.o();\n block3 : do {\n v0 = var2_8.f();\n block4 : while (v0 != 0) {\n var5_4 = var2_8.e();\n if (var5_4.c() != 0) {\n var1_9 = var5_4.l();\n var6_5 = var1_9.a();\n var7_6 = (y.c.q)this.j.b(var6_5);\n var1_9.b();\n while (var1_9.f()) {\n var8_10 = var1_9.a();\n var9_11 = (y.c.q)this.j.b(var8_10);\n var10_12 = (y.c.q)this.k.b(var8_10);\n var11_13 = this.a((y.c.q)var7_6, (y.c.q)var9_11);\n v0 = var5_4.c();\n if (var17_1 != 0) continue block4;\n if (v0 > this.l) {\n this.h.a(var5_4, var11_13);\n }\n var7_6 = (y.c.q)this.j.b(var8_10);\n var12_14 /* !! */ = this.d.a((y.c.q)var9_11, (y.c.q)var10_12);\n this.i.a(var8_10, var12_14 /* !! */ );\n if (var8_10 == var6_5) break;\n var1_9.b();\n if (var17_1 == 0) continue;\n }\n }\n var2_8.g();\n if (var17_1 == 0) continue block3;\n }\n break block3;\n break;\n } while (true);\n var1_9 = this.b.p();\n while (var1_9.f()) {\n var5_4 = var1_9.a();\n v1 = this;\n if (var17_1 == 0) {\n block23 : {\n if (v1.c.n((y.c.d)var5_4)) {\n this.e.m((y.c.d)this.i.b(var5_4));\n if (var17_1 == 0) break block23;\n }\n this.e.e((y.c.d)this.i.b(var5_4));\n }\n var6_5 = this.c.h((y.c.d)var5_4);\n this.e.b((y.c.d)this.i.b(var5_4), (y.c.d)this.i.b(var6_5));\n var1_9.g();\n if (var17_1 == 0) continue;\n }\n break block24;\n }\n v1 = this;\n }\n var5_4 = v1.e.m();\n this.d.a(\"y.layout.orthogonal.general.NodeSplitter.NODE_FACES\", (y.c.c)var5_4);\n var6_5 = this.e.m();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", (y.c.c)var6_5);\n this.m = this.e.g().t();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", new c((r)var6_5, this.m));\n try {\n this.e.l();\n var7_6 = (y.c.d)this.i.b(var4_3);\n this.e.b(this.e.i((y.c.d)var7_6));\n var8_10 = this.e.h();\n while (var8_10.f()) {\n var5_4.a(var8_10.a(), false);\n var8_10.g();\n if (var17_1 == 0) {\n if (var17_1 == 0) continue;\n }\n break block25;\n }\n var8_10 = this.b.o();\n while (var8_10.f()) {\n var9_11 = var8_10.e();\n if (var17_1 != 0) break;\n if (var9_11.c() <= this.l) ** GOTO lbl-1000\n var10_12 = (y.c.d)this.h.b(var9_11);\n var11_13 = this.e.i((y.c.d)var10_12);\n this.h.a(var9_11, var11_13);\n var5_4.a((p)var11_13, true);\n var12_14 /* !! */ = (y.c.d)this.b.p((y.c.q)var9_11);\n var14_15 = this.b.q((y.c.q)var9_11);\n var16_16 = new Dimension((int)var12_14 /* !! */ , (int)var14_15);\n var6_5.a((p)var11_13, var16_16);\n if (var17_1 != 0) lbl-1000: // 2 sources:\n {\n var10_12 = this.b.r((y.c.q)var9_11);\n if (var10_12.a > 0.0 || var10_12.b > 0.0) {\n var11_13 = (y.c.q)this.h.b(var9_11);\n this.m.a(var11_13, this.b.r((y.c.q)var9_11));\n }\n }\n var8_10.g();\n if (var17_1 == 0) continue;\n break;\n }\n }\n catch (Exception var7_7) {\n System.err.println(\"Internal Error in Face calculation !\");\n var7_7.printStackTrace(System.err);\n }\n }\n var7_6 = this.e.h();\n block9 : do {\n if (var7_6.f() == false) return;\n var8_10 = (p)var7_6.d();\n if (var5_4.d(var8_10)) {\n var9_11 = var8_10.a();\n while (var9_11.f()) {\n var10_12 = var9_11.a();\n this.e.m(this.e.h((y.c.d)var10_12));\n this.e.e((y.c.d)var10_12);\n var9_11.g();\n if (var17_1 != 0) continue block9;\n if (var17_1 == 0) continue;\n }\n }\n var7_6.g();\n } while (var17_1 == 0);\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public final synchronized void e(a.c.a.c.c r5, boolean r6) {\n /*\n r4 = this;\n monitor-enter(r4)\n monitor-enter(r4) // Catch:{ all -> 0x00a9 }\n java.util.ArrayList<a.c.a.c.c> r0 = r4.f15b // Catch:{ all -> 0x00a6 }\n r1 = 1\n r2 = 0\n if (r0 != 0) goto L_0x0009\n goto L_0x001e\n L_0x0009:\n java.util.ArrayList<a.c.a.c.c> r0 = r4.f16c // Catch:{ all -> 0x00a6 }\n int r0 = r0.size() // Catch:{ all -> 0x00a6 }\n java.util.ArrayList<a.c.a.c.c> r3 = r4.f17d // Catch:{ all -> 0x00a6 }\n int r3 = r3.size() // Catch:{ all -> 0x00a6 }\n int r3 = r3 + r0\n java.util.ArrayList<a.c.a.c.c> r0 = r4.f15b // Catch:{ all -> 0x00a6 }\n int r0 = r0.size() // Catch:{ all -> 0x00a6 }\n if (r3 != r0) goto L_0x0020\n L_0x001e:\n r0 = 1\n goto L_0x0021\n L_0x0020:\n r0 = 0\n L_0x0021:\n r3 = 0\n if (r0 == 0) goto L_0x0055\n a.c.a.c.h r5 = r4.f14a // Catch:{ all -> 0x00a6 }\n if (r5 == 0) goto L_0x00a3\n java.util.ArrayList<a.c.a.c.c> r5 = r4.f17d // Catch:{ all -> 0x00a6 }\n int r5 = r5.size() // Catch:{ all -> 0x00a6 }\n if (r5 != 0) goto L_0x0040\n a.c.a.c.h r5 = r4.f14a // Catch:{ all -> 0x00a6 }\n com.cuatroochenta.miniland.downloader.FileDownloaderService r5 = (com.cuatroochenta.miniland.downloader.FileDownloaderService) r5 // Catch:{ all -> 0x00a6 }\n if (r5 == 0) goto L_0x003f\n java.lang.String r6 = \"downloadFinished\"\n a.c.a.f.e.b(r6) // Catch:{ all -> 0x00a6 }\n r5.b(r1) // Catch:{ all -> 0x00a6 }\n goto L_0x00a3\n L_0x003f:\n throw r3 // Catch:{ all -> 0x00a6 }\n L_0x0040:\n a.c.a.c.h r5 = r4.f14a // Catch:{ all -> 0x00a6 }\n java.util.ArrayList<a.c.a.c.c> r6 = r4.f17d // Catch:{ all -> 0x00a6 }\n r6.size() // Catch:{ all -> 0x00a6 }\n com.cuatroochenta.miniland.downloader.FileDownloaderService r5 = (com.cuatroochenta.miniland.downloader.FileDownloaderService) r5 // Catch:{ all -> 0x00a6 }\n if (r5 == 0) goto L_0x0054\n java.lang.String r6 = \"downloadFinishedWithErrors\"\n a.c.a.f.e.b(r6) // Catch:{ all -> 0x00a6 }\n r5.b(r2) // Catch:{ all -> 0x00a6 }\n goto L_0x00a3\n L_0x0054:\n throw r3 // Catch:{ all -> 0x00a6 }\n L_0x0055:\n a.c.a.c.h r0 = r4.f14a // Catch:{ all -> 0x00a6 }\n if (r0 == 0) goto L_0x00a3\n if (r6 == 0) goto L_0x0085\n a.c.a.c.h r6 = r4.f14a // Catch:{ all -> 0x00a6 }\n com.cuatroochenta.miniland.downloader.FileDownloaderService r6 = (com.cuatroochenta.miniland.downloader.FileDownloaderService) r6 // Catch:{ all -> 0x00a6 }\n if (r6 == 0) goto L_0x0084\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ all -> 0x00a6 }\n r6.<init>() // Catch:{ all -> 0x00a6 }\n java.lang.String r0 = \"downloadItemSuccess: \"\n r6.append(r0) // Catch:{ all -> 0x00a6 }\n java.lang.String r5 = r5.f9a // Catch:{ all -> 0x00a6 }\n r6.append(r5) // Catch:{ all -> 0x00a6 }\n java.lang.String r5 = r6.toString() // Catch:{ all -> 0x00a6 }\n a.c.a.f.e.b(r5) // Catch:{ all -> 0x00a6 }\n a.c.a.c.h r5 = r4.f14a // Catch:{ all -> 0x00a6 }\n java.util.ArrayList<a.c.a.c.c> r6 = r4.f16c // Catch:{ all -> 0x00a6 }\n r6.size() // Catch:{ all -> 0x00a6 }\n com.cuatroochenta.miniland.downloader.FileDownloaderService r5 = (com.cuatroochenta.miniland.downloader.FileDownloaderService) r5 // Catch:{ all -> 0x00a6 }\n if (r5 == 0) goto L_0x0083\n goto L_0x00a3\n L_0x0083:\n throw r3 // Catch:{ all -> 0x00a6 }\n L_0x0084:\n throw r3 // Catch:{ all -> 0x00a6 }\n L_0x0085:\n a.c.a.c.h r6 = r4.f14a // Catch:{ all -> 0x00a6 }\n com.cuatroochenta.miniland.downloader.FileDownloaderService r6 = (com.cuatroochenta.miniland.downloader.FileDownloaderService) r6 // Catch:{ all -> 0x00a6 }\n if (r6 == 0) goto L_0x00a2\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ all -> 0x00a6 }\n r6.<init>() // Catch:{ all -> 0x00a6 }\n java.lang.String r0 = \"downloadItemError: \"\n r6.append(r0) // Catch:{ all -> 0x00a6 }\n java.lang.String r5 = r5.f9a // Catch:{ all -> 0x00a6 }\n r6.append(r5) // Catch:{ all -> 0x00a6 }\n java.lang.String r5 = r6.toString() // Catch:{ all -> 0x00a6 }\n a.c.a.f.e.b(r5) // Catch:{ all -> 0x00a6 }\n goto L_0x00a3\n L_0x00a2:\n throw r3 // Catch:{ all -> 0x00a6 }\n L_0x00a3:\n monitor-exit(r4) // Catch:{ all -> 0x00a6 }\n monitor-exit(r4)\n return\n L_0x00a6:\n r5 = move-exception\n monitor-exit(r4) // Catch:{ all -> 0x00a6 }\n throw r5 // Catch:{ all -> 0x00a9 }\n L_0x00a9:\n r5 = move-exception\n monitor-exit(r4)\n throw r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.c.a.c.e.e(a.c.a.c.c, boolean):void\");\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final void zzR(Object var1_1, zzha var2_2) {\n block94: {\n var3_3 = this;\n var4_4 = var1_1;\n var5_5 = var2_2;\n var6_6 = this.zzh;\n if (var6_6 != 0) break block94;\n var7_7 = this.zzc;\n var6_6 = ((int[])var7_7).length;\n var8_8 = zzja.zzb;\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n var11_11 = var9_9;\n var13_13 = 0;\n for (var12_12 = 0; var12_12 < var6_6; var12_12 += 3) {\n block95: {\n var14_14 = var3_3.zzA(var12_12);\n var15_15 = var3_3.zzc;\n var16_16 = var15_15[var12_12];\n var17_17 = zzja.zzC(var14_14);\n var18_18 = 17;\n var19_19 = 1;\n if (var17_17 <= var18_18) {\n var20_20 = var3_3.zzc;\n var21_21 = var12_12 + 2;\n var18_18 = var20_20[var21_21];\n if ((var21_21 = var18_18 & var9_9) != var11_11) {\n var22_22 = var21_21;\n var13_13 = var8_8.getInt(var4_4, var22_22);\n var11_11 = var21_21;\n }\n var18_18 >>>= 20;\n var18_18 = var19_19 << var18_18;\n } else {\n var18_18 = 0;\n var20_20 = null;\n }\n var24_23 = var14_14 &= var9_9;\n switch (var17_17) lbl-1000:\n // 56 sources\n\n {\n default: {\n var17_17 = 0;\n break block95;\n }\n case 68: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 67: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 66: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 65: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 64: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 63: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 62: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 61: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n ** GOTO lbl-1000\n }\n case 60: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n ** GOTO lbl-1000\n }\n case 59: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 58: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = (int)zzja.zzH(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n ** GOTO lbl-1000\n }\n case 57: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 56: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 55: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var9_9 = zzja.zzF(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n ** GOTO lbl-1000\n }\n case 54: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 53: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var24_23 = zzja.zzG(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n ** GOTO lbl-1000\n }\n case 52: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var10_10 = zzja.zzE(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n ** GOTO lbl-1000\n }\n case 51: {\n var14_14 = (int)var3_3.zzM(var4_4, var16_16, var12_12);\n if (var14_14 == 0) ** GOTO lbl-1000\n var28_26 = zzja.zzD(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n ** GOTO lbl-1000\n }\n case 50: {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var3_3.zzS(var5_5, var16_16, var26_24, var12_12);\n ** GOTO lbl-1000\n }\n case 49: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzaa(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 48: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzN(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 47: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 46: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 45: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 44: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 43: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 42: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzW(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 41: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 40: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 39: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 38: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 37: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 36: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 35: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, (boolean)var19_19);\n ** GOTO lbl-1000\n }\n case 34: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var16_16 = 0;\n var15_15 = null;\n zzjk.zzN(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 33: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzS(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 32: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzP(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 31: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzU(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 30: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzV(var14_14, (List)var26_24, var5_5, false);\n ** GOTO lbl290\n }\n case 29: {\n var16_16 = 0;\n var15_15 = null;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzR(var14_14, (List)var26_24, var5_5, false);\nlbl290:\n // 6 sources\n\n var17_17 = 0;\n break block95;\n }\n case 28: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzY(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 27: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n zzjk.zzZ(var14_14, (List)var26_24, var5_5, var27_25);\n ** GOTO lbl-1000\n }\n case 26: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzX(var14_14, (List)var26_24, var5_5);\n ** GOTO lbl-1000\n }\n case 25: {\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n var17_17 = 0;\n zzjk.zzW(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 24: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzT(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 23: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzO(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 22: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzQ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 21: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzM(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 20: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzL(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 19: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzK(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 18: {\n var17_17 = 0;\n var30_27 = var3_3.zzc;\n var14_14 = var30_27[var12_12];\n var26_24 = (List)var8_8.getObject(var4_4, var24_23);\n zzjk.zzJ(var14_14, (List)var26_24, var5_5, false);\n break block95;\n }\n case 17: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzs(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 16: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzq(var16_16, var24_23);\n }\n break block95;\n }\n case 15: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzp(var16_16, var9_9);\n }\n break block95;\n }\n case 14: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzd(var16_16, var24_23);\n }\n break block95;\n }\n case 13: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzb(var16_16, var9_9);\n }\n break block95;\n }\n case 12: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzg(var16_16, var9_9);\n }\n break block95;\n }\n case 11: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzo(var16_16, var9_9);\n }\n break block95;\n }\n case 10: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = (zzgs)var8_8.getObject(var4_4, var24_23);\n var5_5.zzn(var16_16, (zzgs)var26_24);\n }\n break block95;\n }\n case 9: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n var27_25 = var3_3.zzv(var12_12);\n var5_5.zzr(var16_16, var26_24, var27_25);\n }\n break block95;\n }\n case 8: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var26_24 = var8_8.getObject(var4_4, var24_23);\n zzja.zzT(var16_16, var26_24, var5_5);\n }\n break block95;\n }\n case 7: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = (int)zzkh.zzh(var4_4, var24_23);\n var5_5.zzl(var16_16, (boolean)var9_9);\n }\n break block95;\n }\n case 6: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzk(var16_16, var9_9);\n }\n break block95;\n }\n case 5: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzj(var16_16, var24_23);\n }\n break block95;\n }\n case 4: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var9_9 = var8_8.getInt(var4_4, var24_23);\n var5_5.zzi(var16_16, var9_9);\n }\n break block95;\n }\n case 3: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzh(var16_16, var24_23);\n }\n break block95;\n }\n case 2: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var24_23 = var8_8.getLong(var4_4, var24_23);\n var5_5.zzc(var16_16, var24_23);\n }\n break block95;\n }\n case 1: {\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var10_10 = zzkh.zzj(var4_4, var24_23);\n var5_5.zze(var16_16, var10_10);\n }\n break block95;\n }\n case 0: \n }\n var17_17 = 0;\n var14_14 = var13_13 & var18_18;\n if (var14_14 != 0) {\n var28_26 = zzkh.zzl(var4_4, var24_23);\n var5_5.zzf(var16_16, var28_26);\n }\n }\n var9_9 = 1048575;\n var10_10 = 1.469367E-39f;\n }\n var7_7 = var3_3.zzn;\n var4_4 = var7_7.zzd(var4_4);\n var7_7.zzi(var4_4, var5_5);\n return;\n }\n this.zzo.zzb(var1_1);\n throw null;\n }", "private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "public final void a(com.tencent.mm.plugin.game.c.ai r12, java.lang.String r13, int r14, int r15) {\n /*\n r11 = this;\n if (r12 == 0) goto L_0x000a;\n L_0x0002:\n r0 = r12.nmz;\n r0 = com.tencent.mm.sdk.platformtools.bi.cC(r0);\n if (r0 == 0) goto L_0x0010;\n L_0x000a:\n r0 = 8;\n r11.setVisibility(r0);\n L_0x000f:\n return;\n L_0x0010:\n r11.mAppId = r13;\n r11.niV = r15;\n r0 = r12.nmz;\n r7 = r0.iterator();\n L_0x001a:\n r0 = r7.hasNext();\n if (r0 == 0) goto L_0x000f;\n L_0x0020:\n r0 = r7.next();\n r4 = r0;\n r4 = (com.tencent.mm.plugin.game.c.k) r4;\n if (r4 == 0) goto L_0x001a;\n L_0x0029:\n r5 = new com.tencent.mm.plugin.game.d.e$a$a;\n r5.<init>();\n r0 = r4.nlz;\n switch(r0) {\n case 1: goto L_0x004a;\n case 2: goto L_0x00e3;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = 2;\n if (r14 != r0) goto L_0x001a;\n L_0x0036:\n r0 = r11.mContext;\n r1 = 10;\n r2 = 1002; // 0x3ea float:1.404E-42 double:4.95E-321;\n r3 = r4.nlw;\n r4 = r4.nlr;\n r6 = com.tencent.mm.plugin.game.model.ap.CD(r4);\n r4 = r13;\n r5 = r15;\n com.tencent.mm.plugin.game.model.ap.a(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x001a;\n L_0x004a:\n r0 = r4.nlx;\n if (r0 == 0) goto L_0x001a;\n L_0x004e:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djD;\n r2 = 1;\n r6 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cxP;\n r0 = r6.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cxR;\n r1 = r6.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cxO;\n r2 = r6.findViewById(r2);\n r2 = (com.tencent.mm.plugin.game.widget.EllipsizingTextView) r2;\n r3 = 2;\n r2.setMaxLines(r3);\n r3 = com.tencent.mm.R.h.cxQ;\n r3 = r6.findViewById(r3);\n r3 = (android.widget.ImageView) r3;\n r8 = r11.mContext;\n r9 = r4.nlv;\n r10 = r0.getTextSize();\n r8 = com.tencent.mm.pluginsdk.ui.d.i.b(r8, r9, r10);\n r0.setText(r8);\n r0 = r11.mContext;\n r8 = r4.nlx;\n r8 = r8.fpg;\n r9 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r8, r9);\n r1.setText(r0);\n r0 = r11.mContext;\n r1 = r4.nlx;\n r1 = r1.nkL;\n r8 = r2.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r1, r8);\n r2.setText(r0);\n r0 = r4.nlx;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x00dd;\n L_0x00b9:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nlx;\n r1 = r1.nkM;\n r2 = r5.aSD();\n r0.a(r3, r1, r2);\n L_0x00c8:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nlx;\n r2 = r2.nkN;\n r3 = r4.nlr;\n r0.<init>(r1, r2, r3);\n r6.setTag(r0);\n r6.setOnClickListener(r11);\n goto L_0x0033;\n L_0x00dd:\n r0 = 8;\n r3.setVisibility(r0);\n goto L_0x00c8;\n L_0x00e3:\n r0 = r4.nly;\n if (r0 == 0) goto L_0x001a;\n L_0x00e7:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djE;\n r2 = 1;\n r3 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cOG;\n r0 = r3.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cOI;\n r1 = r3.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cOH;\n r2 = r3.findViewById(r2);\n r2 = (android.widget.ImageView) r2;\n r6 = r11.mContext;\n r8 = r4.nlv;\n r9 = r0.getTextSize();\n r6 = com.tencent.mm.pluginsdk.ui.d.i.b(r6, r8, r9);\n r0.setText(r6);\n r0 = r11.mContext;\n r6 = r4.nly;\n r6 = r6.fpg;\n r8 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r6, r8);\n r1.setText(r0);\n r0 = r4.nly;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x016f;\n L_0x0135:\n r0 = r4.nly;\n r0 = r0.npS;\n r1 = 1;\n if (r0 != r1) goto L_0x0167;\n L_0x013c:\n r0 = 1;\n r5.nDa = r0;\n r0 = com.tencent.mm.R.g.bCF;\n r5.nDd = r0;\n L_0x0143:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nly;\n r1 = r1.nkM;\n r5 = r5.aSD();\n r0.a(r2, r1, r5);\n L_0x0152:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nly;\n r2 = r2.nkN;\n r5 = r4.nlr;\n r0.<init>(r1, r2, r5);\n r3.setTag(r0);\n r3.setOnClickListener(r11);\n goto L_0x0033;\n L_0x0167:\n r0 = 1;\n r5.hFJ = r0;\n r0 = com.tencent.mm.R.g.bCE;\n r5.nDd = r0;\n goto L_0x0143;\n L_0x016f:\n r0 = 8;\n r2.setVisibility(r0);\n goto L_0x0152;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.ui.f.a(com.tencent.mm.plugin.game.c.ai, java.lang.String, int, int):void\");\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }", "public final synchronized void d() {\n /*\n r10 = this;\n monitor-enter(r10)\n android.content.Context r0 = r10.f // Catch:{ all -> 0x0053 }\n r1 = 0\n if (r0 != 0) goto L_0x0008\n r0 = 0\n goto L_0x000e\n L_0x0008:\n android.content.Context r0 = r10.f // Catch:{ all -> 0x0053 }\n int r0 = com.google.ads.interactivemedia.v3.internal.vf.a(r0) // Catch:{ all -> 0x0053 }\n L_0x000e:\n int r2 = r10.n // Catch:{ all -> 0x0053 }\n if (r2 != r0) goto L_0x0014\n monitor-exit(r10)\n return\n L_0x0014:\n r10.n = r0 // Catch:{ all -> 0x0053 }\n r2 = 1\n if (r0 == r2) goto L_0x0051\n if (r0 == 0) goto L_0x0051\n r2 = 8\n if (r0 != r2) goto L_0x0020\n goto L_0x0051\n L_0x0020:\n long r2 = r10.a(r0) // Catch:{ all -> 0x0053 }\n r10.q = r2 // Catch:{ all -> 0x0053 }\n com.google.ads.interactivemedia.v3.internal.ua r0 = r10.j // Catch:{ all -> 0x0053 }\n long r2 = r0.a() // Catch:{ all -> 0x0053 }\n int r0 = r10.k // Catch:{ all -> 0x0053 }\n if (r0 <= 0) goto L_0x0037\n long r0 = r10.l // Catch:{ all -> 0x0053 }\n long r0 = r2 - r0\n int r1 = (int) r0 // Catch:{ all -> 0x0053 }\n r5 = r1\n goto L_0x0038\n L_0x0037:\n r5 = 0\n L_0x0038:\n long r6 = r10.m // Catch:{ all -> 0x0053 }\n long r8 = r10.q // Catch:{ all -> 0x0053 }\n r4 = r10\n r4.a(r5, r6, r8) // Catch:{ all -> 0x0053 }\n r10.l = r2 // Catch:{ all -> 0x0053 }\n r0 = 0\n r10.m = r0 // Catch:{ all -> 0x0053 }\n r10.p = r0 // Catch:{ all -> 0x0053 }\n r10.o = r0 // Catch:{ all -> 0x0053 }\n com.google.ads.interactivemedia.v3.internal.ux r0 = r10.i // Catch:{ all -> 0x0053 }\n r0.a() // Catch:{ all -> 0x0053 }\n monitor-exit(r10)\n return\n L_0x0051:\n monitor-exit(r10)\n return\n L_0x0053:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.ads.interactivemedia.v3.internal.ss.d():void\");\n }", "void m5768b() throws C0841b;", "protected final /* synthetic */ java.lang.Object run() {\n /*\n r4 = this;\n r0 = 1;\n r1 = 0;\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.chu();\n r3 = com.tencent.mm.plugin.appbrand.b.c.this;\n r3 = r3.iKh;\n if (r2 != r3) goto L_0x0022;\n L_0x000e:\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.iKh;\n r2 = r2.iKy;\n r2 = r2 & 1;\n if (r2 <= 0) goto L_0x0020;\n L_0x0018:\n r2 = r0;\n L_0x0019:\n if (r2 == 0) goto L_0x0022;\n L_0x001b:\n r0 = java.lang.Boolean.valueOf(r0);\n return r0;\n L_0x0020:\n r2 = r1;\n goto L_0x0019;\n L_0x0022:\n r0 = r1;\n goto L_0x001b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.b.c.5.run():java.lang.Object\");\n }", "private static boolean m20205b(java.lang.Throwable r3) {\n /*\n r0 = r3\n L_0x0001:\n if (r0 == 0) goto L_0x0015\n boolean r1 = r0 instanceof com.google.android.exoplayer2.upstream.DataSourceException\n if (r1 == 0) goto L_0x0010\n r1 = r0\n com.google.android.exoplayer2.upstream.DataSourceException r1 = (com.google.android.exoplayer2.upstream.DataSourceException) r1\n int r1 = r1.f18593a\n if (r1 != 0) goto L_0x0010\n r2 = 1\n return r2\n L_0x0010:\n java.lang.Throwable r0 = r0.getCause()\n goto L_0x0001\n L_0x0015:\n r1 = 0\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.upstream.cache.C8465b.m20205b(java.io.IOException):boolean\");\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "public final void run() {\n /*\n r10 = this;\n r8 = 2;\n r7 = 1;\n r6 = 0;\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n r1 = 0;\n r0 = r10.e;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r3 = r10.f;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r0 = com.uc.apollo.media.b.c.a(r0, r3);\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n if (r0 == 0) goto L_0x004b;\n L_0x0010:\n r2 = com.uc.apollo.media.impl.O.M3U8;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n r1 = r0.c();\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n if (r1 == 0) goto L_0x00db;\n L_0x0018:\n r1 = com.uc.apollo.media.impl.O.M3U8_LIVE;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n L_0x001a:\n r2 = r10.h;\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n if (r2 == 0) goto L_0x0022;\n L_0x001e:\n r2 = 1;\n r0.a(r2);\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n L_0x0022:\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r1 == r2) goto L_0x0030;\n L_0x0026:\n r2 = new java.lang.StringBuilder;\n r3 = \"content type is \";\n r2.<init>(r3);\n r2.append(r1);\n L_0x0030:\n r2 = r10.g;\n if (r2 == 0) goto L_0x004a;\n L_0x0034:\n r2 = c;\n r3 = r10.d;\n r4 = 3;\n r4 = new java.lang.Object[r4];\n r5 = r10.g;\n r4[r6] = r5;\n r4[r7] = r1;\n r4[r8] = r0;\n r0 = r2.obtainMessage(r8, r3, r6, r4);\n r0.sendToTarget();\n L_0x004a:\n return;\n L_0x004b:\n r0 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0051:\n r0 = move-exception;\n r9 = r0;\n r0 = r2;\n r2 = r9;\n L_0x0055:\n r3 = r2.a();\n if (r3 == 0) goto L_0x007e;\n L_0x005b:\n r4 = r3.length;\n r5 = 8;\n if (r4 < r5) goto L_0x007e;\n L_0x0060:\n r4 = 4;\n r4 = r3[r4];\n r5 = 102; // 0x66 float:1.43E-43 double:5.04E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0067:\n r4 = 5;\n r4 = r3[r4];\n r5 = 116; // 0x74 float:1.63E-43 double:5.73E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x006e:\n r4 = 6;\n r4 = r3[r4];\n r5 = 121; // 0x79 float:1.7E-43 double:6.0E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0075:\n r4 = 7;\n r3 = r3[r4];\n r4 = 112; // 0x70 float:1.57E-43 double:5.53E-322;\n if (r3 != r4) goto L_0x007e;\n L_0x007c:\n r0 = com.uc.apollo.media.impl.O.MP4;\n L_0x007e:\n r3 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r0 != r3) goto L_0x008c;\n L_0x0082:\n r3 = new java.lang.StringBuilder;\n r4 = \"parse failure, msg: \";\n r3.<init>(r4);\n r3.append(r2);\n L_0x008c:\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0090:\n r0 = move-exception;\n r1 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\n r1 = a;\n r2 = new java.lang.StringBuilder;\n r3 = \"parse failure: \";\n r2.<init>(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n android.util.Log.w(r1, r2);\n r1 = r10.g;\n if (r1 == 0) goto L_0x004a;\n L_0x00ab:\n r1 = c;\n r2 = r10.d;\n r3 = new java.lang.Object[r8];\n r4 = r10.g;\n r3[r6] = r4;\n r4 = new java.lang.StringBuilder;\n r5 = \"parse failure: \";\n r4.<init>(r5);\n r0 = r4.append(r0);\n r0 = r0.toString();\n r3[r7] = r0;\n r0 = r1.obtainMessage(r7, r2, r6, r3);\n r0.sendToTarget();\n goto L_0x004a;\n L_0x00cf:\n r1 = move-exception;\n r9 = r1;\n r1 = r0;\n r0 = r2;\n r2 = r9;\n goto L_0x0055;\n L_0x00d5:\n r2 = move-exception;\n r9 = r0;\n r0 = r1;\n r1 = r9;\n goto L_0x0055;\n L_0x00db:\n r1 = r2;\n goto L_0x001a;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.uc.apollo.media.impl.f.run():void\");\n }", "public JBlock _finally() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: iconst_0 \n // 1: nop \n // 2: nop \n // 3: nop \n // 4: aload_3 \n // 5: nop \n // 6: lconst_0 \n // 7: nop \n // 8: iaload \n // 9: nop \n // 10: ldc2_w \"Lcom/sun/codemodel/JFormatter;\"\n // 13: nop \n // 14: fload_0 /* this */\n // 15: nop \n // 16: nop \n // 17: nop \n // 18: lload_2 \n // 19: nop \n // 20: iconst_0 \n // 21: nop \n // 22: nop \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -----------------------------\n // 0 23 0 this Lcom/sun/codemodel/JTryBlock;\n // \n // The error that occurred was:\n // \n // java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:935)\n // at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)\n // at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:210)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:655)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:532)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:499)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:141)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:130)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:105)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:317)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:238)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:123)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public final synchronized java.lang.String m92g(java.lang.String r5) {\n /*\n r4 = this;\n r1 = 1;\n r0 = 0;\n monitor-enter(r4);\n if (r5 == 0) goto L_0x002c;\n L_0x0005:\n r2 = r5.trim();\t Catch:{ all -> 0x0037 }\n r2 = r2.length();\t Catch:{ all -> 0x0037 }\n if (r2 <= 0) goto L_0x002c;\n L_0x000f:\n if (r0 == 0) goto L_0x002e;\n L_0x0011:\n r0 = \"key should not be empty %s\";\n r1 = 1;\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x0037 }\n r2 = 0;\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0037 }\n r3.<init>();\t Catch:{ all -> 0x0037 }\n r3 = r3.append(r5);\t Catch:{ all -> 0x0037 }\n r3 = r3.toString();\t Catch:{ all -> 0x0037 }\n r1[r2] = r3;\t Catch:{ all -> 0x0037 }\n com.tencent.bugly.legu.proguard.C0073w.m524d(r0, r1);\t Catch:{ all -> 0x0037 }\n r0 = 0;\n L_0x002a:\n monitor-exit(r4);\n return r0;\n L_0x002c:\n r0 = r1;\n goto L_0x000f;\n L_0x002e:\n r0 = r4.f112Y;\t Catch:{ all -> 0x0037 }\n r0 = r0.get(r5);\t Catch:{ all -> 0x0037 }\n r0 = (java.lang.String) r0;\t Catch:{ all -> 0x0037 }\n goto L_0x002a;\n L_0x0037:\n r0 = move-exception;\n monitor-exit(r4);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.bugly.legu.crashreport.common.info.a.g(java.lang.String):java.lang.String\");\n }", "public com.google.cX a(com.google.cM r5) {\n /*\n r4 = this;\n r0 = 0;\n r1 = com.google.bA.b;\n r2 = com.google.cM.k();\n if (r5 != r2) goto L_0x000a;\n L_0x0009:\n return r4;\n L_0x000a:\n r2 = r4.h;\n if (r2 != 0) goto L_0x003f;\n L_0x000e:\n r2 = com.google.cM.a(r5);\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x0079;\n L_0x0018:\n r2 = r4.g;\n r2 = r2.isEmpty();\n if (r2 == 0) goto L_0x002e;\n L_0x0020:\n r2 = com.google.cM.a(r5);\n r4.g = r2;\n r2 = r4.f;\n r2 = r2 & -2;\n r4.f = r2;\n if (r1 == 0) goto L_0x003a;\n L_0x002e:\n r4.j();\n r2 = r4.g;\n r3 = com.google.cM.a(r5);\n r2.addAll(r3);\n L_0x003a:\n r4.g();\n if (r1 == 0) goto L_0x0079;\n L_0x003f:\n r2 = com.google.cM.a(r5);\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x0079;\n L_0x0049:\n r2 = r4.h;\n r2 = r2.i();\n if (r2 == 0) goto L_0x0070;\n L_0x0051:\n r2 = r4.h;\n r2.b();\n r4.h = r0;\n r2 = com.google.cM.a(r5);\n r4.g = r2;\n r2 = r4.f;\n r2 = r2 & -2;\n r4.f = r2;\n r2 = com.google.bL.d;\n if (r2 == 0) goto L_0x006c;\n L_0x0068:\n r0 = r4.b();\n L_0x006c:\n r4.h = r0;\n if (r1 == 0) goto L_0x0079;\n L_0x0070:\n r0 = r4.h;\n r1 = com.google.cM.a(r5);\n r0.a(r1);\n L_0x0079:\n r4.a(r5);\n r0 = r5.getUnknownFields();\n r4.a(r0);\n goto L_0x0009;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.cX.a(com.google.cM):com.google.cX\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "static /* synthetic */ void m200-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "@Override // X.AnonymousClass0l1\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final void A04(int r29) throws java.io.IOException {\n /*\n // Method dump skipped, instructions count: 801\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.AnonymousClass0T3.A04(int):void\");\n }", "private final com.google.wireless.android.finsky.dfe.p513g.p514a.C7467r m35669b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 10: goto L_0x000f;\n case 18: goto L_0x001c;\n case 26: goto L_0x0029;\n case 34: goto L_0x003c;\n case 42: goto L_0x0050;\n case 50: goto L_0x0064;\n case 82: goto L_0x0078;\n case 98: goto L_0x008e;\n case 138: goto L_0x00a4;\n case 146: goto L_0x00b9;\n case 152: goto L_0x00c7;\n case 162: goto L_0x0106;\n case 170: goto L_0x011c;\n case 178: goto L_0x012e;\n case 184: goto L_0x0143;\n case 192: goto L_0x0151;\n case 218: goto L_0x015f;\n case 226: goto L_0x0171;\n case 234: goto L_0x0187;\n case 258: goto L_0x019d;\n case 266: goto L_0x01b3;\n case 274: goto L_0x01c8;\n case 290: goto L_0x01de;\n case 298: goto L_0x021e;\n case 306: goto L_0x022c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r0 = r8.m33564f();\n r7.f37912d = r0;\n r0 = r7.f37911c;\n r0 = r0 | 1;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x001c:\n r0 = r8.m33564f();\n r7.f37914f = r0;\n r0 = r7.f37911c;\n r0 = r0 | 4;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0029:\n r0 = r7.f37916h;\n if (r0 != 0) goto L_0x0034;\n L_0x002d:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.c;\n r0.<init>();\n r7.f37916h = r0;\n L_0x0034:\n r0 = r7.f37916h;\n r8.m33552a(r0);\n r7.f37910a = r1;\n goto L_0x0001;\n L_0x003c:\n r0 = r7.f37917i;\n if (r0 != 0) goto L_0x0047;\n L_0x0040:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.z;\n r0.<init>();\n r7.f37917i = r0;\n L_0x0047:\n r0 = r7.f37917i;\n r8.m33552a(r0);\n r0 = 1;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0050:\n r0 = r7.f37919k;\n if (r0 != 0) goto L_0x005b;\n L_0x0054:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.f;\n r0.<init>();\n r7.f37919k = r0;\n L_0x005b:\n r0 = r7.f37919k;\n r8.m33552a(r0);\n r0 = 3;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0064:\n r0 = r7.f37922n;\n if (r0 != 0) goto L_0x006f;\n L_0x0068:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.o;\n r0.<init>();\n r7.f37922n = r0;\n L_0x006f:\n r0 = r7.f37922n;\n r8.m33552a(r0);\n r0 = 6;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0078:\n r0 = r7.f37924p;\n if (r0 != 0) goto L_0x0083;\n L_0x007c:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.d;\n r0.<init>();\n r7.f37924p = r0;\n L_0x0083:\n r0 = r7.f37924p;\n r8.m33552a(r0);\n r0 = 8;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x008e:\n r0 = r7.f37926r;\n if (r0 != 0) goto L_0x0099;\n L_0x0092:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.n;\n r0.<init>();\n r7.f37926r = r0;\n L_0x0099:\n r0 = r7.f37926r;\n r8.m33552a(r0);\n r0 = 10;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00a4:\n r0 = r7.f37923o;\n if (r0 != 0) goto L_0x00af;\n L_0x00a8:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.q;\n r0.<init>();\n r7.f37923o = r0;\n L_0x00af:\n r0 = r7.f37923o;\n r8.m33552a(r0);\n r0 = 7;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00b9:\n r0 = r8.m33565g();\n r7.f37931w = r0;\n r0 = r7.f37911c;\n r0 = r0 | 16;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x00c7:\n r2 = r7.f37911c;\n r2 = r2 | 2;\n r7.f37911c = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n switch(r3) {\n case 0: goto L_0x00fc;\n case 101: goto L_0x00fc;\n case 102: goto L_0x00fc;\n case 103: goto L_0x00fc;\n case 105: goto L_0x00fc;\n case 106: goto L_0x00fc;\n case 107: goto L_0x00fc;\n case 108: goto L_0x00fc;\n case 109: goto L_0x00fc;\n case 111: goto L_0x00fc;\n case 112: goto L_0x00fc;\n case 113: goto L_0x00fc;\n case 114: goto L_0x00fc;\n case 115: goto L_0x00fc;\n case 116: goto L_0x00fc;\n case 117: goto L_0x00fc;\n case 118: goto L_0x00fc;\n case 119: goto L_0x00fc;\n case 120: goto L_0x00fc;\n case 201: goto L_0x00fc;\n case 202: goto L_0x00fc;\n case 203: goto L_0x00fc;\n case 204: goto L_0x00fc;\n case 205: goto L_0x00fc;\n case 206: goto L_0x00fc;\n case 207: goto L_0x00fc;\n case 209: goto L_0x00fc;\n case 210: goto L_0x00fc;\n case 211: goto L_0x00fc;\n case 212: goto L_0x00fc;\n case 213: goto L_0x00fc;\n case 214: goto L_0x00fc;\n case 215: goto L_0x00fc;\n case 217: goto L_0x00fc;\n case 218: goto L_0x00fc;\n case 219: goto L_0x00fc;\n case 220: goto L_0x00fc;\n case 221: goto L_0x00fc;\n case 222: goto L_0x00fc;\n case 223: goto L_0x00fc;\n case 224: goto L_0x00fc;\n case 301: goto L_0x00fc;\n case 302: goto L_0x00fc;\n case 304: goto L_0x00fc;\n case 305: goto L_0x00fc;\n case 307: goto L_0x00fc;\n case 309: goto L_0x00fc;\n case 310: goto L_0x00fc;\n case 311: goto L_0x00fc;\n case 312: goto L_0x00fc;\n case 313: goto L_0x00fc;\n case 314: goto L_0x00fc;\n case 316: goto L_0x00fc;\n case 317: goto L_0x00fc;\n case 318: goto L_0x00fc;\n case 319: goto L_0x00fc;\n case 320: goto L_0x00fc;\n case 321: goto L_0x00fc;\n case 322: goto L_0x00fc;\n case 323: goto L_0x00fc;\n case 324: goto L_0x00fc;\n case 325: goto L_0x00fc;\n case 326: goto L_0x00fc;\n case 327: goto L_0x00fc;\n case 328: goto L_0x00fc;\n case 401: goto L_0x00fc;\n case 402: goto L_0x00fc;\n case 403: goto L_0x00fc;\n case 404: goto L_0x00fc;\n case 405: goto L_0x00fc;\n case 406: goto L_0x00fc;\n case 407: goto L_0x00fc;\n case 408: goto L_0x00fc;\n case 409: goto L_0x00fc;\n case 410: goto L_0x00fc;\n case 411: goto L_0x00fc;\n case 412: goto L_0x00fc;\n case 501: goto L_0x00fc;\n case 502: goto L_0x00fc;\n case 503: goto L_0x00fc;\n case 504: goto L_0x00fc;\n case 505: goto L_0x00fc;\n case 506: goto L_0x00fc;\n case 507: goto L_0x00fc;\n case 508: goto L_0x00fc;\n case 509: goto L_0x00fc;\n case 510: goto L_0x00fc;\n case 511: goto L_0x00fc;\n case 512: goto L_0x00fc;\n case 513: goto L_0x00fc;\n case 514: goto L_0x00fc;\n case 515: goto L_0x00fc;\n case 601: goto L_0x00fc;\n case 701: goto L_0x00fc;\n case 702: goto L_0x00fc;\n case 703: goto L_0x00fc;\n case 704: goto L_0x00fc;\n case 705: goto L_0x00fc;\n case 706: goto L_0x00fc;\n case 707: goto L_0x00fc;\n case 708: goto L_0x00fc;\n case 709: goto L_0x00fc;\n case 710: goto L_0x00fc;\n case 711: goto L_0x00fc;\n case 801: goto L_0x00fc;\n case 802: goto L_0x00fc;\n case 803: goto L_0x00fc;\n case 804: goto L_0x00fc;\n case 805: goto L_0x00fc;\n case 806: goto L_0x00fc;\n case 807: goto L_0x00fc;\n case 808: goto L_0x00fc;\n case 809: goto L_0x00fc;\n case 810: goto L_0x00fc;\n case 811: goto L_0x00fc;\n case 812: goto L_0x00fc;\n case 901: goto L_0x00fc;\n case 902: goto L_0x00fc;\n case 903: goto L_0x00fc;\n case 904: goto L_0x00fc;\n case 905: goto L_0x00fc;\n case 906: goto L_0x00fc;\n case 907: goto L_0x00fc;\n case 908: goto L_0x00fc;\n case 909: goto L_0x00fc;\n case 910: goto L_0x00fc;\n case 911: goto L_0x00fc;\n case 912: goto L_0x00fc;\n case 913: goto L_0x00fc;\n case 914: goto L_0x00fc;\n case 915: goto L_0x00fc;\n case 916: goto L_0x00fc;\n case 1001: goto L_0x00fc;\n case 1002: goto L_0x00fc;\n default: goto L_0x00d8;\n };\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00d8:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = 44;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = \" is not a valid enum RelationType\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00f3:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x00fc:\n r7.f37913e = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r7.f37911c;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3 | 2;\n r7.f37911c = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n goto L_0x0001;\n L_0x0106:\n r0 = r7.f37927s;\n if (r0 != 0) goto L_0x0111;\n L_0x010a:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.m;\n r0.<init>();\n r7.f37927s = r0;\n L_0x0111:\n r0 = r7.f37927s;\n r8.m33552a(r0);\n r0 = 11;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x011c:\n r0 = r7.f37932x;\n if (r0 != 0) goto L_0x0127;\n L_0x0120:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.ag;\n r0.<init>();\n r7.f37932x = r0;\n L_0x0127:\n r0 = r7.f37932x;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x012e:\n r0 = r7.f37920l;\n if (r0 != 0) goto L_0x0139;\n L_0x0132:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.t;\n r0.<init>();\n r7.f37920l = r0;\n L_0x0139:\n r0 = r7.f37920l;\n r8.m33552a(r0);\n r0 = 4;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0143:\n r0 = r8.m33560d();\n r7.f37933y = r0;\n r0 = r7.f37911c;\n r0 = r0 | 32;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0151:\n r0 = r8.m33560d();\n r7.f37934z = r0;\n r0 = r7.f37911c;\n r0 = r0 | 64;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x015f:\n r0 = r7.f37908A;\n if (r0 != 0) goto L_0x016a;\n L_0x0163:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.k;\n r0.<init>();\n r7.f37908A = r0;\n L_0x016a:\n r0 = r7.f37908A;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x0171:\n r0 = r7.f37929u;\n if (r0 != 0) goto L_0x017c;\n L_0x0175:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.y;\n r0.<init>();\n r7.f37929u = r0;\n L_0x017c:\n r0 = r7.f37929u;\n r8.m33552a(r0);\n r0 = 13;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0187:\n r0 = r7.f37928t;\n if (r0 != 0) goto L_0x0192;\n L_0x018b:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.b;\n r0.<init>();\n r7.f37928t = r0;\n L_0x0192:\n r0 = r7.f37928t;\n r8.m33552a(r0);\n r0 = 12;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x019d:\n r0 = r7.f37925q;\n if (r0 != 0) goto L_0x01a8;\n L_0x01a1:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.e;\n r0.<init>();\n r7.f37925q = r0;\n L_0x01a8:\n r0 = r7.f37925q;\n r8.m33552a(r0);\n r0 = 9;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01b3:\n r0 = r7.f37921m;\n if (r0 != 0) goto L_0x01be;\n L_0x01b7:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.h;\n r0.<init>();\n r7.f37921m = r0;\n L_0x01be:\n r0 = r7.f37921m;\n r8.m33552a(r0);\n r0 = 5;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01c8:\n r0 = r7.f37930v;\n if (r0 != 0) goto L_0x01d3;\n L_0x01cc:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.x;\n r0.<init>();\n r7.f37930v = r0;\n L_0x01d3:\n r0 = r7.f37930v;\n r8.m33552a(r0);\n r0 = 14;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01de:\n r0 = 290; // 0x122 float:4.06E-43 double:1.433E-321;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37909B;\n if (r0 != 0) goto L_0x020a;\n L_0x01e8:\n r0 = r1;\n L_0x01e9:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p513g.p514a.C7468s[r2];\n if (r0 == 0) goto L_0x01f3;\n L_0x01ee:\n r3 = r7.f37909B;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x01f3:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x020e;\n L_0x01f8:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x01f3;\n L_0x020a:\n r0 = r7.f37909B;\n r0 = r0.length;\n goto L_0x01e9;\n L_0x020e:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37909B = r2;\n goto L_0x0001;\n L_0x021e:\n r0 = r8.m33564f();\n r7.f37915g = r0;\n r0 = r7.f37911c;\n r0 = r0 | 8;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x022c:\n r0 = r7.f37918j;\n if (r0 != 0) goto L_0x0237;\n L_0x0230:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.w;\n r0.<init>();\n r7.f37918j = r0;\n L_0x0237:\n r0 = r7.f37918j;\n r8.m33552a(r0);\n r0 = 2;\n r7.f37910a = r0;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.g.a.r.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.g.a.r\");\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "private void b(int r14) {\n /*\n r13 = this;\n java.lang.Integer r0 = r13.w\n if (r0 != 0) goto L_0x000b\n java.lang.Integer r14 = java.lang.Integer.valueOf(r14)\n r13.w = r14\n goto L_0x005b\n L_0x000b:\n java.lang.Integer r0 = r13.w\n int r0 = r0.intValue()\n if (r0 == r14) goto L_0x005b\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r14 = a(r14)\n java.lang.String r14 = java.lang.String.valueOf(r14)\n java.lang.Integer r1 = r13.w\n int r1 = r1.intValue()\n java.lang.String r1 = a(r1)\n java.lang.String r1 = java.lang.String.valueOf(r1)\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n java.lang.String r3 = java.lang.String.valueOf(r14)\n int r3 = r3.length()\n int r3 = r3 + 51\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r3 = r3 + r4\n r2.<init>(r3)\n java.lang.String r3 = \"Cannot use sign-in mode: \"\n r2.append(r3)\n r2.append(r14)\n java.lang.String r14 = \". Mode was already set to \"\n r2.append(r14)\n r2.append(r1)\n java.lang.String r14 = r2.toString()\n r0.<init>(r14)\n throw r0\n L_0x005b:\n com.google.android.gms.internal.zzqy r14 = r13.l\n if (r14 == 0) goto L_0x0060\n return\n L_0x0060:\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r14 = r13.c\n java.util.Collection r14 = r14.values()\n java.util.Iterator r14 = r14.iterator()\n r0 = 0\n r1 = 0\n L_0x006c:\n boolean r2 = r14.hasNext()\n if (r2 == 0) goto L_0x0088\n java.lang.Object r2 = r14.next()\n com.google.android.gms.common.api.Api$zze r2 = (com.google.android.gms.common.api.Api.zze) r2\n boolean r3 = r2.zzahd()\n r4 = 1\n if (r3 == 0) goto L_0x0080\n r0 = 1\n L_0x0080:\n boolean r2 = r2.zzahs()\n if (r2 == 0) goto L_0x006c\n r1 = 1\n goto L_0x006c\n L_0x0088:\n java.lang.Integer r14 = r13.w\n int r14 = r14.intValue()\n switch(r14) {\n case 1: goto L_0x00ae;\n case 2: goto L_0x0092;\n case 3: goto L_0x00c2;\n default: goto L_0x0091;\n }\n L_0x0091:\n goto L_0x00c2\n L_0x0092:\n if (r0 == 0) goto L_0x00c2\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r3 = r13\n com.google.android.gms.internal.zzqh r14 = com.google.android.gms.internal.zzqh.a(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11)\n L_0x00ab:\n r13.l = r14\n return\n L_0x00ae:\n if (r0 != 0) goto L_0x00b8\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"SIGN_IN_MODE_REQUIRED cannot be used on a GoogleApiClient that does not contain any authenticated APIs. Use connect() instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00b8:\n if (r1 == 0) goto L_0x00c2\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"Cannot use SIGN_IN_MODE_REQUIRED with GOOGLE_SIGN_IN_API. Use connect(SIGN_IN_MODE_OPTIONAL) instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00c2:\n com.google.android.gms.internal.zzqr r14 = new com.google.android.gms.internal.zzqr\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r1 = r14\n r3 = r13\n r12 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n goto L_0x00ab\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzqp.b(int):void\");\n }", "private void bщ04490449щ0449щ(rrrrrr.rcccrr r6) {\n /*\n r5 = this;\n r4 = 0;\n r0 = r6.getJsonData();\t Catch:{ Exception -> 0x0056 }\n r1 = new rrrrrr.ccrcrc;\t Catch:{ Exception -> 0x0056 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0056 }\n r2.<init>();\t Catch:{ Exception -> 0x0056 }\n r3 = r5.bнн043Dннн;\t Catch:{ Exception -> 0x0056 }\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = r3.getFilesDir();\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = java.io.File.separator;\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = \"3HC4C-01.txt\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0056 }\n r1.<init>(r2);\t Catch:{ Exception -> 0x0056 }\n r2 = bЗ04170417ЗЗЗ;\n r3 = bЗЗЗ0417ЗЗ;\n r3 = r3 + r2;\n r2 = r2 * r3;\n r3 = b04170417З0417ЗЗ;\n r2 = r2 % r3;\n switch(r2) {\n case 0: goto L_0x0041;\n default: goto L_0x0039;\n };\n L_0x0039:\n r2 = 38;\n bЗ04170417ЗЗЗ = r2;\n r2 = 29;\n b041704170417ЗЗЗ = r2;\n L_0x0041:\n r1.load();\t Catch:{ Exception -> 0x0056 }\n L_0x0044:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x0047;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x0047:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x004a;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x004a:\n goto L_0x0047;\n L_0x004b:\n r0 = r0.toString();\t Catch:{ Exception -> 0x0056 }\n r1.push(r0);\t Catch:{ Exception -> 0x0056 }\n r1.save();\t Catch:{ Exception -> 0x0056 }\n L_0x0055:\n return;\n L_0x0056:\n r0 = move-exception;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.bщ04490449щ0449щ(rrrrrr.rcccrr):void\");\n }", "private void a(java.lang.String r6, java.lang.StringBuilder r7) {\n /*\n r5 = this;\n r0 = F;\n r1 = J;\n r2 = 35;\n r1 = r1[r2];\n r1 = r6.indexOf(r1);\n if (r1 <= 0) goto L_0x0057;\n L_0x000e:\n r2 = J;\n r3 = 38;\n r2 = r2[r3];\n r2 = r2.length();\n r2 = r2 + r1;\n r3 = r6.charAt(r2);\n r4 = 43;\n if (r3 != r4) goto L_0x0039;\n L_0x0021:\n r3 = 59;\n r3 = r6.indexOf(r3, r2);\n if (r3 <= 0) goto L_0x0032;\n L_0x0029:\n r3 = r6.substring(r2, r3);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r3);\t Catch:{ RuntimeException -> 0x0072 }\n if (r0 == 0) goto L_0x0039;\n L_0x0032:\n r2 = r6.substring(r2);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r2);\t Catch:{ RuntimeException -> 0x0072 }\n L_0x0039:\n r2 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r3 = 37;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r6.indexOf(r2);\t Catch:{ RuntimeException -> 0x0074 }\n r3 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r4 = 36;\n r3 = r3[r4];\t Catch:{ RuntimeException -> 0x0074 }\n r3 = r3.length();\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r2 + r3;\n r1 = r6.substring(r2, r1);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r1);\t Catch:{ RuntimeException -> 0x0074 }\n if (r0 == 0) goto L_0x005e;\n L_0x0057:\n r0 = l(r6);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r0);\t Catch:{ RuntimeException -> 0x0074 }\n L_0x005e:\n r0 = J;\n r1 = 39;\n r0 = r0[r1];\n r0 = r7.indexOf(r0);\n if (r0 <= 0) goto L_0x0071;\n L_0x006a:\n r1 = r7.length();\t Catch:{ RuntimeException -> 0x0076 }\n r7.delete(r0, r1);\t Catch:{ RuntimeException -> 0x0076 }\n L_0x0071:\n return;\n L_0x0072:\n r0 = move-exception;\n throw r0;\n L_0x0074:\n r0 = move-exception;\n throw r0;\n L_0x0076:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.StringBuilder):void\");\n }", "final com.google.bV a(java.util.Map r14) {\n /*\n r13_this = this;\n r6 = f;\n if (r14 == 0) goto L_0x013c;\n L_0x0004:\n r0 = com.google.fm.TRY_HARDER;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x013c;\n L_0x000c:\n r0 = 1;\n r2 = r0;\n L_0x000e:\n if (r14 == 0) goto L_0x0140;\n L_0x0010:\n r0 = com.google.fm.PURE_BARCODE;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x0140;\n L_0x0018:\n r0 = 1;\n L_0x0019:\n r1 = r13.b;\n r7 = r1.f();\n r1 = r13.b;\n r8 = r1.b();\n r1 = r7 * 3;\n r1 = r1 / 228;\n r3 = 3;\n if (r1 < r3) goto L_0x002e;\n L_0x002c:\n if (r2 == 0) goto L_0x002f;\n L_0x002e:\n r1 = 3;\n L_0x002f:\n r2 = 0;\n r3 = 5;\n r9 = new int[r3];\n r4 = r1 + -1;\n r5 = r1;\n L_0x0036:\n if (r4 >= r7) goto L_0x0127;\n L_0x0038:\n if (r2 != 0) goto L_0x0127;\n L_0x003a:\n r1 = 0;\n r3 = 0;\n r9[r1] = r3;\n r1 = 1;\n r3 = 0;\n r9[r1] = r3;\n r1 = 2;\n r3 = 0;\n r9[r1] = r3;\n r1 = 3;\n r3 = 0;\n r9[r1] = r3;\n r1 = 4;\n r3 = 0;\n r9[r1] = r3;\n r1 = 0;\n r3 = 0;\n L_0x0050:\n if (r3 >= r8) goto L_0x010d;\n L_0x0052:\n r10 = r13.b;\n r10 = r10.a(r3, r4);\n if (r10 == 0) goto L_0x0069;\n L_0x005a:\n r10 = r1 & 1;\n r11 = 1;\n if (r10 != r11) goto L_0x0061;\n L_0x005f:\n r1 = r1 + 1;\n L_0x0061:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0069:\n r10 = r1 & 1;\n if (r10 != 0) goto L_0x0103;\n L_0x006d:\n r10 = 4;\n if (r1 != r10) goto L_0x00f9;\n L_0x0070:\n r1 = a(r9);\n if (r1 == 0) goto L_0x015f;\n L_0x0076:\n r1 = r13.a(r9, r4, r3, r0);\n if (r1 == 0) goto L_0x0159;\n L_0x007c:\n r5 = 2;\n r1 = r13.a;\n if (r1 == 0) goto L_0x0156;\n L_0x0081:\n r1 = r13.b();\n if (r6 == 0) goto L_0x00c2;\n L_0x0087:\n r2 = r13.c();\n r10 = 2;\n r10 = r9[r10];\n if (r2 <= r10) goto L_0x0152;\n L_0x0090:\n r3 = 2;\n r3 = r9[r3];\n r2 = r2 - r3;\n r2 = r2 - r5;\n r3 = r4 + r2;\n r2 = r8 + -1;\n L_0x0099:\n if (r6 == 0) goto L_0x014e;\n L_0x009b:\n r4 = r5;\n r12 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r12;\n L_0x00a0:\n r5 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 3;\n r10 = 1;\n r9[r5] = r10;\n r5 = 4;\n r10 = 0;\n r9[r5] = r10;\n r5 = 3;\n if (r6 == 0) goto L_0x0147;\n L_0x00bd:\n r5 = r4;\n r4 = r2;\n r12 = r3;\n r3 = r1;\n r1 = r12;\n L_0x00c2:\n r2 = 0;\n r10 = 0;\n r11 = 0;\n r9[r10] = r11;\n r10 = 1;\n r11 = 0;\n r9[r10] = r11;\n r10 = 2;\n r11 = 0;\n r9[r10] = r11;\n r10 = 3;\n r11 = 0;\n r9[r10] = r11;\n r10 = 4;\n r11 = 0;\n r9[r10] = r11;\n if (r6 == 0) goto L_0x0143;\n L_0x00d9:\n r2 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 3;\n r10 = 1;\n r9[r2] = r10;\n r2 = 4;\n r10 = 0;\n r9[r2] = r10;\n r2 = 3;\n if (r6 == 0) goto L_0x0143;\n L_0x00f6:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n L_0x00f9:\n r1 = r1 + 1;\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0103:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n L_0x0109:\n r3 = r3 + 1;\n if (r6 == 0) goto L_0x0050;\n L_0x010d:\n r1 = a(r9);\n if (r1 == 0) goto L_0x0124;\n L_0x0113:\n r1 = r13.a(r9, r4, r8, r0);\n if (r1 == 0) goto L_0x0124;\n L_0x0119:\n r1 = 0;\n r5 = r9[r1];\n r1 = r13.a;\n if (r1 == 0) goto L_0x0124;\n L_0x0120:\n r2 = r13.b();\n L_0x0124:\n r4 = r4 + r5;\n if (r6 == 0) goto L_0x0036;\n L_0x0127:\n r0 = r13.a();\n com.google.bm.a(r0);\n r1 = new com.google.bV;\n r1.<init>(r0);\n r0 = com.google.gC.a;\n if (r0 == 0) goto L_0x013b;\n L_0x0137:\n r0 = r6 + 1;\n f = r0;\n L_0x013b:\n return r1;\n L_0x013c:\n r0 = 0;\n r2 = r0;\n goto L_0x000e;\n L_0x0140:\n r0 = 0;\n goto L_0x0019;\n L_0x0143:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n goto L_0x0109;\n L_0x0147:\n r12 = r1;\n r1 = r5;\n r5 = r4;\n r4 = r2;\n r2 = r3;\n r3 = r12;\n goto L_0x0109;\n L_0x014e:\n r4 = r3;\n r3 = r2;\n goto L_0x00c2;\n L_0x0152:\n r2 = r3;\n r3 = r4;\n goto L_0x0099;\n L_0x0156:\n r1 = r2;\n goto L_0x0087;\n L_0x0159:\n r1 = r3;\n r3 = r2;\n r2 = r4;\n r4 = r5;\n goto L_0x00a0;\n L_0x015f:\n r1 = r2;\n goto L_0x00d9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.bj.a(java.util.Map):com.google.bV\");\n }", "private void a(com.bytedance.crash.nativecrash.c r6, java.lang.String r7, boolean r8) {\n /*\n r5 = this;\n r0 = 0\n boolean r1 = r6.c() // Catch:{ Throwable -> 0x009a }\n if (r1 != 0) goto L_0x0008\n return\n L_0x0008:\n com.bytedance.crash.e.d r8 = a((com.bytedance.crash.nativecrash.c) r6, (boolean) r8) // Catch:{ Throwable -> 0x009a }\n if (r8 == 0) goto L_0x0099\n org.json.JSONObject r1 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n if (r1 == 0) goto L_0x0099\n java.io.File r1 = r6.f19496a // Catch:{ Throwable -> 0x009a }\n java.lang.String r2 = \".npth\"\n java.io.File r1 = com.bytedance.crash.i.h.a(r1, r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.db.a r2 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x009a }\n boolean r2 = r2.a((java.lang.String) r3) // Catch:{ Throwable -> 0x009a }\n if (r2 != 0) goto L_0x0096\n org.json.JSONObject r2 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = \"upload_scene\"\n java.lang.String r4 = \"launch_scan\"\n r2.put(r3, r4) // Catch:{ Throwable -> 0x009a }\n if (r7 == 0) goto L_0x0038\n java.lang.String r3 = \"crash_uuid\"\n r2.put(r3, r7) // Catch:{ Throwable -> 0x009a }\n L_0x0038:\n com.bytedance.crash.d r7 = com.bytedance.crash.d.NATIVE // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.f19382f // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = com.bytedance.crash.event.b.a((com.bytedance.crash.d) r7, (java.lang.String) r3, (org.json.JSONObject) r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r7) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.clone() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.g // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.eventType(r3) // Catch:{ Throwable -> 0x009a }\n java.lang.String r0 = r8.f19423a // Catch:{ Throwable -> 0x0093 }\n java.lang.String r2 = r2.toString() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19425c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.upload.h r8 = com.bytedance.crash.upload.b.a((java.lang.String) r0, (java.lang.String) r2, (java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n boolean r0 = r8.a() // Catch:{ Throwable -> 0x0093 }\n if (r0 == 0) goto L_0x0083\n boolean r6 = r6.e() // Catch:{ Throwable -> 0x0093 }\n if (r6 != 0) goto L_0x0074\n com.bytedance.crash.db.a r6 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r0 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.db.a.a r0 = com.bytedance.crash.db.a.a.a(r0) // Catch:{ Throwable -> 0x0093 }\n r6.a((com.bytedance.crash.db.a.a) r0) // Catch:{ Throwable -> 0x0093 }\n L_0x0074:\n r6 = 0\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n org.json.JSONObject r8 = r8.f19589c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((org.json.JSONObject) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x0099\n L_0x0083:\n int r6 = r8.f19587a // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19588b // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x00aa\n L_0x0093:\n r6 = move-exception\n r0 = r7\n goto L_0x009b\n L_0x0096:\n r6.e() // Catch:{ Throwable -> 0x009a }\n L_0x0099:\n return\n L_0x009a:\n r6 = move-exception\n L_0x009b:\n if (r0 == 0) goto L_0x00aa\n r7 = 211(0xd3, float:2.96E-43)\n com.bytedance.crash.event.a r7 = r0.state(r7)\n com.bytedance.crash.event.a r6 = r7.errorInfo((java.lang.Throwable) r6)\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6)\n L_0x00aa:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.crash.runtime.d.a(com.bytedance.crash.nativecrash.c, java.lang.String, boolean):void\");\n }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "public void zzcr() throws {\n /*\n r5 = this;\n r0 = zzagr;\n monitor-enter(r0);\n r1 = r5.zzagu;\t Catch:{ Throwable -> 0x001b }\n if (r1 == 0) goto L_0x0009;\n L_0x0007:\n monitor-exit(r0);\t Catch:{ Throwable -> 0x001b }\n return;\n L_0x0009:\n r1 = r5.zzags;\t Catch:{ Throwable -> 0x001b }\n if (r1 == 0) goto L_0x001e;\n L_0x000d:\n r2 = r5.zzagp;\t Catch:{ Throwable -> 0x001b }\n if (r2 == 0) goto L_0x001e;\n L_0x0011:\n r2 = r5.zzagp;\t Catch:{ Throwable -> 0x001b }\n r2.connect();\t Catch:{ Throwable -> 0x001b }\n r3 = 1;\n r5.zzagu = r3;\t Catch:{ Throwable -> 0x001b }\n L_0x0019:\n monitor-exit(r0);\t Catch:{ Throwable -> 0x001b }\n return;\n L_0x001b:\n r4 = move-exception;\n monitor-exit(r0);\t Catch:{ Throwable -> 0x001b }\n throw r4;\n L_0x001e:\n r3 = 0;\n r5.zzagu = r3;\t Catch:{ Throwable -> 0x001b }\n goto L_0x0019;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzax.zzcr():void\");\n }", "void m5770d() throws C0841b;", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "static /* synthetic */ void m201-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "private void c() {\n /*\n r14 = this;\n r12 = android.os.SystemClock.elapsedRealtime();\n r8 = r14.d();\n r0 = r14.t;\n if (r0 == 0) goto L_0x007a;\n L_0x000c:\n r0 = 1;\n r7 = r0;\n L_0x000e:\n r0 = r14.r;\n r0 = r0.a();\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n if (r7 == 0) goto L_0x007d;\n L_0x0018:\n r0 = 1;\n r10 = r0;\n L_0x001a:\n if (r10 != 0) goto L_0x0095;\n L_0x001c:\n r0 = r14.d;\n r0 = r0.b;\n if (r0 != 0) goto L_0x0028;\n L_0x0022:\n r0 = -1;\n r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1));\n if (r0 != 0) goto L_0x0032;\n L_0x0028:\n r0 = r14.p;\n r0 = r12 - r0;\n r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x0095;\n L_0x0032:\n r14.p = r12;\n r0 = r14.d;\n r1 = r14.f;\n r1 = r1.size();\n r0.a = r1;\n r0 = r14.c;\n r1 = r14.f;\n r2 = r14.o;\n r4 = r14.m;\n r6 = r14.d;\n r0.getChunkOperation(r1, r2, r4, r6);\n r0 = r14.d;\n r0 = r0.a;\n r0 = r14.a(r0);\n r1 = r14.d;\n r1 = r1.b;\n if (r1 != 0) goto L_0x0080;\n L_0x0059:\n r4 = -1;\n L_0x005b:\n r0 = r14.b;\n r2 = r14.m;\n r1 = r14;\n r6 = r10;\n r0 = r0.update(r1, r2, r4, r6);\n if (r7 == 0) goto L_0x0087;\n L_0x0067:\n r0 = r14.v;\n r0 = r12 - r0;\n r2 = r14.u;\n r2 = (long) r2;\n r2 = r14.c(r2);\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 < 0) goto L_0x0079;\n L_0x0076:\n r14.e();\n L_0x0079:\n return;\n L_0x007a:\n r0 = 0;\n r7 = r0;\n goto L_0x000e;\n L_0x007d:\n r0 = 0;\n r10 = r0;\n goto L_0x001a;\n L_0x0080:\n if (r0 == 0) goto L_0x0095;\n L_0x0082:\n r4 = r14.d();\n goto L_0x005b;\n L_0x0087:\n r1 = r14.r;\n r1 = r1.a();\n if (r1 != 0) goto L_0x0079;\n L_0x008f:\n if (r0 == 0) goto L_0x0079;\n L_0x0091:\n r14.f();\n goto L_0x0079;\n L_0x0095:\n r4 = r8;\n goto L_0x005b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void\");\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }", "private synchronized void a(com.whatsapp.util.x r11, boolean r12) {\n /*\n r10 = this;\n r0 = 0;\n monitor-enter(r10);\n r2 = com.whatsapp.util.Log.h;\t Catch:{ all -> 0x0016 }\n r3 = com.whatsapp.util.x.a(r11);\t Catch:{ all -> 0x0016 }\n r1 = com.whatsapp.util.bl.b(r3);\t Catch:{ IllegalArgumentException -> 0x0014 }\n if (r1 == r11) goto L_0x0019;\n L_0x000e:\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r0.<init>();\t Catch:{ IllegalArgumentException -> 0x0014 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0014 }\n L_0x0014:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0016:\n r0 = move-exception;\n monitor-exit(r10);\n throw r0;\n L_0x0019:\n if (r12 == 0) goto L_0x0058;\n L_0x001b:\n r1 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x0052 }\n if (r1 != 0) goto L_0x0058;\n L_0x0021:\n r1 = r0;\n L_0x0022:\n r4 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r1 >= r4) goto L_0x0058;\n L_0x0026:\n r4 = r3.b(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = r4.exists();\t Catch:{ IllegalArgumentException -> 0x0050 }\n if (r4 != 0) goto L_0x0054;\n L_0x0030:\n r11.b();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2.<init>();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r3 = z;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = 24;\n r3 = r3[r4];\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = r2.append(r3);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r2.append(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0.<init>(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0050 }\n L_0x0050:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0052:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0054:\n r1 = r1 + 1;\n if (r2 == 0) goto L_0x0022;\n L_0x0058:\n r1 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r0 >= r1) goto L_0x008f;\n L_0x005c:\n r1 = r3.b(r0);\t Catch:{ all -> 0x0016 }\n if (r12 == 0) goto L_0x0088;\n L_0x0062:\n r4 = r1.exists();\t Catch:{ IllegalArgumentException -> 0x0126 }\n if (r4 == 0) goto L_0x008b;\n L_0x0068:\n r4 = r3.a(r0);\t Catch:{ all -> 0x0016 }\n r1.renameTo(r4);\t Catch:{ all -> 0x0016 }\n r5 = com.whatsapp.util.bl.e(r3);\t Catch:{ all -> 0x0016 }\n r6 = r5[r0];\t Catch:{ all -> 0x0016 }\n r4 = r4.length();\t Catch:{ all -> 0x0016 }\n r8 = com.whatsapp.util.bl.e(r3);\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8[r0] = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r6 = r8 - r6;\n r4 = r4 + r6;\n r10.i = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n if (r2 == 0) goto L_0x008b;\n L_0x0088:\n a(r1);\t Catch:{ IllegalArgumentException -> 0x0128 }\n L_0x008b:\n r0 = r0 + 1;\n if (r2 == 0) goto L_0x0058;\n L_0x008f:\n r0 = r10.e;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 + 1;\n r10.e = r0;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = 0;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 | r12;\n if (r0 == 0) goto L_0x00e0;\n L_0x00a0:\n r0 = 1;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012c }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = z;\t Catch:{ IllegalArgumentException -> 0x012c }\n r5 = 26;\n r4 = r4[r5];\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = r3.a();\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = 10;\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012c }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012c }\n if (r12 == 0) goto L_0x010f;\n L_0x00d4:\n r0 = r10.n;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 1;\n r4 = r4 + r0;\n r10.n = r4;\t Catch:{ IllegalArgumentException -> 0x012e }\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012e }\n if (r2 == 0) goto L_0x010f;\n L_0x00e0:\n r0 = r10.k;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.remove(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = z;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 25;\n r2 = r2[r4];\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = 10;\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x010f:\n r0 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r2 = r10.c;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 > 0) goto L_0x011d;\n L_0x0117:\n r0 = r10.f();\t Catch:{ IllegalArgumentException -> 0x0132 }\n if (r0 == 0) goto L_0x0124;\n L_0x011d:\n r0 = r10.d;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r1 = r10.j;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r0.submit(r1);\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0124:\n monitor-exit(r10);\n return;\n L_0x0126:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0128:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x012a:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012c }\n L_0x012c:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x012e:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0130:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0132:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.util.b6.a(com.whatsapp.util.x, boolean):void\");\n }", "private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "private boolean a(java.lang.String r2, java.lang.String r3) {\n /*\n r1 = this;\n r0 = r1.i(r3);\t Catch:{ RuntimeException -> 0x001c }\n if (r0 != 0) goto L_0x0024;\n L_0x0006:\n if (r2 == 0) goto L_0x001a;\n L_0x0008:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x0020 }\n if (r0 == 0) goto L_0x001a;\n L_0x000e:\n r0 = g;\t Catch:{ RuntimeException -> 0x0022 }\n r0 = r0.matcher(r2);\t Catch:{ RuntimeException -> 0x0022 }\n r0 = r0.lookingAt();\t Catch:{ RuntimeException -> 0x0022 }\n if (r0 != 0) goto L_0x0024;\n L_0x001a:\n r0 = 0;\n L_0x001b:\n return r0;\n L_0x001c:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x001e }\n L_0x001e:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0020 }\n L_0x0020:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0022 }\n L_0x0022:\n r0 = move-exception;\n throw r0;\n L_0x0024:\n r0 = 1;\n goto L_0x001b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String):boolean\");\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "public final synchronized java.lang.String m90f(java.lang.String r5) {\n /*\n r4 = this;\n r1 = 1;\n r0 = 0;\n monitor-enter(r4);\n if (r5 == 0) goto L_0x002c;\n L_0x0005:\n r2 = r5.trim();\t Catch:{ all -> 0x0037 }\n r2 = r2.length();\t Catch:{ all -> 0x0037 }\n if (r2 <= 0) goto L_0x002c;\n L_0x000f:\n if (r0 == 0) goto L_0x002e;\n L_0x0011:\n r0 = \"key should not be empty %s\";\n r1 = 1;\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x0037 }\n r2 = 0;\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0037 }\n r3.<init>();\t Catch:{ all -> 0x0037 }\n r3 = r3.append(r5);\t Catch:{ all -> 0x0037 }\n r3 = r3.toString();\t Catch:{ all -> 0x0037 }\n r1[r2] = r3;\t Catch:{ all -> 0x0037 }\n com.tencent.bugly.legu.proguard.C0073w.m524d(r0, r1);\t Catch:{ all -> 0x0037 }\n r0 = 0;\n L_0x002a:\n monitor-exit(r4);\n return r0;\n L_0x002c:\n r0 = r1;\n goto L_0x000f;\n L_0x002e:\n r0 = r4.f112Y;\t Catch:{ all -> 0x0037 }\n r0 = r0.remove(r5);\t Catch:{ all -> 0x0037 }\n r0 = (java.lang.String) r0;\t Catch:{ all -> 0x0037 }\n goto L_0x002a;\n L_0x0037:\n r0 = move-exception;\n monitor-exit(r4);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.bugly.legu.crashreport.common.info.a.f(java.lang.String):java.lang.String\");\n }", "public boolean mo42073c(p195e.p196a.p447u0.C12314c r3) {\n /*\n r2 = this;\n java.lang.String r0 = \"Disposable item is null\"\n p195e.p196a.p199x0.p451b.C12390b.m55563a(r3, r0)\n boolean r0 = r2.f35500b\n r1 = 0\n if (r0 == 0) goto L_0x000b\n return r1\n L_0x000b:\n monitor-enter(r2)\n boolean r0 = r2.f35500b // Catch:{ all -> 0x0022 }\n if (r0 == 0) goto L_0x0012\n monitor-exit(r2) // Catch:{ all -> 0x0022 }\n return r1\n L_0x0012:\n java.util.List<e.a.u0.c> r0 = r2.f35499a // Catch:{ all -> 0x0022 }\n if (r0 == 0) goto L_0x0020\n boolean r3 = r0.remove(r3) // Catch:{ all -> 0x0022 }\n if (r3 != 0) goto L_0x001d\n goto L_0x0020\n L_0x001d:\n monitor-exit(r2) // Catch:{ all -> 0x0022 }\n r3 = 1\n return r3\n L_0x0020:\n monitor-exit(r2) // Catch:{ all -> 0x0022 }\n return r1\n L_0x0022:\n r3 = move-exception\n monitor-exit(r2) // Catch:{ all -> 0x0022 }\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p195e.p196a.p199x0.p450a.C12349f.mo42073c(e.a.u0.c):boolean\");\n }", "public org.a9 a() {\n /*\n r4 = this;\n r1 = 0;\n r0 = r4.c;\n if (r0 != 0) goto L_0x0040;\n L_0x0005:\n monitor-enter(r4);\n r0 = r4.c;\t Catch:{ all -> 0x0043 }\n if (r0 != 0) goto L_0x003f;\n L_0x000a:\n r2 = r4.e;\t Catch:{ IllegalArgumentException -> 0x0041 }\n if (r2 != 0) goto L_0x003f;\n L_0x000e:\n r0 = r4.b;\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 8;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = 0;\n r0 = r0.getSharedPreferences(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 6;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = \"\";\n r0 = r0.getString(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ IllegalArgumentException -> 0x0046 }\n if (r2 == 0) goto L_0x0053;\n L_0x002d:\n r2 = r1;\n L_0x002e:\n if (r2 == 0) goto L_0x0039;\n L_0x0030:\n r0 = new org.a9;\t Catch:{ IllegalArgumentException -> 0x0048 }\n r0.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = com.whatsapp.DialogToastActivity.f;\t Catch:{ IllegalArgumentException -> 0x0048 }\n if (r2 == 0) goto L_0x003a;\n L_0x0039:\n r0 = r1;\n L_0x003a:\n r4.c = r0;\t Catch:{ all -> 0x0043 }\n r1 = 1;\n r4.e = r1;\t Catch:{ all -> 0x0043 }\n L_0x003f:\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n L_0x0040:\n return r0;\n L_0x0041:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0043 }\n L_0x0043:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n throw r0;\n L_0x0046:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0048 }\n L_0x0048:\n r0 = move-exception;\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 7;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n com.whatsapp.util.Log.c(r2, r0);\t Catch:{ all -> 0x0043 }\n r0 = r1;\n goto L_0x003a;\n L_0x0053:\n r2 = 3;\n r0 = android.backport.util.Base64.decode(r0, r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = r0;\n goto L_0x002e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.l9.a():org.a9\");\n }", "public com.google.cr a(com.google.ca r5) {\n /*\n r4 = this;\n r0 = 0;\n r1 = com.google.bA.b;\n r2 = com.google.ca.d();\n if (r5 != r2) goto L_0x000a;\n L_0x0009:\n return r4;\n L_0x000a:\n r2 = r4.f;\n if (r2 != 0) goto L_0x003f;\n L_0x000e:\n r2 = com.google.ca.b(r5);\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x0079;\n L_0x0018:\n r2 = r4.g;\n r2 = r2.isEmpty();\n if (r2 == 0) goto L_0x002e;\n L_0x0020:\n r2 = com.google.ca.b(r5);\n r4.g = r2;\n r2 = r4.h;\n r2 = r2 & -2;\n r4.h = r2;\n if (r1 == 0) goto L_0x003a;\n L_0x002e:\n r4.d();\n r2 = r4.g;\n r3 = com.google.ca.b(r5);\n r2.addAll(r3);\n L_0x003a:\n r4.g();\n if (r1 == 0) goto L_0x0079;\n L_0x003f:\n r2 = com.google.ca.b(r5);\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x0079;\n L_0x0049:\n r2 = r4.f;\n r2 = r2.i();\n if (r2 == 0) goto L_0x0070;\n L_0x0051:\n r2 = r4.f;\n r2.b();\n r4.f = r0;\n r2 = com.google.ca.b(r5);\n r4.g = r2;\n r2 = r4.h;\n r2 = r2 & -2;\n r4.h = r2;\n r2 = com.google.bL.d;\n if (r2 == 0) goto L_0x006c;\n L_0x0068:\n r0 = r4.k();\n L_0x006c:\n r4.f = r0;\n if (r1 == 0) goto L_0x0079;\n L_0x0070:\n r0 = r4.f;\n r1 = com.google.ca.b(r5);\n r0.a(r1);\n L_0x0079:\n r4.a(r5);\n r0 = r5.getUnknownFields();\n r4.a(r0);\n goto L_0x0009;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.cr.a(com.google.ca):com.google.cr\");\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n ClassWriter classWriter1 = new ClassWriter((-2894));\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"ConstantValue\";\n stringArray0[1] = \"LocalVariableTable\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n stringArray0[2] = \"ConstantValue\";\n stringArray0[3] = \"ConstantValue\";\n stringArray0[4] = \"0T1MW_`O#}<L\";\n stringArray0[5] = \"h#w=z5(0SfaM)DKLY\";\n stringArray0[6] = \"Synthetic\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"ConstantValue\", \"h#w=z5(0SfaM)DKLY\", \"Synthetic\", stringArray0, true, false);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LocalVariableTable\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n // Undeclared exception!\n try { \n methodWriter0.visitMethodInsn((-2894), \"/#p[v!vM>^U#((tz?0\", \"0T1MW_`O#}<L\", \"Code\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.72170746", "0.6724726", "0.6724111", "0.6701433", "0.66997635", "0.6688366", "0.6682435", "0.65949684", "0.6591033", "0.6577133", "0.656965", "0.6566517", "0.6566274", "0.65634394", "0.65595603", "0.6513839", "0.6499762", "0.64933395", "0.64766335", "0.64486456", "0.64402604", "0.6435989", "0.64306194", "0.6428501", "0.6428501", "0.6422293", "0.6410151", "0.63908523", "0.63841337", "0.6378173", "0.6376838", "0.6346873", "0.6340033", "0.63350797", "0.63325477", "0.63281685", "0.6299958", "0.6275234", "0.6268921", "0.6261085", "0.6210169", "0.6203638", "0.61995983", "0.6196402", "0.6195436", "0.6183797", "0.61738354", "0.6169122", "0.6163927", "0.615229", "0.6151327", "0.6140176", "0.6119117", "0.6115929", "0.6082057", "0.60789925", "0.6075114", "0.60570073", "0.60431993", "0.60323584", "0.60271746", "0.60177255", "0.59949815", "0.59927446", "0.5985196", "0.5983597", "0.5982664", "0.59774244", "0.59732145", "0.59563696", "0.59481674", "0.5946563", "0.59333414", "0.59230524", "0.5922215", "0.59180856", "0.5914085", "0.59091824", "0.5905575", "0.5904865", "0.5899249", "0.5896477", "0.58885026", "0.58884484", "0.58780926", "0.58778983", "0.58580226", "0.58577454", "0.58473563", "0.5845317", "0.5836238", "0.5833301", "0.58312255", "0.5829491", "0.582428", "0.58149886", "0.5814459", "0.58107275", "0.58070177", "0.58064145", "0.5804333" ]
0.0
-1
/ access modifiers changed from: private
public void removeFromDecorView(View view) { this.mTargetContainer.getDecorView().removeView(view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "private void m50366E() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract Object mo26777y();", "@Override\n protected void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private MApi() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Infer() {\n\n }", "protected abstract Set method_1559();", "@Override\n void init() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "private Singletion3() {}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private abstract void privateabstract();", "protected boolean func_70814_o() { return true; }", "private Get() {}", "private Get() {}", "public void m23075a() {\n }", "private Util() { }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21779D() {\n }", "private test5() {\r\n\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n public void memoria() {\n \n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "protected Doodler() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo56925d();", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo21877s() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "@Override\n public void get() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void ss(){\n }", "public void mo21782G() {\n }", "public abstract void mo27385c();", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "protected void h() {}", "private void init() {\n\n\t}", "private final void i() {\n }" ]
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.6059318", "0.60447836", "0.6037732", "0.6033637", "0.6028711", "0.60249", "0.6015989", "0.6015989", "0.6010123", "0.5991239", "0.5977965", "0.59756213", "0.59711885", "0.59652776", "0.59562653", "0.59491456", "0.5947999", "0.5942879", "0.5941421", "0.59406793", "0.5936351", "0.5936351", "0.5934477", "0.5934473", "0.59311885", "0.59261817", "0.592184", "0.59162307", "0.59162307", "0.5915696", "0.5908215", "0.5903059", "0.5903059", "0.5894341", "0.5887855", "0.58869827", "0.5884463", "0.5881538", "0.588023", "0.5879579", "0.58791363", "0.58698714", "0.58686715", "0.5857818", "0.5855094", "0.5851806", "0.58393794", "0.58365846", "0.58286095", "0.5816463", "0.58148336", "0.58144826", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5809802", "0.5802026", "0.57927555", "0.5792171", "0.5790551", "0.5786574", "0.5786574", "0.5786574", "0.5786574", "0.5786161", "0.578553", "0.5785096", "0.57780075", "0.5774098", "0.57732016", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.5763271", "0.57621974", "0.57540506" ]
0.0
-1
/ access modifiers changed from: private
public void showSystemUI() { this.mTargetContainer.getDecorView().setSystemUiVisibility(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "private void m50366E() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract Object mo26777y();", "@Override\n protected void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private MApi() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Infer() {\n\n }", "protected abstract Set method_1559();", "@Override\n void init() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "private Singletion3() {}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private abstract void privateabstract();", "protected boolean func_70814_o() { return true; }", "private Get() {}", "private Get() {}", "public void m23075a() {\n }", "private Util() { }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21779D() {\n }", "private test5() {\r\n\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n public void memoria() {\n \n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "protected Doodler() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo56925d();", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo21877s() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "@Override\n public void get() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void ss(){\n }", "public void mo21782G() {\n }", "public abstract void mo27385c();", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "protected void h() {}", "private void init() {\n\n\t}", "private final void i() {\n }" ]
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.6059318", "0.60447836", "0.6037732", "0.6033637", "0.6028711", "0.60249", "0.6015989", "0.6015989", "0.6010123", "0.5991239", "0.5977965", "0.59756213", "0.59711885", "0.59652776", "0.59562653", "0.59491456", "0.5947999", "0.5942879", "0.5941421", "0.59406793", "0.5936351", "0.5936351", "0.5934477", "0.5934473", "0.59311885", "0.59261817", "0.592184", "0.59162307", "0.59162307", "0.5915696", "0.5908215", "0.5903059", "0.5903059", "0.5894341", "0.5887855", "0.58869827", "0.5884463", "0.5881538", "0.588023", "0.5879579", "0.58791363", "0.58698714", "0.58686715", "0.5857818", "0.5855094", "0.5851806", "0.58393794", "0.58365846", "0.58286095", "0.5816463", "0.58148336", "0.58144826", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5809802", "0.5802026", "0.57927555", "0.5792171", "0.5790551", "0.5786574", "0.5786574", "0.5786574", "0.5786574", "0.5786161", "0.578553", "0.5785096", "0.57780075", "0.5774098", "0.57732016", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.5763271", "0.57621974", "0.57540506" ]
0.0
-1
Constructor from a properties file.
public MapFilter(Properties p, String prefix) { // Properties extends HashTable<Object,Object> so it implements Map. // I need Map<String,T> so I wrap it in a HashMap for simplicity. // Java-8 breaks if we use diamond inference. this(new HashMap<>((Map) p), prefix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PropertyReader(String propertyFileName)\r\n\t{\r\n\t\tthis.propertyFileName = propertyFileName;\r\n\t}", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "public CMProps(final Properties p, final String filename) {\n super(p);\n final char c = Thread.currentThread().getThreadGroup().getName().charAt(0);\n if (props[c] == null)\n props[c] = this;\n\n try {\n this.load(new ByteArrayInputStream(new CMFile(filename, null).raw()));\n loaded = true;\n } catch (final IOException e) {\n loaded = false;\n }\n }", "public PropertyParser(Properties props)\n\t{\n\t\t_props = props;\n\t}", "public void init(Properties properties) throws IOException;", "private void init(String propFilePath) {\n properties = new Properties();\n try {\n properties.load(new FileInputStream(new File(propFilePath)));\n } catch (FileNotFoundException e1) {\n logger.error(\"External properties file not found!\", e1);\n System.exit(1);\n } catch (IOException e2) {\n logger.error(\"Error while reading External properties file!\", e2);\n System.exit(1);\n }\n }", "public\n YutilProperties(InputStream in)\n {\n super(new Properties());\n setPropertiesDefaults(in);\n }", "public Property(String configFileName) {\r\n\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\r\n\t\tif (configFileName == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tScanner in = null;\r\n\t\tScanner scan = null;\r\n\t\ttry {\r\n\t\t\tFile conf = new File(configFileName);\r\n\t\t\tin = new Scanner(conf);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString line = in.nextLine().replace('=', ',');\r\n\t\t\t\tscan = new Scanner(line);\r\n\t\t\t\tscan.useDelimiter(\",\");\r\n\t\t\t\tString firstWord = scan.next();\r\n\t\t\t\tif (firstWord.equals(\"positive\")) {\r\n\t\t\t\t\tpositive = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"negative\")) {\r\n\t\t\t\t\tnegative = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"stop\")) {\r\n\t\t\t\t\tstop = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"scoringmethod\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tscoringmethod = Integer.parseInt(next);\r\n\t\t\t\t} else if (firstWord.equals(\"mindistance\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tmindistance = Double.parseDouble(next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} finally{\r\n\t\t\tif(scan != null)\r\n\t\t\t\tscan.close();\r\n\t\t}\r\n\t}", "public FileServicePropertiesProperties() {\n }", "private AuditYamlConfigurationLoader(Properties properties)\n {\n this.properties = new Properties(properties);\n }", "public DataInputClientProperties(String propertiesFilename) throws IOException {\n if (propertiesFilename == null) {\n initializeProperties();\n }\n else {\n initializeProperties(propertiesFilename);\n }\n }", "public Config(File confDir, Properties props) throws IOException {\n FileInputStream input = new FileInputStream(new File(confDir, PROPERTIES_FILE));\n Properties p = new Properties();\n p.load(input);\n entries = new Properties(p); // Set the file values as defaults for our properties\n // Now copy in our passed in properties\n for (String key : props.stringPropertyNames()) entries.setProperty(key, props.getProperty(key));\n input.close();\n }", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "public PropertiesPlus(File propertiesFile) throws IOException\n\t{\n\t\tsuper();\n\t\tpropertyFile = propertiesFile; \n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateFormatGMT_MS.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tload(new FileReader(propertiesFile));\n\t}", "public GMailProperties(final String filepath, final String charsetName) throws FileNotFoundException, IOException {\r\n this.properties = new PropertyStorage(filepath, charsetName);\r\n }", "public DetectionProperties() throws Exception {\n super(DetectionProperties.class.getResourceAsStream(PROPERTIES_FILE_NAME));\n }", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "public MutablePropertiesPropertySource(File propertiesLocation) {\n this(propertiesLocation, 0);\n }", "@SneakyThrows\n public ApplicationProperties(final String propertiesFilePath) {\n this.properties = new Properties();\n this.properties.load(new FileInputStream(propertiesFilePath));\n }", "@Test\n public void testCreateFromProperties_Properties() throws Exception {\n System.out.println(\"createFromProperties\");\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n EngineConfiguration result = EngineConfiguration.createFromProperties(props);\n assertProperties(result);\n }", "private void initializeProperties(String propertiesFilename) throws IOException {\n this.properties = new Properties();\n\n // Set defaults for 'standard' operation.\n // properties.setProperty(FILENAME_KEY, clientHome + \"/bmo-data.tsv\");\n properties.setProperty(BMO_URI_KEY,\n \"http://www.buildingmanageronline.com/members/mbdev_export.php/download.txt\");\n\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(propertiesFilename);\n properties.load(stream);\n System.out.println(\"Loading data input client properties from: \" + propertiesFilename);\n }\n catch (IOException e) {\n System.out.println(propertiesFilename\n + \" not found. Using default data input client properties.\");\n throw e;\n }\n finally {\n if (stream != null) {\n stream.close();\n }\n }\n trimProperties(properties);\n }", "void setPropertiesFile(File file);", "public PropFileReader(String filename, String jsonFileName){\n this.ruleJsonFile=jsonFileName;\n this.filename=filename;\n this.propertyBuilder();\n }", "public ConfigFile(String fileName, String encoding) {\n InputStream inputStream = null;\n try {\n inputStream = getClassLoader().getResourceAsStream(fileName); // properties.load(ConfigFile.class.getResourceAsStream(fileName));\n if (inputStream == null) {\n throw new IllegalArgumentException(\"Properties file not found in classpath: \" + fileName);\n }\n\n properties = new Properties();\n if (fileName.endsWith(\"yml\")){\n isYml = true;\n properties= new Yaml().loadAs(new InputStreamReader(inputStream, encoding),Properties.class);\n }else\n properties.load(new InputStreamReader(inputStream, encoding));\n } catch (IOException e) {\n throw new RuntimeException(\"Error loading properties file.\", e);\n } finally {\n if (inputStream != null) try {\n inputStream.close();\n } catch (IOException e) {\n LogKit.error(e.getMessage(), e);\n }\n }\n }", "public TestBase() {\n try {\n properties = new Properties();\n FileInputStream fileInputStream = new FileInputStream(\"F:/LearningStuff/PracticalWork\" +\n \"/Frameworks/DataDrivenFrameworkSelenium/src/main/resources/config/config.properties\");\n properties.load(fileInputStream);\n } catch (FileNotFoundException f) {\n f.printStackTrace();\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "protected void fromProperties(Properties properties) {\r\n value = reader.read(properties, key, value);\r\n }", "public\n YutilProperties()\n {\n super(new Properties());\n }", "public ReadProperties(String filename) {\n\n\t\ttry {\n\t\t\tInputStream in = new FileInputStream(filename);\n\n\t\t\tprop = new Properties();\n\n\t\t\tprop.load(in);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "public static void init(String propfile) throws Exception\r\n\t{\r\n\t\tinit(propfile, \"Properties\", new String[0]);\r\n\t}", "public Config(Properties props) {\n entries = (Properties)props.clone();\n }", "private void loadPropertyFile(InputStream stream) throws IOException{\n\t\tproperties = new Properties();\n\t\tproperties.load(stream);\n\t}", "PropertiesTask setProperties( File propertiesFile );", "public PropertiesUtil() {\n\t\t// Read properties file.\n\n\t\tproperties = new Properties();\n\t\ttry {\n\t\t\tproperties.load(PropertiesUtil.class.getClassLoader().getResourceAsStream(\"variables.properties\"));\n\t\t\tlog.info(\"variables.properties file loaded successfully\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"variables.properties file not found: \", e);\n\t\t}\n\t}", "public Properties(){\n\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "public PropertiesCredentials(File file) throws FileNotFoundException,\n\t\t\tIOException, IllegalArgumentException {\n\t\tthis(new FileInputStream(file));\n\t}", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }", "public static Properties loadProperties(final String filename) throws IllegalArgumentException {\n final File file = new File(filename);\n final Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(file));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(\"File not found: \" + file, ex);\n } catch (IOException ex) {\n throw new IllegalArgumentException(\"Unable to load properties: \" + file, ex);\n }\n return properties;\n }", "public void loadPropertyFile(String filename) {\n try (InputStream is = new FileInputStream(filename)) {\n properties.load(is);\n } catch (IOException x) {\n throw new IllegalArgumentException(x);\n }\n }", "public PropertyManager(String propFileName) {\n if ((propFileName != null) && (propFileName.length() > 0)) {\n this.propFileName = propFileName;\n recentResult = loadPropertyFile(propFileName);\n }\n }", "public abstract void load(Properties props, InputStream in)\n throws IOException, InvalidPropertiesFormatException;", "public void init(java.util.Properties props) {\r\n }", "public TestBase()\r\n\t{\r\n\t\tprop = new Properties();\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"src\\\\test\\\\resources\\\\intellicus.properties\");\r\n\t\t\tFileInputStream fis = new FileInputStream(file);\r\n\t\t\tprop.load(fis);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public LoadTestProperties() {\n }", "public Config(String filename) {\n this.filename = filename;\n }", "public BaseClass() {\n\t\t \n\t try {\n\t\t\t \n\t\t\t prop=new Properties();\n\t\t\t \n\t\t\tString path=System.getProperty(\"user.dir\");\n\t\t\t \n\t\t\t // FileInputStream is the pre-defined class\n\t\t\tFileInputStream ip=new FileInputStream(path+\"\\\\src\\\\main\\\\java\\\\com\\\\demoQA\\\\config\\\\Config.Properties\");\n\t\t\t prop.load(ip);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t\t \n\t }", "private ConfigProperties() {\n\n }", "public HistogramConfiguration loadProperties(String propertyFileName)\n {\n HistogramConfiguration histConfig = HistogramConfiguration.getInstance();\n\n try(FileInputStream inputStream = new FileInputStream(propertyFileName))\n {\n properties.load(inputStream);\n\n histConfig.setShouldIgnoreWhiteSpaces(loadShouldIgnoreWhiteSpace());\n histConfig.setIgnoreCharacters(loadIgnoredCharactersProperties());\n\n }catch (IOException e)\n {\n e.printStackTrace();\n }\n\n return histConfig;\n }", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "public void setPropertiesFile(File propertiesFile) {\n this.propertiesFile = propertiesFile;\n }", "public CMProps(String filename) {\n final char c = Thread.currentThread().getThreadGroup().getName().charAt(0);\n if (props[c] == null)\n props[c] = this;\n try {\n final CMFile F = new CMFile(filename, null);\n if (F.exists()) {\n this.load(new ByteArrayInputStream(F.textUnformatted().toString().getBytes()));\n loaded = true;\n } else\n loaded = false;\n } catch (final IOException e) {\n loaded = false;\n }\n }", "public MutablePropertiesPropertySource(File propertiesLocation, int defaultOrdinal) {\n super(propertiesLocation.toString(), defaultOrdinal);\n try {\n this.file = propertiesLocation;\n refresh();\n } catch (Exception e) {\n LOG.log(Level.SEVERE, \"Cannot convert file to URL: \" + propertiesLocation, e);\n }\n }", "public DBCredentials() {\n try {\n // Get the inputStream\n InputStream inputStream = this.getClass().getClassLoader()\n .getResourceAsStream(file);\n\n Properties properties = new Properties();\n\n // load the inputStream using the Properties\n properties.load(inputStream);\n // get the value of the property\n this.dbUser = properties.getProperty(\"Username\");\n this.dbPassword = properties.getProperty(\"Password\");\n this.dbUrl = properties.getProperty(\"DataBase\");\n\n } catch (IOException e) {\n System.out.println(\"IOException\");\n e.printStackTrace();\n }\n }", "public void init(Properties props) ;", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "public PropertiesPlus(String properties)\n\t{\n\t\tsuper();\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateFormatGMT_MS.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tif (properties.startsWith(\"<properties>\"))\n\t\t\tparseXML(properties);\n\t\telse\n\t\t\tparseString(properties);\n\t}", "public ConfigFile(File file, String encoding) {\n if (file == null) {\n throw new IllegalArgumentException(\"File can not be null.\");\n }\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"File not found : \" + file.getName());\n }\n\n InputStream inputStream = null;\n try {\n inputStream = new FileInputStream(file);\n properties = new Properties();\n if (file.getName().endsWith(\"yml\")){\n isYml = true;\n properties= new Yaml().loadAs(new InputStreamReader(inputStream, encoding),Properties.class);\n }else\n properties.load(new InputStreamReader(inputStream, encoding));\n } catch (IOException e) {\n throw new RuntimeException(\"Error loading properties file.\", e);\n } finally {\n if (inputStream != null) try {\n inputStream.close();\n } catch (IOException e) {\n LogKit.error(e.getMessage(), e);\n }\n }\n }", "public\n YutilProperties(YutilProperties argprops)\n {\n super(new Properties());\n setPropertiesDefaults(argprops);\n }", "public PropertyAttributeReader(File file) throws IOException {\r\n String typeName = typeName(file);\r\n String namespace = namespace(file);\r\n reader = new BufferedReader(new FileReader(file));\r\n\r\n // read until \"_=\";\r\n while ((line = reader.readLine()) != null) {\r\n if (line.startsWith(\"_=\"))\r\n break;\r\n }\r\n\r\n if ((line == null) || !line.startsWith(\"_=\")) {\r\n throw new IOException(typeName + \" schema not available\");\r\n }\r\n\r\n String typeSpec = line.substring(2);\r\n\r\n try {\r\n type = DataUtilities.createType(namespace, typeName, typeSpec);\r\n } catch (SchemaException e) {\r\n throw new DataSourceException(typeName + \" schema not available\", e);\r\n }\r\n\r\n line = null;\r\n next = null;\r\n }", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "public ObjReader(String filename){\n file = filename;\n }", "public\n YutilProperties(String argv[])\n {\n super(new Properties());\n setPropertiesDefaults(argv);\n }", "private Properties loadProperties(String fileName){\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinput = new FileInputStream(fileName);\r\n\t\t\tprop.load(input);\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prop;\t \r\n\t}", "public final Properties init() throws FileNotFoundException, IOException{\n /*\n Your properties file must be in the deployed .war file in WEB-INF/classes/tokens. It is there automatically\n if you have it in Source Packages/java/tokens when you build. That is how this will read it in without defining a root location\n https://stackoverflow.com/questions/2395737/java-relative-path-of-a-file-in-a-java-web-application\n */\n String fileLoc =TinyTokenManager.class.getResource(Constant.PROPERTIES_FILE_NAME).toString();\n fileLoc = fileLoc.replace(\"file:\", \"\");\n setFileLocation(fileLoc);\n InputStream input = new FileInputStream(propFileLocation);\n props.load(input);\n input.close();\n currentAccessToken = props.getProperty(\"access_token\");\n currentRefreshToken = props.getProperty(\"refresh_token\");\n currentS3AccessID = props.getProperty(\"s3_access_id\");\n currentS3Secret = props.getProperty(\"s3_secret\");\n currentS3BucketName = props.getProperty(\"s3_bucket_name\");\n currentS3Region = Region.US_WEST_2;\n apiSetting = props.getProperty(\"open_api_cors\");\n return props;\n }", "public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }", "@Test\r\n\t\tpublic static void Properties() \r\n\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tprop = new Properties();\r\n\t\t\t\tfile = new File(\"C:\\\\Users\\\\vardhan\\\\eclipse-workspace\\\\com.makemytrip\\\\prop.properties\");\r\n\t\t\t\tfilereader = new FileReader(file);\r\n\t\t\t\tprop.load(filereader);\r\n\t\t\t\t\r\n\t\t\t }\r\n\t\t\r\n\t\t\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}", "public BaseTest() {\n\n String path = System.getProperty(\"user.dir\") + \"/src/test/resources/config.properties\";\n prop = new Properties();\n /** Stream to read the spreadsheet. */\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(path);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n try {\n prop.load(fis);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "public AposNtripCasterMock (Properties props) throws FileNotFoundException {\n\t\tinit (props);\n\t}", "public void load(File file)\n throws FileNotFoundException, IOException, MissingRequiredTestPropertyException \n {\n\t initializeTestProperties(new BufferedInputStream(new FileInputStream(file)));\n\t}", "public PSBeanProperties()\n {\n loadProperties();\n }", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "public static void readProperties(String propFilename){\n\t\tString propertiesFilename = propFilename;\n\t\tProperties properties = new Properties();\n\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFilename);\n\t\t\tproperties.load(in);\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading properties \"+propertiesFilename);\n\t\t\tSystem.exit(1);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tString path=\"Not set\";\n\t\tint popSize=0;\n\t\tint features=0;\n\t\tint maxGenerations=0;\n\t\tboolean log=false;\n\t\tboolean debug=false;\n\t\tboolean printbest=false;\n\t\tboolean cwd=false;\n\t\tboolean arrcache=false;\n\t\tdouble addSubRangeH;\n\t\tdouble divMultRangeH;\n\t\tdouble randomThicknessRange;\n\t\tdouble randomVelocityRange;\n\n\t\tdouble addSubRangeVS;\n\t\tdouble divMultRangeVS;\n\n\t\tint zThreshold=0;\n\t\tboolean useThreshold = true;\n\n\tif(properties.containsKey(\"path\")){\n\t\tpath = ((String)properties.get(\"path\"));\n\t\tif(properties.containsKey(\"cwd\")){\n\t\t\tcwd = Boolean.parseBoolean((String)properties.get(\"cwd\"));\n\t\t}\n\t\tc.path=path;\n\t\tc.setPaths(cwd);\n\t}else{\n\t\tSystem.out.println(\"Path : \"+path);\n\t\tSystem.exit(1);\n\t}if(properties.containsKey(\"populationSize\")){\n\t\tpopSize = Integer.parseInt((String)properties.get(\"populationSize\"));\n\t\tc.populationSize =popSize;\n\t}if(properties.containsKey(\"printBest\")){\n\t\tprintbest = Boolean.parseBoolean((String)properties.get(\"printBest\"));\n\t\tc.printBest=printbest;\n\t}if(properties.containsKey(\"maxGenerations\")){\n\t\tmaxGenerations = Integer.parseInt((String)properties.get(\"maxGenerations\"));\n\t\tc.maxGenerations=maxGenerations;\n\t}if(properties.containsKey(\"log\")){\n\t\tlog = Boolean.parseBoolean((String)properties.get(\"log\"));\n\t\tc.log=log;\n\t}if(properties.containsKey(\"debug\")){\n\t\tdebug = Boolean.parseBoolean((String)properties.get(\"debug\"));\n\t\tc.debug=debug;\n\t}if(properties.containsKey(\"features\")){\n\t\tfeatures = Integer.parseInt((String)properties.get(\"features\"));\n\t\tc.features=features;\n\t}if(properties.containsKey(\"addSubRangeH\")){\n\t\taddSubRangeH = Double.parseDouble((String)properties.get(\"addSubRangeH\"));\n\t\tc.addSubRangeH=addSubRangeH;\n\t}if(properties.containsKey(\"addSubRangeVS\")){\n\t\taddSubRangeVS = Double.parseDouble((String)properties.get(\"addSubRangeVS\"));\n\t\tc.addSubRangeVS=addSubRangeVS;\n\t}if(properties.containsKey(\"divMultRangeH\")){\n\t\tdivMultRangeH = Double.parseDouble((String)properties.get(\"divMultRangeH\"));\n\t\tc.divMultRangeH=divMultRangeH;\n\t}if(properties.containsKey(\"divMultRangeVS\")){\n\t\tdivMultRangeVS = Double.parseDouble((String)properties.get(\"divMultRangeVS\"));\n\t\tc.divMultRangeVS=divMultRangeVS;\n\t}if(properties.containsKey(\"randomThicknessRange\")){\n\t\trandomThicknessRange = Double.parseDouble((String)properties.get(\"randomThicknessRange\"));\n\t\tc.randomThicknessRange=randomThicknessRange;\n\t}if(properties.containsKey(\"randomVelocityRange\")){\n\t\trandomVelocityRange = Double.parseDouble((String)properties.get(\"randomVelocityRange\"));\n\t\tc.randomVelocityRange=randomVelocityRange;\n\t}if(properties.containsKey(\"zThreshold\")){\n\t\tzThreshold = Integer.parseInt((String)properties.get(\"zThreshold\"));\n\t\tc.zThreshold=zThreshold;\n\t}if(properties.containsKey(\"useThreshold\")){\n\t\tuseThreshold = Boolean.parseBoolean((String)properties.get(\"useThreshold\"));\n\t\tc.useThreshold=useThreshold;\n\t}\n\n\tSystem.out.println(\" Debug? \"+debug + \" | Log? \"+ log + \" | printBest? \"+ printbest);\n\tSystem.out.println(\"Pop: \"+c.populationSize+\" | Max Gens: \"+ maxGenerations+ \"\\nPath: \"+c.path);\n\tSystem.out.println(\"randomThicknessRange :\"+c.randomThicknessRange+\" randomVelocityRange :\"+c.randomVelocityRange);\n\tSystem.out.println(\"AddSubRange H :\"+c.addSubRangeH+\" VS :\"+c.addSubRangeVS);\n\tSystem.out.println(\"divMultRange H :\"+c.divMultRangeH+\" VS :\"+c.divMultRangeVS);\n\tSystem.out.println(\"Threshold ? \"+c.useThreshold+\" : \"+c.zThreshold);\n\t}", "private ConfigProperties parsePropertiesFile(final String propertiesFile) {\n properties = ConfigFactory.getInstance().getConfigPropertiesFromAbsolutePath(propertiesFile);\n return properties;\n }", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public PropertiesDocument() {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n\t\t\tthis.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Exception with default configuration\n\t\t\te.printStackTrace();\n\t\t}\n this.properties = new Properties();\n\t}", "private static synchronized void initialize(String prop) {\n\t\tFileInputStream is=null;\n\t\tproperties = new Properties();\n\t\ttry {\n\t\t\tis = new FileInputStream(prop);\n\t\t\tif (is == null) {\n\t\t\t System.out.println(\"The prop is null.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tproperties.load(is);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t System.out.println(\"properties loading fails.\");\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\tfinally{\n\t\t\t\ttry{\n\t\t\t\t\tif(is!=null)\n\t\t\t\t\t\tis.close();\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex){\n\t\t\t\t System.out.println(\"properties loading fails for runtime exception.\");\n\t\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t}\n\t}", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "public static void main(String[] args) {\n\t\tpublic static CfgSingletonfactory getpropertiesfromFile() {\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private Properties loadPropertiesFile(String file) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(file);\n\t\t\tif (fis != null) {\n\t\t\t\tProperties props = new Properties();\n\t\t\t\tprops.load(fis);\n\t\t\t\treturn props;\n\t\t\t}\n\t\t\tSystem.err.println(\"Cannot load \" + file\n\t\t\t\t\t+ \" , file input stream object is null\");\n\t\t} catch (java.io.IOException ioe) {\n\t\t\tSystem.err.println(\"Cannot load \" + file + \", error reading file\");\n\t\t}\n\t\treturn null;\n\t}", "protected SftpPropertyLoad(final String bundleFileName) {\n\n\t\tthis.bundleFileName = bundleFileName;\n\n\t\tfinal Resource res = new ClassPathResource(StringUtil.replace(bundleFileName, \".\", \"/\") + \".properties\");\n\t\tfinal EncodedResource encodedResource = new EncodedResource(res, \"UTF-8\");\n\n\t\ttry {\n\t\t\tprops = PropertiesLoaderUtils.loadProperties(encodedResource);\n\t\t} catch (IOException e) {\n\t\t\tthrow new WebRuntimeException(e);\n\t\t}\n\t}", "public static Properties loadProperties(String file) throws Exception {\n Properties props = new Properties();\n props.load(new FileInputStream(file));\n\n return props;\n }", "public void setupProp() {\r\n\t\tprop = new Properties();\r\n\t\tInputStream in = getClass().getResourceAsStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(in);\r\n\t\t\tFileInputStream fin = new FileInputStream(\"C:/Users/Marcus/git/EmailProgram/EmailProgram/resources/config.properties\");\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fin);\r\n\t\t\tdblogic = (PatronDBLogic) ois.readObject();\r\n\t\t\tois.close();\r\n\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private PropertiesUtils() {}", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}", "public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }", "public void load(String fileName)\n throws FileNotFoundException, IOException, MissingRequiredTestPropertyException\n {\n\t\tinitializeTestProperties(new BufferedInputStream(new FileInputStream(fileName)));\n\t}", "public Server(String propertiesFile) throws IOException\n {\n Properties properties = new Properties();\n FileInputStream input = new FileInputStream(propertiesFile);\n properties.load(input);\n port = Integer.parseInt(properties.getProperty(\"port\"));\n socket = new ServerSocket(port);\n System.out.println(\"Server ready for client\");\n while(true)\n {\n new ServerConnection(socket.accept()).start();\n }\n }", "public BaseTest() {\n\t\t\n\t\tprop= new Properties();\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fle= new FileInputStream(\"C:\\\\Users\\\\19175\\\\eclipse-workspace\\\\com.toyota\\\\src\\\\test\\\\java\\\\Config\\\\config.properties\"); // Path of the Properties file\n\t\t\tprop.load(fle);\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 static Properties getProperties(String filename)\r\n/* 13: */ {\r\n/* 14:26 */ Properties properties = new Properties();\r\n/* 15: */ try\r\n/* 16: */ {\r\n/* 17:29 */ properties.load(new FileInputStream(System.getProperty(\"user.dir\") + \"/properties/\" + filename));\r\n/* 18: */ }\r\n/* 19: */ catch (IOException ex)\r\n/* 20: */ {\r\n/* 21:31 */ logger.error(\"Can't load properties file: \" + filename, ex);\r\n/* 22: */ }\r\n/* 23:33 */ return properties;\r\n/* 24: */ }", "public static Properties file2Properties(File file) {\r\n Properties props = new Properties();\r\n FileInputStream stream = null;\r\n InputStreamReader streamReader = null;\r\n\r\n\r\n try {\r\n stream = new FileInputStream(file);\r\n streamReader = new InputStreamReader(stream, charSet);\r\n props.load(streamReader);\r\n } catch (IOException ex) {\r\n Logger.getLogger(RunProcessor.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return props;\r\n }", "@PostConstruct\n\tpublic void loadProperties() {\n\t\tproperties.put(PropertyKey.TRANSLATION_FILE_STORE, \"C:\\\\development\\\\projects\\\\mega-translator\\\\store\");\n\t}", "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}", "public static void loadProperties(Properties p, String fileName)throws IOException {\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL f = classLoader.getResource(fileName);\n FileInputStream fr = new FileInputStream(new File(fileName));\n p.load(fr);\n fr.close();\n }", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}" ]
[ "0.72141945", "0.71819913", "0.6964761", "0.69357795", "0.69082487", "0.69056374", "0.684836", "0.6822056", "0.6821428", "0.6805294", "0.67848355", "0.6782666", "0.678217", "0.6766987", "0.6761451", "0.6740497", "0.672405", "0.67189234", "0.6708527", "0.6703886", "0.6700983", "0.6641149", "0.6622186", "0.66213155", "0.6607896", "0.6584558", "0.65695167", "0.6535987", "0.6516417", "0.6509981", "0.64754856", "0.6436417", "0.64277947", "0.6402788", "0.63949895", "0.63887167", "0.638068", "0.6372397", "0.63687855", "0.63646895", "0.63590336", "0.635295", "0.6351491", "0.63337696", "0.63248086", "0.63220096", "0.6291592", "0.6283011", "0.62670654", "0.62454766", "0.6243142", "0.6241856", "0.622539", "0.6210562", "0.6187585", "0.61864716", "0.6181159", "0.61704135", "0.6150788", "0.61448497", "0.6137016", "0.6133543", "0.6120914", "0.6097113", "0.609188", "0.60804677", "0.6077622", "0.6073097", "0.6042466", "0.6024296", "0.6023418", "0.602025", "0.60145956", "0.59985006", "0.59888947", "0.5988698", "0.59865916", "0.5982994", "0.5980098", "0.5965827", "0.59579617", "0.5954203", "0.5946334", "0.594022", "0.5927125", "0.59252954", "0.5917125", "0.59156907", "0.59133893", "0.59106374", "0.59093565", "0.59083766", "0.5901694", "0.5897052", "0.58943933", "0.5876637", "0.5867461", "0.5864637", "0.5863118", "0.58418447", "0.58401656" ]
0.0
-1
Helper to fast filter the map.
public MapFilter<T> filter(String prefix) { // Wrap me in a new filter. return new MapFilter<>(this, prefix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void filterMapExample() {\n List<String> result = createPeople()\n .stream()\n .filter(predicate)\n .map(Person::getName)\n .map(String::toUpperCase)\n .collect(Collectors.toUnmodifiableList());\n print.accept(result);\n }", "void filterOptions(FsItem f, Map<String, Object> map);", "@Test\n public void testCoh3710_entrySetFilter()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet(AlwaysFilter.INSTANCE).iterator();\n validateIndex(cache);\n\n assertFalse(iter.hasNext());\n }\n });\n }", "public void filterBy(Map<String, List<String>> queryMap) {\n }", "public abstract void filter();", "public void showMapFilters() {\n filterPane.getChildren().clear();\n }", "MapComp<K, V> removeAll(Predicate<K> p);", "boolean doFilter() { return false; }", "public static WFJFilterMap[] findFilterMaps() {\n return filterMaps.asArray();\n }", "KTable<K, V> filter(Predicate<K, V> predicate);", "@Override\n public void filter(BoundingBox3d bounds) {\n filter = new boolean[points.size()];\n for (int i = 0; i < filter.length; i++)\n filter[i] = bounds.contains(points.get(i).xyz);\n }", "@Override\n\tpublic void printFilteredMap() {\n\t\tthis.result.forEach((k, v )-> v.forEach((ke,ve) -> ve.forEach((s) -> System.out.println(k + \" : \"+ ke + \" : \"+ s))));\n\n\t}", "public boolean matchFilter(Map<String,String> filter);", "KTable<K, V> filterOut(Predicate<K, V> predicate);", "protected Map<String, DataFilter> getFilterMap(Collection<? extends String> keys)\r\n {\r\n Map<String, DataFilter> filterMap = New.map();\r\n for (String key : keys)\r\n {\r\n filterMap.put(key, myToolbox.getDataFilterRegistry().getLoadFilter(key));\r\n }\r\n return filterMap;\r\n }", "public MapComp<K, V> removeAll(Predicate<K> p) {\n return new MapBST<K, V>(this.bst.removeAll(i -> p.test(i.left)));\n }", "Map<String, String> getFilters();", "@Override\n public void adjustFilter(int key_min, int key_max) {\n //do nothing\n }", "private ListMap<String, String> slurpFilters(final File vcf) {\n final ListMap<String, String> map = new ListMap<>();\n final VCFFileReader in = new VCFFileReader(vcf, false);\n for (final VariantContext ctx : in) {\n if (ctx.isNotFiltered()) continue;\n for (final String filter : ctx.getFilters()) {\n map.add(ctx.getID(), filter);\n }\n }\n in.close();\n return map;\n }", "Map<String, Object> getFilterScratchpad();", "public boolean fitsCriteria(Map<String, String> filter){\n return mutableSegmentController.fitsFilterCriteria(filter);\n }", "static private Map<Object, Object> stripNonKeys(Object hints) {\n if (hints == null) {\n return null;\n }\n @SuppressWarnings(\"unchecked\")\n Map<Object, Object> filtered = (Map) hints;\n for (final Iterator it=hints.keySet().iterator(); it.hasNext();) {\n final Object key = it.next();\n if( key instanceof Stirng){\n \t// not formal\n if (filtered == hints) {\n // Copies the map only if needed.\n filtered = new HashMap<Object, Object>(filtered);\n }\n filtered.remove(key);\n }\n }\n return filtered;\n\t}", "private void applyFilters() {\n Task task = new Task() {\n @Override\n public Object call() {\n long start = System.currentTimeMillis();\n System.out.println(\"Applying filters! \" + filterList.size());\n filteredRowItemList = fullCustomerRowItemList;\n for (CustomerListFilter eachFilter : filterList) {\n eachFilter.setCustomerList(filteredRowItemList);\n filteredRowItemList = eachFilter.run();\n }\n System.out.println(\"Filtering took : \" + (System.currentTimeMillis() - start) + \" ms\");\n searchResultsTable.setItems(filteredRowItemList);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n return null;\n }\n };\n task.run();\n }", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "private void cargarFiltros(Map<String, String> filters)\r\n/* 81: */ {\r\n/* 82:107 */ filters.put(\"numero\", String.valueOf(getDimension()));\r\n/* 83: */ }", "public void filterPoint(FPointType fpt) {\n for (Iterator<TransformLayer> itr = tLayerPool.values().iterator(); itr.hasNext(); )\n itr.next().filterPoint(fpt);\n }", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "protected Map<String, DataFilter> getFilterMap()\r\n {\r\n return getFilterMap(getQueryableDataTypeKeys());\r\n }", "public static void filterMap(final String testString) {\n\n // filter\n if (testString != null && testString.contains(\"Hello\")) {\n System.out.println(testString);\n }\n Optional.ofNullable(testString).filter(s -> s.contains(\"Hello\")).ifPresent(System.out::println);\n\n\n // map\n if (testString != null) {\n String trimmed = testString.trim();\n if (trimmed.length() > 0)\n System.out.println(trimmed);\n }\n Optional.ofNullable(testString).map(String::trim).filter(s -> s\n .length() > 0).ifPresent(System.out::println);\n }", "public MapFilter(Properties p, String prefix) {\n // Properties extends HashTable<Object,Object> so it implements Map.\n // I need Map<String,T> so I wrap it in a HashMap for simplicity.\n // Java-8 breaks if we use diamond inference.\n this(new HashMap<>((Map) p), prefix);\n }", "final void updateMsdtFilterMap() {\r\n\r\n logger.entering(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n\r\n String filterExpression = \"\";\r\n\t\t\r\n\t\tfor (MicroSensorDataType msdt : this.chkMsdtSelection.keySet()) {\r\n JCheckBox chkBox = this.chkMsdtSelection.get(msdt);\r\n\r\n this.msdtFilterMap.remove(msdt);\r\n\r\n if (chkBox.isSelected()) {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.FALSE);\r\n\t\t\t\t// Compile new filter property string\r\n\t\t\t\tfilterExpression += (filterExpression.length() == 0 ? \"\" : \",\") + msdt.getName();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.TRUE);\r\n\r\n\t\t\t}\r\n }\r\n\t\t\r\n\t\t// set the new value of the filter property\r\n\t\ttry {\r\n\t\t\tthis.getModuleProperty(BLOCKER_PROPERTY).setValue(filterExpression);\r\n\t\t} catch (ModulePropertyException e) {\r\n\t\t\tlogger.log(Level.WARNING, \"The filter module is supposed to support the property \" + BLOCKER_PROPERTY);\r\n\t\t}\r\n\t\t\t\r\n\r\n logger.exiting(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n }", "@Override\r\n\tpublic Integer countFiltering(Map<String, Object> map) {\n\t\treturn filteringMapper.countFiltering(map);\r\n\t}", "public static <K, V> void fastForEach(Reference2ObjectMap<K, V> map, Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 70 */ ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 71 */ if (entries instanceof Reference2ObjectMap.FastEntrySet) {\n/* 72 */ ((Reference2ObjectMap.FastEntrySet)entries).fastForEach(consumer);\n/* */ } else {\n/* 74 */ entries.forEach(consumer);\n/* */ } \n/* */ }", "public void testListFilters() {\r\n boolean[] types = {true,true,false}; // Types 1 and 2.\r\n List<InfoNode> filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 2);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n\r\n types[2] = true; // Types 1, 2 and 3.\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 3);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertTrue(filteredList.contains(node3));\r\n\r\n types[0] = false; types[1] = false; types[2] = false;\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.isEmpty());\r\n assertFalse(filteredList.contains(node1));\r\n assertFalse(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n }", "public static void main(String[] args) {\n Map<Integer, Integer> conMap = new HashMap<>();\n for(int i = 1; i < 1000000 ; i ++){\n conMap.put(i,i);\n }\n\n// Thread thread1 = new Thread(() -> {\n// while(true) {\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// entry.getKey();\n// }\n// }\n// });\n// thread1.start();\n//\n// Thread thread2 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n// });\n// thread2.start();\n\n Thread thread3 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n Iterator<Map.Entry<Integer,Integer>> iterator = conMap.entrySet().iterator();\n while(iterator.hasNext()){\n iterator.next();\n iterator.remove();\n }\n });\n thread3.start();\n }", "public static <K, V> Map<K, V> filterMap(Map<K, V> inputMap, Set<K> keysToReturn) {\n\t\tMap<K, V> returnMap = new HashMap<K, V>();\n\t\tfor (K key : keysToReturn) {\n\t\t\tif (inputMap.containsKey(key))\n\t\t\t\treturnMap.put(key, inputMap.get(key));\n\t\t}\n\t\treturn returnMap;\n\t}", "public abstract boolean lambda$size$0$MediaFormat$FilteredMappedKeySet(String str);", "protected Map<String, String> getFilter() {\n\t\tMap<String, String> filterMap = new HashMap<String, String>();\n\t\tfilterMap.clear();\n\t\tString filterGrade = \"\";\n\t\tString elemGrade=\"\";\n\t\t\n\t\tString eleGrade = getSelectedFilter(eleGradePanelUc);\n\t\tif (!eleGrade.isEmpty()) {\n\t\t\tfilterGrade+=eleGrade;\n\t\t}\n\t\tString midGrade = getSelectedFilter(middleGradePanelUc);\n\t\tif (!midGrade.isEmpty()) {\n\t\t\tif(filterGrade.equals(\"\")){\n\t\t\t\tif(elemGrade.isEmpty()){\n\t\t\t\t\tfilterGrade+=midGrade;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tfilterGrade+=\",\"+midGrade;\n\t\t\t}\n\t\t}\n\t\tString highGrade = getSelectedFilter(highrGradePanelUc);\n\t\tif (!highGrade.isEmpty()) {\n\t\t\tif(filterGrade.equals(\"\")){\n\t\t\t\tfilterGrade+=highGrade;\n\t\t\t}else{\n\t\t\t\tfilterGrade+=\",\"+highGrade;\n\t\t\t}\n\t\t}\n\t\tif(filterGrade!=null && !filterGrade.equals(\"\")){\n\t\t\tfilterMap.put(IsSearchView.GRADE_FLT, filterGrade);\n\t\t}\n\t\tString selectedSubject = getSelectedFilter(subjectPanelUc, \"~~\");\n\t\tif (!selectedSubject.isEmpty()) {\n\t\t\tfilterMap.put(IsSearchView.SUBJECT_FLT, selectedSubject);\n\t\t}\n\t\treturn filterMap;\n\t}", "private static Map<String, String> filterAttributes(Map<String, String> attributes, List<String> forbidden){\n Map<String, String> filtered = new HashMap<>();\n for(String key : attributes.keySet()){\n boolean forb = false;\n for(String f : forbidden){\n if(f.equals(key)){ //filter attributes\n forb = true;\n }\n if(f.startsWith(key)){ //filter sub attributes\n forb = true;\n }\n }\n if(!forb){\n filtered.put(key, attributes.get(key));\n }\n }\n return filtered;\n }", "boolean isPreFiltered();", "public Boolean filter(Entry e) {\n\t\t//TODO you will need to implement this method\n\t\treturn false;\n\t}", "public List<Group> getFilteredGroups(Map<String, Object> map);", "@ThreadSafe\n interface KeyFilter<K> {\n\n public static final KeyFilter LOAD_ALL_FILTER = new KeyFilter() {\n @Override\n public boolean shouldLoadKey(Object key) {\n return true;\n }\n };\n\n boolean shouldLoadKey(K key);\n }", "@FXML\r\n void filterTableResult(KeyEvent event) {\r\n \tfilteredData.clear();\r\n\r\n for (twinsTable p : playerInfo) {\r\n if (matchesFilter(p)) {\r\n filteredData.add(p);\r\n }\r\n }\r\n\r\n // Must re-sort table after items changed\r\n reapplyTableSortOrder();\r\n }", "@Test\n public void testFilterStudent() {\n System.out.println(\"filterStudent\");\n HashMap<String, Student> result = new HashMap<>();\n School instance = new School();\n\n result.put(student1.getId(), student1);\n result.put(student2.getId(), student2);\n result.put(student3.getId(), student3);\n instance.setStudents(students);\n\n assertEquals(result, instance.filterStudent(\"\", students));\n assertEquals(result, instance.filterStudent(\" \", students));\n System.out.println(\"PASS with null filter\");\n\n result.remove(student1.getId());\n result.remove(student2.getId());\n assertEquals(result, instance.filterStudent(\"Hong\", students));\n System.out.println(\"PASS with name field\");\n\n result.put(student1.getId(), student1);\n result.put(student2.getId(), student2);\n assertEquals(result, instance.filterStudent(\"@\", students));\n assertEquals(result, instance.filterStudent(\"0909090909\", students));\n assertEquals(result, instance.filterStudent(\"08-0808-0808\", students));\n System.out.println(\"PASS with other fields\");\n\n result.clear();\n assertEquals(result, instance.filterStudent(\"qwerty\", students));\n System.out.println(\"PASS with not-found filter\");\n\n System.out.println(\"PASS ALL\");\n }", "public void pleitegeierSperren() {\n kontoMap.values().stream()\n .filter(konto -> konto.getKontostand() < 0)\n .forEach(Konto::sperren);\n }", "protected void setFilterInMapChanged() {\n rowCount = null;\n }", "public abstract Filter<T> filter();", "FeatureHolder filter(FeatureFilter filter);", "Map<String, String> findAllInMap();", "private void jobFilter_32_RunSubsequent() {\r\n\r\n//\t\tfinal long start = System.nanoTime();\r\n\r\n\t\tfinal boolean isGPSFilter = _imageFilterGPS == PhotoFilterGPS.WITH_GPS;\r\n\t\tfinal boolean isNoGPSFilter = _imageFilterGPS == PhotoFilterGPS.NO_GPS;\r\n\t\tfinal boolean isTourFilter = _imageFilterTour == PhotoFilterTour.WITH_TOURS;\r\n\t\tfinal boolean isNoTourFilter = _imageFilterTour == PhotoFilterTour.NO_TOURS;\r\n\r\n\t\tfinal boolean isFilterSet = isGPSFilter || isNoGPSFilter || isTourFilter || isNoTourFilter;\r\n\r\n\t\t// get current dirty counter\r\n\t\tfinal int currentDirtyCounter = _jobFilterDirtyCounter;\r\n\r\n\t\tPhoto[] newFilteredPhotos = null;\r\n\r\n\t\tif (isFilterSet) {\r\n\r\n\t\t\tfinal int numberOfPhotos = _allPhotos.length;\r\n\t\t\tfinal Photo[] tempFilteredPhotos = new Photo[numberOfPhotos];\r\n\r\n\t\t\t// filterindex is incremented when the filter contains a gallery item\r\n\t\t\tint filterIndex = 0;\r\n\t\t\tint photoIndex = 0;\r\n\r\n\t\t\t// loop: all photos\r\n\t\t\tfor (final Photo photo : _allPhotos) {\r\n\r\n\t\t\t\tif (_filterJobIsCanceled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean isPhotoInFilterGps = false;\r\n\t\t\t\tboolean isPhotoInFilterTour = false;\r\n\r\n\t\t\t\tif (photo.isExifLoaded) {\r\n\r\n\t\t\t\t\tfinal boolean isPhotoWithGps = _isLinkPhotoDisplayed\r\n\t\t\t\t\t\t\t? photo.isLinkPhotoWithGps\r\n\t\t\t\t\t\t\t: photo.isTourPhotoWithGps;\r\n\r\n\t\t\t\t\tif (isGPSFilter) {\r\n\t\t\t\t\t\tif (isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else if (isNoGPSFilter) {\r\n\r\n\t\t\t\t\t\tif (!isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// no gps filter\r\n\r\n\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// no gps filter\r\n\r\n\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinal boolean isSavedInTour = photo.isSavedInTour;\r\n\r\n\t\t\t\tif (isTourFilter) {\r\n\t\t\t\t\tif (isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (isNoTourFilter) {\r\n\r\n\t\t\t\t\tif (!isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// no tour filter\r\n\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isPhotoInFilterGps && isPhotoInFilterTour) {\r\n\r\n\t\t\t\t\ttempFilteredPhotos[filterIndex] = _allPhotos[photoIndex];\r\n\r\n\t\t\t\t\tfilterIndex++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tphotoIndex++;\r\n\t\t\t}\r\n\r\n\t\t\t// remove trailing array items which are not set\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(tempFilteredPhotos, filterIndex);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// a filter is not set, display all images but load exif data which is necessary when filtering by date\r\n\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(_allPhotos, _allPhotos.length);\r\n\t\t}\r\n\r\n\t\t// check sorting\r\n//\t\tif (_initialSorting != _currentSorting) {\r\n//\r\n//\t\t\t/*\r\n//\t\t\t * photo must be sorted because sorting is different than the initial sorting, this\r\n//\t\t\t * will sort only the filtered photo\r\n//\t\t\t */\r\n//\r\n\t\tArrays.sort(newFilteredPhotos, getCurrentComparator());\r\n//\t\t}\r\n\r\n\t\t/**\r\n\t\t * UI update must be run in a UI job because the update can be very long when many\r\n\t\t * (thousands) small images are displayed\r\n\t\t */\r\n\t\t_jobUIFilterPhoto = newFilteredPhotos;\r\n\r\n\t\tjobUIFilter_20_Schedule(0);\r\n\r\n\t\tif (_jobFilterDirtyCounter > currentDirtyCounter) {\r\n\r\n\t\t\t// filter is dirty again\r\n\r\n\t\t\tjobFilter_23_ScheduleSubsequentWithoutRunCheck();\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// clear progress bar\r\n\r\n\t\t\tjobUILoading_20_Schedule();\r\n\t\t}\r\n\r\n//\t\tfinal float timeDiff = (float) (System.nanoTime() - start) / 1000000;\r\n//\t\tSystem.out.println(\"filterJob_30_RunSubsequent:\\t\" + timeDiff + \" ms\\t\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n//\t\t// TODO remove SYSTEM.OUT.PRINTLN\r\n\t}", "public static Mapper filter(final Mapper mapper, @Nullable final Predicate<Statement> predicate) {\n if (predicate != null) {\n final Value[] empty = new Value[0];\n return new Mapper() {\n\n @Override\n public Value[] map(final Statement statement) throws RDFHandlerException {\n if (predicate.test(statement)) {\n return mapper.map(statement);\n } else {\n return empty;\n }\n }\n };\n } else {\n return mapper;\n }\n }", "FeatureHolder filter(FeatureFilter fc, boolean recurse);", "@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}", "@Override\n public boolean shouldFilter() {\n return true;\n }", "default boolean removeIf(LongPredicate filter) {\n/* 193 */ Objects.requireNonNull(filter);\n/* 194 */ boolean removed = false;\n/* 195 */ LongIterator each = iterator();\n/* 196 */ while (each.hasNext()) {\n/* 197 */ if (filter.test(each.nextLong())) {\n/* 198 */ each.remove();\n/* 199 */ removed = true;\n/* */ } \n/* */ } \n/* 202 */ return removed;\n/* */ }", "List<Map<String, String>> getFilteredDocuments(Map<String, Object> paramsMap);", "public static Map<String, String> cleanCriteria(Map<String, String> map) {\r\n return map.entrySet().stream().filter(entry -> StringUtils.isNotBlank(entry.getValue()))\r\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));\r\n }", "@Override\n protected SerializablePredicate<T> getFilter(Query<T, Void> query) {\n return Optional.ofNullable(inMemoryDataProvider.getFilter())\n .orElse(item -> true);\n }", "MapComp<K, V> removeAllPairs(BiPredicate<K, V> p);", "public MapComp<K, V> removeAllPairs(BiPredicate<K, V> p) {\n return new MapBST<K, V>(this.bst.removeAll(i -> p.test(i.left, i.right)));\n }", "public Map<Integer, Boolean> getFilter(Geometry geom) throws SQLException {\n return retrieveExpected(createNativeFilterStatement(geom), BOOLEAN);\n }", "public interface FilterOperation {\n\n boolean check(Map<String, String> values);\n}", "private boolean contain(Map<Double, Integer> map, double temp) {\n \tSet<Double> set = map.keySet();\r\n\t\tIterator<Double> it = set.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tdouble t = it.next();\r\n\t\t\tdouble tt = t-temp;\r\n\t\t\tif(Math.abs(tt)<0.0000001){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static void filter(final Set<Waypoint> waypoints, final GeocacheFilterContext filterContext) {\n\n final GeocacheFilter filter = filterContext.get();\n\n final boolean excludeWpOriginal = Settings.isExcludeWpOriginal();\n final boolean excludeWpParking = Settings.isExcludeWpParking();\n final boolean excludeWpVisited = Settings.isExcludeWpVisited();\n\n final List<Waypoint> removeList = new ArrayList<>();\n for (final Waypoint wp : waypoints) {\n final Geocache cache = DataStore.loadCache(wp.getGeocode(), LoadFlags.LOAD_CACHE_OR_DB);\n final WaypointType wpt = wp.getWaypointType();\n if (cache == null ||\n !filter.filter(cache) ||\n (excludeWpOriginal && wpt == WaypointType.ORIGINAL) ||\n (excludeWpParking && wpt == WaypointType.PARKING) ||\n (excludeWpVisited && wp.isVisited())) {\n removeList.add(wp);\n }\n }\n waypoints.removeAll(removeList);\n }", "private static void doParallelStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.parallelStream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doParallelStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "boolean hasSimpleMap();", "public static void filter() {\n\t\t\n\t\tResult.filter(toggleGroup.getSelectedToggle().getUserData(), ((ComboBox)hbox3.getChildren().get(0)).getValue());\n\t\t\n\t}", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "private static ImmutableMap<String, Object> filter(\n Map<String, Object> predeclared, StarlarkSemantics semantics) {\n ImmutableMap.Builder<String, Object> filtered = ImmutableMap.builder();\n for (Map.Entry<String, Object> bind : predeclared.entrySet()) {\n Object v = bind.getValue();\n if (v instanceof FlagGuardedValue) {\n FlagGuardedValue fv = (FlagGuardedValue) bind.getValue();\n if (fv.isObjectAccessibleUsingSemantics(semantics)) {\n v = fv.getObject();\n }\n }\n filtered.put(bind.getKey(), v);\n }\n return filtered.build();\n }", "@Override\n\t@TimeComplexity(\"O(s + log n)\")\n\tpublic Iterable<Entry<K, V>> subMap(K fromKey, K toKey){\n\t/* TCJ\n\t * Performs a binary search: log n\n\t * Scans through each index within binarysearch range: s \n\t */\n\t\treturn snapShot(findIndex(fromKey), toKey);\n\t}", "private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "boolean hasFiltered() {\n return filtered;\n }", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "private void filter(BufferedImageOp op)\n { \n if (image == null) return;\n BufferedImage filteredImage \n = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n op.filter(image, filteredImage);\n image = filteredImage;\n repaint();\n }", "public boolean shouldFilter() {\n return true;\n }", "protected FilterResults performFiltering(CharSequence prefix) {\n\t\t\tFilterResults results = new FilterResults();\n\t\t\t\n\t\t\t//Every time you type something, start from scratch\n\t\t\tcountries.clear();\n\t\t\tresults.values=null;\n\t\t\tcountries.addAll(countriesBackup);\n\n\t\t\t// No prefix is sent to filter by so we're going to send back the\n\t\t\t// original array\n\t\t\tif (prefix == null || prefix.length() == 0) {\n\t\t\t\tsynchronized (mLock) {\n\t\t\t\t\tLog.d(\"sf\", \"Size of data: \" + Integer.toString(countries.size()));\n\t\t\t\t\tLog.d(\"sf\", \"Size of databackup: \" + Integer.toString(countriesBackup.size()));\n\t\t\t\t\t\n\t\t\t\t\t//reset data\n\t\t\t\t\tresults.values = countriesBackup;\n\t\t\t\t\tresults.count = countriesBackup.size();\n\t\t\t\t\t\n\t\t\t\t\t//data.addAll(dataBackup);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsynchronized (mLock) {\n\n\t\t\t\t\t// Compare lower case strings\n\t\t\t\t\tString prefixString = prefix.toString().toLowerCase();\n\t\t\t\t\tfinal ArrayList<Country> filteredItems = new ArrayList<Country>();\n\t\t\t\t\t// Local to here so we're not changing actual array\n\t\t\t\t\tfinal ArrayList<Country> localItems = new ArrayList<Country>();\n\t\t\t\t\tlocalItems.addAll(countries);\n\n\n\t\t\t\t\tfinal int count = localItems.size();\n\n\t\t\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\t\t\tfinal Country item = localItems.get(i);\n\t\t\t\t\t\tfinal String itemName = item.getName().toString()\n\t\t\t\t\t\t\t\t.toLowerCase();\n\n\t\t\t\t\t\t// First match against the whole, non-splitted value\n\t\t\t\t\t\tif (itemName.contains(prefixString)) {\n\t\t\t\t\t\t\tfilteredItems.add(item);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t} /*\n\t\t\t\t\t\t * This is option and taken from the source of\n\t\t\t\t\t\t * ArrayAdapter final String[] words =\n\t\t\t\t\t\t * itemName.split(\" \"); final int wordCount =\n\t\t\t\t\t\t * words.length;\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * for (int k = 0; k < wordCount; k++) { if\n\t\t\t\t\t\t * (words[k].startsWith(prefixString)) {\n\t\t\t\t\t\t * newItems.add(item); break; } } }\n\t\t\t\t\t\t */\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set and return\n\t\t\t\t\tresults.values = filteredItems;\n\t\t\t\t\tresults.count = filteredItems.size();\n\t\t\t\t}// end synchronized\n\t\t\t}\n\n\t\t\treturn results;\n\t\t}", "public abstract List<Course> getByFilter(HashMap<String, String> filter);", "public void retain(\n\t\tPredicate<String>\tkeyFilter)\n\t{\n\t\tfor (String key : new ArrayList<>(pairs.keySet()))\n\t\t{\n\t\t\tif (!keyFilter.test(key))\n\t\t\t\tpairs.remove(key);\n\t\t}\n\t}", "private Set<String> getNames(Map<String, String> map) {\r\n\t\tSet<String> set = new HashSet<>();\r\n\t\t\r\n\t\tmap.forEach((k,v) -> set.add(k));\r\n\t\t\r\n\t\treturn Collections.unmodifiableSet(set);\r\n\t}", "public static class_34 method_624(Map var0) {\n if (var0 == null) {\n throw new NullPointerException(\"The predicate and closure map must not be null\");\n } else {\n class_34 var1 = (class_34)var0.remove((Object)null);\n int var2 = var0.size();\n if (var2 == 0) {\n return var1 == null ? class_243.method_597() : var1;\n } else {\n class_34[] var3 = new class_34[var2];\n APPARENTLY_REALLY_IMPORTANT[] var4 = new APPARENTLY_REALLY_IMPORTANT[var2];\n int var5 = 0;\n\n for(Iterator var6 = var0.entrySet().iterator(); var6.hasNext(); ++var5) {\n Entry var7 = (Entry)var6.next();\n var4[var5] = (APPARENTLY_REALLY_IMPORTANT)var7.getKey();\n var3[var5] = (class_34)var7.getValue();\n }\n\n return new class_264(false, var4, var3, var1);\n }\n }\n }", "public List<Group> getGroupsByFilter(Map<String, Object> map);", "public abstract void updateFilter();", "public final void clear() { _map.clear(); }", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public void filterByDataType(HashMap<String, String> filterTerms) {\n filterer.filterAirports(filterTerms, storage.getAirports());\n }", "public Set<Integer> checkAndFilter(Map<Integer, QuantDataset> quantDatasetToFilter) {\n this.updateQuantDatasetMap(quantDatasetToFilter);\n filtersSet.values().stream().forEach((filter) -> {\n filter.reset();\n });\n return filterSelectionUnit();\n\n }", "private void clearAllFilter() {\n }", "public static boolean validateFilterKeys(Map<String,String> filter)\n {\n if(filter == null)\n return false;\n\n if(filter.size() > 2)\n return false;\n\n if(filter.size() == 2 && filter.containsKey(SRTFilterKeys.PROGRAM_AREA_CODE) && filter.containsKey(SRTFilterKeys.REPORTING_FACILITY_ID))\n return true;\n else if(filter.size() == 2 && filter.containsKey(SRTFilterKeys.CONDITION_CODE) && filter.containsKey(SRTFilterKeys.REPORTING_FACILITY_ID))\n return true;\n else if(filter.size() == 2 && filter.containsKey(SRTFilterKeys.ORDERED_TEST_CODE) && filter.containsKey(SRTFilterKeys.REPORTING_FACILITY_ID))\n return true;\n else if(filter.size() == 1 && filter.containsKey(SRTFilterKeys.REPORTING_FACILITY_ID))\n return true;\n else\n return false;\n\n }", "public void filter(int idx, Set values) {\r\n Tuple[] newTuple = new Tuple[tupleCount];\r\n int ctra = 0;\r\n\r\n for (int i = 0; i < tupleCount; i++) {\r\n Tuple t = tuple[i];\r\n int value = (int) t.getValue(idx);\r\n\r\n if (values.contains(new Integer(value))) {\r\n newTuple[ctra] = t;\r\n ctra++;\r\n }\r\n }\r\n tuple = newTuple;\r\n tupleCount = ctra;\r\n }", "default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }", "@Override\n public Map<Long, Map<Long, Number>> getFilteredRatings(Map<Long, Map<Long, Number>> originalSet) {\n Map<Long, Map<Long, Number>> ret = new TreeMap<Long, Map<Long, Number>>();\n\n for (Map.Entry<Long, Map<Long, Number>> userRatings : originalSet.entrySet()) {\n Long idUser = userRatings.getKey();\n Map<Long, Number> userRatingsMap = userRatings.getValue();\n\n ret.put(idUser, new TreeMap<Long, Number>());\n for (Map.Entry<Long, Number> entry : userRatingsMap.entrySet()) {\n Long idItem = entry.getKey();\n Number rating = entry.getValue();\n ret.get(idUser).put(idItem, rating.doubleValue());\n }\n }\n return ret;\n }", "public void filterLocations(double rad, double centerlat, double centerlng) {\n Location center = new Location(\"Center\");\n center.setLatitude(centerlat);\n center.setLongitude(centerlng);\n Location point = new Location(\"Point\");\n\n // New arraylist of filter things.\n filtered = new ArrayList<DiscoverTile>();\n\n // For loop calculate straight line distance between each tile object in database and center.\n for (int i = 0; i < Test.size(); i++) {\n //Log.d(TAG, \"onMapDialogFragmentInteraction: Rad is \" + rad);\n point.setLatitude(Test.get(i).getLat());\n point.setLongitude(Test.get(i).getLng());\n float distance = center.distanceTo(point);\n //Log.d(TAG, \"onMapDialogFragmentInteraction: distance is \" + distance);\n if (distance <= rad) {\n // Test.get(i) is in the radius. Show selection.\n filtered.add(Test.get(i));\n }\n }\n\n // Create a new tile fragment (separate from disoverTileFragment) called filteredTileFragment,\n // which contains the filtered tiles.\n filteredTileFragment = new DiscoverTileFragment();\n TFmode = useFTF;\n\n Bundle bundle = new Bundle();\n bundle.putParcelableArrayList(\"KEY\", filtered);\n\n filteredTileFragment.setArguments(bundle);\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.discover_tilefragment, filteredTileFragment);\n //fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n\n\n }", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "public FilterBuilder setFilters(HashMap<FilterBy, String> hashmap){\n for ( Map.Entry e : hashmap.entrySet() ){\n instance.arguments.put(((FilterBy)e.getKey()).getFilterKey(), (String) e.getValue());\n }\n return this;\n }", "public List<Student> searchStudent(Map<String, String> map);", "@Override\r\n\t\t public boolean isResourceFiltered(Resource resource) {\n\t\t return \"pathmap\".equals(resource.getURI().scheme());\r\n\t\t }", "@Override\n public List<SupplierProdSuccessUsePerDay> selectByMap(Map map) {\n return mapper.selectByMap(map);\n }", "public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}" ]
[ "0.59517753", "0.5938754", "0.5816245", "0.5628316", "0.5617532", "0.55251175", "0.54939973", "0.54726166", "0.54643315", "0.5379356", "0.53667766", "0.5359793", "0.53481096", "0.53337026", "0.52959126", "0.52946013", "0.5284409", "0.526437", "0.52446276", "0.5235485", "0.5141843", "0.51347035", "0.5099103", "0.50805205", "0.50707155", "0.5058204", "0.5053462", "0.5039575", "0.50245583", "0.5023175", "0.50172865", "0.5016631", "0.49992576", "0.49980247", "0.49931043", "0.49660662", "0.49659944", "0.49542037", "0.49521896", "0.4926257", "0.49243137", "0.49230334", "0.49085188", "0.48854408", "0.4877785", "0.48555556", "0.48498446", "0.4846434", "0.48378316", "0.48348892", "0.4833586", "0.48259458", "0.47945446", "0.47935894", "0.47914577", "0.4789427", "0.47665727", "0.4764398", "0.47566557", "0.47533318", "0.47489765", "0.47458103", "0.47420335", "0.47359207", "0.47345084", "0.4704388", "0.470172", "0.46993348", "0.4696388", "0.46896517", "0.46814668", "0.46788535", "0.46604976", "0.46596906", "0.46532091", "0.46530882", "0.46501005", "0.4649629", "0.46440527", "0.46435198", "0.4637874", "0.4633392", "0.46313772", "0.4629486", "0.4619785", "0.46195748", "0.4617551", "0.46116793", "0.4611468", "0.46098146", "0.4607398", "0.46044978", "0.46040618", "0.45927978", "0.45922682", "0.45904118", "0.45870516", "0.4587029", "0.45811406", "0.45770374" ]
0.5717572
3
Is this key in me?
@Override public boolean containsKey(Object key) { return entries.containsKey(key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "public boolean hasKey() {\n Item[] items = getRoomContents();\n for (int i = 0; i < items.length; i++) {\n if (items[i].getDesc().equals(\"A shiny gold key.\")) {\n return true;\n }\n }\n return false;\n }", "public boolean containsKey(Key key) ;", "public Boolean isKey() {\n return this.key;\n }", "boolean hasKey(String key);", "boolean isKeyInCache(Object key);", "boolean hasContKey();", "boolean containsKey(CoreLabel key);", "boolean containsKey(long key);", "public boolean hasKey() {\n return key_ != null;\n }", "public boolean inStorage(String key);", "boolean hasAuthKey();", "@Override\n\tpublic boolean containsKey(Object arg0) {\n\t\treturn false;\n\t}", "public boolean containsKey(String key);", "public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}", "public abstract boolean containsKey(K key);", "boolean containsInfo(\n int key);", "boolean hasCompoundKey();", "public boolean existsKey(String inKey);", "public abstract boolean lookup(Key key);", "public boolean is (String key) { return options.is (key); }", "public boolean contains(Key key);", "@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}", "public void hasKey() {\n\t\tif (checkKey(Integer.parseInt(getCurrentPositionX()),Integer.parseInt(getCurrentPositionY()))) {\n\t\t\tDisplay.setKey(\"Yes\");\n\t\t\tDisplay.setMessage(\"You have found a key! Try to go through a house!\");\n\t\t}\n\t}", "protected abstract boolean isForUser(@NonNull K key, int userId);", "boolean containsKey(K key);", "boolean containsKey(K key);", "boolean containsKey(String keyLabel);", "public boolean hasKey() {\n return keyBuilder_ != null || key_ != null;\n }", "public Boolean isKeyInMap() {\n questionFourAnswer = \"Brunch\";\n\t\treturn hashMap.containsKey(questionFourAnswer);\n\t}", "public boolean containsKey(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\treturn slot >= 0;\r\n\t}", "public boolean isSmartKey(String key);", "public boolean contains(long key){\n for (int i = 0; i < numKeys; i++){\n if (keys[i].key == key){\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn false;\n\t}", "boolean hasRandomKey();", "public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }", "public boolean hasKeys();", "public boolean hasKey() {\n return result.hasKey();\n }", "public boolean hasKey() {\n return result.hasKey();\n }", "public boolean hasKey() {\n return result.hasKey();\n }", "public boolean hasKey() {\n return result.hasKey();\n }", "public boolean hasKey() {\n return result.hasKey();\n }", "public boolean hasKey() {\n return result.hasKey();\n }", "private boolean pluginIsAwareOf(ApplicationUser user, SshKey inspectedKey) {\n SshKeyEntity knownKey = enterpriseKeyRepository.findSingleUserKey(user);\n return null != knownKey && knownKey.getText().equals(inspectedKey.getText());\n }", "public boolean containsKey(int key) {\n return getElement(key) != null;\n }", "public boolean containsKey(K theKey) {\n\t\tboolean result = false;\n\t\tint index = hash(theKey);\n\t\t\tfor (WordCode<K, V> wc : myBuckets.get(index)) {\n\t\t\t\tif (wc.myKey.equals(theKey)) result = true;\n\t\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}", "boolean hasCdkey();", "public boolean isKeyInMap(String key) {\r\n\t\treturn wikiList.containsKey(key);\r\n\t}", "public boolean containsKey(String key) {\n \treturn (getNode(key) != null);\n }", "public static Boolean isContains(String key){\r\n return scenarioContext.containsKey(key.toString());\r\n }", "public boolean containsKey(String s){\r\n return this.get(s) != 0;\r\n }", "boolean contains(KeyType key);", "public boolean isSetKey() {\n return this.key != null;\n }", "final boolean hasKey(final E key) {\r\n for (int i=0;i<kcount;i++) {\r\n if (equal(key, (E)k[i])) return true;\r\n }\r\n return false;\r\n }", "public boolean existInItinerary() {\n\t\t\n\t\tlong position = mPref.getLong(\"KEY_DATA_POSITION\", 0);\n\t\t\n\t\tif (mPref.contains(\"USER_DATA_\" + position)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean containsKey(K key) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n Node targetNode = data[hash];\r\n while (targetNode != null) {\r\n if (targetNode.key == key || targetNode.key.equals(key)) {\r\n return true;\r\n }\r\n targetNode = targetNode.next;\r\n }\r\n return false;\r\n }", "@Override\n public boolean containsKey(Object key) {\n LinkedList<Entry> tempBucket = chooseBucket(key);\n \n for(int i=0;i<tempBucket.size();i++) {\n \t\tEntry tempEntry = tempBucket.get(i);\n \t\t\n \t\tif(tempEntry.getKey() == key) {\n \t\t\treturn true;\n \t\t}\n \t}\n \n return false;\n }", "boolean isAssociative();", "boolean isTypeKey(String key);", "boolean containsKey(Object key) throws NullPointerException;", "public boolean checkKey(int y, int x) {\n\t\treturn Tile.getTile(x,y).hasObjectKey();\n\t}", "public boolean containsKey(Object key) {\r\n\t\tif (key == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex] == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex];\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\r\n\t\treturn false;\r\n\t}", "boolean hasKey(String collection, String hkey);", "public boolean containsKey(Comparable key) { return this.store.containsKey(key); }", "public boolean containsKey(DNA key){\n Node actual_node = this.getReference(key);\n\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> buscando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n int reference_page = actual_node.getReference(), hash = key.hashCode();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n boolean res = false;\n\n while(true) {\n int cant = content.get(0);\n\n for(int i=1; i<=cant; i++) {\n if(content.get(i) == hash) {\n res = true;\n }\n }\n\n if(res)\n break;\n\n if(content.size() != B)\n break;\n\n reference_page = content.get(B-1);\n content = this.fm.read(reference_page); this.in_counter++;\n\n }\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> cadena encontrada: \" + res);\n\n return res;\n }", "private boolean contains(String key) {\n return contains(dict, key);\n }", "@Override\n public boolean contains(String key) {\n if (key == null || key.length() == 0 || root == null)\n return false;\n Node p = root;\n for (int i = 0; i < key.length(); i++) {\n char current = key.charAt(i);\n Node next = p.next.get(current);\n if (next == null) {\n return false;\n }\n p = next;\n }\n return p.isKey;\n }", "boolean has(String key);", "public boolean isSetKey() {\n return this.key != null;\n }", "public boolean isSetKey() {\n return this.key != null;\n }", "public boolean isSetKey() {\n return this.key != null;\n }", "public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }", "public boolean containsKey(int key) {\r\n\t\ttry {\r\n\t\t\tthis.hashlock.readLock().lock();\r\n\t\t\tint index = index(key);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tint pos = (index / FREE.length);\r\n\t\t\t\tthis.claims.position(pos);\r\n\t\t\t\tthis.claims.put((byte) 1);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSDFSLogger.getLog().fatal(\"error getting record\", e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tthis.hashlock.readLock().unlock();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}", "boolean contains(String key);", "boolean contains(String key);", "@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}", "public boolean contains(String key) {\n\t\treturn serialNumber.contains(key);\n\t}", "public boolean containsKey(String n){\n\t\treturn name.containsKey(n);\n\t}", "public boolean contains(String key);", "public boolean contains(String key)\r\n { return get(key) != null; }", "public boolean hasMid() {\n return genClient.cacheHasKey(CacheKey.mid);\n }", "boolean containsKeyLocalOnHeap(Object key);", "@Override\n\t\t\tpublic boolean contains(String key) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n int size = al.size();\n for (int i = 0; i < size; ++i)\n {\n if (al.get(i) == key)\n {\n return true;\n }\n }\n return false;\n }\n }", "@Override\r\n\tpublic boolean exists(T key) {\r\n\t\treturn existsRec(raiz, key);\r\n\t}", "private boolean isPressed(KeyCode key) {\n \t\n return keys.getOrDefault(key, false);\n }", "public boolean contains(int key) {\n Entry tab[] = table;\n int index = (key & 0x7FFFFFFF) % tab.length;\n for (Entry e = tab[index]; e != null; e = e.next) {\n if (e.key == key) {\n return true;\n }\n }\n return false;\n }", "public boolean isContainedInSharedPreference(String key){\n return mSharedPreferences.contains(key);\n }", "boolean getKeyBox();", "public boolean containsKey(String key) {\n int keyBucket = hash(key);\n \n HashNode temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n return true;\n }\n temp = temp.next;\n }\n \n return false;\n }", "@Override\n public boolean containsKey(K key) {\n return containsKeyHelper(root, key);\n }", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}", "public boolean keyIsInUse(String regKey) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n return Meth.GetBool(MethodBase.GetCurrentMethod(), regKey);\n }\n \n String command = \"SELECT RegKey FROM registrationkey WHERE RegKey='\" + POut.string(regKey) + \"'\";\n DataTable table = db.getTable(command);\n return (table.Rows.Count > 0);\n }", "public boolean containsInfo(\n int key) {\n \n return internalGetInfo().getMap().containsKey(key);\n }", "public boolean contains(int key) {\n return s.contains(key);\n }" ]
[ "0.76190126", "0.76190126", "0.76190126", "0.76190126", "0.76190126", "0.7214978", "0.71227634", "0.7082379", "0.6960777", "0.6960164", "0.68734276", "0.6872517", "0.68439776", "0.6736861", "0.6721105", "0.6703632", "0.66687995", "0.66607416", "0.66490144", "0.6646442", "0.66406286", "0.66387844", "0.6584705", "0.6576385", "0.65749323", "0.6574261", "0.6567922", "0.6559638", "0.6553364", "0.65496707", "0.65496707", "0.65489185", "0.65385866", "0.6525518", "0.65251476", "0.64930797", "0.6474383", "0.64639866", "0.6452756", "0.6450453", "0.6449514", "0.64329076", "0.64329076", "0.64329076", "0.64329076", "0.64329076", "0.64329076", "0.64251155", "0.6423672", "0.642248", "0.64194024", "0.6417703", "0.6407267", "0.6397263", "0.639125", "0.6381733", "0.63659406", "0.636379", "0.6362016", "0.63455695", "0.6337727", "0.63334227", "0.6332894", "0.6331991", "0.63162744", "0.6313791", "0.6308849", "0.63078034", "0.6300504", "0.62934947", "0.6287187", "0.6250011", "0.6246968", "0.6246968", "0.6246968", "0.62391245", "0.6233164", "0.6233039", "0.61997676", "0.61997676", "0.61914265", "0.6188584", "0.61882585", "0.61809087", "0.61795866", "0.61751074", "0.61606425", "0.6156597", "0.61514205", "0.6141053", "0.61381006", "0.6136281", "0.6134074", "0.6129415", "0.61261725", "0.61253035", "0.6121998", "0.61211133", "0.6117689", "0.61141604" ]
0.62902313
70
Is this value in me.
@Override public boolean containsValue(Object value) { // Walk the values. for (Map.Entry<String, T> e : entries.values()) { if (value.equals(e.getValue())) { // Its there! return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isStoredInObject() {\r\n return lockValueStored == IN_OBJECT;\r\n }", "public boolean isValue() {\n return value;\n }", "public boolean isValue() {\n switch(this.getType()) {\n case CONSTANT_INTEGER : \n case CONSTANT_FLOAT :\n case CONSTANT_DOUBLE : \n case CONSTANT_LONG : \n case CONSTANT_STRING:\n return true ;\n default :\n return false;\n }\n }", "public boolean isValue() {\n return value;\n }", "boolean hasCustomValue();", "public boolean getMine() {\n return mine;\n }", "public boolean isActiveMember() {\n return member instanceof HumanMember || member instanceof AiMember;\n }", "public boolean isMine() {\r\n\t\treturn isMine;\r\n\t}", "private boolean isVal() {\n\t\treturn look.type == Tag.BOOLEAN || look.type == Tag.NUMBER\n\t\t\t\t|| look.type == Tag.STRING || look.type == Tag.NULL;\n\n\t}", "public boolean hasValue() {\n return value_ != null;\n }", "boolean isValue();", "public abstract boolean isMine();", "public boolean isSetValue() {\n return this.value != null;\n }", "public boolean isSetValue() {\n return this.value != null;\n }", "public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }", "public boolean checkIn(){\n return state.checkIn();\n }", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasMPValue();", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "public final boolean isOwner() {\n return currentOwner == this;\n }", "public boolean isInDataset() {\n\t\tfor (int i = 0; i < Dna.data.getStatements().size(); i++) {\n\t\t\tif (Dna.data.getStatements().get(i).getStatementTypeId() == this.getStatementTypeId() \n\t\t\t\t\t&& Dna.data.getStatements().get(i).getValues().get(this.variable).equals(this.value)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasValue() {\n return result.hasValue();\n }", "public boolean hasValue() {\n return result.hasValue();\n }", "public boolean checkIn()\r\n\t{\r\n\t\tif(this.status == 'B')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "boolean isMember();", "boolean hasVal();", "boolean hasVal();", "@Override\n\tpublic boolean is(Widget widget){\n\t\treturn (widget == this);\n\t}", "public boolean isValue() {\n return false;\n }", "public boolean hasValue() {\n return valueBuilder_ != null || value_ != null;\n }", "@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean getIsMine() {\r\n\t\treturn this.isMine;\r\n\t}", "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getActivePlayer());\n }", "public boolean hasImTrue() {\n return result.hasImTrue();\n }", "public boolean isPerPerson() {\n return perPerson;\n }", "public boolean isKnownValue() {\r\n\t\t\treturn isKnownValue;\r\n\t\t}", "public boolean isMember(T o)\n {\n return (objectSet.search(o) != null);\n }", "@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "boolean getValue();", "public boolean isThisThingOn(){\r\n return isActive;\r\n }", "public boolean isStoredInCache() {\r\n return lockValueStored == IN_CACHE;\r\n }", "public boolean containsValue(Object value) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "public boolean existInItinerary() {\n\t\t\n\t\tlong position = mPref.getLong(\"KEY_DATA_POSITION\", 0);\n\t\t\n\t\tif (mPref.contains(\"USER_DATA_\" + position)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasUser() {\n return instance.hasUser();\n }", "public boolean isHolder() {\n return holder;\n }", "public boolean isSetUserInfo() {\n return this.userInfo != null;\n }", "public boolean hasMeyou(String uid) {\n\t\tif(dataStore.getMaxChildId(FolderID.onRoot(uid)) > 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}", "boolean isSetWhoOwnsWhom();", "public boolean isTrue(PartialWorld w) {\n return (observedValue.equals(observedVar.getValue(w)));\n }", "public boolean isEntered();", "public boolean getValue();", "public boolean containsAnActor() {\n\t\treturn map.isAnActorAt(this);\n\t}", "public boolean hasValue() { return false; }", "boolean isSetValue();", "boolean isSetValue();", "public boolean isSetKin() {\n return this.kin != null;\n }", "public boolean isValue() {\n return TYPE != TokenType.OPERATOR;\n }", "public boolean isGivingInformation();", "public boolean isInEnv()\n {\n return environment().objectAt(location()) == this;\n }", "public boolean isOther() {\n\t\t\treturn this == OTHER;\n\t\t}", "Boolean getIndemnity();", "public isWithin() {\n\t\tsuper();\n\t}", "@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }", "boolean isValueLocked();", "@Override\r\n\tpublic boolean getIntentValue() {\n\t\treturn true;\r\n\t}", "public Boolean valid() {\n\t\treturn this.getMeasuredBy()!=null && this.getMeasuredBy().valid();\n\t}", "public boolean getInternal()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INTERNAL$4, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "boolean hasMentionedIn();", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isSetUser() {\n return this.user != null;\n }", "public boolean isInCombat() {\n return isInCombat;\n }", "public boolean evaluate() {\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// handle the case when this.getValue() is null\r\n\t\t\tif (this.getValue() == null) {\r\n\t\t\t\t// if the value is null, then we just need to see if expected evaluation is also null\r\n\t\t\t\treturn this.getCurrentEvaluation() == null;\r\n\t\t\t}\r\n\t\t\t// if entities have the same name, they are equals.\r\n\t\t\tif (this.getCurrentEvaluation().getName().equalsIgnoreCase(this.getValue().getName())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "public final boolean isValueLockedSetted() {\n\t\treturn engine.isPropertySetted(Properties.VALUE_LOCKED);\n\t}", "public boolean getAmAI()\n\t{\n\t\tif (myAmAI)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isValid() {\n return instance != null;\n }", "public boolean getCheckedIn(Booking b)\r\n {\r\n if(b == null)\r\n return false;\r\n \r\n return b.getCheckedIn();\r\n }", "public boolean isSetCustomValues() {\n return this.customValues != null;\n }", "public boolean isSetCustomValues() {\n return this.customValues != null;\n }", "public boolean isSetCustomValues() {\n return this.customValues != null;\n }", "public boolean isOccuped(){\n return this.occuped;\n }", "public static boolean isInBank(){\n return isInBank(Players.localPlayer());\n }", "private boolean satisfies(Instance inst) {\n\n if ((int) inst.value(m_attr) == m_val) {\n if (m_next == null) {\n\t return true;\n\t} else {\n\t return m_next.satisfies(inst);\n\t}\n }\n return false; \n }", "public boolean hasObjUser() {\n return objUser_ != null;\n }" ]
[ "0.6317208", "0.619321", "0.6189073", "0.618898", "0.61573905", "0.6112634", "0.6111261", "0.60751575", "0.60496837", "0.6017235", "0.59974176", "0.59802127", "0.5948645", "0.59385335", "0.59310424", "0.59170127", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.5909118", "0.58147985", "0.5791286", "0.57632774", "0.576113", "0.5753372", "0.5753372", "0.574446", "0.5740723", "0.5730585", "0.5730585", "0.5717318", "0.5712089", "0.5710976", "0.5684988", "0.5684188", "0.5683546", "0.56663364", "0.5662347", "0.5655899", "0.56553644", "0.56536156", "0.5645565", "0.562491", "0.56072265", "0.5607057", "0.56033933", "0.5601253", "0.5599236", "0.55972946", "0.55791795", "0.55780756", "0.55701864", "0.5562835", "0.55376214", "0.55310595", "0.5529424", "0.5523972", "0.5520329", "0.5519912", "0.5518393", "0.55067325", "0.5500023", "0.5500023", "0.54886526", "0.5481562", "0.54569566", "0.54550374", "0.54459", "0.5434766", "0.5430786", "0.54204506", "0.54195565", "0.54185104", "0.54153186", "0.5415199", "0.5403619", "0.5402048", "0.5402048", "0.54007375", "0.54004085", "0.539595", "0.53907037", "0.5389387", "0.5388068", "0.53824055", "0.53824055", "0.53824055", "0.5381403", "0.5379377", "0.53744245", "0.5373524" ]
0.0
-1
Get the referenced value if present.
@Override public T get(Object key) { return get(key, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getReferenceValue();", "@Override\n public Object getReferenced(Optional<?> reference) {\n return reference.orElse(null);\n }", "public Object get() {\n synchronized (lock) {\n if (!set) { throw new IllegalStateException(\"Reference has not been set\"); }\n\n return ref;\n }\n }", "public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public ValueOrRef readRef(Element element) {\n String ref = element.getTextContent();\n ValueOrRef defaultValueOrRef = DefaultValueOrRef.ref(null, ref, true);\n return defaultValueOrRef;\n }", "public final Object get() {\n return getValue();\n }", "Object getContainedValue();", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public PDFObject get (String key)\n {\n PDFObject value = getUnresolved (key);\n return value == null ? null : value.resolve ();\n }", "java.lang.String getRef();", "public E get(Object key) {\n WeakReference<E> weakRef = _obj2Ref.get(key);\n return weakRef != null ? weakRef.get() : null;\n }", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "@Nullable\n String getRef();", "public T getValue() {\n return casValue.getValue();\n }", "@UML(identifier=\"valueReference\", obligation=MANDATORY, specification=ISO_19143)\n ValueReference<? super R, ?> getValueReference();", "public /* @Nullable */ T getValue() {\n return value;\n }", "private static Object referenceValue(IDatatype type, Object value) {\n if (Reference.TYPE.isAssignableFrom(type)) {\n DisplayNameProvider nameProvider = DisplayNameProvider.getInstance();\n List<AbstractVariable> possibleDecls = ReferenceValuesFinder.findPossibleValues(\n de.uni_hildesheim.sse.qmApp.model.VariabilityModel.Configuration.INFRASTRUCTURE.getConfiguration()\n .getProject(), (Reference) type);\n for (int i = 0; i < possibleDecls.size(); i++) {\n AbstractVariable declaration = possibleDecls.get(i);\n String name = nameProvider.getDisplayName(declaration);\n if (name.equals(value)) {\n value = declaration;\n break;\n }\n }\n } \n return value;\n }", "String getReference();", "String getReference();", "public javax.xml.namespace.QName getReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getQNameValue();\n }\n }", "@JsonIgnore\r\n public String getReferenceId() {\r\n return OptionalNullable.getFrom(referenceId);\r\n }", "public Object getValue() {\n return element == null ? null : element.getValue();\n }", "public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }", "@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}", "public Object getValue() {\n\t\tif (present || isRequired()) {\t\t\t\n\t\t\treturn editorBinder.populateBackingObject();\n\t\t}\n\t\treturn null;\n\t}", "public @Nullable T getValue() {\n return this.value;\n }", "public Object get(Object key){\n\t\tNode tempNode = _locate(key);\r\n\t\tif(tempNode != null){\r\n\t\t\treturn tempNode._value;\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Object getValue() {\n if (_valueIndex <= 0)\n return null;\n return ((ConstantEntry) getPool().getEntry(_valueIndex)).getConstant();\n }", "public Object get()\n {\n return m_internalValue;\n }", "public Object getValue() { return _value; }", "@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}", "public java.lang.String getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$12);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "public Properties getValue() throws ContextInitializationException {\n PropertiesHolder propertiesRef = getReferencedProperties();\n if (propertiesRef != null) {\n return propertiesRef.getValue();\n }\n return null;\n }", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public Object getValue() { return this.value; }", "public Object getFetchedValue() {\n return fetchedValue;\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }", "default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }", "public V get( K key ) {\n WeakReference<V> valueRef = map.get( key );\n return valueRef == null ? null : valueRef.get();\n }", "public Object getValue() {\n\t\treturn object;\n\t}", "@Nullable\n private YAMLValue getVal() {\n return getKeyValue().getValue();\n }", "default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }", "public SoftReference getReference ()\r\n {\r\n return _reference;\r\n }", "Object getValueFrom();", "public AtomicReference<LocatableInquiry> getReferenceGroundItemInquiry();", "public Optional<String> getRefAllele() {\n return this.placement.getAlleles().stream()\n .map(p -> p.getAllele().getSpdi().getDeletedSequence())\n .findFirst();\n }", "public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }", "@Override\n\tpublic synchronized Value get(ILexNameToken field, boolean explicit)\n\t{\n\t\ttry\n\t\t{\n\t\t\tValue val = this.delayedCtxt.lookup(field,getOriginalSelf().objectReference);\n\t\t\tif (val != null)\n\t\t\t{\n\t\t\t\treturn val;\n\t\t\t}\n\t\t} catch (ContextException e)\n\t\t{\n\t\t\t// ignore if it wasnt there\n\t\t}\n\t\tValue v = super.get(field, explicit);\n\t\treturn delayedCtxt.wrapField(v, field,getOriginalSelf().objectReference);\n\t}", "public Object get(Object refName)\r\n {\r\n String key = String.valueOf(refName);\r\n if (isSafeMode() && key.indexOf('.') >= 0)\r\n {\r\n return null;\r\n }\r\n return this.context.get(key);\r\n }", "public abstract double getReference();", "public abstract double getReference();", "public String getRef() {\n return ref;\n }", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "public java.lang.String getReference() {\n return reference;\n }", "public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}", "public String getReference();", "public String getReference();", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}", "@Override\n public V getValue() {\n Object object = this.h;\n synchronized (object) {\n return this.a().getValue();\n }\n }", "@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public final String getReference() {\n return reference;\n }", "public int getValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getvalue\", getRefId());\n\t}", "public Object getValue()\n {\n\treturn value;\n }", "public Object getValue(){\n \treturn this.value;\n }", "final public Object getValue()\n {\n return getProperty(VALUE_KEY);\n }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Object getObject()\n {\n initialize();\n\n if (_invariant)\n return _cachedValue;\n\n return resolveProperty();\n }", "public S getValue() { return value; }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public T getValue() {\n if (mDependency == null)\n mDependency = new ReactorDependency();\n\n mDependency.depend();\n return mValue;\n }", "@SuppressWarnings(\"unchecked\")\n @Nullable\n public T getValue() {\n Object data = mData;\n if (data != NOT_SET) {\n return (T) data;\n }\n return null;\n }", "public Object getValue()\n {\n return value;\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "public Object getValue() {\r\n return value;\r\n }", "public String valueInTargetSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot();\n }", "public String getReference() {\n return reference;\n }", "public Object getValue() {\r\n return oValue;\r\n }", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "@Override\n public T getValue() {\n return entry.getValue().getValue();\n }" ]
[ "0.7228913", "0.7189698", "0.71802074", "0.68021524", "0.66517353", "0.63945687", "0.6354037", "0.62688583", "0.62580603", "0.6190723", "0.61795664", "0.61734194", "0.61681384", "0.61347336", "0.612298", "0.6119435", "0.60994446", "0.6086228", "0.60855854", "0.60855854", "0.6077202", "0.6030361", "0.6020332", "0.5999609", "0.59986603", "0.59973896", "0.59834695", "0.5980341", "0.59801966", "0.5976317", "0.5974645", "0.5971388", "0.596798", "0.59601617", "0.59601617", "0.59599394", "0.594433", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.5931325", "0.5928424", "0.5927208", "0.589817", "0.589613", "0.58943975", "0.5893512", "0.5891887", "0.5889371", "0.5883313", "0.5879433", "0.5878652", "0.58738166", "0.5860514", "0.5856353", "0.58514285", "0.5845457", "0.5845457", "0.5838511", "0.5837956", "0.5818022", "0.58117604", "0.58035403", "0.58035403", "0.58009064", "0.5800659", "0.57994324", "0.57970583", "0.57958233", "0.57925814", "0.57925814", "0.57828707", "0.5774162", "0.5767842", "0.57660794", "0.576008", "0.57589746", "0.57587665", "0.57587665", "0.57587665", "0.57587665", "0.57587665", "0.5758419", "0.57572055", "0.574904", "0.5747588", "0.573702", "0.5733981", "0.5730768", "0.57270455", "0.572678", "0.57226706", "0.57172036", "0.57150155", "0.57119465", "0.5703483", "0.5700304" ]
0.0
-1
Get the referenced value if present.
public T get(Object key, T dflt) { Map.Entry<String, T> e = entries.get((String) key); return e != null ? e.getValue() : dflt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getReferenceValue();", "@Override\n public Object getReferenced(Optional<?> reference) {\n return reference.orElse(null);\n }", "public Object get() {\n synchronized (lock) {\n if (!set) { throw new IllegalStateException(\"Reference has not been set\"); }\n\n return ref;\n }\n }", "public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public ValueOrRef readRef(Element element) {\n String ref = element.getTextContent();\n ValueOrRef defaultValueOrRef = DefaultValueOrRef.ref(null, ref, true);\n return defaultValueOrRef;\n }", "public final Object get() {\n return getValue();\n }", "Object getContainedValue();", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public PDFObject get (String key)\n {\n PDFObject value = getUnresolved (key);\n return value == null ? null : value.resolve ();\n }", "java.lang.String getRef();", "public E get(Object key) {\n WeakReference<E> weakRef = _obj2Ref.get(key);\n return weakRef != null ? weakRef.get() : null;\n }", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "@Nullable\n String getRef();", "public T getValue() {\n return casValue.getValue();\n }", "@UML(identifier=\"valueReference\", obligation=MANDATORY, specification=ISO_19143)\n ValueReference<? super R, ?> getValueReference();", "public /* @Nullable */ T getValue() {\n return value;\n }", "private static Object referenceValue(IDatatype type, Object value) {\n if (Reference.TYPE.isAssignableFrom(type)) {\n DisplayNameProvider nameProvider = DisplayNameProvider.getInstance();\n List<AbstractVariable> possibleDecls = ReferenceValuesFinder.findPossibleValues(\n de.uni_hildesheim.sse.qmApp.model.VariabilityModel.Configuration.INFRASTRUCTURE.getConfiguration()\n .getProject(), (Reference) type);\n for (int i = 0; i < possibleDecls.size(); i++) {\n AbstractVariable declaration = possibleDecls.get(i);\n String name = nameProvider.getDisplayName(declaration);\n if (name.equals(value)) {\n value = declaration;\n break;\n }\n }\n } \n return value;\n }", "String getReference();", "String getReference();", "public javax.xml.namespace.QName getReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getQNameValue();\n }\n }", "@JsonIgnore\r\n public String getReferenceId() {\r\n return OptionalNullable.getFrom(referenceId);\r\n }", "public Object getValue() {\n return element == null ? null : element.getValue();\n }", "public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }", "@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}", "public Object getValue() {\n\t\tif (present || isRequired()) {\t\t\t\n\t\t\treturn editorBinder.populateBackingObject();\n\t\t}\n\t\treturn null;\n\t}", "public @Nullable T getValue() {\n return this.value;\n }", "public Object get(Object key){\n\t\tNode tempNode = _locate(key);\r\n\t\tif(tempNode != null){\r\n\t\t\treturn tempNode._value;\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Object getValue() {\n if (_valueIndex <= 0)\n return null;\n return ((ConstantEntry) getPool().getEntry(_valueIndex)).getConstant();\n }", "public Object get()\n {\n return m_internalValue;\n }", "public Object getValue() { return _value; }", "@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}", "public java.lang.String getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$12);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "public Properties getValue() throws ContextInitializationException {\n PropertiesHolder propertiesRef = getReferencedProperties();\n if (propertiesRef != null) {\n return propertiesRef.getValue();\n }\n return null;\n }", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public Object getValue() { return this.value; }", "public Object getFetchedValue() {\n return fetchedValue;\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }", "default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }", "public V get( K key ) {\n WeakReference<V> valueRef = map.get( key );\n return valueRef == null ? null : valueRef.get();\n }", "public Object getValue() {\n\t\treturn object;\n\t}", "@Nullable\n private YAMLValue getVal() {\n return getKeyValue().getValue();\n }", "default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }", "public SoftReference getReference ()\r\n {\r\n return _reference;\r\n }", "Object getValueFrom();", "public AtomicReference<LocatableInquiry> getReferenceGroundItemInquiry();", "public Optional<String> getRefAllele() {\n return this.placement.getAlleles().stream()\n .map(p -> p.getAllele().getSpdi().getDeletedSequence())\n .findFirst();\n }", "public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }", "@Override\n\tpublic synchronized Value get(ILexNameToken field, boolean explicit)\n\t{\n\t\ttry\n\t\t{\n\t\t\tValue val = this.delayedCtxt.lookup(field,getOriginalSelf().objectReference);\n\t\t\tif (val != null)\n\t\t\t{\n\t\t\t\treturn val;\n\t\t\t}\n\t\t} catch (ContextException e)\n\t\t{\n\t\t\t// ignore if it wasnt there\n\t\t}\n\t\tValue v = super.get(field, explicit);\n\t\treturn delayedCtxt.wrapField(v, field,getOriginalSelf().objectReference);\n\t}", "public Object get(Object refName)\r\n {\r\n String key = String.valueOf(refName);\r\n if (isSafeMode() && key.indexOf('.') >= 0)\r\n {\r\n return null;\r\n }\r\n return this.context.get(key);\r\n }", "public abstract double getReference();", "public abstract double getReference();", "public String getRef() {\n return ref;\n }", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "public java.lang.String getReference() {\n return reference;\n }", "public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}", "public String getReference();", "public String getReference();", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}", "@Override\n public V getValue() {\n Object object = this.h;\n synchronized (object) {\n return this.a().getValue();\n }\n }", "@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}", "@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public final String getReference() {\n return reference;\n }", "public int getValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getvalue\", getRefId());\n\t}", "public Object getValue()\n {\n\treturn value;\n }", "public Object getValue(){\n \treturn this.value;\n }", "final public Object getValue()\n {\n return getProperty(VALUE_KEY);\n }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Object getObject()\n {\n initialize();\n\n if (_invariant)\n return _cachedValue;\n\n return resolveProperty();\n }", "public S getValue() { return value; }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public T getValue() {\n if (mDependency == null)\n mDependency = new ReactorDependency();\n\n mDependency.depend();\n return mValue;\n }", "@SuppressWarnings(\"unchecked\")\n @Nullable\n public T getValue() {\n Object data = mData;\n if (data != NOT_SET) {\n return (T) data;\n }\n return null;\n }", "public Object getValue()\n {\n return value;\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "public Object getValue() {\r\n return value;\r\n }", "public String valueInTargetSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot();\n }", "public String getReference() {\n return reference;\n }", "public Object getValue() {\r\n return oValue;\r\n }", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "@Override\n public T getValue() {\n return entry.getValue().getValue();\n }" ]
[ "0.7228913", "0.7189698", "0.71802074", "0.68021524", "0.66517353", "0.63945687", "0.6354037", "0.62688583", "0.62580603", "0.6190723", "0.61795664", "0.61734194", "0.61681384", "0.61347336", "0.612298", "0.6119435", "0.60994446", "0.6086228", "0.60855854", "0.60855854", "0.6077202", "0.6030361", "0.6020332", "0.5999609", "0.59986603", "0.59973896", "0.59834695", "0.5980341", "0.59801966", "0.5976317", "0.5974645", "0.5971388", "0.596798", "0.59601617", "0.59601617", "0.59599394", "0.594433", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.594336", "0.5931325", "0.5928424", "0.5927208", "0.589817", "0.589613", "0.58943975", "0.5893512", "0.5891887", "0.5889371", "0.5883313", "0.5879433", "0.5878652", "0.58738166", "0.5860514", "0.5856353", "0.58514285", "0.5845457", "0.5845457", "0.5838511", "0.5837956", "0.5818022", "0.58117604", "0.58035403", "0.58035403", "0.58009064", "0.5800659", "0.57994324", "0.57970583", "0.57958233", "0.57925814", "0.57925814", "0.57828707", "0.5774162", "0.5767842", "0.57660794", "0.576008", "0.57589746", "0.57587665", "0.57587665", "0.57587665", "0.57587665", "0.57587665", "0.5758419", "0.57572055", "0.574904", "0.5747588", "0.573702", "0.5733981", "0.5730768", "0.57270455", "0.572678", "0.57226706", "0.57172036", "0.57150155", "0.57119465", "0.5703483", "0.5700304" ]
0.0
-1
Add to the underlying map.
@Override public T put(String key, T value) { T old = null; // Do I have an entry for it already? Map.Entry<String, T> entry = entries.get(key); // Was it already there? if (entry != null) { // Yes. Just update it. old = entry.setValue(value); } else { // Add it to the map. map.put(prefix + key, value); // Rebuild. rebuildEntries(); } return old; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}", "private void add(String key) {\n dict = add(dict, key, 0);\n }", "@Override\n synchronized public void addMap(TreeMap toAdd) {\n this.map.putAll(toAdd);\n printAct(\"added a whole map with keys from:\" + toAdd.firstKey() + \" up to:\" + toAdd.lastKey());\n }", "MapComp<K, V> add(K k, V v);", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}", "public synchronized boolean add(String key, String content) {\n if (store.get(key) != null) {\n logger.warning(\"Key \" + key + \" already in store\");\n return false;\n }\n logger.info(\"Adding key \" + key);\n ensureMapSize();\n MapData mapData = new MapData();\n mapData.setContent(content);\n mapData.setTime((new Date()).getTime());\n store.put(key, mapData);\n tally.put(key, 0);\n return true;\n }", "public void addMap(GridMap map){\n mapsList.add(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }", "public void add(Key key, Value value) {\n\n\t\tif (2 * this.size > this.capacity) {\n\t\t\tresize(2 * this.capacity);\n\t\t}\n\n\t\t// Add this item to the hash table in the expected location.\n\n\t\tint index = locate(key);\n\t\tthis.keys[index] = key;\n\t\tthis.values[index] = value;\n\t\tthis.size++;\n\t}", "public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }", "@Override\r\n\tpublic void addToMap(MapView arg0) {\n\t\tsuper.addToMap(arg0);\r\n\t}", "void add( Map< String, Object > paramMap );", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "public void add(Map<Variable, Object> instance) {\n\t\tthis.listInstance.add(instance);\n\t}", "void add(K key, V value);", "void addEntry(K key, V value);", "public void add(K key,V value) {\n DictionaryPair pair = new DictionaryPair(key,value);\n int index = findPosition(key);\n\n if (index!=DsConst.NOT_FOUND) {\n list.set(index,pair);\n } else {\n list.addLast(pair);\n this.count++;\n }\n }", "@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }", "@Override\n public void addMapInfo(GameMapInfo mapInfo) {\n }", "@SuppressWarnings(\"serial\")\n protected void addInstance(\n Map<String, Object> keyMap, String key, CIMInstance instance)\n throws BaseCollectionException {\n try {\n Object result = keyMap.get(key);\n if (keyMap.containsKey(key) && result instanceof List<?>) {\n @SuppressWarnings(\"unchecked\")\n List<CIMInstance> cimInstanceList = (List<CIMInstance>) keyMap\n .get(key);\n\n cimInstanceList.add(instance);\n keyMap.put(key, cimInstanceList);\n } else {\n keyMap.put(key, instance);\n }\n } catch (Exception ex) {\n throw new BaseCollectionException(\n \"Error while adding CIMInstance to Map : \" + instance.getObjectPath(), ex) {\n @Override\n public int getErrorCode() {\n // To-Do errorCode\n return -1;\n }\n };\n }\n }", "public V add(K key, V value);", "@SuppressWarnings(\"unchecked\")\n protected void onAdd()\n {\n // issue add notification\n ObservableHashMap map = ObservableHashMap.this;\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_INSERTED,\n getKey(), null, getValue()));\n }\n }", "void add(String key);", "public static <K, T extends Number> void addToMap(Map<K, T> m, K key, T value) {\n m.put(key, m.containsKey(key) ? (T) (Double) (value.doubleValue() + m.get(key).doubleValue()) : value);\n }", "boolean add(Object key, Object value);", "public Map add(Tile tile) {\n this.tiles.add(tile);\n return this;\n }", "public void add(BindRecord record) {\n map.put(record.getPeptide(), record);\n }", "@Override\n public void add(K key, V value) {\n if(containsKey(key)){\n List<V> v = getValues(key);\n if(v.contains(value)){return;}\n }\n internalGetValue(key).add(value);\n }", "void add(KeyType key, ValueType value);", "public int insert( Map x ) {\n throw new UnsupportedOperationException(\n \"Method insert( Map ) not supported in MRC\" );\n }", "public void addToMapsArrayContainsThisPlaceOfInterest(Map map)\r\n\t{\r\n\t\tthis._mapsArrayContainsThisPlaceOfInterest.add(map);\r\n\t}", "public void add(HayStack stack){\n if(canMoveTo(stack.getPosition())){\n mapElement.put(stack.getPosition(), stack);\n }\n else{\n throw new IllegalArgumentException(\"UnboundedMap.add - This field is occupied\");\n }\n }", "public void addKey(String key){\n itemMap.put(key, new ArrayList<>());\n }", "public void add(int number) {\n\t map.put(number,map.containsKey(number)?map.get(number)+1:1);\n\t}", "public static <\n K,\n V> void addToCollectionMap(K key, V valueToAdd, Map<K, Collection<V>> map) {\n if (key != null && valueToAdd != null && map != null) {\n map.computeIfAbsent(key, Suppliers.asFunction(ArrayList::new)).add(valueToAdd);\n }\n }", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "public void add(Object key, Object value){\n\t\tint bucketLoc = key.hashCode() % _numBuckets;\r\n\t\tif(_locate(key) == null){\r\n\t\t\tNode newNode = new Node(key,value,_buckets[bucketLoc]);\r\n\t\t\t_buckets[bucketLoc] = newNode;\r\n\t\t\t_count++;\r\n\t\t\t_loadFactor = (double) _count / (double) _numBuckets;\r\n\t\t\tif(_loadFactor > _maxLoadFactor){\r\n\t\t\t\t_increaseTableSize();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t_buckets[bucketLoc]._value = value;\r\n\t\t}\r\n\t}", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n }else {\n map.put(number, 1);\n }\n }", "private void addValueToStatMap(HashMap<String, ArrayList<Double>> map, String key, Double value) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new ArrayList<Double>());\r\n }\r\n map.get(key).add(value);\r\n }", "@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}", "@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 boolean add(K key, V value);", "public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }", "private void addToHashmap(String key, Long timestamp){\r\n\t\tkeyHashMap.putIfAbsent(key, new PriorityQueue<Long>());\r\n\t\tsynchronized(keyHashMap.get(key)){\r\n\t\t\tSystem.out.println(\"Added Key: \" + key + \" Time: \" + timestamp);\r\n\t\t\tkeyHashMap.get(key).add(timestamp);\r\n\t\t}\r\n\t}", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)){\n map.put(number, map.get(number) + 1);\n }else{\n list.add(number);\n map.put(number, 1);\n }\n }", "protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }", "public void add(int number) {\n //map.put(number, map.getOrDefault(number, 0) + 1);\n if (map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n } else {\n map.put(number, 1);\n }\n }", "public V add(K key, V value)\n { \n checkInitialization();\n if ((key == null) || (value == null))\n throw new IllegalArgumentException();\n else\n { \n V result = null; \n int keyIndex = locateIndex(key); \n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n {\n // Key found; return and replace entry's value\n result = dictionary[keyIndex].getValue(); // Get old value\n dictionary[keyIndex].setValue(value); // Replace value \n }\n else // Key not found; add new entry to dictionary\n { \n makeRoom(keyIndex);\n dictionary[keyIndex] = new Entry(key, value);\n numberOfEntries++;\n ensureCapacity(); // Ensure enough room for next add\n } // end if \n return result;\n } // end if\n }", "public MapComp<K, V> add(K k, V v) {\n return new MapBST<K, V>(this.bst.add(new KVPairof<>(k, v)));\n }", "public void add(T newEntry) {\r\n add(size(), newEntry);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate boolean checkAndAdd(Object key, Object obj, @SuppressWarnings(\"rawtypes\") TreeMap map){\n if (map.containsKey(key))\n return(false);\n else\n map.put(key,obj);\n\n return(true);\n }", "public void add(int number) {\n map.put(number, map.getOrDefault(number, 0) + 1);\n }", "@SuppressWarnings(\"unchecked\")\n public MapEntryImpl addEntry(MapEntryImpl newEntry, Object key, int hash) {\n int i = indexOfKey(key, hash);\n MapEntryImpl entry = entries[i];\n if (entry != null) return entry; // Entry exists\n entries[i] = newEntry;\n newEntry.key = key;\n newEntry.hash = hash;\n // Check if we need to resize.\n if ((++count << EMPTINESS_LEVEL) > entries.length) {\n resize(entries.length << 1);\n }\n return newEntry;\n }", "public void add(K key, E e){\n\t\tremove(key);\n\t\tnewestIndex = (newestIndex+1)%keys.length;\n\t\tif(keys[newestIndex] == null)\n\t\t\thowMany = howMany + 1;\n\t\tkeys[newestIndex] = key;\n\t\telem[newestIndex] = e;\n\t}", "public void add(String key, JsonValue value, boolean asArray) {\n if (asArray) {\n toArray(key);\n }\n\n // 2. If value is an array, then for each element v in value, use add value\n // recursively to add v to key in entry.\n if (JsonUtils.isArray(value)) {\n value.asJsonArray().forEach(v -> add(key, v, asArray));\n\n // 3.\n } else {\n\n final Object original = map.get(key);\n\n // 3.1\n if (original != null) {\n\n if (original instanceof JsonValue) {\n\n if (JsonUtils.isArray((JsonValue)original)) {\n map.put(key, Json.createArrayBuilder(((JsonValue)original).asJsonArray()).add(value));\n\n } else {\n map.put(key, Json.createArrayBuilder().add((JsonValue)original).add(value));\n }\n\n } else if (original instanceof JsonArrayBuilder) {\n ((JsonArrayBuilder)original).add(value);\n\n } else if (original instanceof JsonMapBuilder) {\n map.put(key, Json.createArrayBuilder().add(((JsonMapBuilder)original).build()));\n\n } else {\n throw new IllegalStateException();\n }\n\n // 3.2\n } else {\n map.put(key, value);\n }\n }\n }", "@Override\r\n\tpublic boolean add(GIS_layer e) {\n\r\n\t\treturn set.add(e);\r\n\t}", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public boolean add(E key)\r\n {\r\n if(this.contains(key))\r\n {\r\n return false;\r\n }\r\n\r\n else\r\n {\r\n super.add(key);\r\n }\r\n return true;\r\n }", "public void add(E e){\n int target = e.hashCode() % this.buckets;\n if(!data[target].contains(e)){\n data[target].add(e);\n }\n }", "public void add(String masterKey, HashMap<String, String> featureInfo) {\n this.featureInfoHashMap.put(masterKey, featureInfo);\n }", "public int add(String key, E value) {\r\n int index = items.size();\r\n keys.put(key, index);\r\n items.add(value);\r\n return index;\r\n }", "public boolean add(String key, String value){\r\n // takes a key and turns it into a hashed thing\r\n int arrIndex = hash(key);\r\n\r\n Entry entry = new Entry(key, value);\r\n\r\n if (hashTableArray[arrIndex] == null){\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n if(contains(key)) {\r\n return false; // the key is already in use, so don't use it.\r\n } else {\r\n hashTableArray[arrIndex].add(entry); // add the key and value pair to the linked list.\r\n }\r\n return true;\r\n }", "public void add(String key,String value){\n int index=hash(key);\n if (arr[index] == null)\n {\n arr[index] = new Llist();\n }\n arr[index].add(key, value);\n\n\n }", "public void add(K key, V value) {\r\n if(this.table.containsKey(key)){\r\n BloomFilterUtil bf = (BloomFilterUtil)table.get(key).getHash();\r\n bf.put(value);\r\n Node<V> node = (Node<V>) table.get(key);\r\n node.getValues().add(value);\r\n }else {\r\n BloomFilterUtil bf = BloomFilterUtil.create(funnel,\r\n expectedInsertions,\r\n fpp,\r\n (BloomFilterUtil.Strategy) hashStrategy);\r\n bf.put(value);\r\n Node<V> node = new Node<V>(value, bf);\r\n table.put(key, node);\r\n }\r\n }", "@Override\r\n\tpublic void putAll( Map<? extends K, ? extends V> m ) {\r\n\t\tif(this.spaceLeft() - countNewElements( m ) < 0)\r\n\t\t\tthrow new IllegalStateException(\"There is not enough space to put whole passed map.\");\r\n\t\tsuper.putAll( m );\r\n\t}", "public void insertIntoMap(String key, String name) {\n\t\tif (mapNames.containsKey(key)) {\n\t\t\t// Add new name onto the end of the existing ArrayList.\n\t\t\tmapNames.get(key).add(name);\n\t\t} else {\n\n\t\t\t// Create new ArrayList with the unparsed name as the value\n\t\t\tArrayList<String> arrName = new ArrayList<String>();\n\t\t\tarrName.add(name);\n\t\t\tmapNames.put(key, arrName);\n\t\t}\n\t}", "public void addInventory(String key, Integer value) {\n int currentValue = inventoryMap.getOrDefault(key, 0);\n inventoryMap.put(key, currentValue + value);\n }", "public static <K> void addNumber (Map<? super K, Integer> toAdd, K key, int val) {\n if (toAdd.get(key) == null) {\n toAdd.put(key, val);\n } else {\n toAdd.put(key, toAdd.get(key) + val);\n }\n }", "@Override\n\t\tpublic boolean add(java.util.Map.Entry<F, Double> arg0) {\n\t\t\tthrow new UnsupportedOperationException(\"Not yet implemented!\");\n\t\t}", "public E tryAdd(E o) {\r\n E found = this.map.get(o.hashCode());\r\n if (found != null) {\r\n return found;\r\n }\r\n this.map.put(o.hashCode(), o);\r\n return o;\r\n }", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "void addTransientEntry(K key, V value);", "public boolean add( String key, T value )\r\n {\r\n HashMap<String,T> top = tables.peekFirst();\r\n T result = top.get( key );\r\n top.put( key, value );\r\n return result==null;\r\n }", "public void add(int k) {\n\t\tcontains[k] = true;\n\t}", "@SuppressWarnings(\"serial\")\n protected void addPath(\n Map<String, Object> keyMap, String key, CIMObjectPath path)\n throws BaseCollectionException {\n try {\n Object result = keyMap.get(key);\n if (keyMap.containsKey(key) && result instanceof List<?>) {\n @SuppressWarnings(\"unchecked\")\n List<CIMObjectPath> cimPathList = (List<CIMObjectPath>) keyMap\n .get(key);\n cimPathList.add(path);\n keyMap.put(key, cimPathList);\n } else {\n keyMap.put(key, path);\n }\n } catch (Exception ex) {\n throw new BaseCollectionException(\n \"Error while adding CIMObject Path to Map : \" + path, ex) {\n @Override\n public int getErrorCode() {\n // To-Do errorCode\n return -1;\n }\n };\n }\n }", "private void add() {\n\n\t}", "public void add(int key) {\n int index = getIndex(key);\n if(buckets[index] == null){\n buckets[index] = new boolean[bucketItem];\n }\n int index2 = getIndex2(key);\n buckets[index][index2] = true;\n }", "public static HashMap<JSONObject, JSONObject> addNew (HashMap<JSONObject, JSONObject> map,JSONObject key, JSONObject value){\n\t\tmap.put(key, value);\n\t\treturn map;\n\t}", "@Override\n public boolean add(E item) {\n if (item == null)\n throw new IllegalArgumentException(\"null invalid value for bag\");\n Counter count = map.get(item);\n if (count == null)\n map.put(item, new Counter(1));\n else\n count.increment();\n return true;\n }", "private void hashMapPutPlusOne(Map<String, Integer> map, String key) {\n Integer value = map.get(key);\n if (value == null)\n map.put(key, 1);\n else\n map.put(key, value + 1);\n }", "boolean addAll(MapP2P<K, V> mapP2P);", "public void enterScope() {\n\t\tmap.add(new HashMap<K, V>());\n\t}", "@Override\r\n\tpublic int addbus(HashMap<String, Object> map) {\n\t\treturn dao.addbus(map);\r\n\t}", "public int addMap(NodePositionsSet otherMap, int otherID){\r\n\t\tif(otherMap.getMap() == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tallMaps.put(otherID, otherMap);\r\n\t\tsynced = -1;\r\n\t\treturn 0;\r\n\t}", "public boolean add(E o) {\r\n if (o == null)\r\n return false;\r\n if (this.map.containsKey(o.hashCode())) {\r\n return false;\r\n }\r\n return this.map.put(o.hashCode(), o) == null;\r\n }", "public boolean addNode(N node)\r\n/* 32: */ {\r\n/* 33: 68 */ assert (checkRep());\r\n/* 34: 69 */ if (!this.map.containsKey(node))\r\n/* 35: */ {\r\n/* 36: 70 */ this.map.put(node, new HashMap());\r\n/* 37: 71 */ return true;\r\n/* 38: */ }\r\n/* 39: 73 */ return false;\r\n/* 40: */ }", "@Override\n public void putAll(Map<? extends K, ? extends V> map) {\n throw new UnsupportedOperationException();\n }", "public boolean add(String e) {\r\n \tSystem.out.println(e + \" \" + PRESENT);\r\n return map.put(e, PRESENT)==null;\r\n }", "@Override\n\tpublic void add(Object o) {\n\t}", "public void putAll(Map<? extends E, ? extends V> m) {\n\t\t\r\n\t}", "public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n map.put(number, 1);\n list.add(number);\n }\n }", "@Override\n\tpublic void add(T t) {\n\t\tc.add(t);\n\t}", "public static <K, V> void addToMapList(Map<K, List<V>> map, K key, V value)\n {\n List<V> list = map.get(key);\n\n if (list == null)\n {\n list = CollectionFactory.newList();\n map.put(key, list);\n }\n\n list.add(value);\n }", "public void addToIdMap(int Id) {\n idMap.put(Id, true);\n }", "@Override\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\n\t\t\n\t}", "public MapSum() {\n map = new HashMap<>();\n }", "private void addTableEntry(HashMap<Integer,Integer> map, int key){\n int count = map.containsKey(key) ? map.get(key) : 0;\n map.put(key, count + 1); //If wasn't present, this is set to 1, else its incremented\n\n return;\n }", "public void add() {\n\t\t\n\t}", "public void addPoolMap(PoolMap poolMap){\n\n\t\tpoolMaps.add(poolMap);\n\t}", "@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }", "public boolean add(T newEntry);" ]
[ "0.6846878", "0.6789898", "0.676944", "0.6731316", "0.67104554", "0.66972804", "0.66652656", "0.6523818", "0.6502026", "0.6481582", "0.6464343", "0.6443337", "0.642923", "0.641454", "0.64030313", "0.63977313", "0.63829654", "0.6382297", "0.63118595", "0.63111573", "0.6303543", "0.6280074", "0.6275754", "0.6270293", "0.6256395", "0.6247854", "0.62434757", "0.62413543", "0.62344706", "0.62182766", "0.61718804", "0.6159631", "0.61525637", "0.6147629", "0.61432415", "0.6141836", "0.6127366", "0.61213773", "0.61066025", "0.61016357", "0.6094199", "0.60824263", "0.6068989", "0.6058181", "0.60535467", "0.6047676", "0.6046217", "0.6031307", "0.601705", "0.59837437", "0.5980259", "0.59697986", "0.5963623", "0.5962106", "0.59546113", "0.5948263", "0.59437174", "0.5936747", "0.59342957", "0.59293836", "0.5910535", "0.5895792", "0.5876937", "0.5876589", "0.5875015", "0.58743066", "0.587123", "0.58518714", "0.5847249", "0.58409244", "0.5831057", "0.5829519", "0.58285105", "0.58244145", "0.5820863", "0.5820496", "0.58124894", "0.5811301", "0.5805525", "0.5804426", "0.58025575", "0.57921445", "0.5776781", "0.57764864", "0.5773105", "0.57624274", "0.5759023", "0.5754923", "0.57544005", "0.575068", "0.5745768", "0.573553", "0.5733179", "0.57054204", "0.57004666", "0.57003134", "0.5699289", "0.56947196", "0.56947166", "0.5689938", "0.5685348" ]
0.0
-1
Get rid of that one.
@Override public T remove(Object key) { // Do I have an entry for it? Map.Entry<String, T> entry = entries.get((String) key); if (entry != null) { entries.remove(key); // Change the underlying map. return map.remove(prefix + key); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unset(){\n\t\tcurrentInst = -1;\n\t}", "public void remove() {\r\n return;\r\n }", "public void supprimerHacker() {\n if (hacker != null) {\n g.getChildren().remove(hacker);\n\n }\n }", "public void unsetRegular()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REGULAR$2, 0);\n }\n }", "public void removeCurrent( )\n {\n // Implemented by student.\n }", "public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}", "public void remove() {\r\n super.remove();\r\n }", "Object removeFirst();", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "private void unsetLast() { this._last = false; }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void removeThing(){\n thing = null;\n }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "void unsetQuick();", "void unsetCombine();", "public void remove () {}", "public void clearOne()\n\t{\n\n\t\t// add code to remove one name from the graphArray (if not empty)\n\t\t// and call repaint() to update the graph\n\t}", "@Override\n\tpublic void discardUnget() {\n\t\t\n\t}", "public void erase()\n {\n this.top = null;\n }", "@Override\n\tpublic void detalhar() {\n\t\t\n\t}", "@Override\r\n\tpublic void erase() {\n\t\t\r\n\t}", "public void unsetThead()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(THEAD$6, 0);\n }\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public final void remove () {\r\n }", "public void remove() {\n\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void destory(){\n \n }", "void unsetStraight();", "public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}", "public void unsetGeneral()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GENERAL$20, 0);\r\n }\r\n }", "@Override\n public void remove() {\n }", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "void unsetBegin();", "public void unsetOther()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(OTHER$18, 0);\r\n }\r\n }", "public void discard();", "public void removeLastEntry(){\r\n\t\tboards.remove(boards.size() -1 );\r\n\t}", "private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}", "@Override\r\n\tpublic void destory() {\n\t\t\r\n\t}", "public void remove() {\n\t}", "public void remove() {\n\t}", "@Override\n\tpublic void remove() { }", "public void unKingMe() {\r\n this.type = Type.SINGLE;\r\n }", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "public void unsetInternal()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(INTERNAL$4, 0);\n }\n }", "@Override\n public void deselectGolem() {\n }", "public void clearLastMarker(){\n lastMarker.remove();\n }", "public void remove() {\r\n //\r\n }", "void unsetCit();", "public void discard() {\n }", "void clearCurrent();", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "@Override\n public void remove() {\n }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void unsetGibbmt()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GIBBMT$4, 0);\r\n }\r\n }", "@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "public void removeFlag()\r\n\t{\r\n\t\thasFlag = false;\r\n\t\tflag = null;\r\n\t}", "public void clear() {\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\titerator.next();\n\t\t\titerator.remove();\n\t\t}\n\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}", "void unsetDesc();", "public void remove () { this.setAsDown(); n.remove(); }", "void unsetFoundingDate();", "void unsetOffset();", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "public void unsetTpg()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPG$30, 0);\r\n }\r\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "@Override\n\tpublic void destory() {\n\t\t\n\t}", "@Override\n\tpublic void destory() {\n\t\t\n\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "public E removeFirst(){\r\n return null;\r\n }", "public String removeFirst() {\n\t\treturn removeAt(0);\n\t}", "public Node removeFirst() {\r\n\t\treturn removeNode(0);\r\n\t}", "public void unsetGi()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GI$22, 0);\r\n }\r\n }", "public void unsetEmbl()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(EMBL$10, 0);\r\n }\r\n }", "private void clear() {\n }", "void unsetID();" ]
[ "0.71063393", "0.6857906", "0.6566236", "0.6555239", "0.6539492", "0.6513571", "0.65004414", "0.6496926", "0.6456956", "0.6456956", "0.6456956", "0.6456956", "0.6456956", "0.6456956", "0.6456956", "0.6453192", "0.64129156", "0.64129156", "0.6399447", "0.6391941", "0.63819945", "0.63819945", "0.63819945", "0.63791597", "0.63771594", "0.637606", "0.6375665", "0.6358632", "0.63557005", "0.635559", "0.63510275", "0.6336237", "0.63246214", "0.63229454", "0.6307898", "0.6298743", "0.62987286", "0.6295674", "0.6288397", "0.62845373", "0.62728953", "0.6270341", "0.62696624", "0.62696624", "0.6266363", "0.6265679", "0.6254862", "0.6250964", "0.6249142", "0.6239416", "0.62380743", "0.62380743", "0.62282115", "0.62209755", "0.6213359", "0.6211712", "0.6211423", "0.6210308", "0.620287", "0.61966157", "0.61865276", "0.6184534", "0.61789817", "0.6178944", "0.61739534", "0.61739534", "0.61739534", "0.61739534", "0.61739534", "0.61739534", "0.61739534", "0.61739534", "0.617135", "0.61710846", "0.6165007", "0.6160872", "0.615959", "0.615104", "0.615104", "0.615104", "0.615104", "0.615104", "0.6150962", "0.6146401", "0.61448044", "0.6140939", "0.6134601", "0.6133016", "0.61313957", "0.6123311", "0.6120966", "0.6120966", "0.61185277", "0.61185277", "0.61108834", "0.6105563", "0.6104321", "0.60999954", "0.6094138", "0.60923433", "0.6091752" ]
0.0
-1
Add all of them.
@Override public void putAll(Map<? extends String, ? extends T> m) { for (Map.Entry<? extends String, ? extends T> e : m.entrySet()) { put(e.getKey(), e.getValue()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addAll(Object... values) {\n verifyModifiable();\n\n if (values.length == 1 && values[0] instanceof Tuple)\n addAll((Tuple) values[0]);\n else\n Collections.addAll(elements, values);\n }", "@Override\n public void addAllElements() {\n addAllSoftwareSystems();\n addAllPeople();\n }", "public String addAll() {\n\t\treturn prefix(\"addAll\");\n\t}", "public void addAll(Object[] toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\tdata.addAll(Arrays.asList(toAdd));\r\n\r\n\t\tfireAdd(toAdd);\r\n\t}", "@Override\n public void addAll(List<Note> given) {\n for (Note n : given) {\n this.addNote(n);\n }\n }", "public void addAll(GuiElementBase... elements)\n\t\t{ for (GuiElementBase element : elements) add(element); }", "public void addAll(Collection other) {\n\n\t\tclass AddProcessor extends Processor {\n\t\t\tpublic void process(Object value) {\n\t\t\t\tadd(value);\n\t\t\t}\n\t\t}\n\t\tAddProcessor addProcessor = new AddProcessor();\n\n\t\tother.forEach(addProcessor);\n\t}", "void addAll(Graph graph);", "public TempList<T> addAll(Iterable< ? extends T> all) {\n chk();\n if (all instanceof Collection)\n list.addAll((Collection< ? extends T>) all);\n else if (all != null) {\n for (T x : all)\n list.add(x);\n }\n return this;\n }", "@Test\n public void initializeByAddAll() {\n List<Integer> lst1 = new ArrayList<>();\n\n // Add all from Java 9+ List.of\n lst1.addAll(List.of(3, 1, 2));\n\n // Add all from Arrays.asList\n lst1.addAll(Arrays.asList(5, 4, 6));\n\n // Add all from Java 9+ Set.of\n lst1.addAll(Set.of(8, 7, 9));\n\n assertThat(lst1).hasSize(9);\n\n // Add all from an existing collection\n List<Integer> lst2 = new ArrayList<>();\n lst2.addAll(lst1);\n assertThat(lst2).hasSize(9);\n }", "private void addAll(User[] users) {\n synchronized (this.base) {\n Stream.of(users).forEach(this::add);\n }\n }", "public void addAll(Collection toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\taddAll(toAdd.toArray());\r\n\t}", "void addAll(Collection<Book> books);", "public void addAll (SetADT<T> set);", "public boolean addAll(Collection<? extends Type> items);", "public void addAll(String[] a)\n {\n\tfor (String s : a)\n\t this.add(s);\n }", "static final void addAll(ContainerValue cont, List<Value> result) {\r\n for (int i = 0; i < cont.getElementSize(); i++) {\r\n result.add(cont.getElement(i));\r\n }\r\n }", "public void addAll(Collection<T> objs) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter addAll\");\r\n\t\t\r\n\t\tdata.addAll(objs);\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit addAll\");\r\n\t}", "@SuppressWarnings (\"unchecked\") public void addAll(ItemList list){\n items.addAll(list.items);\n }", "@Override\n\tpublic boolean addAll(Collection<? extends T> elements) {\n\t\tif ((elements == null) || (elements.size() == 0))\n\t\t\treturn false;\n\t\tboolean result = false;\n\t\tdouble prob = 1.0 / elements.size();\n\t\tfor (T item : elements) {\n\t\t\tresult = result | add(item, prob);\n\t\t}\n\t\treturn result;\n\t}", "public void addAll(List<ContentValues> result) {\n for (ContentValues c : result) {\n add(c);\n }\n }", "public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }", "public void addAll(AudioFile ... items) {\n if (mOriginalValues != null) {\n synchronized (mLock) {\n for (AudioFile item : items) {\n mOriginalValues.add(item);\n }\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n } else {\n for (AudioFile item : items) {\n mObjects.add(item);\n }\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n }", "public void addAll(T[] arr);", "@Override\n public boolean addAll(Collection<? extends E> c) {\n boolean result = true;\n for (E current : c) {\n result &= add(current);\n }\n return result;\n }", "private<T> void addManyResults(T... results)\n {\n int i =0;\n for(T result : results)\n {\n this.add(\"morgen-main-result\"+i, new LazyDynamicPrimitive<>(result));\n i++;\n }\n\n results = null; // Prevents Heap pollution\n }", "public boolean addAll(Collection added)\n {\n boolean ret = super.addAll(added);\n normalize();\n return(ret);\n }", "public void add(LorentzVector... vects) {\n\t\tfor (LorentzVector vect : vects) {\n\t\t\tthis.vector.add(vect.vect());\n\t\t\tthis.energy = this.e() + vect.e();\n\t\t}\n\t}", "@Override\n \tpublic ArrayPVector<E> plusAll(int i, Collection<? extends E> l) {\n \t\tthrow new UnsupportedOperationException(\"Not yet implemented\");\n \t}", "private void addItems(RegularItem...pItems)\r\n\t{\r\n\t\tfor (RegularItem item : pItems) {\r\n\t\t\tassert item != null;\r\n\t\t\taItems.add(item);\r\n\t\t};\r\n\t}", "public void addAll(List<ImageContent> items) {\n _data = items;\n }", "public static void addAll(){\n /* Add kill Achievements. */\n AchievementManager.addAchievement(kill1);\n AchievementManager.addAchievement(kill2);\n AchievementManager.addAchievement(kill3);\n AchievementManager.addAchievement(kill4);\n\n /* Add Death Achievements. */\n AchievementManager.addAchievement(death1);\n AchievementManager.addAchievement(death2);\n AchievementManager.addAchievement(death3);\n AchievementManager.addAchievement(death4);\n\n /* Add Score Achievements. */\n AchievementManager.addAchievement(score1);\n AchievementManager.addAchievement(score2);\n AchievementManager.addAchievement(score3);\n AchievementManager.addAchievement(score4);\n\n /* Add Time Achievements. */\n AchievementManager.addAchievement(time1);\n AchievementManager.addAchievement(time2);\n AchievementManager.addAchievement(time3);\n AchievementManager.addAchievement(time4);\n\n /* Random Achievements. */\n AchievementManager.addAchievement(tutorialAch);\n AchievementManager.addAchievement(secretAch);\n }", "void addAll(intList list) throws IllegalAccessException;", "@Override\n\tpublic boolean addAll(Collection<? extends Integer> c) {\n\t\treturn false;\n\t}", "public void addAll(SelectionSet newSet)\n {\n elements.addAll(newSet.elements);\n }", "public void addAll(ArrayIntList other) {\n\t\t\tensureCapacity(size + other.size);\n\t\t\tfor(int i = 0; i < other.size; i++) {\n\t\t\t\tadd(other.elementData[i]);\n\t\t\t}\n\t\t}", "@Override // java.util.Collection, java.util.Set\r\n public boolean addAll(Collection<? extends E> collection) {\r\n b(this.f513d + collection.size());\r\n boolean added = false;\r\n Iterator<? extends E> it = collection.iterator();\r\n while (it.hasNext()) {\r\n added |= add(it.next());\r\n }\r\n return added;\r\n }", "default void addAllTo(Collection<? super E> collection) {\n // Accepting a Collection<? super E> allows us to add elements to\n // any collection that can hold E elements, including Collection<Object>.\n for (E element : this) {\n collection.add(element);\n }\n }", "public void addAll(MyList<? extends E> list);", "@Test\r\n\tpublic void testAddAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.addAll(list);\r\n\t\tAssert.assertEquals(16, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(15).equals(list.get(14)));\r\n\t}", "@Override\n public boolean addAll(Collection<? extends Integer> clctn) {\n for(int i : clctn){\n if(!definedOn.contains(i)){\n return false;\n }\n }\n \n return super.addAll(clctn);\n }", "public final void add(int... elements) {\n add(elements, 0, elements.length);\n }", "public synchronized void addAll(WCollection otherCollection)\n\t{\n\t\tif(otherCollection != null)\n\t\t{\n\t\t\tEnumeration otherCollectionEnum = otherCollection.elements();\n\t\t while(otherCollectionEnum.hasMoreElements())\n\t\t {\n\t\t \tWModelObject object = (WModelObject) otherCollectionEnum.nextElement();\n\t\t \tm_elements.addElement(object);\n\t\t }\n\t\t}\n\t\t\n\t}", "public void addAll(Tuple tuple) {\n verifyModifiable();\n\n if (tuple != null)\n elements.addAll(tuple.elements);\n }", "public void add(List<SermCit> citList){\n //Add one by one\n for (SermCit x : citList){\n add(x);\n }\n }", "private void add() {\n\n\t}", "public void addAll(Collection<E> es) {\n \tmData.addAll(es);\n notifyDataSetChanged();\n }", "public boolean addAll(Iterable<T> c){\r\n\t\t//same addAll from HW2 denseboard\r\n\t\tboolean added = false;\r\n\t\tfor(T thing : c){\r\n\t\t\tadded |= this.add(thing);\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "public void addAll(XResultSet r) {\n this.getNodeRefs().addAll(r.getNodeRefs());\n this.numberFound += r.numberFound;\n }", "public void addAll(E[] es){\n for(E e: es) {\n \tmData.add(e);\n }\n notifyDataSetChanged();\n }", "public void addALl(List<T> list){\n for(int i = 0; i < list.size(); i++){\n add(list.get(i));\n }\n }", "boolean addAll(Collection<? extends E> c);", "@Test\n public void testAddAll_int_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "public void addAll(Equipment e){\r\n if(e.weapon !=null) add(e.weapon );\r\n if(e.helmet !=null) add(e.helmet );\r\n if(e.chestplate !=null) add(e.chestplate);\r\n if(e.leggings !=null) add(e.leggings );\r\n if(e.boots !=null) add(e.boots );\r\n if(e.amulet1 !=null) add(e.amulet1 );\r\n if(e.amulet2 !=null) add(e.amulet2 );\r\n }", "public void addAll(ArrayList<Taking> items){\n if(this.mTakings == null){\n this.mTakings = new ArrayList<>();\n }\n this.mTakings.addAll(items);\n notifyDataSetChanged();\n }", "@Override\n\tpublic boolean addAll(Collection<? extends E> c) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "public boolean addAll(Collection<? extends E> c) {\n\t\tfor(Iterator<? extends E> it = c.iterator(); it.hasNext();)\r\n\t\t\tadd((E)it.next());\r\n\t\treturn !c.isEmpty();\r\n\t}", "public void addAll(Collection<? extends AudioFile> collection) {\n if (mOriginalValues != null) {\n synchronized (mLock) {\n mOriginalValues.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n } else {\n mObjects.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n }", "@Override\r\n\tpublic boolean addAll(Collection<? extends GIS_layer> c) {\n\t\treturn set.addAll(c);\r\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "public void addAll(final int[] newArray) {\n for (int eachVal: newArray) {\n add(eachVal);\n }\n }", "public boolean addAll(Collection<? extends T> arg0, double prob) {\n\t\tif ((arg0 == null) || (arg0.size() == 0))\n\t\t\treturn false;\n\t\tboolean result = false;\n\t\tfor (T item : arg0) {\n\t\t\tresult = result | add(item, prob);\n\t\t}\n\t\treturn result;\n\t}", "public void putAll(final serverObjects add) {\n for (final Map.Entry<String, String> entry: add.entrySet()) {\n put(entry.getKey(), entry.getValue());\n }\n }", "@Override\r\n\tpublic boolean addAll(int index, Collection<? extends E> c) {\n\t\treturn false;\r\n\t}", "private void addAllRequests(\n Iterable<? extends RequestFromSelf> values) {\n ensureRequestsIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, requests_);\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add() {\n\t\t\n\t}", "public void addAll(T[] arr, int from, int length);", "@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "void addAll(List<News> data) {\n\t\t// Traverse the data list to add news item to the adapter's data set\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t// Get the book at current index\n\t\t\tNews newsStory = data.get(i);\n\t\t\t// Add the book to the data set\n\t\t\tmNewsList.add(newsStory);\n\n\t\t\t// Notify the adapter of the change in the data set\n\t\t\t// so that it repopulates the view with the updated data set\n\t\t\tnotifyDataSetChanged();\n\t\t}\n\t}", "Get<K, C> addAll();", "@SuppressWarnings(\"unchecked\")\n \t@Override\n \tpublic PVector<E> plusAll(Collection<? extends E> l) {\n \t\tint n = l.size();\n \t\tif (n == 0) {\n \t\t\treturn this;\n \t\t} else if (count == 0 && l instanceof ArrayPVector) {\n \t\t\treturn (ArrayPVector<E>) l;\n \t\t} else if (!sublist && value != null\n \t\t\t\t&& offset + count + n <= value.length) {\n \t\t\t// l fits into the remaining space\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tvalue[i++] = e;\n \t\t\t}\n \t\t\tsublist = true;\n \t\t\treturn new ArrayPVector<E>(value, offset, i);\n \t\t} else {\n \t\t\t// l longer than remaining space\n \t\t\tE[] val = (E[]) new Object[count + n];\n \t\t\tif (value != null) {\n \t\t\t\tSystem.arraycopy(value, offset, val, 0, count);\n \t\t\t}\n \t\t\tint i = count;\n \t\t\tfor (E e : l) {\n \t\t\t\tif (e == null) {\n \t\t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\t\t\"Can't add null to an ArrayPVector\");\n \t\t\t\t}\n \t\t\t\tval[i++] = e;\n \t\t\t}\n \t\t\treturn new ArrayPVector<E>(val, 0, i);\n \t\t}\n \t}", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}", "public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}", "@Override\n\tpublic void all() {\n\t\t\n\t}", "public void addMultipleElements(View v) {\r\n mAddNMoreElements = 4;\r\n addElement(v);\r\n }", "@Override\n\tpublic boolean addAll(Collection<? extends SimpleFeature> collection) {\n\t\tboolean ret = super.addAll(collection);\n\t\tfor (SimpleFeature f : collection) {\n\t\t\taddToIndex(f);\n\t\t}\n\t\treturn ret;\n\t}", "@Test\r\n public void addAllWorks() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n ArrayList<Integer> array = new ArrayList<>();\r\n array.add(1);\r\n array.add(2);\r\n array.add(3);\r\n s.addAll(array);\r\n assertTrue(s.contains(1));\r\n assertTrue(s.contains(2));\r\n assertTrue(s.contains(3));\r\n }", "T addGraphs(Graph... graphs);", "public void addComponents(Component... components);", "private void addAllMsg(\n Iterable<? extends Msg> values) {\n ensureMsgIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, msg_);\n }", "private void addAllMsg(\n Iterable<? extends Msg> values) {\n ensureMsgIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, msg_);\n }", "void addAll(intList list, int index) throws IllegalAccessException;", "@Override\n public boolean addAll(int index, Collection<? extends T> c) {\n Object[] newArray = c.toArray();\n int newSize = newArray.length;\n for (int i = index; i < newSize; i++) {\n add(i, (T) newArray[i]);\n }\n return true;\n }", "public void addAll(Fragment frag) {\n for( DefaultGraphCell node : frag.getNodes() ) {\n add(node);\n }\n \n for( DefaultEdge edge : frag.getEdges() ) {\n add(edge);\n }\n }", "@Test\r\n public void addAll() throws Exception {\r\n TreeSet<Integer> check = new TreeSet<>();\r\n ArrayList<Integer> l = new ArrayList<>();\r\n l.add(7);\r\n l.add(9);\r\n check.addAll(l);\r\n assertTrue(check.containsAll(l));\r\n }", "public void add()\r\n {\r\n resultDoubles = Operations.addition(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "@Test\n\tpublic void testAddAll() {\n\t Set<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t Set<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t setA.addAll(setB);\n\t Set<Integer> union = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9));\n\t assertEquals(setA, union);\n }", "public void addAll(MyCollection col) {\n\t\taddAll(size, col);\n\t}", "public void add(){\n list.add(smart);\n list.add(mega);\n list.add(smartMini);\n list.add(absolute);\n\n clientsList.add(client1);\n clientsList.add(client2);\n clientsList.add(client3);\n clientsList.add(client4);\n clientsList.add(client5);\n }", "public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }", "@Override\r\n\tpublic void add(CreditCard ...t) {\n\t\tfor(CreditCard card:t)\r\n\t\t this.cardList.add(card);\r\n\t}", "public synchronized void addAll(long subtotal) {\n\t\t\tsum[0] += subtotal;\n\t\t}", "public boolean addAll(Collection<? extends E> rhs) {\n\t\t// this is not a low-level or common function, so ok to call add()\n\t\tif (rhs.size() == 0)\n\t\t\treturn false;\n\t\tfor (E x : rhs)\n\t\t\tadd(x);\n\t\treturn true;\n\n\t}", "public boolean addAll(ISet<E> otherSet) {\n\t\tif (otherSet == null)\n\t\t\tthrow new IllegalArgumentException(\"The given set is null.\");\n\t\tboolean result = false;\n\t\tfor (E obj: otherSet) {\n\t\t\tif (!this.contains(obj)) {\n\t\t\t\tthis.add(obj);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n @SuppressWarnings(\"fallthrough\")\n public boolean addAll(final Collection<? extends Date> dates) {\n final int c = modCount;\n if (dates != null) {\n final Iterator<? extends Date> it = dates.iterator();\n switch (size()) { // Fallthrough everywhere.\n case 0: if (!it.hasNext()) break;\n date1 = it.next().getTime();\n modCount++;\n case 1: if (!it.hasNext()) break;\n date2 = it.next().getTime();\n modCount++;\n default: if (!it.hasNext()) break;\n throw new IllegalArgumentException(Errors.format(\n Errors.Keys.TooManyCollectionElements_3, \"dates\", 2, dates.size()));\n }\n }\n return modCount != c;\n }", "public void addComponents(){\r\n\r\n\t\t\tfor(int i=0; i < fieldNum ; i++){ \r\n\t\t\t\tadd(labels[i]);\r\n\t\t\t\tif(i==3){\r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t\t\tfor(int k=1;k<ingredientFields.size();k++)\r\n\t\t\t\t\t\tadd(ingredientFields.get(k));\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t}\r\n\r\n\t\t}", "@Override\n\tpublic boolean addAll(Collection<? extends T> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}" ]
[ "0.6991686", "0.6837042", "0.68140954", "0.6725941", "0.6721536", "0.6634401", "0.65485984", "0.6539671", "0.6506794", "0.6491044", "0.64892346", "0.6421861", "0.6417827", "0.63966495", "0.63614935", "0.6336979", "0.63348764", "0.63133115", "0.6312357", "0.63092643", "0.6305023", "0.6227711", "0.6223371", "0.62199926", "0.62182266", "0.62160933", "0.61794317", "0.61334574", "0.613247", "0.6132174", "0.61236936", "0.61212975", "0.61196136", "0.6091668", "0.60804975", "0.60685027", "0.6064947", "0.6060603", "0.6050412", "0.6047707", "0.60463727", "0.60374194", "0.60356385", "0.60339445", "0.6031535", "0.60214853", "0.6018548", "0.60182333", "0.60172755", "0.6008704", "0.6004215", "0.597958", "0.5978894", "0.5977612", "0.5954959", "0.59414417", "0.59240437", "0.5918534", "0.5914279", "0.59116024", "0.5909082", "0.5909082", "0.5909082", "0.59054923", "0.5904128", "0.5903855", "0.590284", "0.5885118", "0.5875697", "0.58684695", "0.58535", "0.58460015", "0.58426213", "0.5841355", "0.5831566", "0.5808141", "0.57986975", "0.57946384", "0.57835144", "0.5776531", "0.5772168", "0.57635534", "0.57612574", "0.575789", "0.575789", "0.5757607", "0.5751116", "0.5745372", "0.57423574", "0.57413274", "0.57383096", "0.57368046", "0.5727272", "0.5709565", "0.570643", "0.57015276", "0.5701312", "0.5698785", "0.5697915", "0.5691527", "0.5679485" ]
0.0
-1
Roll them all out into a new ArrayList.
@Override public Collection<T> values() { List<T> values = new ArrayList<>(); for (Map.Entry<String, T> v : entries.values()) { values.add(v.getValue()); } return values; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void prepareArrayLists() {\n mArrQueries = new ArrayList<>(Arrays.asList(DiscoverConstants.RESTAURANT, DiscoverConstants.MUSEUM, DiscoverConstants.HOTEL, DiscoverConstants.CLUB));\n mArrRecyclerViews = new ArrayList<>(Arrays.asList(rvRestaurants, rvMuseums, rvHotels, rvClubs));\n mArrAdapters = new ArrayList<>(Arrays.asList(mAdapterRestaurants, mAdapterMuseums, mAdapterHotels, mAdapterClubs));\n mArrBusinesses = new ArrayList<>(Arrays.asList(mRestaurants, mMuseums, mHotels, mClubs));\n }", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "List<Object> toList() {\n List<Object> results = new ArrayList<>(this.myArrayList.size());\n for (Object element : this.myArrayList) {\n if (element == null || PropertyObject.NULL.equals(element)) {\n results.add(null);\n } else if (element instanceof PropertyArray) {\n results.add(((PropertyArray) element).toList());\n } else if (element instanceof PropertyObject) {\n results.add(((PropertyObject) element).toMap());\n } else {\n results.add(element);\n }\n }\n return results;\n }", "@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}", "public static final ArrayList list (Object ... items) {\r\n ArrayList sequence = new ArrayList();\r\n for (int i=0; i<items.length; i++) {\r\n sequence.add(items[i]);\r\n }\r\n return sequence;\r\n }", "@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }", "protected static ArrayList<Resource> asList(Resource... bundles) {\n\t\treturn new ArrayList<>(Arrays.asList(bundles));\n\t}", "public ArrayList getAll() {\r\n\t\tArrayList list = new ArrayList();\r\n\t\tlist.addAll(getParticles());\r\n\t\tlist.addAll(getConstraints());\r\n\t\tlist.addAll(getComposites());\r\n\t\treturn list;\r\n\t}", "public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }", "@Override\n public List<Entry> toArrayList() {\n return members;\n }", "public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }", "ArrayList<E> getAll();", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "public static < E > ArrayList<E> readArrayList () throws IOException, ClassNotFoundException{\n ArrayList<E> outputArrayList = new ArrayList<E>();\n // åbn inputstreams på al.ser\n FileInputStream fi = new FileInputStream(\"al.ser\");\n ObjectInputStream oi = new ObjectInputStream(fi);\n // cast til arraylist af generisk type\n outputArrayList = (ArrayList<E>) oi.readObject();\n // luk inputstreams og returner\n oi.close();\n fi.close();\n return outputArrayList;\n }", "public ArrayList<Book> getBookList()\r\n {\r\n ArrayList<Book> bookCopy = new ArrayList<Book>();\r\n //Add code here to copy the bookList ArrayList elements into the local variable bookCopy and return bookCopy\r\n //Hint: You will use the 2-arg Book constructor and the getters or you can add a copy constructor to the Book\r\n //Class\r\n for(Book book: bookList){\r\n Book bk = new Book(book.getTitle(), book.getPrice());\r\n bookCopy.add(bk);\r\n }\r\n return bookCopy;\r\n }", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "public ArrayList<Integer> createList(){\r\n \tArrayList<Integer> test = new ArrayList<>();\r\n \tstarLabels = new ArrayList<>();\r\n \tconstLabels = new ArrayList<>();\r\n \tplanetLabels = new ArrayList<>();\r\n \tmesrLabels = new ArrayList<>();\r\n \tmoonLabel = new ArrayList<>();\r\n \t\r\n \tint a = 0;\r\n \tint b = 1;\r\n \tint c = 2;\r\n \tint d = 3;\r\n \t\r\n \tint size;\r\n \t\r\n \t//Go through the spaceobjectlist\r\n \tfor(int i = 0; i < AlexxWork2.spaceObjList.size(); i++) {\r\n \t\t\r\n \t\t//If object is visible and object has positive altitude continue\r\n \t\tif(AlexxWork2.spaceObjList.get(i).getMagnitude() != null \r\n \t\t\t\t&& (Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) \r\n \t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 0.5) {\r\n\t \t\t\r\n \t\t\t\r\n \t\t\t//Calculate X and Y\r\n \t\t\tint x = getX(2250, 2250, 1000, \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n \t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n \t\t\t\r\n\t\t\t\tint y = getY(2250, 2250, 1000, \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAzimuth(), \r\n\t\t\t\t\t\t(int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\r\n\t\t\t\t//Load stars\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"STAR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\") {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(AlexxWork2.starNamesCB \r\n\t\t\t\t\t\t\t&& Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()) <= 6.0) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//Filter out number only star names\r\n\t\t\t\t\t\t\tint testInt = Integer.parseInt(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t} catch (NumberFormatException | NullPointerException nfe) {\r\n\t\t\t\t\t\t\t\tstarLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(x));\r\n\t\t\t\t\t\t\t\tstarLabels.add(String.valueOf(y));\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\t//Load constellation data\r\n\t\t\t\t\tif(herculesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadHerculesLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMinorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ursaMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadUrsaMajorLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(libraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tString name = AlexxWork2.spaceObjList.get(i).getProperName();\r\n\t\t\t\t\t\tloadLibraLocation(name, x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(andromedaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAndromedaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aquilaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAquilaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ariesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAriesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(aurigaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadAurigaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(bootesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadBootesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cancerNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCancerLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMajorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMajorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(canisMinorNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCanisMinorLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(capricornusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCapricornusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cassiopeiaNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCassiopeiaLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(centaurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCentaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cepheusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCepheusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cruxNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCruxLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(cygnusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadCygnusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(dracoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadDracoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(geminiNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadGeminiLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(hydraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadHydraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(leoNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLeoLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(lyraNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadLyraLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(orionNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadOrionLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(pegasusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPegasusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(perseusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPerseusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(piscesNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadPiscesLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(sagittariusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadSagittariusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(scorpioNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadScorpioLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(taurusNames.contains(AlexxWork2.spaceObjList.get(i).getProperName())) {\r\n\t\t\t\t\t\tloadTaurusLocation(AlexxWork2.spaceObjList.get(i).getProperName(), x, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Add coordinates to list\r\n\t \t\ttest.add(a, x);\r\n\t \t\ttest.add(b, y);\r\n\t \t\t\r\n\t \t\t//Add moon information if visible\r\n\t \t\tif(AlexxWork2.spaceObjList.get(i).getProperName() == \"MOON\") {\r\n size = 22;\r\n String moonName = AlexxWork2.spaceObjList.get(i).getProperName() + \": \" + AlexxWork2.spaceObjList.get(i).getType();\r\n moonLabel.add(0, moonName);\r\n moonLabel.add(1, String.valueOf(x));\r\n moonLabel.add(2, String.valueOf(y));\r\n }\r\n\t \t\t\r\n\t \t\t//If object is planet, set the size\r\n\t \t\telse if(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\"){\r\n\t \t\t\tsize = 16;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else set size based on mag\r\n\t \t\telse{\r\n\t \t\t\tsize = getSize(Double.valueOf(AlexxWork2.spaceObjList.get(i).getMagnitude()));\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Add size to list\r\n\t \t\ttest.add(c, size);\r\n\t \t\ttest.add(d, size);\r\n\t \t\ta = d + 1;\r\n\t \t\tb = a + 1;\r\n\t \t\tc = b + 1;\r\n\t \t\td = c + 1;\r\n \t\t}\r\n \t\t\r\n \t\t//Load constellation labels\r\n \t\tif(AlexxWork2.constellationsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"CONST\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getConstName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tconstLabels.add(AlexxWork2.spaceObjList.get(i).getConstName());\r\n\t\t\t\t\tconstLabels.add(String.valueOf(x));\r\n\t\t\t\t\tconstLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load planet labels\r\n \t\tif(AlexxWork2.planetsCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"PLAN\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tplanetLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(x));\r\n\t\t\t\t\tplanetLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t\r\n \t\t//Load messier labels\r\n \t\tif(AlexxWork2.messierCB) {\r\n\t\t\t\tif(AlexxWork2.spaceObjList.get(i).getType() == \"MESR\" \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != null \r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getProperName() != \"\"\r\n\t\t\t\t\t\t&& AlexxWork2.spaceObjList.get(i).getAltitude() > 1) {\r\n\t\t\t\t\tint x = getX(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\tint y = getY(2250, 2250, 1000, (int)AlexxWork2.spaceObjList.get(i).getAzimuth(), (int)AlexxWork2.spaceObjList.get(i).getAltitude());\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tmesrLabels.add(AlexxWork2.spaceObjList.get(i).getProperName());\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(x));\r\n\t\t\t\t\tmesrLabels.add(String.valueOf(y));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n \t\r\n \t//Return list \r\n \treturn test;\r\n }", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "public ArrayList getList() {\n \t\treturn list;\n \t}", "public TempList(T... all) {\n list = new ArrayList<T>(all.length);\n for (int i = 0; i < all.length; i++)\n list.add(all[i]);\n }", "public ArrayList<Item> createItemList() {\n return itemLines\n .stream()\n .map(this::writeLineItemNumber)\n .map(this::createItem)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }", "public ArrayList<Item> createArrayList(int items) {\n\t\tArrayList<Item> array = new ArrayList<Item>();\n\t\tfor (int i=0;i<items;i++) {\n\t\t\t\n\t\t\tItem item = genItem(i,items);\n\t\t\tarray.add(item);\n\t\t}\n\t\t\n\t\t\n\t\treturn array;\n\t\t\n\t}", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "public ArrayList<ItemListElement> formatOutputForList() {\n \t\n \tArrayList<ItemListElement> item = new ArrayList<ItemListElement>();\n \t\n \tfor (int i = 0;i < currentTaskItems.size(); i++) {\n \t\n \t\t//map for item\n \t\t//0 -> number of item\n \t\t//1 -> item type\n \t\t//2 -> description\n \t\tString[] s = currentTaskItems.get(i);\n \t\tString top = s[0] + \" \" + s[1] + \" file(s)\";\n \t\tString bottom = \"Description: \" + s[2];\n \t\t\n \t\t//add the item to the list\n \t\titem.add(new ItemListElement(\n \t\t Utility.getIconFromString(s[1]), \n \t\t top, bottom));\n \t} \t\n \treturn item; \t\n }", "public ArrayList<T> getAll() {\n\t\treturn new ArrayList<T>(this.data.values());\n\t}", "public TempList(Collection< ? extends T> all) {\n list = new ArrayList<T>(all);\n }", "private static List forestIntoList() {\n List temp = new ArrayList<Integer>();\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n temp.add(forest[i][j]);\n }\n }\n return temp;\n }", "ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}", "public ArrayList<String> combineLists(Set<String> hs){\t\n\t\tArrayList<String> newList = new ArrayList<String>(hs);\n\t\tString[] tempString = newList.toArray(new String[newList.size()]);\n\t\tint[] tempInt = new int[tempString.length];\n\t\tfor(int i = 0; i < tempInt.length; i++){\n\t\t\ttempInt[i] = Integer.parseInt(tempString[i]);\n\t\t}\n\t\tArrays.sort(tempInt);\n\t\tnewList.clear();\n\t\tfor(int i = 0; i < tempInt.length; i++){\n\t\t\tnewList.add(String.valueOf(tempInt[i]));\n\t\t}\n\t\treturn newList;\n\t}", "public ArrayList<Item> getListItemFromLocationAll()\r\n\t{\r\n\t\tArrayList<Item> tempListItem = new ArrayList<Item>();\r\n\t\tfor(int i = 0; i < this.listLocation.size(); i++) \r\n\t\t{\r\n\t\t\tLocation tempLocation = this.listLocation.get(i);\r\n\t\t\ttempListItem.addAll(tempLocation.getListItem());\r\n\t\t}\r\n\t\treturn tempListItem;\r\n\t}", "public void create() {\n String[] arrays = new String[100];\n ArrayList<String> list1 = new ArrayList(); //Object[10]\n list1.size(); //0\n list1.add(\"Vivek\"); //object[0] = \"Vivek\"\n list1.size(); //1\n list1.get(0);//\"Vivek\"\n\n list1.remove(1);\n\n list1.add(0, \"Vivek\");\n\n\n ArrayList<String> list3 = new ArrayList<String>(list1);\n\n ArrayList<Student> list = new ArrayList<Student>();\n\n\n\n }", "public ArrayList<ArrayList<Task>> loadAllTasklists() {\n\t\tArrayList<ArrayList<Task>> superlist = new ArrayList<ArrayList<Task>>();\n\n\t\tfor (TasklistEnum listType : TasklistEnum.values()) {\n\t\t\tFile src = new File(directory, listType.filename());\n\t\t\tArrayList<Task> loadedList = storageReader.loadTasklist(src, listType);\n\t\t\tsuperlist.add(loadedList);\n\t\t}\n\t\treturn superlist;\n\t}", "private List<T> getCompList(){\n\t\tList<T> l = new ArrayList<T>();\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tl.add(list.get(i));\n\t\t\t}\n\t\t}\n\t\treturn l;\n\t}", "public void addList()\n\t{\n\t\tdlm_patch.clear();\n\t\tif (pf.getAllPatch_DB() != null)\n\t\t{\n\t\t\tfor ( Patch p : pf.getAllPatch_DB() )\n\t\t\t\tdlm_patch.addElement(p);\n\t\t}\n\t}", "public static ArrayList<String> copy(ArrayList<String> original) {\n\t\tArrayList<String> copy = new ArrayList<String>();\r\n\t\tfor (int i = 0; i < original.size(); i++) {\r\n\t\t\tcopy.add(original.get(i));\r\n\t\t}\r\n\t\treturn copy;\r\n\t}", "private ArrayList<ArrayList<String>> createArrayListsFromBaselineTable(){\n ArrayList<ArrayList<String>> returnArrayList = new ArrayList<>();\n ArrayList<String> station1ArrayList = new ArrayList<>();\n ArrayList<String> station2ArrayList = new ArrayList<>();\n DefaultTableModel bsltm = (DefaultTableModel)baselineStationsTable.getModel();\n if(bsltm.getRowCount()>0){\n for(int i = 0; i<bsltm.getRowCount();i++){\n String station1 = ((ArrayList)bsltm.getDataVector().elementAt(i)).get(0).toString();\n String station2 = ((ArrayList)bsltm.getDataVector().elementAt(i)).get(1).toString();\n station1ArrayList.add(station1);\n station2ArrayList.add(station2);\n }\n }\n \n returnArrayList.add(station1ArrayList);\n returnArrayList.add(station2ArrayList);\n \n return returnArrayList;\n }", "@Override\n public ArrayList<String> toArrayList()\n {\n ArrayList<String> list = new ArrayList<>();\n list.add(\"SHOP\");\n list.addAll(super.toArrayList());\n list.add(address);\n list.add(city);\n list.add(zip);\n list.add(String.valueOf(latitude));\n list.add(String.valueOf(longitude));\n list.add(String.valueOf(averageReviews));\n list.add(String.valueOf(numReviews));\n list.add(String.valueOf(intLongitude));\n list.add(new Gson().toJson(tags));\n list.add(new Gson().toJson(hours));\n return list;\n }", "@SuppressWarnings (\"unchecked\") public void addAll(ItemList list){\n items.addAll(list.items);\n }", "public List toList() throws TemplateModelException {\n if (unwrappedList == null) {\n Class listClass = list.getClass();\n List result = null;\n try {\n result = (List) listClass.newInstance();\n } catch (Exception e) {\n throw new TemplateModelException(\"Error instantiating an object of type \" + listClass.getName() + \"\\n\" + e.getMessage());\n }\n BeansWrapper bw = BeansWrapper.getDefaultInstance();\n for (int i=0; i<list.size(); i++) {\n Object elem = list.get(i);\n if (elem instanceof TemplateModel) {\n elem = bw.unwrap((TemplateModel) elem);\n }\n result.add(elem);\n }\n unwrappedList = result;\n }\n return unwrappedList;\n }", "public void addDatatoArrayList(ArrayList<Object> ar1) {\n\t\tar1.add(1);\n\t\tar1.add(\"anu\");\n\t\tar1.add(1.3);\n\t\tar1.add(true);\n\t\tar1.add('&');\n\t\tar1.add(false);\n\t\tSystem.out.println(\"Data aaded to ArrayList\");\n\t}", "public <T> void makeArrayList(List<T> list) {\n\t\tList<T> list1 = new ArrayList<T>(); // now we can create the list using \"T\"\n\t\tlist1.addAll(list);\n\t}", "public void borrarListas() {\n\n\t\tthis.jugadoresEnMesa = new ArrayList<Jugador>();\n\t\tListaJugadores.jugadoresRetirados = new ArrayList<Jugador>();\n\n\t}", "private <T extends IDElement> ArrayList<Object[]> transformElementListToList(ArrayList<T> pElementList, int pElementType) throws Exception{\r\n\t\tArrayList<Object[]> vRet = new ArrayList<Object[]>();\r\n\t\t\r\n\t\tif (pElementList!= null) {\r\n\t\t\tfor (T vCur : pElementList) {\r\n\t\t\t\tswitch(pElementType) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tvRet.add(transformProbElementToList((ProbElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvRet.add(transformPrioElementToList((PrioElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception(\"02; tELtL,Edi\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else throw new Exception(\"04; tELtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }", "ArrayList<Unit> extend(){\n return list;\n }", "public ArrayList<Card> giveAllCards() {\n\t\tArrayList<Card> temp = new ArrayList<Card>();\n\t\ttemp.addAll(cards);\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t\treturn temp;\n\t}", "private void setToDoLists(){\n\n ArrayList<String> groceries = new ArrayList<String>();\n groceries.add(\"groceries\");\n groceries.add(\"apples\");\n groceries.add(\"gogurts\");\n groceries.add(\"cereal\");\n groceries.add(\"fruit roll ups\");\n groceries.add(\"lunch meat\");\n groceries.add(\"milk\");\n groceries.add(\"something for dessert\");\n groceries.add(\"steak\");\n groceries.add(\"milksteak\");\n groceries.add(\"cookies\");\n groceries.add(\"brewzongs\");\n\n ArrayList<String> bills = new ArrayList<String>();\n bills.add(\"bills\");\n bills.add(\"car loan\");\n bills.add(\"cable\");\n bills.add(\"rent\");\n\n ArrayList<String> emails = new ArrayList<String>();\n emails.add(\"emails\");\n\n ArrayList<ArrayList<String>> tmpMyList;\n tmpMyList = new ArrayList<ArrayList<String>>();\n\n tmpMyList.add(groceries);\n tmpMyList.add(bills);\n tmpMyList.add(emails);\n\n myList = tmpMyList;\n\n }", "private ArrayList<Concert> cloneConcertList(){\n ArrayList<Concert> tempConcertList = new ArrayList<Concert>();\n tempConcertList.addAll(concertList);\n return tempConcertList;\n }", "private ArrayList<Node<T>> addAll(Node<T> current, ArrayList<Node<T>> list) {\n\t\tlist.add(current);\n\t\tif (current.getLeft() != null) {\n\t\t\tlist = addAll(current.getLeft(), list);\n\t\t}\n\t\t\n\t\tif (current.getRight() != null) {\n\t\t\tlist = addAll(current.getRight(), list);\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "private List<ItemModel> addList() {\n List<ItemModel> items = new ArrayList<>();\n\n managerlist = new ArrayList(strangerList);\n for(int i = 0; i < managerlist.size(); i++)\n if(managerlist.get(i).getId().equals(mPI.getId())) {\n managerlist.remove(i);\n break;\n }\n for(PersonalInformation i : managerlist){\n items.add(new ItemModel(i.getGraph(), i.getName(), i.getCity(), i.getAge()));\n }\n return items;\n }", "Object getTolist();", "private ArrayList<String> postOrder()\n\t{\n\t\tArrayList<String> rlist = new ArrayList<String>();\n\t\tpostOrder(this,rlist);\n\t\treturn rlist;\n\t}", "protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "private Object[] getObjects(ArrayList objectList) {\n Object[] objects = new Object[objectList.size()];\n for(int i=0; i<objectList.size(); ++i)\n objects[i] = objectList.get(i);\n return objects;\n }", "public ArrayList<ArrayList<Dog>> getVetSchedule() {\n\t\t\tint initialCapacity = 10;\r\n\t\t\tArrayList<ArrayList<Dog>> list = new ArrayList<ArrayList<Dog>>(initialCapacity); //list to put in lists of dogs\r\n\t\t\t//intialize ArrayList with size ArrayList\r\n\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t/*for(int i=0; i<=10; i++){\r\n\t\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\tDogShelterIterator iterator = new DogShelterIterator();\r\n\t\t\twhile(iterator.hasNext()){\r\n\t\t\t\tDog nextDog = iterator.next();\r\n\t\t\t\tint index = nextDog.getDaysToNextVetAppointment()/7;\r\n\t\t\t\tif(index < list.size())list.get(index).add(nextDog);\r\n\t\t\t\telse{\r\n\t\t\t\t\t//index out of range --> create larger list\r\n\t\t\t\t\tArrayList<ArrayList<Dog>> newList = new ArrayList<ArrayList<Dog>>(index+1);\r\n\t\t\t\t\tnewList.addAll(list); //add all lists from the old list\r\n\t\t\t\t\tfor(int i=0; i<(index+1)-list.size(); i++){ //initialize the other half with new ArrayLists\r\n\t\t\t\t\t\tnewList.add(new ArrayList<Dog>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlist = newList; //update list to the larger newList\r\n\t\t\t\t\tlist.get(index).add(nextDog);\r\n\t\t\t\t}\r\n\t\t\t}\r\n return list;\r\n\t\t}", "public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }", "public static ArrayList<Events> getEventsArrayList(){\n if (EVENTS_ARRAY_LIST.isEmpty()){\n EVENTS_ARRAY_LIST.addAll(generateEventList());\n }\n return EVENTS_ARRAY_LIST;\n }", "private ArrayList<Record> getItemsToAdd() {\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\r\n\t\tlist = myConn.populateRecords();\r\n\t\t//myConn.connectionClose();\r\n\r\n\t\treturn list;\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList ar=new ArrayList();\n\t\tar.add(100);\n\t\tar.add(200);\n\t\t\n\t\t ArrayList<Integer> arr=new ArrayList<Integer>();\n\t\t arr.add(10);\n\t\t arr.add(200);\n\t\t arr.add(400);\n\t\t \n\t\t \n\t\t System.out.println(arr.size());//length of arraylist\n\t\t \n\t\t //iteration\n\t\t for(int i=0;i<arr.size();i++) {\n\t\t\t System.out.println(i);\n\t\t }\n\t\t \n\t\t for(Integer e:arr) {\n\t\t\t System.out.println(e);\n\t\t }\n\t\t \n\t\t arr.stream().forEach(e->System.out.println(e));\n\t\t \n\t\t Iterator<Integer>it=arr.iterator();\n\t\t while(it.hasNext()) {\n\t\t\t System.out.println(it.next());\n\t\t }\n\t\tSystem.out.println(\"******************************************\");\n\n\t\t//create one arraylist with another\n\t\t\n\t\tArrayList<Integer> list= new ArrayList<Integer>(Arrays.asList(10,20,30,40,50));\n\t\t\n\t\t//arraylist methods\n\t\t//1.Add\n\t\tlist.add(90);\n\t\tSystem.out.println(list);\n\t\t\n\t\t//2.AddAll\n\t\tArrayList<String> ar1=new ArrayList<String>(Arrays.asList(\"Ruby\",\"Python\",\"Java\",\"C#\"));\n\t\t\n\t\tArrayList<String> ar2=new ArrayList<String>(Arrays.asList(\"Testing\",\"Devops\"));\n\n\t\tar1.addAll(ar2);\n\t\tar2.addAll(ar1);\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar2);\n\t\t\n\t\t//3.clear\n\t\t//ar1.clear();\n\t\tSystem.out.println(ar1);\n\t\t\n\t\t//4.clone\n\t\tArrayList<String> clonelist=( ArrayList<String>)ar2.clone();\n\t\tSystem.out.println(clonelist);\n\n\t\t//5.contains\n\t\tSystem.out.println(ar2.contains(\"python\"));\n\t\t\n\t\t//6.index of\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar1.indexOf(\"java\")>0);\n\t\t\n\t\t//7.last index of-returns inetegre\n\t\t\n\t\tArrayList<String> list1=new ArrayList<String>(Arrays.asList(\"Anu\",\"Naveen\",\"Tom\"));\n\t\tint i=list1.lastIndexOf(\"test\");\n\t\tSystem.out.println(i);\n\t\t\n\t\t//8.remove\n\t\tlist1.remove(1);\n\t\tlist1.remove(\"Anu\");\n\t\t\n\t\t//9.removeif\n\t\tArrayList<Integer> numbers=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10));\n\t\tnumbers.removeIf(num->num%2==0);//printing all odd numbers /elimnating even numbers\n\t\tSystem.out.println(numbers);\n\t\t\n\t\t//10.retain All\n\t\tArrayList<String> al=new ArrayList<String>(Arrays.asList(\"ANu\",\"Robin\",\"Sky\",\"Red\"));\n\t\tal.retainAll(Collections.singleton(\"ANu\"));\n\t\tSystem.out.println(al);\n\t\t\n\t\t//11.How to create a substring from arraylist\n\t\tArrayList<Integer> no=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,12,13,14));\n\t\t\n\t\tArrayList<Integer> substring=new ArrayList<Integer>(no.subList(3, 9));\n\t\tSystem.out.println(substring);\n\t\t\n\t\t//How to convert an arraylist to array\n\t\tObject arr1[]=no.toArray();\n\t\tSystem.out.println(Arrays.toString(arr1));\n\t\t\n\t\tfor(Object e:arr1) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\t/*How to synchronise arraylist\n\t\t * 1.collections.synchronisedlist()->returns a synchronised list\n\t\t * 2.CopyOnWriteArraylist-synchronised variant of arraylist\n\t\t*/\n\t\t\n\t\tList<String> namelist=(List<String>) Collections.synchronizedCollection(new ArrayList<String>());\n\t\t\n\t\t\n\t\t//How to remove duplicate elements using linkedhashset and streams\n\t\t\n\t\t//how to compare 2 arraylist\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\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\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\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\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList(ArrayList<E> lst) {\n list = (E[])new Object[lst.size()];\n capacity = lst.capacity;\n size = lst.size;\n for(int i = 0; i < size; i++) {\n list[i] = lst.list[i];\n }\n }", "private static void initializeLists() {\n\t\t\n\t\t//read from serialized files to assign array lists\n\t\t//customerList = (ArrayList<Customer>) readObject(customerFile);\n\t\t//employeeList = (ArrayList<Employee>) readObject(employeeFile);\n\t\t//applicationList = (ArrayList<Application>) readObject(applicationFile);\n\t\t//accountList = (ArrayList<BankAccount>) readObject(accountFile);\n\t\t\n\t\t//read from database to assign array lists\n\t\temployeeList = (ArrayList<Employee>)employeeDao.readAll();\n\t\tcustomerList = (ArrayList<Customer>)customerDao.readAll();\n\t\taccountList = (ArrayList<BankAccount>) accountDao.readAll();\n\t\tapplicationList = (ArrayList<Application>)applicationDao.readAll();\n\t\t\n\t\tassignBankAccounts();\n\t}", "public List<List<Die>> getCollections (){\n List<List<Die>> dieList = new ArrayList<>();\n for(int i = 1; i<getRound(); i++) {\n dieList.add(new ArrayList<>());\n dieList.get(i - 1).addAll(getDice(i));\n }\n return dieList;\n }", "public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }", "@NotNull\n private static List<P> list(P... ps) {\n List<P> result = new ArrayList<>();\n Collections.addAll(result, ps);\n return result;\n }", "private void createRuleList()\n {\n\n ArrayList<String> tempList0 = new ArrayList<String>();\n ArrayList<String> tempList1 = new ArrayList<String>();\n ArrayList<String> tempList2 = new ArrayList<String>();\n ArrayList<String> tempList3 = new ArrayList<String>();\n ArrayList<String> tempList4 = new ArrayList<String>();\n ArrayList<String> tempList5 = new ArrayList<String>();\n ArrayList<String> tempList6 = new ArrayList<String>();\n ArrayList<String> tempList7 = new ArrayList<String>();\n ArrayList<String> tempList8 = new ArrayList<String>();\n ArrayList<String> tempList9 = new ArrayList<String>();\n ArrayList<String> tempList10 = new ArrayList<String>();\n ArrayList<String> tempList11 = new ArrayList<String>();\n ArrayList<String> tempList12 = new ArrayList<String>();\n ArrayList<String> tempList13 = new ArrayList<String>();\n ArrayList<String> tempList14 = new ArrayList<String>();\n ArrayList<String> tempList15 = new ArrayList<String>();\n ArrayList<String> tempList16 = new ArrayList<String>();\n ArrayList<String> tempList17 = new ArrayList<String>();\n ArrayList<String> tempList18 = new ArrayList<String>();\n ArrayList<String> tempList19 = new ArrayList<String>();\n ArrayList<String> tempList20 = new ArrayList<String>();\n ArrayList<String> tempList21 = new ArrayList<String>();\n ArrayList<String> tempList22 = new ArrayList<String>();\n ArrayList<String> tempList23 = new ArrayList<String>();\n ArrayList<String> tempList24 = new ArrayList<String>();\n ArrayList<String> tempList25 = new ArrayList<String>();\n ArrayList<String> tempList26 = new ArrayList<String>();\n ArrayList<String> tempList27 = new ArrayList<String>();\n ArrayList<String> tempList28 = new ArrayList<String>();\n ArrayList<String> tempList29 = new ArrayList<String>();\n ArrayList<String> tempList30 = new ArrayList<String>();\n ArrayList<String> tempList31 = new ArrayList<String>();\n ArrayList<String> tempList32 = new ArrayList<String>();\n ArrayList<String> tempList33 = new ArrayList<String>();\n ArrayList<String> tempList34 = new ArrayList<String>();\n ArrayList<String> tempList35 = new ArrayList<String>();\n ArrayList<String> tempList36 = new ArrayList<String>();\n ArrayList<String> tempList37 = new ArrayList<String>();\n ArrayList<String> tempList38 = new ArrayList<String>();\n ArrayList<String> tempList39 = new ArrayList<String>();\n ArrayList<String> tempList40 = new ArrayList<String>();\n ArrayList<String> tempList41 = new ArrayList<String>();\n ArrayList<String> tempList42 = new ArrayList<String>();\n ArrayList<String> tempList43 = new ArrayList<String>();\n ArrayList<String> tempList44 = new ArrayList<String>();\n ArrayList<String> tempList45 = new ArrayList<String>();\n ArrayList<String> tempList46 = new ArrayList<String>();\n ArrayList<String> tempList47 = new ArrayList<String>();\n ArrayList<String> tempList48 = new ArrayList<String>();\n\n //There is no rule 0, so index 0 is left blank\n tempList0.add(\"\");\n ruleList.add(tempList0);\n //Create a list for each index position, then add it on to the overall list of lists\n tempList1.add(\"make-<PROGRAM>\");\n tempList1.add(\"DEFINITIONS\");\n ruleList.add(tempList1);\n tempList2.add(\"NULL\");\n ruleList.add(tempList2);\n tempList3.add(\"DEFINITIONS\");\n tempList3.add(\"DEF\");\n ruleList.add(tempList3);\n tempList4.add(\"make-<DEF>\");\n tempList4.add(\"BODY\");\n tempList4.add(\"TYPE\");\n tempList4.add(\"colon\");\n tempList4.add(\"rightParen\");\n tempList4.add(\"FORMALS\");\n tempList4.add(\"leftParen\");\n tempList4.add(\"make-<IDENTIFIER>\");\n tempList4.add(\"IDENTIFIER\");\n tempList4.add(\"function\");\n ruleList.add(tempList4);\n tempList5.add(\"make-<FORMALS>\");\n ruleList.add(tempList5);\n tempList6.add(\"NONEMPTYFORMALS\");\n ruleList.add(tempList6);\n tempList7.add(\"NEFREST\");\n tempList7.add(\"FORMAL\");\n ruleList.add(tempList7);\n tempList8.add(\"NONEMPTYFORMALS\");\n tempList8.add(\"comma\");\n ruleList.add(tempList8);\n tempList9.add(\"make-<FORMALS>\");\n ruleList.add(tempList9);\n tempList10.add(\"make-<FORMAL>\");\n tempList10.add(\"TYPE\");\n tempList10.add(\"colon\");\n tempList10.add(\"make-<IDENTIFIER>\");\n tempList10.add(\"IDENTIFIER\");\n ruleList.add(tempList10);\n tempList11.add(\"PRINTBODY\");\n ruleList.add(tempList11);\n tempList12.add(\"make-<BODY>\");\n tempList12.add(\"EXPR\");\n ruleList.add(tempList12);\n tempList13.add(\"BODY\");\n tempList13.add(\"PRINTSTATEMENT\");\n ruleList.add(tempList13);\n tempList14.add(\"make-integer\");\n tempList14.add(\"integer\");\n ruleList.add(tempList14);\n tempList15.add(\"make-boolean\");\n tempList15.add(\"boolean\");\n ruleList.add(tempList15);\n tempList16.add(\"EXPRREST\");\n tempList16.add(\"SIMPLEEXPR\");\n ruleList.add(tempList16);\n tempList17.add(\"EXPRREST\");\n tempList17.add(\"make-<BINARY>\");\n tempList17.add(\"EXPR\");\n tempList17.add(\"lessThan\");\n ruleList.add(tempList17);\n tempList18.add(\"EXPRREST\");\n tempList18.add(\"make-<BINARY>\");\n tempList18.add(\"EXPR\");\n tempList18.add(\"equals\");\n ruleList.add(tempList18);\n tempList19.add(\"make-<EXPR>\");\n ruleList.add(tempList19);\n tempList20.add(\"SIMPLEEXPRREST\");\n tempList20.add(\"TERM\");\n ruleList.add(tempList20);\n tempList21.add(\"SIMPLEEXPRREST\");\n tempList21.add(\"make-<BINARY>\");\n tempList21.add(\"SIMPLEEXPR\");\n tempList21.add(\"or\");\n ruleList.add(tempList21);\n tempList22.add(\"SIMPLEEXPRREST\");\n tempList22.add(\"make-<BINARY>\");\n tempList22.add(\"SIMPLEEXPR\");\n tempList22.add(\"plus\");\n ruleList.add(tempList22);\n tempList23.add(\"SIMPLEEXPRREST\");\n tempList23.add(\"make-<BINARY>\");\n tempList23.add(\"SIMPLEEXPR\");\n tempList23.add(\"minus\");\n ruleList.add(tempList23);\n tempList24.add(\"NULL\");\n ruleList.add(tempList24);\n tempList25.add(\"TERMREST\");\n tempList25.add(\"FACTOR\");\n ruleList.add(tempList25);\n tempList26.add(\"TERMREST\");\n tempList26.add(\"make-<BINARY>\");\n tempList26.add(\"TERM\");\n tempList26.add(\"and\");\n ruleList.add(tempList26);\n tempList27.add(\"TERMREST\");\n tempList27.add(\"make-<BINARY>\");\n tempList27.add(\"TERM\");\n tempList27.add(\"multiply\");\n ruleList.add(tempList27);\n tempList28.add(\"TERMREST\");\n tempList28.add(\"make-<BINARY>\");\n tempList28.add(\"TERM\");\n tempList28.add(\"divide\");\n ruleList.add(tempList28);\n tempList29.add(\"NULL\");\n ruleList.add(tempList29);\n tempList30.add(\"make-<if-EXPR>\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"else\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"then\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"if\");\n ruleList.add(tempList30);\n tempList31.add(\"NOTFACTOR\");\n ruleList.add(tempList31);\n tempList32.add(\"IDENTIFIERMAIN\");\n ruleList.add(tempList32);\n tempList33.add(\"LITERAL\");\n ruleList.add(tempList33);\n tempList34.add(\"NEGFACTOR\");\n ruleList.add(tempList34);\n tempList35.add(\"rightParen\");\n tempList35.add(\"EXPR\");\n tempList35.add(\"leftParen\");\n ruleList.add(tempList35);\n tempList36.add(\"make-<UNARY>\");\n tempList36.add(\"FACTOR\");\n tempList36.add(\"not\");\n ruleList.add(tempList36);\n tempList37.add(\"make-<UNARY>\");\n tempList37.add(\"FACTOR\");\n tempList37.add(\"minus\");\n ruleList.add(tempList37);\n tempList38.add(\"IDENTIFIERREST\");\n tempList38.add(\"make-<IDENTIFIER>\");\n tempList38.add(\"IDENTIFIER\");\n ruleList.add(tempList38);\n tempList39.add(\"rightParen\");\n tempList39.add(\"ACTUALS\");\n tempList39.add(\"leftParen\");\n ruleList.add(tempList39);\n tempList40.add(\"NULL\");\n ruleList.add(tempList40);\n tempList41.add(\"NULL\");\n ruleList.add(tempList41);\n tempList42.add(\"NONEMPTYACTUALS\");\n ruleList.add(tempList42);\n tempList43.add(\"NEAREST\");\n tempList43.add(\"EXPR\");\n ruleList.add(tempList43);\n tempList44.add(\"NONEMPTYACTUALS\");\n tempList44.add(\"comma\");\n ruleList.add(tempList44);\n tempList45.add(\"make-Function-Call\");\n tempList45.add(\"make-<ACTUALS>\");\n ruleList.add(tempList45);\n tempList46.add(\"make-<NUMBER>\");\n tempList46.add(\"NUMBER\");\n ruleList.add(tempList46);\n tempList47.add(\"make-<BOOLEAN>\");\n tempList47.add(\"BOOLEAN\");\n ruleList.add(tempList47);\n tempList48.add(\"make-Function-Call\");\n tempList48.add(\"rightParen\");\n tempList48.add(\"EXPR\");\n tempList48.add(\"leftParen\");\n tempList48.add(\"make-<IDENTIFIER>\");\n tempList48.add(\"print\");\n ruleList.add(tempList48);\n }", "private ArrayList<String> getArrayList() throws IOException {\n long jumpTo = 0;\n ArrayList<String> arrayList = new ArrayList<String>();\n arrayList.add(readStringUntil0x());\n boolean notFound = true;\n while (notFound == true) {\n ins.skip(jumpTo);\n String actIndex = readStringUntil0x();\n long lowerIndex = readJumpOffset();\n long upperIndex = readJumpOffset();\n if ((searchIndex.compareTo(actIndex) < 0) && (lowerIndex > 0)) {\n jumpTo = lowerIndex - 1;\n } else if ((searchIndex.compareTo(actIndex) > 0) && upperIndex > 0) {\n jumpTo = upperIndex - 1;\n } else if (searchIndex.compareTo(actIndex) == 0) {\n notFound = false;\n // reading all the found lines\n actIndex = readStringUntil0x();\n while (!actIndex.equalsIgnoreCase(\"\")) {\n arrayList.add(actIndex);\n actIndex = readStringUntil0x();\n }\n } else {\n notFound = false;\n arrayList = null;\n }\n }\n return arrayList;\n }", "private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\n }", "private ArrayList<String> convertToStringArrayList() {\r\n\t\tArrayList<String> strList = new ArrayList<String>();\r\n\t\tStringBuilder strBuilder = new StringBuilder();\r\n\t\tfor (int i = 0; i < gameBoard.getmBoard().length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard.getmBoard()[0].length; j++) {\r\n\t\t\t\tstrBuilder.append(gameBoard.getIdValue(gameBoard.genId(i, j)));\r\n\t\t\t}\r\n\t\t\tstrList.add(strBuilder.toString());\r\n\t\t\tstrBuilder.setLength(0);\r\n\t\t}\r\n\r\n\t\tif (gameBoard.isPlayerBlackTurn()) {\r\n\t\t\tstrList.add(\"t\");\r\n\t\t} else {\r\n\t\t\tstrList.add(\"f\");\r\n\t\t}\r\n\r\n\t\tstrList.add(((Integer) gameBoard.getBlackScore()).toString());\r\n\t\tstrList.add(((Integer) gameBoard.getRedScore()).toString());\r\n\t\treturn strList;\r\n\t}", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public TempList<T> addAll(Iterable< ? extends T> all) {\n chk();\n if (all instanceof Collection)\n list.addAll((Collection< ? extends T>) all);\n else if (all != null) {\n for (T x : all)\n list.add(x);\n }\n return this;\n }", "@Override\r\n\tpublic void fill(ArrayList<T> list) {\r\n\t\t//Copy of list\r\n\t\tArrayList<T> copyData = list;\r\n\t\t// Add copy of list to the Stack\r\n\t\tfor (T e: copyData) {\r\n\t\t\tdata.add(e);\r\n\t\t}\r\n\t}", "public static void restoreList() {\n\n if (copyList.isEmpty())\n return;\n\n\n getList().clear();\n\n for (Map<String, ?> item : copyList) {\n getList().add(item);\n }\n\n copyList.clear();\n //Log.d(\"test\", \"After restore: Champlist size \" + getSize() + \" copylist size \" + copyList.size());\n\n }", "private List<LinkedHashMap<String, String>> resultSetToArrayList(ResultSet rs) throws SQLException {\r\n ResultSetMetaData md = rs.getMetaData();\r\n int columns = md.getColumnCount();\r\n ArrayList list = new ArrayList(50);\r\n while (rs.next()) {\r\n LinkedHashMap row = new LinkedHashMap(columns);\r\n for (int i = 1; i <= columns; ++i) {\r\n row.put(md.getColumnName(i), rs.getObject(i));\r\n }\r\n list.add(row);\r\n }\r\n return list;\r\n }", "public void addInventoryList(ArrayList<? extends Item> toAddList){\n\t\tinventoryList.addAll(toAddList);\n\t}", "public ArrayList<ItemCategory> createItemCategoryList() {\n return categoryLines\n .stream()\n .map(this::writeLineNumber)\n .map(this::createItemList)\n .peek(this::addCategoryForFasterTesting)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "public ArrayList<Item> getItems() {\r\n\t\titems.clear();\r\n\t\tCursor cursor = db.query(SkyleConstants.TABLE_ITEMS, allColumns, null, null, null, null, null);\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\twhile (!cursor.isAfterLast()) {\r\n\t\t\tString ID = cursor.getString(cursor.getColumnIndex(SkyleConstants.KEY_ID));\r\n\t\t\tString type = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_TYPE));\r\n\t\t\tString date = cursor.getString(cursor.getColumnIndex(SkyleConstants.DATE_NAME));\r\n\t\t\tString path = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_PATH));\r\n\t\t\t\r\n\t\t\tLog.i(TAG, \"elements: \"+type+\", \"+path);\r\n\t\t\t\r\n\t\t\tItem item = new Item(ID, type, date, path);\t\t\t\r\n\t\t\titems.add(item);\r\n\t\t\tcursor.moveToNext();\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tLog.i(TAG, \"arraylist: \"+items.toString());\r\n\t\treturn items;\r\n\t}", "private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}", "@Override\n public ArrayList<Object> getFieldsAsList() {\n if (!getParsed()) {\n parse();\n }\n if (cachedList == null) {\n cachedList = new ArrayList<Object>();\n } else {\n cachedList.clear();\n }\n for (int i = 0; i < getFields().length; i++) {\n cachedList.add(uncheckedGetField(i));\n }\n return cachedList;\n }", "private List<Point> toList(){\n List<Point> pointsList = new ArrayList<Point>();\n int n = pointsStack.size();\n for (int i = 0; i < n; i++){\n pointsList.add(pointsStack.pop());\n }\n return pointsList;\n }", "synchronized void toCrawlList_addAll(LinkedHashSet _toCrawlList, ArrayList _links)\n {\n _toCrawlList.addAll(_links);\n }", "@Override\r\n\tpublic ArrayList<ListItem> getAllListItemsByShoppingLists(ShoppingList sl) {\r\n\t\treturn this.listItemMapper.findAllListItemsby(sl);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}", "private ArrayList<Read> makeReadList() {\r\n\t\tArrayList<Read> rlist=makeReadList2();\r\n\t\tif(mateStream!=null){\r\n\t\t\tListNum<Read> matesln=mateStream.nextList();\r\n\t\t\tArrayList<Read> mates=matesln.list;\r\n\t\t\tif(rlist!=null && mates!=null){\r\n\t\t\t\tint max=Tools.min(rlist.size(), mates.size());\r\n\t\t\t\tfor(int i=0; i<max; i++){\r\n\t\t\t\t\tRead a=rlist.get(i);\r\n\t\t\t\t\tRead b=mates.get(i);\r\n\t\t\t\t\ta.mate=b;\r\n\t\t\t\t\tb.mate=a;\r\n\t\t\t\t\tb.setPairnum(1);\r\n\t\t\t\t}\r\n\t\t\t\tmates.clear();\r\n\t\t\t\tmateStream.returnList(matesln, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rlist;\r\n\t}", "public static void slide127() {\n ArrayList<String> obj = new ArrayList<String>();\n\n //This is how we add elements to an ArrayList\n obj.add(\"Alex\");\n obj.add(\"Con\");\n obj.add(\"Paul\");\n obj.add(\"Estel\");\n obj.add(\"Peter\");\n\n // Displaying elements\n System.out.println(\"Original ArrayList:\");\n for(String str:obj)\n System.out.println(str);\n\n // Add element at the specific index\n\n obj.add(0, \"Mary\");\n obj.add(1, \"Justin\");\n\n // Displaying elements\n System.out.println(\"ArrayList after add operation:\");\n for(String str:obj)\n System.out.println(str);\n\n //Remove elements from ArrayList like this\n obj.remove(\"Peter\");\n obj.remove(\"Paul\");\n\n // Displaying elements\n System.out.println(\"ArrayList after remove operation:\");\n for(String str:obj)\n System.out.println(str);\n\n // Edit element from ArrayList\n obj.set(2, \"Tom\");\n\n // Displaying elements\n System.out.println(\"ArrayList after edit operation:\");\n for(String str:obj)\n System.out.println(str);\n\n\n //Remove element from the specified index\n obj.remove(1); //Removes Second element from the List\n\n // Displaying elements\n System.out.println(\"Final ArrayList:\");\n for(String str:obj)\n System.out.println(str);\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\r\n return new ArrayList<ELEMENT>();\r\n }", "public ArrayListBag() {\n\t\tlist = new ArrayList<T>();\n\t}", "public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "@Deprecated\n public synchronized void splitOutputList() {\n logger.debug3(\"Splitting\");\n listStack.push(new ArrayList());\n }", "protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\n return new ArrayList<ELEMENT>();\n }", "public void addALl(List<T> list){\n for(int i = 0; i < list.size(); i++){\n add(list.get(i));\n }\n }", "public MyArrayList() {\n this.IntList = new int[10];\n this.CharList = new Character[10];\n this.StringList = new String[5];\n \n // fill all 3 arrays with data\n for(int i = 0; i < IntList.length; i++) {\n IntList[i] = (int) (Math.random()*52);\n }\n\t \n // Populate char array\n for(int i = 0; i < CharList.length; i++) {\n \n Random random = new Random();\n CharList[i] = (char)(random.nextInt(26) + 'a');\n }\n\t \n // Populate String array\n StringList[0] = \"joe\";\n StringList[1] = \"mark\";\n StringList[2] = \"abbey\";\n StringList[3] = \"tony\";\n StringList[4] = \"kevin\"; \n }" ]
[ "0.6601226", "0.639036", "0.62667567", "0.6258979", "0.62474513", "0.6160662", "0.6096445", "0.6083957", "0.5985295", "0.59672064", "0.5942836", "0.59045595", "0.5897144", "0.5874042", "0.58444995", "0.5808939", "0.57946336", "0.57927716", "0.57852864", "0.5785127", "0.5766979", "0.57350403", "0.5717608", "0.5707995", "0.56958896", "0.5667975", "0.56638914", "0.5663401", "0.56487024", "0.5641269", "0.56309336", "0.56039226", "0.55964655", "0.5583967", "0.55798537", "0.55792904", "0.5578345", "0.5570019", "0.556943", "0.5563934", "0.5554885", "0.5545901", "0.55413944", "0.55327994", "0.5531867", "0.5530285", "0.5523233", "0.55101955", "0.55099607", "0.5504386", "0.55017436", "0.5500192", "0.5499718", "0.54954344", "0.5493416", "0.5491117", "0.5486304", "0.54852396", "0.548382", "0.5481235", "0.5480599", "0.54643404", "0.5455158", "0.5448177", "0.5445586", "0.54189503", "0.54139334", "0.54106414", "0.54085666", "0.5406486", "0.5397782", "0.5394184", "0.53941727", "0.53908634", "0.53829354", "0.53806007", "0.53733337", "0.5360738", "0.53521216", "0.5351628", "0.53473216", "0.5345954", "0.53451663", "0.5344243", "0.53442174", "0.5341693", "0.53414047", "0.53398263", "0.5337065", "0.5335465", "0.53318787", "0.5327062", "0.5323714", "0.5322616", "0.5319135", "0.5316801", "0.53041565", "0.53041565", "0.53027636", "0.52997166", "0.528971" ]
0.0
-1
Roll them all out into a new TreeSet.
@Override public Set<Map.Entry<String, T>> entrySet() { Set<Map.Entry<String, T>> entrySet = new TreeSet<>(); for (Map.Entry<String, Map.Entry<String, T>> v : entries.entrySet()) { entrySet.add(new Entry<>(v)); } return entrySet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\r\n TreeSet<point> ts1 = new TreeSet<>();\r\n ts1.add(new point(1,1));\r\n ts1.add(new point(5, 5));\r\n ts1.add(new point(5, 2));\r\n\r\n System.out.println(ts1);\r\n }", "public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=new TreeSet(h1);\r\n\t\tt1.add(100);\r\n\t\tSystem.out.println(t1);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\t TreeSet<String> treeset = new TreeSet<String>();\r\n\t\t treeset.add(\"Good\");\r\n\t\t treeset.add(\"For\");\r\n\t\t treeset.add(\"Health\");\r\n\t\t //Add Duplicate Element\r\n\t\t treeset.add(\"Good\");\r\n\t\t System.out.println(\"TreeSet : \");\r\n\t\t for (String temp : treeset) {\r\n\t\t System.out.println(temp);\r\n\t\t }\r\n\t\t }", "public static void main(String[] args) {\n\n\n TreeSet<String> t = new TreeSet();\n\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n\n TreeSet<String> u = t;\n\n for (String x : t) {\n System.out.println(x);\n u.add(\"\" + new Date());\n }\n\n }", "<T extends Comparable> SortedSet<T> sorted(Set<T> in) {\n return new TreeSet<>(in);\n }", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "public static void main(String[] args) {\n SortedSet<Long> longTreeSet = new TreeSet<>();\n longTreeSet.add(3L);\n longTreeSet.add(3L);\n longTreeSet.add(39L);\n longTreeSet.add(30L);\n longTreeSet.add(30L);\n\n System.out.println(\"longTreeSet = \" + longTreeSet);\n System.out.println(\"longTreeSet.size() = \" + longTreeSet.size());\n System.out.println(\"longTreeSet.first() = \" + longTreeSet.first());\n System.out.println(\"longTreeSet.last() = \" + longTreeSet.last());\n\n longTreeSet.addAll(Arrays.asList(15L, 18L, 15L, 18L));\n System.out.println(\"longTreeSet = \" + longTreeSet);\n\n //longTreeSet.add(null);\n // System.out.println(\"longTreeSet = \" + longTreeSet);\n\n\n System.out.println(\"longTreeSet.subSet(15L, 21L) = \" + longTreeSet.subSet(15L, 30L));\n System.out.println(\"longTreeSet.headSet(18L) = \" + longTreeSet.headSet(18L));\n System.out.println(\"longTreeSet.tailSet(18L) = \" + longTreeSet.tailSet(18L));\n\n SortedSet<Long> tailView = longTreeSet.tailSet(18L);\n System.out.println(\"tailView.remove(30L) = \" + tailView.remove(30L));\n System.out.println(\"longTreeSet = \" + longTreeSet);\n\n\n\n }", "public static void main(String[] args) \n\t{\n\t\tSortedSet<String> ts = new TreeSet<String>(); \n\n\t\t// Adding elements into the TreeSet \n\t\t// using add() \n\t\tts.add(\"Sravan\"); \n\t\tts.add(\"Ojaswi\"); \n\t\tts.add(\"Bobby\"); \n\t\tts.add(\"Rohith\"); \n\t\tts.add(\"Gnanesh\"); \n\t\tts.add(\"Devi2\"); \n\n\t\t// Adding the duplicate \n\t\t// element \n\t\tts.add(\"Sravan\"); \n\n\t\t// Displaying the TreeSet \n\t\tSystem.out.println(ts); \n\n\t\t// Removing items from TreeSet \n\t\t// using remove() \n\t\tts.remove(\"Ojaswi\"); \n\n\t\t// Iterating over Tree set items \n\t\tSystem.out.println(\"Iterating over set:\"); \n\t\tIterator<String> i = ts.iterator(); \n\t\twhile (i.hasNext()) \n\t\t\tSystem.out.println(i.next()); \n\t}", "public SyncedTreeSet() {\n _treeSet = new TreeSet<T>();\n }", "public static void main(String[] args) {\n\t\tTreeSet<String> ts = new TreeSet<String>();\n\t\t\n\t\tts.add(\"\");\n\t\t//System.out.println(ts);\n\n\t\tts.add(\"Red\");\n\t\tts.add(\"Green\");\n\t\tts.add(\"Blue\");\n\t\tts.add(\"White\");\n\t\tts.add(\"Orange\");\n\t\tts.add(\"\");\n\n\t\tSystem.out.println(ts);\n\t\tSystem.out.println(ts.size());\n\n\t\t// List<String> li = new ArrayList<String>(ts);\n\n\t\tTreeSet<String> ts1 = new TreeSet<String>();\n\n\t\tts1.add(\"Red\");\n\t\tts1.add(\"Green\");\n\t\tts1.add(\"Blue\");\n\t\tts1.add(\"WWhite\");\n\t\tts1.add(\"OOrange\");\n\n\t\tfor (String tss : ts) {\n\t\t\tSystem.out.println(ts1.contains(tss) ? \"YES\" : \"NO\");\n\t\t}\n\n\t\tTreeSet<Integer> ts2 = new TreeSet<Integer>();\n\n\t\tts2.add(1);\n\t\tts2.add(2);\n\t\tts2.add(3);\n\t\tts2.add(5);\n\t\tts2.add(9);\n\n\t\tIterator<Integer> itr = ts2.headSet(3).iterator();\n\n\t\twhile (itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\n\t\tSystem.out.println(\"======\");\n\n\t\tIterator<Integer> itr2 = ts2.tailSet(3).iterator();\n\n\t\twhile (itr2.hasNext()) {\n\t\t\tSystem.out.println(itr2.next());\n\t\t}\n\n\t\tSystem.out.println(\"======\");\n\n\t\tSystem.out.println(ts2.ceiling(11));\n\t\tSystem.out.println(ts2.floor(3));\n\n\t\tSystem.out.println(\"======\");\n\n\t\tSystem.out.println(ts2.lower(3));\n\t\tSystem.out.println(ts2.higher(3));\n\t\t\n\t\tSystem.out.println(\"======\");\n\t\t\n\t\tTreeSet t = new TreeSet();\n\t\t\n\t\tt.add(new StringBuffer(\"AA\"));\n\t\tt.add(new StringBuffer(\"BB\"));\n\t\tSystem.out.println(t);\n\t\t\n\n\t\t// ts1.addAll(ts);\n\t\t// System.out.println(ts1);\n\n\t\t/*\n\t\t * System.out.println(\"Treeset to ArrayList: \" + li); Collections.reverse(li);\n\t\t * System.out.println(\"After Reversing: \" + li);\n\t\t */\n\n\t\t/*\n\t\t * Iterator<String> itr = ts.iterator();\n\t\t * \n\t\t * while (itr.hasNext()) { System.out.println(itr.next()); }\n\t\t */\n\t}", "public static void main(String[] args) {\n\n// SortedSet<Integer> set=new TreeSet<>();\n// set.add(45);\n// set.add(3);\n// set.add(12);\n// System.out.println(set);\n\n SortedSet<User> set=new TreeSet<>();\n set.add(new User(34,\"r\"));\n set.add(new User(4,\"j\"));\n set.add(new User(14,\"x\"));\n System.out.println(set);\n }", "public static void main(String[] args) {\n\n Set<Student> set = Sets.newTreeSet();\n Student s3 = new Student(3);\n Student s4 = new Student(4);\n Student s5 = new Student(5);\n Student s1 = new Student(1);\n Student s2 = new Student(2);\n List<Student> list = Lists.newArrayList();\n list.add(s4);\n list.add(s3);\n list.add(s5);\n list.add(s1);\n list.add(s2);\n\n list.sort(new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n return o1.getAge() - o2.getAge() < 0 ? 1 : -1;\n }\n });\n System.out.println(list);\n\n// s1.toString();\n// set.add(s3);\n// set.add(s4);\n// set.add(s5);\n// set.add(s1);\n// set.add(s2);\n// System.out.println(set);\n// for (Student s : set) {\n// System.out.println(s);\n// }\n\n\n }", "private void setup() {\r\n final int gsz = _g.getNumNodes();\r\n if (_k==2) {\r\n\t\t\tNodeComparator2 comp = new NodeComparator2();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t} else { // _k==1\r\n\t\t\tNodeComparator4 comp = new NodeComparator4();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t}\r\n for (int i=0; i<gsz; i++) {\r\n _origNodesq.add(_g.getNodeUnsynchronized(i)); // used to be _g.getNode(i)\r\n }\r\n _nodesq = new TreeSet(_origNodesq);\r\n //System.err.println(\"done sorting\");\r\n }", "public static void main(String[] args) {\n TreeSet<String> colorsTreeSet = new TreeSet<String>();\n colorsTreeSet.add(\"Red\");\n colorsTreeSet.add(\"White\");\n colorsTreeSet.add(\"Yellow\");\n colorsTreeSet.add(\"Black\");\n colorsTreeSet.add(\"Green\");\n colorsTreeSet.add(\"Pink\");\n\n System.out.println(\"\\n1. Java program to create a new tree set, add some colors (string) and print out the tree set\\n\" + colorsTreeSet);\n\n//2. Write a Java program to iterate through all elements in a tree set.\n System.out.println(\"\\n2. Java program to iterate through all elements in a tree set\");\n for (String element : colorsTreeSet) {\n System.out.print(element + \", \");\n }\n//3. Write a Java program to add all the elements of a specified tree set to another tree set.\n TreeSet<String> colorsTreeSet2 = new TreeSet<String>();\n colorsTreeSet2.addAll(colorsTreeSet);\n System.out.println(\"\\n\\n3. Java program to add all the elements of a specified tree set to another tree set.\\n\" + colorsTreeSet2);\n\n//4. Write a Java program to create a reverse order view of the elements contained in a given tree set.\n Iterator it = colorsTreeSet.descendingIterator();\n System.out.println(\"\\n4. Java program to create a reverse order view of the elements contained in a given tree set.\");\n while (it.hasNext()) {\n System.out.print(it.next() + \", \");\n }\n\n//5. Write a Java program to get the first and last elements in a tree set.\n System.out.println(\"\\n\\n5. Java program to get the first and last elements in a tree set.\");\n Object first_element = colorsTreeSet.first();\n System.out.println(\"The first element is: \" + first_element);\n\n // Find last element of the tree set\n Object last_element = colorsTreeSet.last();\n System.out.println(\"The last element is: \" + last_element);\n\n//6. Write a Java program to clone a tree set list to another tree set.\n TreeSet<String> cloneColors = (TreeSet<String>) colorsTreeSet.clone();\n System.out.println(\"\\nJava program to clone a tree set list to another tree set.\\n\" + cloneColors);\n\n//7. Write a Java program to get the number of elements in a tree set.\n System.out.println(\"\\nJava program to get the number of elements in a tree set.\\n\" + cloneColors.size());\n\n//8. Write a Java program to compare two tree sets.\n System.out.println(\"\\n8. Java program to compare two tree sets.\");\n TreeSet<String> compareColors = new TreeSet<String>();\n for (String element : colorsTreeSet) {\n System.out.println(cloneColors.contains(element) ? \"Yes\" : \"No\");\n }\n\n //9. Write a Java program to find the numbers less than 7 in a tree set.\n System.out.println(\"\\n9. Java program to find the numbers less than 7 in a tree set.\");\n\n TreeSet<Integer> treeSetNum = new TreeSet<Integer>();\n TreeSet<Integer> treeheadset = new TreeSet<Integer>();\n\n // Add numbers in the tree\n treeSetNum.add(1);\n treeSetNum.add(2);\n treeSetNum.add(3);\n treeSetNum.add(5);\n treeSetNum.add(6);\n treeSetNum.add(7);\n treeSetNum.add(8);\n treeSetNum.add(9);\n treeSetNum.add(10);\n\n treeheadset = (TreeSet) treeSetNum.headSet(7);\n\n Iterator iterator;\n iterator = treeheadset.iterator();\n\n while (iterator.hasNext()) {\n System.out.print(iterator.next() + \", \");\n }\n\n//10. Write a Java program to get the element in a tree set which is greater than or equal to the given element.\n System.out.println(\"\\n\\n10. Java program to get the element in a tree set which is greater than or equal to the given element.\");\n int element = 5;\n int i = treeSetNum.ceiling(element);\n\n System.out.println(\"Greater than or equal \" + element + \" is: \" + i);\n\n//11. Write a Java program to get the element in a tree set which is less than or equal to the given element.\n System.out.println(\"\\n11. Java program to get the element in a tree set which is less than or equal to the given element.\");\n int element2 = 6;\n int j = treeSetNum.floor(element2);\n\n System.out.println(\"GLess than or equal to \" + element2 + \" is: \" + j);\n\n//12. Write a Java program to get the element in a tree set which is strictly greater than or equal to the given element.\n System.out.println(\"\\n12. Java program to get the element in a tree set which is strictly greater than or equal to the given element.\");\n int element3 = 4;\n int a = treeSetNum.higher(element3);\n\n System.out.println(\"Strictly greater than \" + element3 + \" is: \" + a);\n\n//13. Write a Java program to get an element in a tree set which is strictly less than the given element.\n System.out.println(\"\\n13. Java program to get an element in a tree set which is strictly less than the given element.\");\n int element4 = 4;\n int b = treeSetNum.lower(element4);\n\n System.out.println(\"Strictly less than \" + element4 + \" is: \" + b);\n\n//14. Write a Java program to retrieve and remove the first element of a tree set.\n System.out.println(\"\\n14. Removes the first element:\\n\" + colorsTreeSet.pollFirst());\n\n//15. Write a Java program to retrieve and remove the last element of a tree set.\n System.out.println(\"\\n15. Removes the last element:\\n\" + colorsTreeSet.pollLast());\n\n//16. Write a Java program to remove a given element from a tree set.\n if (treeSetNum.remove(8)) {\n System.out.println(\"\\n16. Java program to remove a given element from a tree set.\\n\" + treeSetNum);\n } else {\n System.out.println(\"\\n16. Java program to remove a given element from a tree set.\\n\" + \"Element isn't correct\");\n }\n }", "public static <T extends Comparable> Set<T> CreateSortedSet() {\n return new TreeSet<>();\n }", "public static void main(String[] args) {\n\t\tTreeSet<String> myset=new TreeSet<String>();\r\n\t\t myset.add(\"ardra\");\r\n\t\t myset.add(\"anakha\");\r\n\t\t myset.add(\"anusha\");\r\n\t\t myset.add(\"ananya\");\r\n\t\t \r\n\t\t \r\n\t\t TreeSet<String> myset1=new TreeSet<String>();\r\n\t\t myset1=(TreeSet<String>) myset.clone();\r\n\t\t System.out.println(myset1);\r\n\t\t \r\n\r\n\t}", "public static void main(String[] args) {\n TreeSet<Employee> treeEmp = new TreeSet<>();\n \n for(int i =0; i<100 ; i++){\n treeEmp.add(new Employee(\"Pera\"+i, (int)(Math.random()*100+1)));\n } \n \n \n Iterator<Employee> iteratorEmp = treeEmp.iterator();\n while (iteratorEmp.hasNext()) { \n Employee ite = iteratorEmp.next();\n System.out.println(\"Empployee name: \"+ite.name+\" id: \"+ite.id);\n }\n \n System.out.println(treeEmp.first());\n System.out.println(treeEmp.last());\n \n Employee e = new Employee(\"Perica499\");\n e.id = \"50\";\n treeEmp.add(e);\n Iterator<Employee> headSetIterator = treeEmp.headSet(e).iterator();\n while (headSetIterator.hasNext()) { \n System.out.println(\"object Id \"+headSetIterator.next().id);\n }\n \n System.out.println(\"*****************************\");\n \n TreeSet<Employee> emps = new TreeSet<>(new CustomComparator());\n \n \n }", "public static void main(String[] args) {\n TreeSet<String> ts = new TreeSet<>(new MyComp().reversed());\n\n ts.add(\"C\");\n ts.add(\"B\");\n ts.add(\"A\");\n ts.add(\"G\");\n ts.add(\"Z\");\n ts.add(\"Q\");\n\n for (String element : ts){\n System.out.print(element);\n }\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tTreeSet<String> ts = new TreeSet<String>();\n\t\tts.add(\"D\");\n\t\tts.add(\"B\");\n\t\tts.add(\"E\");\n\t\tts.add(\"A\");\n\t\tts.add(\"C\");\n\t\tts.add(\"B\");\t\t//duplicates are not stored\n\t\tts.add(null);\n\t\tSystem.out.println(\"Elements of TreeSet:\\n\" + ts);\n\t\t\n\t\tSortedSet<String> ts2 = new TreeSet<String>();\t//SortedSet is an interface\n\t\tts2 = ts.subSet(\"B\", \"D\");\n\t\tSystem.out.println(ts2);\n\t\t\n\t\tts2 = ts.subSet(\"B\", false, \"E\", true);\n\t\tSystem.out.println(ts2);\n\t}", "public static void main(String args[]) {\n\tSystem.out.println(\"--------------------------------------------------------------------\");\r\n\tSystem.out.println(\"Program 2.2: Sorting TreeSet when it has user-defined Objects/values\");\r\n\tTreeSet TS3 = new TreeSet();\r\n\tassign3And4_SubClass_Employee e31 = new assign3And4_SubClass_Employee(9, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e41 = new assign3And4_SubClass_Employee(4, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e51 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e61 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tTS3.add(e31);\r\n\tTS3.add(e41);\r\n\tTS3.add(e51);\r\n\tTS3.add(e61);\r\n\tSystem.out.println(\"Sorted TreeSet TS3 is : \"+TS3); // sort then in Asc order + it doesnt allow duplicate values.\r\n\t}", "public static void main(String[] args) {\n\t\t \n\t\tTreeSet<String> obj = new TreeSet<String>();\n\t\t\n\t\t\n\t\tobj.add(\"ABC\");\n\t\tobj.add(\"String\");\n\t\tobj.add(\"Test\");\n\t\tobj.add(\"Pen\");\n\t\tobj.add(\"Ink\");\n\t\tobj.add(\"Jack\");\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tTreeSet<Integer> obj1 = new TreeSet<Integer>();\n\t\t\n\t\tobj1.add(88);\n\t\tobj1.add(45);\n\t\tobj1.add(7);\n\t\tobj1.add(3);\n\t\tobj1.add(222);\n\t\t\n\t\tSystem.out.println(obj1);\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n TreeSet<String> set = new TreeSet<String>();\n try {\n set.add(\"hello\");\n set.add(\"world\");\n set.add(\"welcome\");\n set.add(\"all\");\n set.add(\"all\");\n set.add(\"welcome\");\n\n for (String num : set) {\n System.out.println( num);\n\n }\n// set.add(null);\n } catch (NullPointerException e) {\n System.out.println(e);\n System.out.println(\"Set doesn't allow null value and duplicate value\");\n }\n\n }", "public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }", "public static void main(String[] args) {\n HashSet<String> hashSet = new HashSet<>();\n hashSet.add(\"Orange\");\n hashSet.add(\"Red\");\n hashSet.add(\"Pink\");\n hashSet.add(\"Red\");\n hashSet.add(\"White\");\n System.out.println(hashSet);\n TreeSet<String> treeSet = new TreeSet<>(hashSet);\n for (String color : treeSet) {\n System.out.println(color);\n }\n\n }", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "private Set<E> toSet(Node<E> n) {\n Set<E> result = new HashSet<>();\n toSet(result, n);\n return result;\n }", "@Test\r\n public void addAllWorks() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n ArrayList<Integer> array = new ArrayList<>();\r\n array.add(1);\r\n array.add(2);\r\n array.add(3);\r\n s.addAll(array);\r\n assertTrue(s.contains(1));\r\n assertTrue(s.contains(2));\r\n assertTrue(s.contains(3));\r\n }", "public static void main(String[] args) {\n\t\t\tList<String> hrLeaders = new ArrayList<>();\n\t\t\thrLeaders.add(\"762 - Barry Bonds\");\n\t\t\thrLeaders.add(\"755 - Hank Aaron\");\n\t\t\thrLeaders.add(\"714 - Babe Ruth\");\n\t\t\thrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"686 - Brandon Davis\");\n\t\t\thrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\tSystem.out.println(\"*****LIST EXAMPLE*****\");\n\t\t\tSystem.out.println(\"Here are the top \" + hrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\thrLeaders.set(0, \"763 - Mike Trout\");\n\t\t\tSystem.out.println(\"Updated Home Run List \\n\" + hrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set1 = new TreeSet<String>(hrLeaders); \n\t System.out.println(tree_Set1);\n\t \n\t System.out.print( \"\\n\\n\" );\t\n\t\t\t\n\t\t\tSystem.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\n//Map EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****Map EXAMPLE*****\");\n\t\t\tMap<Integer, String> AhrLeaders = new HashMap<>();\n\t\t\tAhrLeaders.put(762, \"Barry Bonds\");\n\t\t\tAhrLeaders.put(755, \"Hank Aaron\");\n\t\t\tAhrLeaders.put(714, \"Babe Ruth\");\n\t\t\tAhrLeaders.put(687, \"Alex Rodriquez\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(686, \"Brandon Davis\");\n\t\t\tAhrLeaders.put(660, \"Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + AhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(AhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tArrayList<Integer> keyList = new ArrayList<Integer>(AhrLeaders.keySet());\n\t\t ArrayList<String> valueList = new ArrayList<String>(AhrLeaders.values());\n\n\t\t System.out.println(\"Top Homerun Leaders by number of Homeruns ::\"+keyList);\n\t\t System.out.println(\"Top Homerun Leaders by Name ::\"+valueList);\n\t\t\t\n\t\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n//Set EXAMPLE and Treeset//\t\t\n\t\t\tSystem.out.println(\"*****Set EXAMPLE*****\");\n\t\t\tSet<String> BhrLeaders = new HashSet<String>();\n\t\t\tBhrLeaders.add(\"762 - Barry Bonds\");\n\t\t\tBhrLeaders.add(\"755 - Hank Aaron\");\n\t\t\tBhrLeaders.add(\"714 - Babe Ruth\");\n\t\t\tBhrLeaders.add(\"687 - Alex Rodriquez\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"686 - Brandon Davis\");\n\t\t\tBhrLeaders.add(\"660 - Willie Mays\");\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Here are the top \" + BhrLeaders.size() + \" homerun leaders of all time!\");\n\t\t\tSystem.out.print(BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\n\t\t\tBhrLeaders.add(\"661 - Mike Trout\"); \n\t\t\tSystem.out.println(\"Updated Home Run List: \\n\" + BhrLeaders);\n\t\t\t\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\t\t\t\n\t\t\tSystem.out.print(\"Sorted Set after passing into TreeSet: \\n\"); \n\t Set<String> tree_Set = new TreeSet<String>(BhrLeaders); \n\t System.out.println(tree_Set);\n\t\t\t\n\t System.out.print( \"_______________________________________________________________________\" );\n\t\t\tSystem.out.print( \"\\n\\n\" );\n\n//Queue EXAMPLE//\t\t\n\t\t\tSystem.out.println(\"*****QUEUE EXAMPLE*****\");\n\t\t\t\n\t\t\tList<String> listhrLeaders = Arrays.asList(\"Barry Bond - 762\", \"Hank Aaron - 755\", \"Babe Ruth - 714\", \"Alex Rodriequez - 687\", \"Brandon Davis - 686\", \"Brandon Davis - 686\", \"Willie Mays - 660\");\n\t\t\tQueue<String> queueNames = new LinkedList<>(listhrLeaders);\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\tqueueNames.add(\"661 - Mike Trout\");\n\t\t\tqueueNames.add(\"660 - Bryce Harper\");\n\t\t\tSystem.out.println(queueNames);\n\t\t\t\n\t\t\t\t\t\n\t\n\t}", "public MyTreeSet()\r\n {\r\n root = null;\r\n }", "public static void main(String[] args) {\n SortedSet<String> fruits = new TreeSet<>(Comparator.reverseOrder());\n\n /*\n The above TreeSet with the custom Comparator is the concise form of the following:\n SortedSet<String> fruits = new TreeSet<>(new Comparator<String>() {\n @Override\n public int compare(String s1, String s2) {\n return s2.compareTo(s1);\n }\n });\n */\n\n // Adding new elements to a TreeSet\n fruits.add(\"Banana\");\n fruits.add(\"Apple\");\n fruits.add(\"Pineapple\");\n fruits.add(\"Orange\");\n\n System.out.println(\"Fruits Set : \" + fruits);\n\n System.out.println(fruits.tailSet(\"Banana\"));\n System.out.println(fruits.subSet(\"Orange\", \"Banana\"));\n // creating a TreeSet\n TreeSet<Integer> treeadd = new TreeSet<>();\n\n // adding in the tree set\n treeadd.add(12);\n treeadd.add(11);\n treeadd.add(16);\n treeadd.add(15);\n\n // getting ceiling value for 13\n System.out.println(\"Ceiling value for 13: \" + treeadd.ceiling(13));//15\n System.out.println(\"Flooring value for 13: \" + treeadd.floor(13));//12\n }", "@Override\n public Set<K> keySet() {\n Set<K> keyset = new TreeSet<>();\n Inorder(root, keyset);\n return keyset;\n }", "public static void main(String[] args) \n {\n\t Scanner sc = new Scanner(System.in);\n TreeSet<String> tree = new TreeSet<String>();\n \n// Prompt user for a line of text containing characters:\n System.out.println(\"Enter line: \");\n String str = sc.nextLine();\n \n// Put words into tree:\n for (String s : str.split(\" \"))\n tree.add(s);\n \n// Print tree set use:\n System.out.println(tree);\n }", "public Set<T> toSet()\r\n\t{\r\n\t\tSet<T> s = new HashSet<T>();\r\n//\t\tSystem.out.println(\"in toSet method\");\r\n//\t\tSystem.out.println(\"thisTable.tostring \" + this.toString());\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\t\r\n\t\twhile (thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t//\tSystem.out.println(e + \" \");\r\n\t\t\ts.add(e);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "public static <T extends Comparable> Set<T> AsSortedSet(@NonNull T... ts) {\n return Create_UnModifiableSet_By_InputElements(ContainerUtil.<T>CreateSortedSet(), ts);\n }", "public static void main(String[] args) {\n Set<BankAccount> set=new TreeSet(new BankAccountTest());\n\tset.add(new BankAccount(128,\"mallika\",2000.0));\n\tset.add(new BankAccount(124,\"sallika1\",21000.0));\n\tset.add(new BankAccount(125,\"nallika2\",20000));\t\n\tfor(BankAccount bank:set){\n\t\tSystem.out.println(bank);\n\t}\n \n\t}", "public static void main(String[] args) {\n\t\t\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\tset.add(\"A\");\n\t\tset.add(\"B\");\n\t\tset.add(\"C\");\n\t\tset.add(\"D\");\n\t\tset.add(\"E\");\n\t\tset.add(\"F\");\n\t\t\n\t\tSystem.out.println(set);\n\n\t}", "public PointSET() {\n //s = new TreeSet<Point2D>(Point2D.X_ORDER);\n }", "public static void main(String[] args){\n\t\tTreeSet hs=new TreeSet();\n\t\t\n\t\ths.add(\"d\");\n\t\ths.add(\"c\");\n\t\ths.add(\"b\");\n\t\ths.add(\"a\");\n\t\ths.add(\"c\");\n\t\ths.add(\"i\");\n\t\ths.add(\"l\");\n\t\ths.add(new Integer(2));\n\t\ths.add(new Float(2));\n\t\t\n\t\t\t\t\n\t\tSystem.out.println(\"Hashset is \"+hs);\n\t\tSystem.out.println(\"Size of Hashset is \"+ hs.size());\n\t\t\n\t\tSystem.out.println(\"Does hashset contains this 'u' element \" + hs.contains(\"u\"));\t\t\n\t\tSystem.out.println(\"is hashset empty \" + hs.isEmpty());\n\t\tSystem.out.println(\"remove the element \"+hs.remove(\"i\"));\n\t\t\n\t\t\n\t hs.clear();\n\t System.out.println(\"get class \" +hs.getClass());\n\t\t\n\t System.out.println(\"is hashset empty \" +hs.isEmpty());\n\t \n\t \n\t\t\n\t}", "Set<X> toSet();", "static void AddCollections()\n\t{\n\t\tSet<String> oSet1 = null;\n\t\tSet<String> oSet2 = null;\n\t\ttry {\n\t\t\toSet1 = new TreeSet<String>();\n\t\t\toSet1.add(\"Apple\");\n\t\t\toSet1.add(\"Boy\");\n\t\t\toSet1.add(\"Cat\");\n\t\t\tSystem.out.println(oSet1);\n\t\t\t\n\t\t\toSet2 = new TreeSet<String>();\n\t\t\toSet2.add(\"Dog\");\n\t\t\toSet2.add(\"Arrow\");\n\t\t\toSet2.add(\"Frog\");\n\t\t\tSystem.out.println(oSet2);\n\t\t\t\n\t\t\toSet1.addAll(oSet2);\n\t\t\tSystem.out.println(oSet1);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet1 = null;\n\t\t\toSet2 = null;\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n\t\tTreeSet<String> ts= new TreeSet<String>();\r\n\t}", "public Set getFullSet(int iteration) {\r\n Dataset Data = getFullDataset(iteration);\r\n return new TreeSet(Data.getEntries());\r\n }", "public static void main(String[] args) {\n\t\t TreeSet<Integer> treeSet = new TreeSet<Integer>();\n\t\t \n\t\t treeSet.add(21);\n\t\t treeSet.add(10);\n\t\t treeSet.add(25);\n\t\t // treeSet.add(null);\n\t\t treeSet.add(25);\n\t\t //treeSet.add(null);\n\t\t long start = System.currentTimeMillis();\n\t\t Iterator<Integer> iterator = treeSet.iterator();\n\t\t while(iterator.hasNext())\n\t\t {\n\t\t\t System.out.println(iterator.next());\n\t\t }\n\t\t long end = System.currentTimeMillis();\n\t\t System.out.println(end - start);\n\t}", "public static void main(String[] args) {\n\t\tTreeSet<Integer> numset = new TreeSet<Integer>();//stored in order\n\t\tnumset.add(10);\n\t\tnumset.add(40); //string buffer is not implementing comparable class so it cannot be used in tree set\n\t\tnumset.add(30);\n\t\tnumset.add(20);\n\t\tnumset.add(10);\n\t\tSystem.out.println(numset);\n\t\tSystem.out.println(numset.headSet(40));//gives values lesser than it\n\t\tSystem.out.println(numset.tailSet(10));//gives equal or greater than it\n\t\tSystem.out.println(numset.subSet(10, 30));//gives starting values from starting and value before last element\n\t\tSortedSet<Integer> set2= new TreeSet<Integer>(); //store in sorted set\n\t\t\n\t\tset2=numset.subSet(10, 30);\n\t\tSystem.out.println(\"subset is \"+set2);\n\t\tSystem.out.println(numset.comparator());//returns null if values are already in order\n\t\tSystem.out.println(numset.higher(10));//gives value higher than this\n\t\tSystem.out.println(numset.lower(30));//gives value lower than this\n\t\tSystem.out.println(numset.descendingSet());\n\t\t\n\t\tIterator<Integer> iterator=numset.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\tIterator<Integer> iterator2=numset.descendingIterator();\n\t\twhile(iterator2.hasNext()) {\n\t\t\tSystem.out.println(iterator2.next());\n\t\t}\n\t}", "public static TreeSet<String> uniqueStems(Path inputFile) throws IOException {\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\ttry (BufferedReader reader = Files.newBufferedReader(inputFile);) {\n\t\t\tString line = null;\n\t\t\tStemmer stemmer = new SnowballStemmer(DEFAULT);\n\t\t\twhile ((line = reader.readLine())!= null) {\n\t\t\t\tset.addAll(uniqueStems(line, stemmer));\n\t\t\t}\n\t\t}\n\t\treturn set;\n\t}", "public static void main(String [] arguments){\n TreeSet<String> colors = new TreeSet<String>();\n\n // add to the Tree Set object\n colors.add(\"blue\");\n colors.add(\"yellow\");\n colors.add(\"green\");\n colors.add(\"red\");\n\n System.out.println(colors.size());\n\n //\n System.out.println(colors.first());\n System.out.println(colors.last());\n\n colors.remove(\"yellow\");\n\n System.out.println(\"After yellow was removed: \");\n\n for(String color : colors) {\n System.out.println(color);\n }\n\n System.out.println(\"Traveresing the Tree Set with a while loop:\");\n\n Iterator <String> iterator = colors.iterator();\n while(iterator.hasNext()) {\n System.out.println(iterator.next());\n }\n}", "@Test\r\n public void addAllFromSet() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n s.addAll(sInt);\r\n assertTrue(s.contains(1));\r\n assertTrue(s.contains(2));\r\n assertTrue(s.contains(3));\r\n assertTrue(s.contains(4));\r\n assertTrue(s.contains(5));\r\n }", "public static void main(String[] args) {\n SortedSet<CompareObject> objects = new TreeSet<>(new ComparatorTest());\n\n objects.add(new CompareObject(1));\n objects.add(new CompareObject(3));\n objects.add(new CompareObject(5));\n objects.add(new CompareObject(-13));\n objects.add(new CompareObject(12));\n objects.add(new CompareObject(1100));\n objects.add(new CompareObject(1));\n\n for (CompareObject x : objects){\n System.out.println(x);\n }\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tTreeSet<Object> treeSet = new TreeSet<Object>();\r\n\t treeSet.add(45);\r\n\t treeSet.add(15);\r\n\t treeSet.add(99);\r\n\t treeSet.add(70);\r\n\t treeSet.add(65);\r\n\t treeSet.add(30);\r\n\t treeSet.add(10);\r\n\t System.out.println(\"TreeSet Ascending order : \" + treeSet);\r\n\t NavigableSet<Object> res = treeSet.descendingSet();\r\n\t System.out.println(\"TreeSet after Descending order\" + res);\r\n\t \r\n\t // How to Change it Descending order For TreeMap\r\n\t TreeMap<Object,Object> treeMap = new TreeMap<Object,Object>();\r\n\t treeMap.put(1,\"A\");\r\n\t treeMap.put(5,\"B\");\r\n\t treeMap.put(3,\"C\");\r\n\t treeMap.put(7,\"F\");\r\n\t treeMap.put(2,\"G\");\r\n\t System.out.println(\"TreeMap Ascending order : \" + treeMap);\r\n\t NavigableMap<Object,Object> result = treeMap.descendingMap();\r\n\t System.out.println(\"TreeMap after Descending order\" + result);\r\n\t \r\n\t // Covert HashSet or List to Array\r\n\t HashSet<String> hset = new HashSet<String>();\r\n\t hset.add(\"Element1\");\r\n\t hset.add(\"Element2\");\r\n\t hset.add(\"Element3\");\r\n\t hset.add(\"Element4\");\r\n\t // Displaying HashSet elements\r\n\t System.out.println(\"HashSet contains: \"+ hset); \r\n\t // Creating an Array\r\n\t String[] array = new String[hset.size()];\r\n\t hset.toArray(array);\r\n\t // Displaying Array elements\r\n\t System.out.println(\"Array elements: \");\r\n\t for(String temp : array){\r\n\t System.out.println(temp);\r\n\t }\r\n\t \r\n\t // HashMap Creation with Load Factor \r\n\t Map<String, String> hmapFac = new HashMap<>(12,0.95f);\r\n\t hmapFac.put(\"1\", \"Debu\");\r\n\t hmapFac.put(\"2\", \"Debu\");\r\n\t hmapFac.put(\"3\", \"Shyam\");\r\n\t hmapFac.put(\"4\", \"Uttam\");\r\n\t hmapFac.put(\"5\", \"Gautam\");\r\n\t System.out.println(\"Created with Load Factor \" + hmapFac);\r\n\t \r\n\t \r\n\t \r\n\t //how to copy one hashmap content to another hashmap\r\n\t Map<String, String> hmap1 = new HashMap<>();\r\n\t hmap1.put(\"1\", \"Debu\");\r\n\t hmap1.put(\"2\", \"Debu\");\r\n\t hmap1.put(\"3\", \"Shyam\");\r\n\t hmap1.put(\"4\", \"Uttam\");\r\n\t hmap1.put(\"5\", \"Gautam\");\r\n\t // Create another HashMap\r\n\t HashMap<String, String> hmap2 = new HashMap<String, String>();\r\n\t // Adding elements to the recently created HashMap\r\n\t hmap2.put(\"7\", \"Jerry\");\r\n\t hmap2.put(\"8\", \"Tom\");\r\n\t // Copying one HashMap \"hmap\" to another HashMap \"hmap2\"\r\n\t hmap2.putAll(hmap1);\r\n\t System.out.println(\"After Copy in The HashMap \" + hmap2);\r\n\t \r\n\t // Map containsKey(), containsValue and get() method\r\n\t // get() by index for List and similar contains available for List , Set\r\n\t \r\n\t Map<String, String> map = new HashMap<>();\r\n\t\t\tmap.put(\"1\", \"Debu\");\r\n\t\t\tmap.put(\"2\", \"Debu\");\r\n\t\t\tmap.put(\"3\", \"Shyam\");\r\n\t\t\tmap.put(\"4\", \"Uttam\");\r\n\t\t\tmap.put(\"5\", \"Gautam\");\r\n\t\t\tSystem.out.println(\"Map containsKey() : \" + map.containsKey(\"2\"));\r\n\t\t\tSystem.out.println(\"Map containsValue() : \" + map.containsValue(\"Debu\"));\r\n\t\t\tSystem.out.println(\"Map get() : \" + map.get(\"4\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t // Few Common Collection Method ========\r\n\t\t\tList<Integer> list = new ArrayList<>();\r\n\t\t\tlist.add(5);\r\n\t\t\tlist.add(3);\r\n\t\t\tlist.add(6);\r\n\t\t\tlist.add(1);\r\n\t\t\t// size()\r\n\t\t\tSystem.out.println(\"List Size() : \" + list.size());\r\n\t\t\t// contains() , Similar containsAll() take all collection Object\r\n\t\t\tSystem.out.println(\"List Contains() : \" + list.contains(1));\r\n\t\t\t// remove() - Here by object of element , also can be happen by index \r\n\t\t\t// Similar removeAll() take all collection Object\r\n\t\t\tSystem.out.println(\"List Before remove : \" + list);\r\n\t\t\tSystem.out.println(\"List remove() : \" + list.remove(3));\r\n\t\t\tSystem.out.println(\"List After remove : \" + list);\r\n\t\t\t\r\n\t\t\t// isEmpty()\r\n\t\t\tSystem.out.println(\"List isEmpty() : \" + list.isEmpty());\r\n\t\t\t// retainAll() - matching\r\n\t\t\tlist.add(1);\r\n\t\t\tlist.add(8);\r\n\t\t\tList<Integer> list1 = new ArrayList<>();\r\n\t\t\tlist1.add(8);\r\n\t\t\tlist1.add(3);\r\n\t\t\tSystem.out.println(\"List Before retainAll() : \" +list );\r\n\t\t\tlist.retainAll(list1);\r\n\t\t\tSystem.out.println(\"List AFter retainAll() : \" +list );\r\n\t\t\t\r\n\t\t\t// clear()\r\n\t\t\tSystem.out.println(\"List Before clear() : \" +list );\r\n\t\t\t\r\n\t\t\tlist.clear();\r\n\t\t\tSystem.out.println(\"List AFter clear() : \" + list );\r\n\t\t\t// Below line compile time error\r\n\t\t\t//System.out.println(\"List AFter clear() : \" + list.clear() );\r\n\t\t\tlist.add(1);\r\n\t\t\tlist.add(3);\r\n\t\t\tlist.add(6);\r\n\t\t\tSystem.out.println(\"List AFter Adding() : \" +list );\r\n\t\t\t\r\n\t\t\t\r\n\t}", "public static SortedSet transformedSortedSet(SortedSet set, Transformer transformer) {\n/* 322 */ return TransformedSortedSet.decorate(set, transformer);\n/* */ }", "public SortedSet() {\n\n }", "public static void main(String[] args) {\n\t\tSet<String> colorSet = new HashSet<>();\n\t\tString[] colorArray = { \"red\", \"blue\", \"green\", \"orange\", \"gray\", \"red\" };\n\t\tfor (String color : colorArray) {\n\t\t\tSystem.out.println(colorSet.add(color));\n//\t\t\tcolorSet.add(color);\n\n\t\t}\n\t\tSystem.out.println(colorSet);\n\t\tSortedSet<String> tree = new TreeSet<>(colorSet);\n\t\tSystem.out.println(tree);\n\t\t//[blue, gray, green, orange, red]\n\t\tSystem.out.println(tree.headSet(\"green\"));\n\t\tSystem.out.println(tree.tailSet(\"green\"));\n\t\ttree.add(\"pink\");\n\t\tSystem.out.println(tree);\n\t\tSystem.out.println(tree.first());\n\t\tSystem.out.println(tree.last());\n\n\t}", "public static void main(String[] args) {\r\n\t\tSortedSet<String> ss = new TreeSet<String>();\r\n\t\tss.add(\"geeta\");\r\n\t\tss.add(\"seeta\");\r\n\t\tss.add(\"meeta\");\r\n\t\tss.add(\"neeta\");\r\n\t\tss.add(\"reeta\");\r\n\t\tSystem.out.println(\"SortedSet elements : \"+ ss);\r\n\t\tSystem.out.print(\"Iterating SortedSet elements : \");\r\n\t\tIterator it = ss.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n System.out.print(it.next() + \" \");\r\n }\r\n System.out.println();\r\n System.out.println(\"Lowest element :\"+ ss.first());\r\n System.out.println(\"Highest element :\"+ ss.last());\r\n System.out.println(\"Lesser than elements : \" +ss.headSet(\"seeta\"));\r\n System.out.println(\"Higher than or equals elements : \"+ ss.tailSet(\"meeta\"));\r\n System.out.println(\"Range elements : \"+ss.subSet(\"neeta\", \"reeta\"));\r\n \r\n\t}", "public Set getPages () {\n return new TreeSet (allPages.values ());\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "private static <K, V> Set<Map.Entry<K, V>> getSortedEntrySet(Map<K, V> dict) {\n if (!(dict instanceof SortedMap<?, ?>)) {\n Map<K, V> tmp = new TreeMap<>(EvalUtils.SKYLARK_COMPARATOR);\n tmp.putAll(dict);\n dict = tmp;\n }\n\n return dict.entrySet();\n }", "public static void main(String[] args) {\r\n\t\t\tTreeSet t1=new TreeSet();\r\n\t\t\t\r\n\t\t\tt1.add(8);\r\n\t\t\tt1.add(88);\r\n\t\t\tt1.add(9);\r\n\t\t\tt1.add(8);\r\n\t\t\tt1.add(4);\r\n\t\t\t\r\n\t\t\tSystem.out.println(t1);\r\n\t\t\tSystem.out.println(\"---------------\");\r\n\r\n\r\n\t\t\t\r\n\t\t\tLinkedList l1=new LinkedList(t1);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tListIterator i=l1.listIterator();\r\n\t\t\t\r\n\t\t\twhile (i.hasPrevious())\r\n\t\t\t\tSystem.out.println(i.previous());\r\n\t\t\t}", "public PointSET() {\n pointSet = new TreeSet<>();\n }", "public static void main(String[] args) {\n\t\tList l1=new ArrayList();\n\t\tl1.add(0, \"Gyan\");\n\t\tl1.add(1, \"Ranjan\");\n\t\tl1.add(2, \"Mahapatra\");\n\t\tSystem.out.println(l1);\n\t\tl1.add(2,\"xyz\");\n\t\tSystem.out.println(l1 + \" \" +l1.get(2));\nint a[]=new int[8];\nfor(int i=0;i<8;i++){\n\ta[i]=i;\n}\n//for(int j:a)\n//\tSystem.out.println(j);\nList l2=new ArrayList();\nl2.add(\"Sonit\");\nl2.add(\"Dora\");\nl2.add(\"Sourav\");\n/*System.out.println(l2);\nl2.remove(1);*/\nSystem.out.println(l2);\nSet s=new HashSet();\ns.add(\"seta\");\ns.add(\"setc\");\ns.add(\"setb\");\nSystem.out.println(s);\nCollections.sort((List) s);\nSystem.out.println(s);\n\nSet s1=new TreeSet(s);\nSystem.out.println(s1.size());\nSystem.out.println(\"Gyan\");\n\t}", "@Test\r\n public void addAllFromSetWithStrings() throws Exception {\r\n TreeSet<String> s = new TreeSet<>();\r\n s.addAll(sStr);\r\n assertTrue(s.contains(\"kek\"));\r\n assertTrue(s.contains(\"lel\"));\r\n assertTrue(s.contains(\"lol\"));\r\n }", "public TreeSet<Integer> rankSet() {\n TreeSet<Integer> rankSet = new TreeSet<Integer>();\n for (Card c : cards) {\n \tint org = rankSet.size();\n \trankSet.add(c.getRank());\n \tif (org == rankSet.size()) {\n \tthis.sameSet.add(c.getRank());\n }\n } \n return rankSet;\n }", "public SortedSet<Date> getSelection()\n/* */ {\n/* 179 */ return new TreeSet(this.selectedDates);\n/* */ }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "Set<Node<K, V>> entrySet();", "private TreeSet<Integer> getNeightborSets(DisjointSets<Pixel> ds, int root)\n {\n return null; //TODO: remove and replace this line\n }", "public Map<K, Set<V>> coreGetAllSupersetsOf(Collection<?> set, int mode) {\n // Skip elements in the collection having an incorrect type, as we are looking for subsets which simply\n // cannot contain the conflicting items\n Set<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n List<SetTrieNode> frontier = new ArrayList<>();\n frontier.add(superRootNode);\n\n // For every value, extend the frontier with the successor nodes for that value.\n V from = null;\n V upto = null;\n\n // Use a flag for null safety so we do not rely on the comparator to treat null as the least element\n boolean isLeastFrom = true;\n while(it.hasNext()) {\n from = upto;\n upto = it.next();\n\n List<SetTrieNode> nextNodes = new ArrayList<>();\n\n // Based on the frontier, we need to keep scanning nodes whose values is in the range [from, upto]\n // until we find the nodes whose values equals upto\n // Only these nodes then constitute the next frontier\n Collection<SetTrieNode> currentScanNodes = frontier;\n do {\n Collection<SetTrieNode> nextScanNodes = new ArrayList<>();\n for(SetTrieNode currentNode : currentScanNodes) {\n if(currentNode.nextValueToChild != null) {\n NavigableMap<V, SetTrieNode> candidateNodes = isLeastFrom\n ? currentNode.nextValueToChild.headMap(upto, true)\n : currentNode.nextValueToChild.subMap(from, true, upto, true);\n\n for(SetTrieNode candidateNode : candidateNodes.values()) {\n if(Objects.equals(candidateNode.value, upto)) {\n nextNodes.add(candidateNode);\n } else {\n nextScanNodes.add(candidateNode);\n }\n }\n }\n }\n currentScanNodes = nextScanNodes;\n } while(!currentScanNodes.isEmpty());\n\n frontier = nextNodes;\n\n isLeastFrom = false;\n }\n\n Map<K, Set<V>> result = new HashMap<>();\n\n // Copy all data entries associated with the frontier to the result\n Stream<SetTrie<K, V>.SetTrieNode> stream = frontier.stream();\n\n if(mode != 0) {\n stream = stream.flatMap(node -> reachableNodesAcyclic(\n node,\n x -> (x.nextValueToChild != null ? x.nextValueToChild.values() : Collections.<SetTrieNode>emptySet()).stream()));\n }\n\n stream.forEach(currentNode -> {\n if(currentNode.keyToSet != null) {\n for(Entry<K, NavigableSet<V>> e : currentNode.keyToSet.entrySet()) {\n result.put(e.getKey(), e.getValue());\n }\n }\n });\n\n return result;\n }", "public static TreeSet<String> uniqueStems(String line) {\n\t\t// THIS IS PROVIDED FOR YOU; NO NEED TO MODFY //\n\t\treturn uniqueStems(line, new SnowballStemmer(DEFAULT));\n\t}", "public static void main(String[] args) {\n\t\tTreeSet<Integer> ts = new TreeSet<Integer>();\n\t\tts.add(10);\n\t\tts.add(11);\n\t\tts.add(18);\n\t\tts.add(13);\n\t\tts.add(14);\n\t\tts.add(14);\n\t\t\n\t\tfor(Integer i:ts) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "@Test\r\n public void addAll() throws Exception {\r\n TreeSet<Integer> check = new TreeSet<>();\r\n ArrayList<Integer> l = new ArrayList<>();\r\n l.add(7);\r\n l.add(9);\r\n check.addAll(l);\r\n assertTrue(check.containsAll(l));\r\n }", "Collection<Tree<V, E>> getTrees();", "Set createSet();", "private static TreeSet<Integer> b(bqf parambqf) {\n }", "public T union( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If already were in same set, just return data from the root of that\n // set.\n if ( root1 == root2 )\n return root1.data;\n // If not already, then doing union reduces overall number of sets.\n numSets-- ;\n // We use root2 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this case,\n // or (b) the tree containing obj1 has lower rank.\n if ( ( root1.rank == root2.rank && Math.random() < 0.5 ) || root1.rank < root2.rank )\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root1.parent = root2;\n root2.size += root1.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root2.rank++ ;\n \n return root2.data;\n }\n else\n // We use root1 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this\n // case, or (b) the tree containing obj2 has lower rank.\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root2.parent = root1;\n root1.size += root2.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root1.rank++ ;\n \n return root1.data;\n }\n }", "private Set<ActiveGroupEntry> convertToEntrySet(Collection<String> groupIds)\n {\n Map<String, DataGroupInfo> map = DefaultDataGroupInfo.getKeyMap().getGroupsForKeys(groupIds);\n\n return map.entrySet().stream().map(\n entry -> new DefaultActiveGroupEntry(entry.getValue().getDisplayNameWithPostfixTopParentName(), entry.getKey()))\n .collect(Collectors.toSet());\n }", "public static void main(String[] args) {\n Set<Inner> set = new HashSet<>();\n System.out.println(set.add(new Inner(\"A\")));\n System.out.println(set.add(new Inner(\"A\")));\n System.out.println(set.add(new Inner(\"A\")));\n\n System.out.println(set);\n }", "public TreeSet<Team> getTeamTreeFromMatchTree(){\r\n TreeSet<Team> teamTree = new TreeSet<>(lexicalSortByName);\r\n \r\n //Go through the whole tree and find each team\r\n //Add it to the tree if it's not already present\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n \r\n Match m = null;\r\n while (itr.hasNext()){\r\n m = itr.next();\r\n \r\n String team1 = m.getTeam1().getName();\r\n if(teamTree.isEmpty()){\r\n teamTree.add(m.getTeam1());\r\n }\r\n else {\r\n boolean added = false;\r\n Iterator<Team> itTeams = teamTree.iterator();\r\n while(itTeams.hasNext() && !added){\r\n Team currentTeam = itTeams.next();\r\n if(currentTeam.getName().equals(team1)) {\r\n added = true;\r\n }\r\n }\r\n if(!added){\r\n teamTree.add(m.getTeam1());\r\n }\r\n }\r\n }\r\n //Add the last team, the one never in the first column\r\n if (m != null){\r\n teamTree.add(m.getTeam2());\r\n }\r\n return teamTree;\r\n }", "private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }", "GeneralizationSet createGeneralizationSet();", "public interface TransformsToUnsortedSetTrait extends RichIterableTestCase\n{\n @Override\n default <T> UnsortedSetIterable<T> getExpectedTransformed(T... elements)\n {\n return Sets.immutable.with(elements);\n }\n\n @Override\n default <T> MutableSet<T> newMutableForTransform(T... elements)\n {\n return Sets.mutable.with(elements);\n }\n\n @Override\n default MutableBooleanSet newBooleanForTransform(boolean... elements)\n {\n return new BooleanHashSet(elements);\n }\n\n @Override\n default MutableByteSet newByteForTransform(byte... elements)\n {\n return new ByteHashSet(elements);\n }\n\n @Override\n default MutableCharSet newCharForTransform(char... elements)\n {\n return new CharHashSet(elements);\n }\n\n @Override\n default MutableDoubleSet newDoubleForTransform(double... elements)\n {\n return new DoubleHashSet(elements);\n }\n\n @Override\n default MutableFloatSet newFloatForTransform(float... elements)\n {\n return new FloatHashSet(elements);\n }\n\n @Override\n default MutableIntSet newIntForTransform(int... elements)\n {\n return new IntHashSet(elements);\n }\n\n @Override\n default MutableLongSet newLongForTransform(long... elements)\n {\n return new LongHashSet(elements);\n }\n\n @Override\n default MutableShortSet newShortForTransform(short... elements)\n {\n return new ShortHashSet(elements);\n }\n}", "static List<AffinityGroup> setsToAffinityGroups(Set<Set<Guid>> uag) {\n List<AffinityGroup> output = new ArrayList<>();\n\n for(Set<Guid> s : uag) {\n AffinityGroup temp = new AffinityGroup();\n temp.setVmAffinityRule(EntityAffinityRule.POSITIVE);\n List<Guid> entities = new ArrayList<>();\n\n entities.addAll(s);\n temp.setVmIds(entities);\n output.add(temp);\n }\n\n return output;\n }", "private static void mergeNext() {\n\t\tString ids[] = getMinGeneIds();\n\t\tString minI = ids[0];\n\t\tString minJ = ids[1];\n\t\tString newEntry = createNewEntry(minI, minJ);\n\t\tTreeMap<String, Double> prevI = distanceMatrix.remove(minI);\n\t\tTreeMap<String, Double> prevJ = distanceMatrix.remove(minJ);\n\t\tminMatrix.remove(minI);minMatrix.remove(minJ);\n\t\tallClusters.remove(minI);allClusters.remove(minJ);\n\t\tTreeMap<String, Double> newTemp = new TreeMap<String, Double>(); \n\t\tfor(String c: allClusters) {\n\t\t\tTreeMap<String, Double> temp = distanceMatrix.get(c);\n\t\t\ttemp.remove(minI);temp.remove(minJ);\n\t\t\tdouble dist1 = prevI.get(c);\n\t\t\tdouble dist2 = prevJ.get(c);\n\t\t\tif(dist1 < dist2) {\n\t\t\t\tnewTemp.put(c,dist1);\n\t\t\t\tupdateMinMatrix(newEntry, c, dist1);\n\t\t\t\ttemp.put(newEntry, dist1);\n\t\t\t\tString minData[] = minMatrix.get(c).split(\";\");\n\t\t\t\tif(minData[0].equals(minI) || minData[0].equals(minJ)) {\n\t\t\t\t\tminMatrix.remove(c);\n\t\t\t\t\tcreateMinMatrixAfterRemoval(c);\n\t\t\t\t}\n\t\t\t\tupdateMinMatrix(c, newEntry, dist1);\n\t\t\t} else {\n\t\t\t\tnewTemp.put(c,dist2);\n\t\t\t\tupdateMinMatrix(newEntry, c, dist2);\n\t\t\t\ttemp.put(newEntry, dist2);\n\t\t\t\tString minData[] = minMatrix.get(c).split(\";\");\n\t\t\t\tif(minData[0].equals(minI) || minData[0].equals(minJ)) {\n\t\t\t\t\tminMatrix.remove(c);\n\t\t\t\t\tcreateMinMatrixAfterRemoval(c);\n\t\t\t\t}\n\t\t\t\tupdateMinMatrix(c, newEntry, dist2);\n\t\t\t}\n\t\t\tdistanceMatrix.put(c, temp);\n\t\t}\n\t\tdistanceMatrix.put(newEntry, newTemp);\n\t\tallClusters.add(newEntry);\n\t\ttotalCluster = allClusters.size();\n\t}", "public RegexNode ReduceSet()\n\t{\n\t\t// Extract empty-set, one and not-one case as special\n\n\t\tif (RegexCharClass.IsEmpty(_str))\n\t\t{\n\t\t\t_type = Nothing;\n\t\t\t_str = null;\n\t\t}\n\t\telse if (RegexCharClass.IsSingleton(_str))\n\t\t{\n\t\t\t_ch = RegexCharClass.SingletonChar(_str);\n\t\t\t_str = null;\n\t\t\t_type += (One - Set);\n\t\t}\n\t\telse if (RegexCharClass.IsSingletonInverse(_str))\n\t\t{\n\t\t\t_ch = RegexCharClass.SingletonChar(_str);\n\t\t\t_str = null;\n\t\t\t_type += (Notone - Set);\n\t\t}\n\n\t\treturn this;\n\t}", "public Set<Group> toSet() {\n assert CollectionUtil.elementsAreUnique(internalList);\n return new HashSet<>(internalList);\n }", "private TreeNode removeRoot(TreeNode root)\r\n {\r\n ________________________________________\r\n ...\r\n }\r\n\r\n // Returns a string representation of the tree rooted at node.\r\n private String toString(TreeNode node)\r\n {\r\n if (node == null)\r\n return \"\";\r\n else\r\n return toString(node.getLeft()) + node.getValue() + \", \" +\r\n toString(node.getRight());\r\n }\r\n\r\n // Implements an Iterator for this tree.\r\n private class MyTreeSetIterator implements Iterator<Object>\r\n {\r\n ________________________________________\r\n ...\r\n }\r\n\r\n //************************** main: **************************\r\n\r\n public static void main(String[] args)\r\n {\r\n String[] words = {\"One\", \"Two\", \"Three\", \"Four\", \"Five\",\r\n \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\"};\r\n MyTreeSet bst = new MyTreeSet();\r\n\r\n for (String word : words)\r\n {\r\n System.out.println(\"Added: \" + word + \" \" + bst.add(word));\r\n System.out.println(\"Contains: \" + word + \" \" + bst.contains(word));\r\n if(bst.add(word))\r\n System.out.println(\"*** Added a duplicate value ***\");\r\n System.out.println(bst);\r\n }\r\n\r\n System.out.println(\"Traversal with an iterator:\");\r\n for (Object obj : bst)\r\n System.out.print(obj + \" \");\r\n System.out.println();\r\n\r\n for (String word : words)\r\n {\r\n System.out.println(\"Removed: \" + word + \" \" + bst.remove(word));\r\n if(bst.remove(word))\r\n System.out.println(\"*** Removed a non-existent value ***\");\r\n System.out.println(bst);\r\n }\r\n }\r\n}", "@SuppressWarnings(\"unchecked\")\n\tTrieSet() {\n children = (Set<String>[]) new Set[26];\n terminal = false;\n }", "@Test\r\n public void toArrayModificated() throws Exception {\r\n TreeSet<String> check = new TreeSet<>();\r\n check.addAll(sStr);\r\n assertTrue(check.add(\"ke\"));\r\n assertArrayEquals(new String[]{\"ke\", \"kek\", \"lel\", \"lol\"}, check.toArray());\r\n assertTrue(check.remove(\"kek\"));\r\n assertArrayEquals(new String[]{\"ke\", \"lel\", \"lol\"}, check.toArray());\r\n }", "public static TreeSet<String> uniqueStems(String line, Stemmer stemmer) {\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\tString lines[] = TextParser.parse(line);\n\t\tfor(int i = 0 ; i < lines.length; i++) {\n\t\t\tset.add(stemmer.stem(lines[i]).toString());\n\t\t}\n\t\treturn set;\n\t}", "public static void main(String a[])throws IOException\n {\n BufferedReader b= new BufferedReader(new InputStreamReader(System.in));\n TreeSet<String> t = new TreeSet<String>();\n String mon = b.readLine();\n String[] arr = mon.split(\",\");\n for(int i = 0;i<arr.length;i++)\n {\n t.add(arr[i]);\n }\n System.out.println(t);\n Object arr1[] = t.toArray();\n int c = arr1.length-1;\n while(t.isEmpty()!=true)\n {\n Object m = arr1[c];\n t.remove(m);\n System.out.println(t);\n --c;\n }\n \n }", "@Test\r\n public void addToStringSet() throws Exception {\r\n TreeSet<String> s = new TreeSet<>();\r\n assertTrue(s.add(\"kek\"));\r\n assertTrue(s.contains(\"kek\"));\r\n }", "@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\tSet<Entry<K, V>> set = new HashSet<Entry<K, V>>();\n\t\tIterator it1 = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it1.hasNext()) {\n\t\t\tit1.next();\n\t\t\tIterator it2 = tabla.get(i).keySet().iterator();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tK clave = tabla.get(i).keySet().get(j);\n\t\t\t\tV valor = tabla.get(i).valueSet().get(j);\n\t\t\t\tEntrada<K, V> entry = new Entrada<K, V>(clave, valor);\n\t\t\t\tset.add(entry);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn set;\n\t}", "@SuppressWarnings(\"rawtypes\")\n\t\tpublic static void main(String[] args) {\n\t Set<String> s=new TreeSet<String>();\n\n\t s.add(\"b\");\n\t s.add(\"a\");\n\t s.add(\"d\");\n\t s.add(\"c\");\n\t s.add(\"c\");\n\t s.add(\"d\");\n\t s.add(\"e\");\n\t \n\t Iterator it=s.iterator();\n\n\t while(it.hasNext())\n\t {\n\t String value=(String)it.next();\n\n\t System.out.println(\"Value :\"+value);\n\t }\n\t }", "@Test\r\n public void descendingSet() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n check.add(43);\r\n assertTrue(check.contains(43));\r\n assertTrue(kek.contains(43));\r\n assertTrue(kek.remove(43));\r\n assertFalse(check.contains(43));\r\n assertFalse(kek.contains(43));\r\n }", "public static Set orderedSet(Set set) {\n/* 236 */ return (Set)ListOrderedSet.decorate(set);\n/* */ }", "void unionTreeCoreset(int k,int n_1,int n_2,int d, Point[] setA,Point[] setB, Point[] centres, MTRandom clustererRandom) {\n\t\t//printf(\"Computing coreset...\\n\");\n\t\t//total number of points\n\t\tint n = n_1+n_2;\n\n\t\t//choose the first centre (each point has the same probability of being choosen)\n\t\t\n\t\t//stores, how many centres have been choosen yet\n\t\tint choosenPoints = 0; \n\t\t\n\t\t//only choose from the n-i points not already choosen\n\t\tint j = clustererRandom.nextInt(n-choosenPoints); \n\n\t\t//copy the choosen point\n\t\tif(j < n_1){\n\t\t\t//copyPointWithoutInit(&setA[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setA[j].clone();\n\t\t} else {\n\t\t\tj = j - n_1;\n\t\t\t//copyPointWithoutInit(&setB[j],&centres[choosenPoints]);\n\t\t\tcentres[choosenPoints] = setB[j].clone();\n\t\t}\n\t\ttreeNode root = new treeNode(setA,setB,n_1,n_2, centres[choosenPoints],choosenPoints); //??\n\t\tchoosenPoints = 1;\n\t\t\n\t\t//choose the remaining points\n\t\twhile(choosenPoints < k){\n\t\t\tif(root.cost > 0.0){\n\t\t\t\ttreeNode leaf = selectNode(root, clustererRandom);\n\t\t\t\tPoint centre = chooseCentre(leaf, clustererRandom);\n\t\t\t\tsplit(leaf,centre,choosenPoints);\n\t\t\t\t//copyPointWithoutInit(centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = centre;\n\t\t\t} else {\n\t\t\t\t//create a dummy point\n\t\t\t\t//copyPointWithoutInit(root.centre,&centres[choosenPoints]);\n\t\t\t\tcentres[choosenPoints] = root.centre;\n\t\t\t\tint l;\n\t\t\t\tfor(l=0;l<root.centre.dimension;l++){\n\t\t\t\t\tcentres[choosenPoints].coordinates[l] = -1 * 1000000;\n\t\t\t\t}\n\t\t\t\tcentres[choosenPoints].id = -1;\n\t\t\t\tcentres[choosenPoints].weight = 0.0;\n\t\t\t\tcentres[choosenPoints].squareSum = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\tchoosenPoints++;\n\t\t}\n\n\t\t//free the tree\n\t\tfreeTree(root);\n\n\t\t//recalculate clustering features\n\t\tint i;\n\t\tfor(i=0;i<n;i++){\n\t\t\t\t\n\t\t\tif(i < n_1) {\n\t\t\t\t\n\t\t\t\tint index = setA[i].centreIndex;\n\t\t\t\tif(centres[index].id != setA[i].id){\n\t\t\t\t\tcentres[index].weight += setA[i].weight;\n\t\t\t\t\tcentres[index].squareSum += setA[i].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setA[i].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setA[i].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tint index = setB[i-n_1].centreIndex;\n\t\t\t\tif(centres[index].id != setB[i-n_1].id){\n\t\t\t\t\tcentres[index].weight += setB[i-n_1].weight;\n\t\t\t\t\tcentres[index].squareSum += setB[i-n_1].squareSum;\n\t\t\t\t\tint l;\n\t\t\t\t\tfor(l=0;l<centres[index].dimension;l++){\n\t\t\t\t\t\tif(setB[i-n_1].weight != 0.0){\n\t\t\t\t\t\t\tcentres[index].coordinates[l] += setB[i-n_1].coordinates[l];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}", "public static TreeMap<String, TreeSet<ArchivalUnit>> orderAusByPublisher(Collection<ArchivalUnit> allAus) {\n Iterator<ArchivalUnit> itr = allAus.iterator();\n TreeMap<String, TreeSet<ArchivalUnit>> ausMap =\n new TreeMap<String, TreeSet<ArchivalUnit>>();\n while (itr.hasNext()) {\n ArchivalUnit au = itr.next();\n String publisher = AuUtil.getTitleAttribute(au, \"publisher\");\n if (publisher == null) {\n publisher = \"unknown publisher\";\n }\n if (ausMap.containsKey(publisher)) {\n TreeSet<ArchivalUnit> auSet = (TreeSet) ausMap.get(publisher);\n auSet.add(au);\n } else {\n TreeSet<ArchivalUnit> auSet =\n new TreeSet<ArchivalUnit>(new AuOrderComparator());\n auSet.add(au);\n ausMap.put(publisher, auSet);\n }\n }\n return ausMap;\n }", "private void makeTree(HashMap<Instance, Bag> instanceBags,\n ArrayList<Instance> all, boolean stopOnFirstPositiveLeaf) {\n\n Random r = new Random(getSeed());\n\n AlgorithmConfiguration settings = getSettings();\n\n ArrayList<TreeNode> toSplit = new ArrayList<TreeNode>();\n\n root = new TreeNode(null, all);\n toSplit.add(root);\n numLeaves = 0;\n\n while (toSplit.size() > 0) {\n\n // The next two lines are here solely to reproduce the results from the\n // paper\n // (i.e. so that the same random number sequence is used.\n int nextIndex = Math.min(1, toSplit.size());\n nextIndex = r.nextInt(nextIndex);\n\n TreeNode next = toSplit.remove(nextIndex);\n if (next == null) {\n continue;\n }\n\n if (next.isPurePositive(instanceBags)) {\n next.makeLeafNode(true);\n ArrayList<String> deactivated = new ArrayList<String>();\n next.deactivateRelatedInstances(instanceBags, deactivated);\n\n if (m_Debug && deactivated.size() > 0) {\n Bag.printDeactivatedInstances(deactivated);\n }\n\n // Need to re-calculate scores if positive leaf has been\n // created\n for (TreeNode n : toSplit) {\n n.removeDeactivatedInstances(instanceBags);\n n.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n }\n\n if (stopOnFirstPositiveLeaf && deactivated.size() > 0) {\n return;\n }\n\n } else if (next.isPureNegative(instanceBags)) {\n next.makeLeafNode(false);\n } else {\n next.splitInstances(instanceBags, settings, r, m_Debug);\n if (!next.isLeafNode()) {\n if (next.split.isNominal) {\n TreeNode[] nominals = next.nominals();\n for (TreeNode nominal : nominals) {\n nominal.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(nominal);\n }\n } else {\n next.left().calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(next.left());\n next.right().calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(next.right());\n }\n } else {\n // Need to re-calculate scores if positive leaf has been\n // created\n if (next.isPositiveLeaf()) {\n for (TreeNode n : toSplit) {\n n.removeDeactivatedInstances(instanceBags);\n n.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n }\n\n if (stopOnFirstPositiveLeaf) {\n return;\n }\n }\n }\n }\n\n // Increment number of leaves if necessary\n if (next.isLeafNode()) {\n numLeaves++;\n }\n\n // Re-evaluate the best next node, because we've most likely\n // added new nodes or disabled bags\n Comparator<TreeNode> sh = Collections\n .reverseOrder(new NextSplitHeuristic());\n Collections.sort(toSplit, sh);\n }\n\n if (m_Debug) {\n System.out.println(root.render(1, instanceBags));\n }\n }", "@Test\n public void testSetMayorsSearchTree01() {\n\n System.out.println(\"setMayorsSearchTree\");\n // Converted to TreeSet so it would preserve the order but exclude repetition (Can be the same mayor of more than one city)\n Set<User> expResult = new TreeSet<>(sn10.listMayors().values());\n sn10.setMayorsSearchTree();\n List<User> result = (List<User>) sn10.getMayorsAVL().inOrder();\n\n // Test if Mayors are order by descending order & if AVL Tree is ordered & has the same size\n // listMayors already returns a collection order by mayors score\n assertArrayEquals(expResult.toArray(), result.toArray());\n\n }", "private void populate_tree(KDTree kdtree, ArrayList<Point> pointSet) {\n\t\tfor (Point p : pointSet) {\n\t\t\t\n\t\t\tArrayList<Double> coordinates = p.getCoordinates();\n\n\t\t\tdouble[] key = new double[coordinates.size()];\n\n\t\t\tfor (int i = 0; i < coordinates.size(); i++) {\n\t\t\t\tkey[i] = coordinates.get(i);\n\t\t\t}\n\n\t\t\tkdtree.insert(key, p);\n\t\t}\n\n\t}" ]
[ "0.64941186", "0.6264445", "0.61970776", "0.6194664", "0.61552054", "0.61494184", "0.61161906", "0.60627174", "0.6058487", "0.6025394", "0.6005958", "0.5995365", "0.598816", "0.5949891", "0.58951026", "0.58767587", "0.58642334", "0.58077276", "0.5791532", "0.5788892", "0.578089", "0.5736284", "0.5689357", "0.5687342", "0.5682599", "0.5672708", "0.56610125", "0.5656267", "0.5641258", "0.5598206", "0.5585692", "0.5574421", "0.5557581", "0.5547915", "0.5547762", "0.55131894", "0.549468", "0.54519653", "0.54284954", "0.5415722", "0.5411322", "0.5400767", "0.5400114", "0.5379768", "0.5375256", "0.53586054", "0.53493184", "0.5348936", "0.53479254", "0.53215903", "0.53176963", "0.530246", "0.52947015", "0.52862465", "0.52687114", "0.52571374", "0.52566147", "0.52565026", "0.52331793", "0.52296484", "0.52215457", "0.52170116", "0.5205971", "0.5205317", "0.5204244", "0.5191993", "0.517186", "0.5165338", "0.5137852", "0.51290756", "0.5118439", "0.5111928", "0.5092485", "0.5089712", "0.50830334", "0.505755", "0.5044644", "0.5025989", "0.50207835", "0.50028414", "0.5001352", "0.49961856", "0.49940747", "0.4988487", "0.49873078", "0.49791056", "0.4978424", "0.49768072", "0.49716586", "0.4969462", "0.4959074", "0.495675", "0.49549726", "0.4952476", "0.49521273", "0.49491224", "0.49474445", "0.4946812", "0.49458438", "0.49371645" ]
0.5754236
21
Remember that the value is the entry in the underlying map.
@Override public T getValue() { return entry.getValue().getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remember(String key, Object value) {\n if (value instanceof Map map) {\n map.forEach((entryKey, entryValue) -> remember(key + OBJECT_KEY_SEPARATOR + entryKey.toString(), entryValue));\n }\n if (value instanceof List list) {\n range(0, list.size()).forEach(i -> remember(key + String.format(LIST_ITEM_FORMAT, i), list.get(i)));\n }\n context.put(key, value);\n }", "@SuppressWarnings(\"unchecked\")\n public V setValue(V oValue)\n {\n ObservableHashMap map = ObservableHashMap.this;\n synchronized (map)\n {\n // perform the entry update\n V oPrev = super.setValue(oValue);\n\n // note: previous to Coherence 3.1, there was an optimization\n // that would only raise an event if the reference was changing,\n // i.e. if (oPrev != oValue) {..}\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_UPDATED,\n getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }\n }", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }", "@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }", "Value replaceValue(Entry<Key, Value> entry, Value value);", "@Override\n public T setValue(T newValue) {\n return entry.getValue().setValue(newValue);\n }", "public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }", "void put(ThreadLocal<?> key, Object value) {\n cleanUp();\n\n // Keep track of first tombstone. That's where we want to go back\n // and add an entry if necessary.\n int firstTombstone = -1;\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n\n if (k == key.reference) {\n // Replace existing entry.\n table[index + 1] = value;\n return;\n }\n\n if (k == null) {\n if (firstTombstone == -1) {\n // Fill in null slot.\n table[index] = key.reference;\n table[index + 1] = value;\n size++;\n return;\n }\n\n // Go back and replace first tombstone.\n table[firstTombstone] = key.reference;\n table[firstTombstone + 1] = value;\n tombstones--;\n size++;\n return;\n }\n\n // Remember first tombstone.\n if (firstTombstone == -1 && k == TOMBSTONE) {\n firstTombstone = index;\n }\n }\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t\treturn v;\n\t}", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "@Override\n public <T> T save(String correlationId, String key, T value) {\n if (key == null)\n throw new NullPointerException(\"Key cannot be null\");\n\n\n // Cleanup the stored states\n this.cleanup();\n\n // Get the entry\n StateEntry entry = this._states.getOrDefault(key, null);\n\n // Shortcut to remove entry from the cache\n if (value == null) {\n this._states.remove(key);\n return null;\n }\n\n // Update the entry\n if (entry != null) {\n entry.setValue(value);\n }\n // Or create a new entry\n else {\n entry = new StateEntry(key, value);\n this._states.put(key, entry);\n }\n\n return value;\n }", "@Override\n public V put(K key, V value) {\n return null;\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\treturn null;\n\t}", "protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }", "@Nullable\r\n public Object put(String key, @Nullable Object value) {\r\n Object res = attributeMap.put(key, value);\r\n fireStateChanged();\r\n return res;\r\n }", "public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }", "public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }", "@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }", "protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }", "@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }", "public Value put(Key key, Value thing) ;", "public void setEntry(Flow.DataflowObject value) {\n entry.copy(value);\n }", "@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "@Override\n public void putValue(String key, Object value) {\n\n }", "public synchronized V put(K key, V value)\n {\n // COH-6009: map mutations must be synchronized with event dispatch\n // to ensure in-order delivery\n return super.put(key, value);\n }", "@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}", "public Object setValue(Object oValue)\n {\n // optimization - verify that the entry is still valid\n if (m_cUnits == -1)\n {\n // entry is discarded; avoid exception\n super.setValue(oValue);\n return null;\n }\n\n // perform the entry update\n Object oPrev;\n int cNewUnits = calculateUnits(oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n super.setValue(oValue);\n return null;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n\n oPrev = super.setValue(oValue);\n }\n\n scheduleExpiry();\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_UPDATED, getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn map.containsValue(value);\n\t}", "@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }", "public Object putTransient(Object key, Object value);", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}", "public String put(String key, String value)\n {\n String previousValue = getMap().put(key, value);\n if (value != previousValue && (value == null || !value.equals(previousValue))) {\n cacheable.setPropertyBoolean(PROPERTY_DIRTY, true);\n updater.deferUpdate();\n }\n return previousValue;\n }", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}", "@Override\n public V put(final K key, final V value) {\n if (key == null) {\n throw new NullPointerException(\"key\");\n }\n entries.add(new SimpleEntry<K,V>(key, value));\n size = UNKNOWN_SIZE;\n return null;\n }", "public Value putIfExists(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tValue ret = data.get().getValue();\r\n\t\t\t\t\tdata.get().setValue(value);\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}", "public V get(Object key) { return _map.get(key); }", "public V put(K key, V value) {\n System.out.println(\"SimpleHashMap.put\");\n return mMap.put(key, value);\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}", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "public Value get(Value key) {\n\t\treturn storage.get(key);\n\t}", "private void addSeenInfo(SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.add(value);\n }", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "public boolean put( AnyType key , AnyType value)\n { \n int currentPos = findPos( key );\t//TODO: test this\n \n if( array[ currentPos ] == null )\n ++occupied;\n array[ currentPos ] = new HashEntry<>(key, value);\n \n theSize++;\n \n // Rehash\n if( occupied > array.length / 2 )\n rehash( );\n \n return true;\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// caut daca cheya mai este folosita si inlocuiesc elementul entry .\n\t\t\tif (b.get(h).e.get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tremove(key);\n\t\t\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\treturn null;\n\t}", "public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}", "public V put(K key, V value) {\n System.out.println(\"SimpleTreeMap.put\");\n return mMap.put(key, value);\n }", "void addTransientEntry(K key, V value);", "@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }", "private void put(Map<T, Integer> state, T key, int val) {\n if (val == 0)\n state.remove(key);\n else\n state.put(key, val);\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}", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> lastEntry() {\n\t/* TCJ\n\t * Continuous operation: 1\n\t */\n\t\treturn safeEntry(map.size() - 1);\n\t}", "public native Map<K, V> set(K key, V value);", "protected void computeEntryWritten(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }", "public Collection<V> put(K key, V value) {\r\n\r\n \tCollection<V> values = map.get(key);\r\n\r\n if (values == null) {\r\n \tvalues = newCollection();\r\n \tvalues.add(value);\r\n map.put(key, values);\r\n }\r\n else {\r\n \tvalues.add(value);\r\n }\r\n\r\n return values;\r\n }", "public synchronized Object put( Object key, Object object ) {\n\t\tObject oldPos = mapKeyPos.get(key);\n\t\tif ( oldPos != null ) {\n\t\t\tint pos = ((Integer)oldPos).intValue();\n\t\t\tObject oldObject = values[pos];\n\t\t\tvalues[pos] = object;\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t} else {\n\t\t\t// skip to new pos -- for Cache, change walkStatus() to get lock....\n\t\t\twhile (walkStatus() != LRU_OLD) {}\n\n\t\t\tObject intvalue;// = null;\n\t\t\tif ( keys[cur] != null ) {\n\t\t\t\tintvalue = mapKeyPos.remove(keys[cur]);\n//\t\t\t\tif ( intvalue == null )\n//\t\t\t\t\tintvalue = new Integer(cur);\n\t\t\t} else {\n\t\t\t\tintvalue = new Integer(cur);\n\t\t\t}\n\t\t\tObject oldObject = values[cur];\n\t\t\tkeys[cur] = key;\n\t\t\tvalues[cur] = object;\n\t\t\tstatus[cur] = LRU_NEW;\n\t\t\t//System.out.println(\"mapKeyPos, key: \"+key+\" intvalue: \"+intvalue);\n\t\t\tmapKeyPos.put(key, intvalue);\n\t\t\tcur++;\n\t\t\tif ( cur >= size ) cur = 0;\n\t\t\tif ( oldObject != null )\n\t\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t}\n\t}", "public V put(final K key, final V value) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n\n for (Entry<K, V> entry = entries[index]; entry != null; entry = entry.nextEntry) {\n if (hash == entry.hash && key == entry.get()) {\n final V oldentry = entry.value;\n if (value != oldentry) {\n entry.value = value;\n }\n return oldentry;\n }\n }\n\n entries[index] = new Entry<K, V>(key, value, refqueue, hash, entries[index]);\n if (++size >= threshold) {\n resize(entries.length * 2);\n }\n return null;\n }", "public V put(K key,V value) {\n\tif(key==null||value==null) {\n\t throw new NullPointerException();\n\t}\n\telse {\n\tMyEntry addvalue=new MyEntry();\n\taddvalue.key=key;\n\taddvalue.value=value;\n\t\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t\n\t\n\t//what happens if the same key already exists\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].add(addvalue);\n\t\tsize++;\n\t\tif(((float)size/(float)capacity)>loadFactor) {\n\t\t resize();\n\t\t}\n\t\treturn previousvalue;\n\t }\n\t}\n\t\n\t//what happens if the key does not exist\n\ttable[bucket].add(addvalue);\n\tsize++;\n\tif(((float)size/(float)capacity)>loadFactor) {\n\t resize();\n\t}\n\treturn null;\n\t}\n }", "public V put(K key, V value) {\n\t\tint pos = key.hashCode() / numCub;\n\t\tV valor = this.get(key);\n\t\tif (pos < tam) {\n\t\t\tint indice = tabla.get(pos).keySet().indexOf(key);\n\t\t\tif (indice == -1) {\n\t\t\t\ttabla.get(pos).valueSet().add(value);\n\t\t\t\ttabla.get(pos).keySet().add(key);\n\t\t\t} else {\n\t\t\t\ttabla.get(pos).valueSet().set(indice, value);\n\t\t\t\ttabla.get(pos).keySet().set(indice, key);\n\t\t\t}\n\t\t} else { //Mapa demasiado pequeno, redimensiona y vuelve a intentarlo\n\t\t\tthis.redimensionar();\n\t\t\tthis.put(key, value);\n\t\t}\n\t\treturn valor;\n\t}", "public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }", "public interface Map<K, V>\n{\n // Adds the specified key-value pair to the map. Does nothing if the key already\n // exists in the map.\n void add(K key, V value);\n\n // Returns the value associated with the specified key, or null of that key doesn't\n // exist in the map\n V get(K key);\n\t\n // Removes the key-value pair with the specified key from the map. Does nothing if\n // the key doesn't exist in the map.\n void remove(K key);\n}", "public void put (String key, Object value) {\n if (trace) {\n getProfiler().checkPoint(\n String.format(\" %s='%s' [%s]\", key, value, Thread.currentThread().getStackTrace()[2])\n );\n }\n getMap().put (key, value);\n synchronized (this) {\n notifyAll();\n }\n }", "public void setSurrogateKey(long value)\n {\n if(__surrogateKey != value)\n {\n _isDirty = true;\n }\n __surrogateKey = value;\n }", "public abstract void map(String key, String value) throws Exception;", "@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }", "public V put(K key, V value) {\r\n\t\tint place = hash(key.hashCode());\r\n\t\tif (get(key) != null) {\r\n\t\t\tLinkedList<KVPair> temp = hashMapArray[place];\r\n\t\t\tfor (KVPair i : temp) {\r\n\t\t\t\tif (i.getKey().equals(key)) {\r\n\t\t\t\t\tV oldKey = i.getValue();\r\n\t\t\t\t\ti.setValue(value);\r\n\t\t\t\t\treturn oldKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ((capacity * loadFactor) <= (size)) {\r\n\t\t\t\texpand(capacity + 10);\r\n\t\t\t\treturn put(key, value);\r\n\t\t\t} else if (hashMapArray[place] == null) {\r\n\t\t\t\thashMapArray[place] = new LinkedList<KVPair>();\r\n\t\t\t}\r\n\t\t\thashMapArray[place].add(new KVPair(key, value));\r\n\t\t\tsize++;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic T put(String key, T value) {\n\t\tString uKey = key.toUpperCase();\n\t\tif ( containsKey(uKey)){\n\t\t\treturn super.get(uKey);\n\t\t}else{\n\t\t\treturn super.put(uKey, value);\n\t\t}\n\t\t\n\t}", "public MapUtil put(String name, Object value) {\n\t\tif (value != null) {\n\t\t\tvalues.put(name, value);\n\t\t}\n\t\treturn this;\n\t}", "public Map<String, String> getValueData(){\n\t\treturn valueCache;\n\t}", "public static <K, V> Reference2ObjectMap<K, V> singleton(K key, V value) {\n/* 271 */ return new Singleton<>(key, value);\n/* */ }", "Object put(Object key, Object value);", "ValueType put(long key, ValueType entry);", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }", "private void put(String aKey, Object aValue) {\n\t\tmData.put(aKey, getValue(aValue));\n\t}", "public void \n\tsetData(\n\t\t\tString key, \n\t\t\tObject value) \n\t{\n\t\ttry{\n\t\t\tthis_mon.enter();\n\n\t\t\tif (user_data == null) {\n\t\t\t\tuser_data = new HashMap();\n\t\t\t}\n\t\t\tif (value == null) {\n\t\t\t\tif (user_data.containsKey(key))\n\t\t\t\t\tuser_data.remove(key);\n\t\t\t} else {\n\t\t\t\tuser_data.put(key, value);\n\t\t\t}\n\t\t}finally{\n\t\t\tthis_mon.exit();\n\t\t}\n\t}", "final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }", "public void put(int key, int value) {\n Node n = map.get(key);\n if(n == null){\n n = new Node(key, value);\n add(n);\n map.put(key, n);\n }\n else{\n n.val = value;\n update(n);\n }\n if(map.size() > this.capacity ){\n //we need to remove a stale node now\n Node removeNode = tail.prev;\n remove(removeNode);\n map.remove(removeNode.key);\n return;\n }\n return;\n }", "Object getValueFromLocalCache(Object key);", "private <T, E> T getKeyByValue(Map<T, E> map, E value) {\n for (Map.Entry<T, E> entry : map.entrySet()) {\n if (value.equals(entry.getValue())) {\n return entry.getKey();\n }\n }\n return null;\n }", "public void put(Object key, Object value) throws Exception {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n entry.setValue(value);\n touchEntry(entry);\n } else {\n\n if (_hash.size() == _max) {\n // purge and recycle entry\n entry = purgeEntry();\n entry.setKey(key);\n entry.setValue(value);\n } else {\n entry = new CacheEntry(key, value);\n }\n addEntry(entry);\n _hash.put(entry.getKey(), entry);\n }\n }", "@Override\n public int hashCode()\n {\n return Objects.hash(value);\n }", "@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}", "public V put(String key, V value) {\n int index = hashOf(key);\n while (index > capacity) grow();\n Object oldValue = values[index];\n values[index] = value;\n if (oldValue == null) size++;\n return (V) oldValue;\n }", "@Override\n public int hashCode() {\n return value;\n }", "public void put(int key, int value) {\n if(map.get(key) != null){\n Node node = map.get(key);\n node.value = value;\n deleteNode(node);\n addToHead(node);\n } else {\n Node node = new Node(key, value);\n map.put(key, node);\n if(size < capacity){\n size++;\n addToHead(node);\n } else {\n map.remove(tail.prev.key);\n deleteNode(tail.prev);\n addToHead(node);\n }\n }\n }", "void cache(String key, T value) throws IOException;", "private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}", "public synchronized Object get( Object key ) {\n\t\tObject intvalue = mapKeyPos.get(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\t//System.out.println(\"CountLimiteLRU: get(\"+key+\") = \"+values[pos]);\n\t\t\treturn values[pos];\n\t\t}\n\t\treturn null;\n\t}", "public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }", "public void put(String key, V value) {\n map.computeIfAbsent(key, k -> keepOrder ? new LinkedHashSet<>() : new HashSet<>()).add(value);\n }", "@Override\n public void unmarkCell() {\n MNKCell last = MC.getLast();\n super.unmarkCell();\n key = nextZobrist(last.i, last.j);\n value = previousValues.pop();\n }", "public boolean put(K key, V value)\r\n\t{\r\n\t\treturn data.addUpdate(new Entry(key, value));\r\n\t}", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public void persist(String key, Object value)\r\n\t{\r\n\t\tgetPersistenceMap().put(key, value);\r\n\t}", "public ImmutableMapEntry(final K key, final V value) {\r\n this.value = value;\r\n this.key = key;\r\n }", "public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }", "public void put(int key, int value) {\n if(!map.contains(key)){\n // If the cache is full, remove from the end of the deque and the map\n if(deque.size() == cacheSize){\n int lastElement = deque.removeLast();\n map.remove(lastElement);\n }else{\n // The data is found in the cache, but it could be anywhere\n // So iterate the queue and push it forward\n int index = 0, i = 0;\n Iterator<Integer> itr = deque.iterator();\n while(itr.hasNext()){\n if(itr.next() == key){\n index = i;\n break;\n }\n i++;\n }\n // Now index position locates the key in the deque. Remove it and add it\n // to the front of the queue\n deque.remove(index);\n }\n deque.push(key);\n // Add also the key to the map\n map.add(key);\n } \n }", "public void put(final Serializable key, final Serializable value) {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (value != null) {\n final Element element = new Element(key, value);\n cache.put(element);\n } else {\n cache.remove(key);\n }\n } finally {\n //Release the readlock here. This will have been acquired in the get, where the element was null\n lock.release();\n }\n }" ]
[ "0.6363502", "0.62468076", "0.6196581", "0.60864735", "0.60732293", "0.60439116", "0.602342", "0.6022729", "0.5948156", "0.59375983", "0.59346604", "0.58570373", "0.5831709", "0.583046", "0.5827214", "0.5823543", "0.5814574", "0.5766113", "0.57635796", "0.5754704", "0.5749699", "0.5747362", "0.5740089", "0.57369745", "0.57321066", "0.57152337", "0.571484", "0.57145655", "0.5703124", "0.56780416", "0.567644", "0.56710815", "0.56657255", "0.56596375", "0.56497794", "0.56420743", "0.56156", "0.56140965", "0.55968606", "0.5588893", "0.5587578", "0.5581642", "0.55730796", "0.5569257", "0.55657", "0.55648726", "0.5546979", "0.5545169", "0.5541138", "0.5534079", "0.5533702", "0.5529595", "0.5518071", "0.5516563", "0.5515606", "0.55072343", "0.55045336", "0.55001503", "0.54825586", "0.54813534", "0.5481047", "0.54763657", "0.5475532", "0.54693425", "0.54610986", "0.5457675", "0.54499257", "0.54498804", "0.54445666", "0.5438223", "0.5430992", "0.5420378", "0.5420276", "0.54143023", "0.54121816", "0.5404442", "0.54011106", "0.53989476", "0.5393659", "0.53868735", "0.5380001", "0.5376039", "0.5361014", "0.5357868", "0.53512955", "0.53488445", "0.53457075", "0.534334", "0.5339116", "0.53381765", "0.53279245", "0.5327484", "0.53227013", "0.53222847", "0.5318644", "0.531758", "0.5316889", "0.53110695", "0.5310594", "0.53099114" ]
0.58870465
11
Remember that the value is the entry in the underlying map.
@Override public T setValue(T newValue) { return entry.getValue().setValue(newValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remember(String key, Object value) {\n if (value instanceof Map map) {\n map.forEach((entryKey, entryValue) -> remember(key + OBJECT_KEY_SEPARATOR + entryKey.toString(), entryValue));\n }\n if (value instanceof List list) {\n range(0, list.size()).forEach(i -> remember(key + String.format(LIST_ITEM_FORMAT, i), list.get(i)));\n }\n context.put(key, value);\n }", "@SuppressWarnings(\"unchecked\")\n public V setValue(V oValue)\n {\n ObservableHashMap map = ObservableHashMap.this;\n synchronized (map)\n {\n // perform the entry update\n V oPrev = super.setValue(oValue);\n\n // note: previous to Coherence 3.1, there was an optimization\n // that would only raise an event if the reference was changing,\n // i.e. if (oPrev != oValue) {..}\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_UPDATED,\n getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }\n }", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }", "@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }", "Value replaceValue(Entry<Key, Value> entry, Value value);", "public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }", "void put(ThreadLocal<?> key, Object value) {\n cleanUp();\n\n // Keep track of first tombstone. That's where we want to go back\n // and add an entry if necessary.\n int firstTombstone = -1;\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n\n if (k == key.reference) {\n // Replace existing entry.\n table[index + 1] = value;\n return;\n }\n\n if (k == null) {\n if (firstTombstone == -1) {\n // Fill in null slot.\n table[index] = key.reference;\n table[index + 1] = value;\n size++;\n return;\n }\n\n // Go back and replace first tombstone.\n table[firstTombstone] = key.reference;\n table[firstTombstone + 1] = value;\n tombstones--;\n size++;\n return;\n }\n\n // Remember first tombstone.\n if (firstTombstone == -1 && k == TOMBSTONE) {\n firstTombstone = index;\n }\n }\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t\treturn v;\n\t}", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "@Override\n public <T> T save(String correlationId, String key, T value) {\n if (key == null)\n throw new NullPointerException(\"Key cannot be null\");\n\n\n // Cleanup the stored states\n this.cleanup();\n\n // Get the entry\n StateEntry entry = this._states.getOrDefault(key, null);\n\n // Shortcut to remove entry from the cache\n if (value == null) {\n this._states.remove(key);\n return null;\n }\n\n // Update the entry\n if (entry != null) {\n entry.setValue(value);\n }\n // Or create a new entry\n else {\n entry = new StateEntry(key, value);\n this._states.put(key, entry);\n }\n\n return value;\n }", "@Override\n public T getValue() {\n return entry.getValue().getValue();\n }", "@Override\n public V put(K key, V value) {\n return null;\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\treturn null;\n\t}", "protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }", "@Nullable\r\n public Object put(String key, @Nullable Object value) {\r\n Object res = attributeMap.put(key, value);\r\n fireStateChanged();\r\n return res;\r\n }", "public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }", "public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }", "@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }", "protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }", "@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }", "public Value put(Key key, Value thing) ;", "public void setEntry(Flow.DataflowObject value) {\n entry.copy(value);\n }", "@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "@Override\n public void putValue(String key, Object value) {\n\n }", "public synchronized V put(K key, V value)\n {\n // COH-6009: map mutations must be synchronized with event dispatch\n // to ensure in-order delivery\n return super.put(key, value);\n }", "@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}", "public Object setValue(Object oValue)\n {\n // optimization - verify that the entry is still valid\n if (m_cUnits == -1)\n {\n // entry is discarded; avoid exception\n super.setValue(oValue);\n return null;\n }\n\n // perform the entry update\n Object oPrev;\n int cNewUnits = calculateUnits(oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n super.setValue(oValue);\n return null;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n\n oPrev = super.setValue(oValue);\n }\n\n scheduleExpiry();\n\n // issue update notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_UPDATED, getKey(), oPrev, oValue));\n }\n\n return oPrev;\n }", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn map.containsValue(value);\n\t}", "@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }", "public Object putTransient(Object key, Object value);", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}", "public String put(String key, String value)\n {\n String previousValue = getMap().put(key, value);\n if (value != previousValue && (value == null || !value.equals(previousValue))) {\n cacheable.setPropertyBoolean(PROPERTY_DIRTY, true);\n updater.deferUpdate();\n }\n return previousValue;\n }", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}", "@Override\n public V put(final K key, final V value) {\n if (key == null) {\n throw new NullPointerException(\"key\");\n }\n entries.add(new SimpleEntry<K,V>(key, value));\n size = UNKNOWN_SIZE;\n return null;\n }", "public Value putIfExists(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tValue ret = data.get().getValue();\r\n\t\t\t\t\tdata.get().setValue(value);\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}", "public V get(Object key) { return _map.get(key); }", "public V put(K key, V value) {\n System.out.println(\"SimpleHashMap.put\");\n return mMap.put(key, value);\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}", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "public Value get(Value key) {\n\t\treturn storage.get(key);\n\t}", "private void addSeenInfo(SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.add(value);\n }", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "public boolean put( AnyType key , AnyType value)\n { \n int currentPos = findPos( key );\t//TODO: test this\n \n if( array[ currentPos ] == null )\n ++occupied;\n array[ currentPos ] = new HashEntry<>(key, value);\n \n theSize++;\n \n // Rehash\n if( occupied > array.length / 2 )\n rehash( );\n \n return true;\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// caut daca cheya mai este folosita si inlocuiesc elementul entry .\n\t\t\tif (b.get(h).e.get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tremove(key);\n\t\t\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\treturn null;\n\t}", "public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}", "public V put(K key, V value) {\n System.out.println(\"SimpleTreeMap.put\");\n return mMap.put(key, value);\n }", "void addTransientEntry(K key, V value);", "@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }", "private void put(Map<T, Integer> state, T key, int val) {\n if (val == 0)\n state.remove(key);\n else\n state.put(key, val);\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}", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> lastEntry() {\n\t/* TCJ\n\t * Continuous operation: 1\n\t */\n\t\treturn safeEntry(map.size() - 1);\n\t}", "public native Map<K, V> set(K key, V value);", "protected void computeEntryWritten(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }", "public Collection<V> put(K key, V value) {\r\n\r\n \tCollection<V> values = map.get(key);\r\n\r\n if (values == null) {\r\n \tvalues = newCollection();\r\n \tvalues.add(value);\r\n map.put(key, values);\r\n }\r\n else {\r\n \tvalues.add(value);\r\n }\r\n\r\n return values;\r\n }", "public synchronized Object put( Object key, Object object ) {\n\t\tObject oldPos = mapKeyPos.get(key);\n\t\tif ( oldPos != null ) {\n\t\t\tint pos = ((Integer)oldPos).intValue();\n\t\t\tObject oldObject = values[pos];\n\t\t\tvalues[pos] = object;\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t} else {\n\t\t\t// skip to new pos -- for Cache, change walkStatus() to get lock....\n\t\t\twhile (walkStatus() != LRU_OLD) {}\n\n\t\t\tObject intvalue;// = null;\n\t\t\tif ( keys[cur] != null ) {\n\t\t\t\tintvalue = mapKeyPos.remove(keys[cur]);\n//\t\t\t\tif ( intvalue == null )\n//\t\t\t\t\tintvalue = new Integer(cur);\n\t\t\t} else {\n\t\t\t\tintvalue = new Integer(cur);\n\t\t\t}\n\t\t\tObject oldObject = values[cur];\n\t\t\tkeys[cur] = key;\n\t\t\tvalues[cur] = object;\n\t\t\tstatus[cur] = LRU_NEW;\n\t\t\t//System.out.println(\"mapKeyPos, key: \"+key+\" intvalue: \"+intvalue);\n\t\t\tmapKeyPos.put(key, intvalue);\n\t\t\tcur++;\n\t\t\tif ( cur >= size ) cur = 0;\n\t\t\tif ( oldObject != null )\n\t\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t}\n\t}", "public V put(final K key, final V value) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n\n for (Entry<K, V> entry = entries[index]; entry != null; entry = entry.nextEntry) {\n if (hash == entry.hash && key == entry.get()) {\n final V oldentry = entry.value;\n if (value != oldentry) {\n entry.value = value;\n }\n return oldentry;\n }\n }\n\n entries[index] = new Entry<K, V>(key, value, refqueue, hash, entries[index]);\n if (++size >= threshold) {\n resize(entries.length * 2);\n }\n return null;\n }", "public V put(K key,V value) {\n\tif(key==null||value==null) {\n\t throw new NullPointerException();\n\t}\n\telse {\n\tMyEntry addvalue=new MyEntry();\n\taddvalue.key=key;\n\taddvalue.value=value;\n\t\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t\n\t\n\t//what happens if the same key already exists\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].add(addvalue);\n\t\tsize++;\n\t\tif(((float)size/(float)capacity)>loadFactor) {\n\t\t resize();\n\t\t}\n\t\treturn previousvalue;\n\t }\n\t}\n\t\n\t//what happens if the key does not exist\n\ttable[bucket].add(addvalue);\n\tsize++;\n\tif(((float)size/(float)capacity)>loadFactor) {\n\t resize();\n\t}\n\treturn null;\n\t}\n }", "public V put(K key, V value) {\n\t\tint pos = key.hashCode() / numCub;\n\t\tV valor = this.get(key);\n\t\tif (pos < tam) {\n\t\t\tint indice = tabla.get(pos).keySet().indexOf(key);\n\t\t\tif (indice == -1) {\n\t\t\t\ttabla.get(pos).valueSet().add(value);\n\t\t\t\ttabla.get(pos).keySet().add(key);\n\t\t\t} else {\n\t\t\t\ttabla.get(pos).valueSet().set(indice, value);\n\t\t\t\ttabla.get(pos).keySet().set(indice, key);\n\t\t\t}\n\t\t} else { //Mapa demasiado pequeno, redimensiona y vuelve a intentarlo\n\t\t\tthis.redimensionar();\n\t\t\tthis.put(key, value);\n\t\t}\n\t\treturn valor;\n\t}", "public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }", "public interface Map<K, V>\n{\n // Adds the specified key-value pair to the map. Does nothing if the key already\n // exists in the map.\n void add(K key, V value);\n\n // Returns the value associated with the specified key, or null of that key doesn't\n // exist in the map\n V get(K key);\n\t\n // Removes the key-value pair with the specified key from the map. Does nothing if\n // the key doesn't exist in the map.\n void remove(K key);\n}", "public void put (String key, Object value) {\n if (trace) {\n getProfiler().checkPoint(\n String.format(\" %s='%s' [%s]\", key, value, Thread.currentThread().getStackTrace()[2])\n );\n }\n getMap().put (key, value);\n synchronized (this) {\n notifyAll();\n }\n }", "public void setSurrogateKey(long value)\n {\n if(__surrogateKey != value)\n {\n _isDirty = true;\n }\n __surrogateKey = value;\n }", "public abstract void map(String key, String value) throws Exception;", "@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }", "public V put(K key, V value) {\r\n\t\tint place = hash(key.hashCode());\r\n\t\tif (get(key) != null) {\r\n\t\t\tLinkedList<KVPair> temp = hashMapArray[place];\r\n\t\t\tfor (KVPair i : temp) {\r\n\t\t\t\tif (i.getKey().equals(key)) {\r\n\t\t\t\t\tV oldKey = i.getValue();\r\n\t\t\t\t\ti.setValue(value);\r\n\t\t\t\t\treturn oldKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ((capacity * loadFactor) <= (size)) {\r\n\t\t\t\texpand(capacity + 10);\r\n\t\t\t\treturn put(key, value);\r\n\t\t\t} else if (hashMapArray[place] == null) {\r\n\t\t\t\thashMapArray[place] = new LinkedList<KVPair>();\r\n\t\t\t}\r\n\t\t\thashMapArray[place].add(new KVPair(key, value));\r\n\t\t\tsize++;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic T put(String key, T value) {\n\t\tString uKey = key.toUpperCase();\n\t\tif ( containsKey(uKey)){\n\t\t\treturn super.get(uKey);\n\t\t}else{\n\t\t\treturn super.put(uKey, value);\n\t\t}\n\t\t\n\t}", "public MapUtil put(String name, Object value) {\n\t\tif (value != null) {\n\t\t\tvalues.put(name, value);\n\t\t}\n\t\treturn this;\n\t}", "public Map<String, String> getValueData(){\n\t\treturn valueCache;\n\t}", "public static <K, V> Reference2ObjectMap<K, V> singleton(K key, V value) {\n/* 271 */ return new Singleton<>(key, value);\n/* */ }", "Object put(Object key, Object value);", "ValueType put(long key, ValueType entry);", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }", "private void put(String aKey, Object aValue) {\n\t\tmData.put(aKey, getValue(aValue));\n\t}", "public void \n\tsetData(\n\t\t\tString key, \n\t\t\tObject value) \n\t{\n\t\ttry{\n\t\t\tthis_mon.enter();\n\n\t\t\tif (user_data == null) {\n\t\t\t\tuser_data = new HashMap();\n\t\t\t}\n\t\t\tif (value == null) {\n\t\t\t\tif (user_data.containsKey(key))\n\t\t\t\t\tuser_data.remove(key);\n\t\t\t} else {\n\t\t\t\tuser_data.put(key, value);\n\t\t\t}\n\t\t}finally{\n\t\t\tthis_mon.exit();\n\t\t}\n\t}", "final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }", "public void put(int key, int value) {\n Node n = map.get(key);\n if(n == null){\n n = new Node(key, value);\n add(n);\n map.put(key, n);\n }\n else{\n n.val = value;\n update(n);\n }\n if(map.size() > this.capacity ){\n //we need to remove a stale node now\n Node removeNode = tail.prev;\n remove(removeNode);\n map.remove(removeNode.key);\n return;\n }\n return;\n }", "Object getValueFromLocalCache(Object key);", "private <T, E> T getKeyByValue(Map<T, E> map, E value) {\n for (Map.Entry<T, E> entry : map.entrySet()) {\n if (value.equals(entry.getValue())) {\n return entry.getKey();\n }\n }\n return null;\n }", "public void put(Object key, Object value) throws Exception {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n entry.setValue(value);\n touchEntry(entry);\n } else {\n\n if (_hash.size() == _max) {\n // purge and recycle entry\n entry = purgeEntry();\n entry.setKey(key);\n entry.setValue(value);\n } else {\n entry = new CacheEntry(key, value);\n }\n addEntry(entry);\n _hash.put(entry.getKey(), entry);\n }\n }", "@Override\n public int hashCode()\n {\n return Objects.hash(value);\n }", "@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}", "public V put(String key, V value) {\n int index = hashOf(key);\n while (index > capacity) grow();\n Object oldValue = values[index];\n values[index] = value;\n if (oldValue == null) size++;\n return (V) oldValue;\n }", "@Override\n public int hashCode() {\n return value;\n }", "public void put(int key, int value) {\n if(map.get(key) != null){\n Node node = map.get(key);\n node.value = value;\n deleteNode(node);\n addToHead(node);\n } else {\n Node node = new Node(key, value);\n map.put(key, node);\n if(size < capacity){\n size++;\n addToHead(node);\n } else {\n map.remove(tail.prev.key);\n deleteNode(tail.prev);\n addToHead(node);\n }\n }\n }", "void cache(String key, T value) throws IOException;", "private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}", "public synchronized Object get( Object key ) {\n\t\tObject intvalue = mapKeyPos.get(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\t//System.out.println(\"CountLimiteLRU: get(\"+key+\") = \"+values[pos]);\n\t\t\treturn values[pos];\n\t\t}\n\t\treturn null;\n\t}", "public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }", "public void put(String key, V value) {\n map.computeIfAbsent(key, k -> keepOrder ? new LinkedHashSet<>() : new HashSet<>()).add(value);\n }", "@Override\n public void unmarkCell() {\n MNKCell last = MC.getLast();\n super.unmarkCell();\n key = nextZobrist(last.i, last.j);\n value = previousValues.pop();\n }", "public boolean put(K key, V value)\r\n\t{\r\n\t\treturn data.addUpdate(new Entry(key, value));\r\n\t}", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public void persist(String key, Object value)\r\n\t{\r\n\t\tgetPersistenceMap().put(key, value);\r\n\t}", "public ImmutableMapEntry(final K key, final V value) {\r\n this.value = value;\r\n this.key = key;\r\n }", "public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }", "public void put(int key, int value) {\n if(!map.contains(key)){\n // If the cache is full, remove from the end of the deque and the map\n if(deque.size() == cacheSize){\n int lastElement = deque.removeLast();\n map.remove(lastElement);\n }else{\n // The data is found in the cache, but it could be anywhere\n // So iterate the queue and push it forward\n int index = 0, i = 0;\n Iterator<Integer> itr = deque.iterator();\n while(itr.hasNext()){\n if(itr.next() == key){\n index = i;\n break;\n }\n i++;\n }\n // Now index position locates the key in the deque. Remove it and add it\n // to the front of the queue\n deque.remove(index);\n }\n deque.push(key);\n // Add also the key to the map\n map.add(key);\n } \n }", "public void put(final Serializable key, final Serializable value) {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (value != null) {\n final Element element = new Element(key, value);\n cache.put(element);\n } else {\n cache.remove(key);\n }\n } finally {\n //Release the readlock here. This will have been acquired in the get, where the element was null\n lock.release();\n }\n }" ]
[ "0.6363502", "0.62468076", "0.6196581", "0.60864735", "0.60732293", "0.602342", "0.6022729", "0.5948156", "0.59375983", "0.59346604", "0.58870465", "0.58570373", "0.5831709", "0.583046", "0.5827214", "0.5823543", "0.5814574", "0.5766113", "0.57635796", "0.5754704", "0.5749699", "0.5747362", "0.5740089", "0.57369745", "0.57321066", "0.57152337", "0.571484", "0.57145655", "0.5703124", "0.56780416", "0.567644", "0.56710815", "0.56657255", "0.56596375", "0.56497794", "0.56420743", "0.56156", "0.56140965", "0.55968606", "0.5588893", "0.5587578", "0.5581642", "0.55730796", "0.5569257", "0.55657", "0.55648726", "0.5546979", "0.5545169", "0.5541138", "0.5534079", "0.5533702", "0.5529595", "0.5518071", "0.5516563", "0.5515606", "0.55072343", "0.55045336", "0.55001503", "0.54825586", "0.54813534", "0.5481047", "0.54763657", "0.5475532", "0.54693425", "0.54610986", "0.5457675", "0.54499257", "0.54498804", "0.54445666", "0.5438223", "0.5430992", "0.5420378", "0.5420276", "0.54143023", "0.54121816", "0.5404442", "0.54011106", "0.53989476", "0.5393659", "0.53868735", "0.5380001", "0.5376039", "0.5361014", "0.5357868", "0.53512955", "0.53488445", "0.53457075", "0.534334", "0.5339116", "0.53381765", "0.53279245", "0.5327484", "0.53227013", "0.53222847", "0.5318644", "0.531758", "0.5316889", "0.53110695", "0.5310594", "0.53099114" ]
0.60439116
5
Fills CharTermAttribute with the current token text.
public final void getText(CharTermAttribute t) { t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final void getText(CharTermAttribute t) {\n t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }", "private void initTermBuffer() {\n if (termBuffer == null) {\n if (termText == null) {\n termBuffer = new char[MIN_BUFFER_SIZE];\n termLength = 0;\n } else {\n int length = termText.length();\n if (length < MIN_BUFFER_SIZE) length = MIN_BUFFER_SIZE;\n termBuffer = new char[length];\n termLength = termText.length();\n termText.getChars(0, termText.length(), termBuffer, 0);\n termText = null;\n }\n } else if (termText != null)\n termText = null;\n }", "public void setTermText(String text) {\n termText = text;\n termBuffer = null;\n }", "public void setTerm(String value) {\r\n setAttributeInternal(TERM, value);\r\n }", "public String getTermText() {\n return termText;\n }", "QuoteTermAttribute createQuoteTermAttribute();", "public String getTerm() {\n return term;\n }", "public String getTerm(){\n return this.term;\n }", "TermNode() {\n this.fac = new FacNode();\n this.term = null;\n this.selection = 1;\n }", "public String getTerm() {\r\n return (String) getAttributeInternal(TERM);\r\n }", "public TermData(String term)\n\t{\n\t\tthis.term = term;\n\t}", "public ConceptToken(String token) {\n _multiToken = false;\n _text = \"\";\n _tokens = new String[]{token};\n }", "public Token setText(java.lang.String text) {\n this.text = text;\n return this;\n }", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText().toLowerCase();\n\n // TODO: construct a vector of tokens and update the tokenList in CAS\n\n String[] wordList = docText.split(\" \");\n HashMap<String, Integer> tokenCount = new HashMap<String, Integer>();\n for (String word : wordList) {\n String newWord = word;\n if(word.charAt(word.length()-1)<'a' || word.charAt(word.length()-1)>'z'){\n newWord = word.substring(0, word.length()-1);\n }\n //if(Utils.GetStopWordFilter().isStopword(newWord))continue;\n if (!tokenCount.containsKey(newWord)) {\n tokenCount.put(newWord, 1);\n } else {\n tokenCount.put(newWord, tokenCount.get(newWord) + 1);\n }\n }\n\n ArrayList<Token> tokenList = new ArrayList<Token>();\n for (String word : tokenCount.keySet()) {\n Token token = new Token(jcas);\n token.setText(word);\n token.setFrequency(tokenCount.get(word));\n tokenList.add(token);\n }\n FSList tokenFSList = Utils.fromCollectionToFSList(jcas, tokenList);\n doc.setTokenList(tokenFSList);\n }", "public void setTermcat(String value) {\r\n setAttributeInternal(TERMCAT, value);\r\n }", "public void setTerm(Expression term) {\n this.term = term;\n }", "private Token(char firstChar) {\r\n\t\tthis.text += firstChar;\r\n\t}", "public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }", "public Token(String text, int start, int end) {\n termText = text;\n startOffset = start;\n endOffset = end;\n }", "Term getCurrentTerm() {\n return currentTerm;\n }", "public Term(String t) {\n this.t = t;\n \n RepCheck();\n }", "public Element compileTerm() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\n\t\tElement termParent = document.createElement(\"term\");\n\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\n\t\t// Case 1: ( expression )\n\n\t\tif (token.equals(\"(\")) {\n\t\t\t// (\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t\t// exp\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t// )\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t}\n\n\t\t// Case 2: unaryOp term\n\t\telse if (token.matches(\"\\\\-|~\")) {\n\n\t\t\t// unary op\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tString op = jTokenizer.returnTokenVal();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t\n\t\t\t//Since it is postfix, the term comes first\n\t\t\t\n\t\t\t// term\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileTerm());\n\n\t\t\t// appending the op\n\t\t\tif (op.equals(\"~\")) {\n\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t} else {\n\t\t\t\twriter.writeArithmetic(\"neg\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Any constant or keyword\n\t\telse if (tokenType.matches(\"keyword|integerConstant|stringConstant\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t//pushing an integer constant\n\t\t\tif (tokenType.equals(\"integerConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", Integer.parseInt(token));\t\n\t\t\t}\n\t\t\t//For string, have to iterate along the length of the string and call string.append\n\t\t\telse if (tokenType.equals(\"stringConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", token.length());\n\t\t\t\twriter.writeCall(\"String.new\", 1);\n\n\t\t\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\t\t\twriter.writePush(\"constant\", (int) token.charAt(i));\n\t\t\t\t\twriter.writeCall(\"String.appendChar\", 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t\t//Pushing the keyword onto the stack, depending on what it is\n\t\t\telse if (tokenType.equals(\"keyword\")) {\n\t\t\t\tif (token.equals(\"true\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t\t} else if (token.equals(\"this\")) {\n\t\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\t} else if (token.equals(\"false\") || token.equals(\"null\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Variable, Variable[expression] or subroutineCall\n\t\telse if (tokenType.equals(\"identifier\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\tvarName = jTokenizer.returnTokenVal();\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.returnTokenVal();\n\n\t\t\t// Case 1: Array dereferencing\n\t\t\tif (token.equals(\"[\")) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// push base id\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\n\t\t\t\t// Exp\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t\t// ]\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// base + offset\n\t\t\t\twriter.writeArithmetic(\"add\");\n\n\t\t\t\t// pop into that\n\t\t\t\twriter.writePop(\"pointer\", 1);\n\t\t\t\t// push value into stack\n\t\t\t\twriter.writePush(\"that\", 0);\n\t\t\t}\n\n\t\t\t// Case 2: variable/class.subroutine call\n\t\t\telse if (token.equals(\".\")) {\n\n\t\t\t\tboolean method = false;\n\n\t\t\t\t// .\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// subroutine name\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tString subName = jTokenizer.returnTokenVal();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\tString firstName = varName;\n\t\t\t\t//Similar to the compileDo method, have to distinguish between\n\t\t\t\t//method and function\n\t\t\t\tif (symTable.lookup(firstName) != null) {\n\t\t\t\t\tmethod = true;\n\t\t\t\t\twriter.writePush(symTable.lookup(firstName).kind, symTable.lookup(firstName).index);\n\t\t\t\t\tvarName = symTable.lookup(firstName).type;\n\t\t\t\t}\n\t\t\t\t// expressionList\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement compileExpression = compileExpressionList();\n\t\t\t\tint nArgs = compileExpression.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(compileExpression);\n\n\t\t\t\t// Checking if method or function\n\t\t\t\tif (method) {\n\t\t\t\t\tnArgs++;\n\t\t\t\t}\n\t\t\t\twriter.writeCall(varName + \".\" + subName, nArgs);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\t\t\t}\n\n\t\t\t// Case 3: function call\n\t\t\telse if (token.equals(\"(\")) {\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// expression list\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement node = compileExpressionList();\n\t\t\t\tint nArgs = node.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(node);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// Writing the VML for a method call\n\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\twriter.writeCall(className + \".\" + varName, ++nArgs);\n\t\t\t}\n\t\t\t// Case 4: Variable name.\n\t\t\telse {\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t}\n\t\t}\n\t\treturn termParent;\n\t}", "public Value.Builder clearTerm() {\n term = null;\n fieldSetFlags()[14] = false;\n return this;\n }", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText();\n // construct a vector of tokens and update the tokenList in CAS\n // use tokenize0 from above\n List<String> ls = tokenize0(docText);\n Map<String, Integer> map = new HashMap<String, Integer>();\n Collection<Token> token_collection = new ArrayList<Token>();\n for (String d : ls) {\n if (map.containsKey(d)) {\n int inc = map.get(d) + 1;\n map.put(d, inc);\n } else {\n map.put(d, 1);\n }\n }\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry) it.next();\n Token t = new Token(jcas);\n String k = pairs.getKey().toString();\n int v = Integer.parseInt(pairs.getValue().toString());\n t.setFrequency(v);\n t.setText(k);\n token_collection.add(t);\n it.remove(); // avoids a ConcurrentModificationException\n }\n // use util tool to convert to FSList\n doc.setTokenList(Utils.fromCollectionToFSList(jcas, token_collection));\n doc.addToIndexes(jcas);\n\n }", "public Token(String text, int start, int end, int flags) {\n termText = text;\n startOffset = start;\n endOffset = end;\n this.flags = flags;\n }", "public SpecialCharToken(char value, Position position) {\n super(position);\n this.value = value;\n }", "public AcademicTerm(int termIndex, Term term) {\n this.termIndex = termIndex;\n this.term = term;\n }", "protected void parseTermData()\n {\n for (int i = 0; i < data.length; i++)\n {\n data[i] = Cdata[i];\n }\n }", "public Token(String text, int start, int end, String typ) {\n termText = text;\n startOffset = start;\n endOffset = end;\n type = typ;\n }", "void compileTerm() {\n tagBracketPrinter(TERM_TAG, OPEN_TAG_BRACKET);\n try {\n compileTermBasicHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(TERM_TAG, CLOSE_TAG_BRACKET);\n }", "protected Term createTermFrom(String tag) {\n\t\tTerm tmp = terms.getOrDefault(tag, new Term(tag, this, terms.size()));\n\t\tterms.put(tag, tmp);\n\t\t// termCounts.put(tmp, termCounts.getOrDefault(tmp,0)+1);\n\t\ttermsInCorpus += 1;\n\t\treturn tmp;\n\t}", "public int getTermIndex() {return termIndex;}", "public void setTermweig(String value) {\r\n setAttributeInternal(TERMWEIG, value);\r\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length) {\n\t\tif (inWord) {\n\t\t\tString w = new String(ch, start, length);\n\t\t\tif (currentElementText == null)\n\t\t\t\tcurrentElementText = w;\n\t\t\telse\n\t\t\t\tcurrentElementText += w;\n\t\t}\n\t\tsuper.characters(ch, start, length);\n\t}", "Term getTerm();", "void setToken(String aKey, ITokenizable aTokenizable);", "public String getTermcat() {\r\n return (String) getAttributeInternal(TERMCAT);\r\n }", "public void parseTerm(Tokenizer t) {\n\n // parse the fac node\n this.fac.parseFac(t);\n\n // check selection\n if(t.currentToken().equals(\"*\")) {\n\n // Chomp \"*\" token\n t.nextToken();\n\n // update selection\n this.selection = 2;\n\n // parse term node\n this.term = new TermNode();\n this.term.parseTerm(t);\n\n }\n\n }", "public String getTermweig() {\r\n return (String) getAttributeInternal(TERMWEIG);\r\n }", "protected void setAttribs(String str, int start, int end) {\n clearAttributes();\n //FIXME increasing below by one(default) might be tricky, need more analysis\n // after lucene upgrade to 3.5 below is most probably not even needed \n this.posIncrAtt.setPositionIncrement(1);\n this.termAtt.setEmpty();\n this.termAtt.append(str);\n this.offsetAtt.setOffset(start, end);\n }", "SingleTerm(Term t)\n {\n term = t;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n token_ = value;\n onChanged();\n return this;\n }", "public void setTermFrequency(double termFreq) {\n\t\ttermFrequency = termFreq;\n\t}", "private void setToken(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n token_ = value;\n }", "private void setToken(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n token_ = value;\n }", "private void setToken(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n token_ = value;\n }", "void set(ITokenizable aTokenizable);", "public Token setToken(String token) {\n this.token = token;\n return this;\n }", "private void setTokenLength() {\n\t\tfor (Token ts : Token.values()) {\n\t\t\tif (ts.getValue().length() == 1) ts.setOneChar(true);\n\t\t\telse ts.setOneChar(false);\n\t\t}\n\t}", "private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public Expression getTerm() {\n return term;\n }", "public void extract() throws Exception{\n //because when this is called, Scanner had already determined the first character\n char currentChar = getCurrentChar();\n\n do {\n this.text += Character.toString(currentChar);\n currentChar = getNextChar();\n } while (Character.isLetterOrDigit(currentChar) || currentChar == '_');\n\n this.value = this.text;\n\n //find token type. For words, the type is either IDENTIFIER, or the specific reserved word\n\n if (TokenType.getReservedWords().contains(this.text.toLowerCase())) {\n this.type = TokenType.valueOf(this.text.toUpperCase());\n }\n else {\n this.type = TokenType.IDENTIFIER;\n }\n }", "public SpecialCharToken(char value) {\n this(value, null);\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic String getValue() {\n\t\treturn this.token.getActualTextValue() ;\n\t}", "protected void apply(AttributedString as) {\n\t\t\tas.addAttribute(textAttribute, value, begin, end);\n\t\t}", "@Override\n\tpublic void setToken(Token token) {\n\t\tthis.token = token;\n\t\t\n\t}", "@Override\n public String getTermByIndex(int index) {\n return null;\n }", "public Word (String word){\n this.word = word;\n count = 0;\n }", "public void setCharacterSequence(String chars);", "public TreeItem(Symbol term) {\n\t\tsuper(term);\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\t}", "public String getTermCode() {\n return termCode;\n }", "QuoteTerm createQuoteTerm();", "public void updateCharacters(Tree sentence){\n\t\tinitializeAllCharacters(sentence);\n\t}", "public void setTerm(java.lang.Integer value) {\n this.term = value;\n }", "public Word(String text) {\n\t\tsuper();\n\t\tthis.text = text;\n\t}", "public String getTokenValue() { return tok; }", "public Token(Token other) {\n __isset_bitfield = other.__isset_bitfield;\n this.tokenIndex = other.tokenIndex;\n if (other.isSetText()) {\n this.text = other.text;\n }\n if (other.isSetTextSpan()) {\n this.textSpan = new edu.jhu.hlt.concrete.TextSpan(other.textSpan);\n }\n if (other.isSetRawTextSpan()) {\n this.rawTextSpan = new edu.jhu.hlt.concrete.TextSpan(other.rawTextSpan);\n }\n if (other.isSetAudioSpan()) {\n this.audioSpan = new edu.jhu.hlt.concrete.AudioSpan(other.audioSpan);\n }\n }", "@Override\n\tpublic void onStyleAttributeValue(Tokenizer tokenizer, String key, String value) {\n\t\t\n\t}", "public String getContextCharacters() {\r\n return this.text.toString();\r\n }", "public Token() {\n this.clitic = \"none\";\n }", "protected void updateTokens(){}", "public StreamTerm term() {\n return term;\n }", "void setSymbol(@MaxUtf8Length(20) CharSequence symbol);", "public RegexCharClass()\n\t{\n\t\t_rangelist = new java.util.ArrayList<SingleRange>(6);\n\t\t_canonical = true;\n\t\t_categories = new StringBuilder();\n\n\t}", "@Override\n public final boolean incrementToken() throws IOException {\n if (lemmaListIndex < lemmaList.size()) {\n restoreState(current);\n posIncrAtt.setPositionIncrement(0);\n popNextLemma();\n return true;\n } else if (this.input.incrementToken()) {\n if (!keywordAttr.isKeyword()\n && (lookupSurfaceForm(termAtt) || lookupSurfaceForm(toLowercase(termAtt)))) {\n current = captureState();\n popNextLemma();\n } else {\n tagsAtt.clear();\n }\n return true;\n } else {\n return false;\n }\n }", "protected void nextChar() {\r\n\t\t\r\n//\t\tif (index < text.length) {\r\n//\t\t\tlook = text[index++];\r\n//\t\t} else {\r\n//\t\t\tlook = ' ';\r\n//\t\t}\r\n\t\tlook = (index < text.length)?(text[index++]):(' ');\r\n\t}", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "void missingTokenInserted(Term token);", "public void setToken(String token) {\r\n this.token = token == null ? null : token.trim();\r\n }", "@Override\n public void annotate(Annotation annotation) {\n if (VERBOSE) {\n System.err.print(\"Tokenizing ... \");\n }\n\n if (annotation.has(CoreAnnotations.TextAnnotation.class)) {\n String text = annotation.get(CoreAnnotations.TextAnnotation.class);\n Reader r = new StringReader(text);\n // don't wrap in BufferedReader. It gives you nothing for in-memory String unless you need the readLine() method!\n\n List<CoreLabel> tokens = getTokenizer(r).tokenize();\n // cdm 2010-05-15: This is now unnecessary, as it is done in CoreLabelTokenFactory\n // for (CoreLabel token: tokens) {\n // token.set(CoreAnnotations.TextAnnotation.class, token.get(CoreAnnotations.TextAnnotation.class));\n // }\n\n annotation.set(CoreAnnotations.TokensAnnotation.class, tokens);\n if (VERBOSE) {\n System.err.println(\"done.\");\n System.err.println(\"Tokens: \" + annotation.get(CoreAnnotations.TokensAnnotation.class));\n }\n } else {\n throw new RuntimeException(\"Tokenizer unable to find text in annotation: \" + annotation);\n }\n }", "private void selectCurrentToken() {\r\n setCurrentItem(currentTextItem);\r\n setPosition(currentTextItem.getEndPosition());\r\n }", "private void clearFormatedText() {\n \n formatedText_ = getDefaultInstance().getFormatedText();\n }", "public void setToken(String token) {\n this.token = token == null ? null : token.trim();\n }", "public String newToken(){\n String line = getLine(lines);\n String token = getToken(line);\n return token;\n }", "public void setTermPath(String value) {\r\n setAttributeInternal(TERMPATH, value);\r\n }", "public void setCurrent_word(String current_word){\n\t\tthis.current_word = current_word;\n\t}", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "public Value.Builder setTerm(java.lang.Integer value) {\n validate(fields()[14], value);\n this.term = value;\n fieldSetFlags()[14] = true;\n return this;\n }", "String highlightTerm(String term);", "public StringWordTokenizer(WordFinder wf) {\n\t\tsuper(wf);\n\t}", "private void saveToken() throws IOException {\n\t\t\n\t\tFileWriter termIdx = new FileWriter(StoragePath+Path.termIdxDir);\n\t\t\n\t\tfor(Entry<String, Integer> term: termDic.entrySet()){\n\t\t\ttermIdx.append(term.getKey() + \"\\n\" + term.getValue() + \"\\n\");\n\t\t}\n\t\t\n\t\ttermIdx.close();\n\t\t\n\t}" ]
[ "0.62463444", "0.6145582", "0.6118295", "0.5996986", "0.5884617", "0.5733993", "0.56272036", "0.56007767", "0.55606574", "0.55272335", "0.551733", "0.54624623", "0.5424525", "0.53693455", "0.5293277", "0.5255325", "0.5252336", "0.518281", "0.5117941", "0.5027711", "0.502214", "0.5021584", "0.50102323", "0.5008509", "0.50005865", "0.4973385", "0.4957519", "0.4950464", "0.49201462", "0.48984566", "0.48963684", "0.48944885", "0.48935556", "0.4862931", "0.48521277", "0.48444304", "0.48392943", "0.48223022", "0.4811553", "0.48080546", "0.47988898", "0.4792655", "0.4776809", "0.47730714", "0.47730714", "0.47730714", "0.4766875", "0.4761608", "0.47587988", "0.4757096", "0.4753638", "0.47479227", "0.47458598", "0.47437266", "0.47437266", "0.47437266", "0.47437266", "0.47437266", "0.4742763", "0.47358757", "0.47196922", "0.47077993", "0.47034404", "0.47015777", "0.46938497", "0.46832523", "0.46817532", "0.46665537", "0.46646437", "0.46603712", "0.46559462", "0.46553156", "0.46549717", "0.46539125", "0.4653845", "0.46478122", "0.46203604", "0.46178317", "0.46102226", "0.4607425", "0.46059448", "0.46058628", "0.46058628", "0.46058628", "0.45929283", "0.45748696", "0.4571742", "0.45536938", "0.45442018", "0.45419657", "0.45363167", "0.45349905", "0.45298254", "0.45248237", "0.45248237", "0.45248237", "0.45235598", "0.4522606", "0.4520335", "0.45190832" ]
0.6583949
0
Creates a new scanner
SentenceTokenizerImpl(java.io.Reader in) { this.zzReader = in; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\n }", "private ConsoleScanner() {}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "private static Scanner createScanner(File inputFile)\n\t{\n\t\t/// create Scanner to read from file and also check if the file exists\n\t Scanner in = null; // closes before the end of readDataFile\n\t try \n\t {\n\t \tin=new Scanner(inputFile);\n\t }\n\t catch(FileNotFoundException e) \n\t {\n\t \tSystem.out.println(\"The file \"+ inputFile.getName() + \" can not be found!\");\n\t \tSystem.exit(0);\n\t }\n\t \n\t return in;\n\t}", "protected Scanner getTagScanner() {\n \tif(scanner == null)\n \t scanner = new Scanner();\n \treturn scanner;\n }", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public parser(Scanner s) {super(s);}", "private Scanner getScanner(String fixedString) throws IOException {\n\t\tURLConnection connection = new URL(SUPERVALU_URL_START +fixedString).openConnection();\n\t\treturn new Scanner(connection.getInputStream());\n\t}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public static QRScanner newInstance() {\n QRScanner fragment = new QRScanner();\n return fragment;\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public CompParser(java_cup.runtime.Scanner s) {super(s);}", "void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}", "public Scanner getScanner(){\n\t\t\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t\t//DIFFERENT FROM OTHER INIT FILE!\n\t\t\t\tfilename = filename.trim().replace(\".s230\", \".S230\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tString dirName = System.getProperty(\"user.dir\");\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\source\",\"\\\\\").trim();\n\t\tdirName = dirName.replace(\"\\\\Program_Files\\\\classes\",\"\\\\\").trim();\n\t\tdirName = dirName.concat(\"\\\\InputOutputFolder\\\\\");\n\t\tSystem.out.println(dirName+filename);\n\t\tFile file = new File(dirName, filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\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\treturn toReturn;\n\t}", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Scanner getScanner(){\n\t\t\n\t\tboolean hasFile = false;\n\t\tString filename = \"\";\n\t\tfor(int i = 0; i<argList.size(); i++ ){\n\t\t\tif(argList.get(i).equals(\"-f\")){\n\t\t\t\thasFile = true;\n\t\t\t\tfilename = argList.get(i+1);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(System.getProperty(\"user.dir\") + \" ... \" + filename);\n\t\tFile file = new File(System.getProperty(\"user.dir\")+\"\\\\ARM230Compiler\\\\InputOutputFolder\\\\\", filename);\n\t\tScanner toReturn = null;\n\t\ttry {\n\t\t\ttoReturn = new Scanner(file);\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\treturn toReturn;\n\t}", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public MetadataScanner()\n {\n this(\"\");\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public Scanner( String filename ) throws IOException\n {\n sourceFile = new PushbackInputStream(new FileInputStream(filename));\n \n nextToken = null;\n }", "public static Scanner getScanner(File file) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n } catch (IOException e) {\n System.err.println(\"input error\");\n }\n return scanner;\n }", "public ContentScanner getScanner(\n )\n {return scanner;}", "CreateScanFilterResponse createScanFilter(CreateScanFilterRequest request);", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public parser(Scanner s, SymbolFactory sf) {super(s,sf);}", "public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}", "public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public LuaGrammarCup(java_cup.runtime.Scanner s) {super(s);}", "public static synchronized void Initialize() throws FileNotFoundException, UnsupportedEncodingException {\n fileReaderInit(fLocation);\n \n pbr = new PushbackReader(reader, 5);\n \n \n File currentDirFile = new File(\".\");\n String helper = currentDirFile.getAbsolutePath();\n outLocation = \"src/parser_resources/\" + outFile;\n /*scan.nextLine();*/\n \n File f = new File(outLocation);\n\n if (f.exists() && !f.isDirectory()) {\n fWriter = new PrintWriter(outLocation, \"Ascii\");\n System.out.println(\"\\nOutput file initialized for Scanner\");\n System.out.println(\"Scanning output to: \" + helper + \"/\" + outLocation);\n } else {\n System.out.println(\"Error: output file missing please \\\"touch\"\n + \"scanner.out\\\" in parser_resources directory.\");\n }\n }", "public MJParser(java_cup.runtime.Scanner s) {super(s);}", "public PCLParser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(Configuration config) {\r\n\t\tthis.conf = config;\r\n\t\tfileCacheList = new LinkedList<FileObj>();\r\n\r\n\t}", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public static Gate scan( Scanner sc ) {\n\t\tif (outputList.isEmpty()) {\n\t\t\tSimulator.schedule(\n\t\t\t\t1,\n\t\t\t\t(float time) -> displayHeaders( time )\n\t\t\t);\n\t\t}\n\n\t\t// now do the scan as for any other gate\n\t\tOutput g = new Output();\n\t\tg.scan( sc, inputs );\n\t\tif (g.name == null) g = null;\n\n\t\t// and finally, remember this in the output list\n\t\tif (g != null) outputList.add( g );\n\t\treturn g;\n\t}", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public LexicalScanner() throws IOException {\n this.codesMap = new CodesMap();\n this.keyWords = loadKeywords();\n this.specialCharacters = loadSpecialCharacters();\n this.identifierAutomata = new FA(IDENTIFIER_AUTOMATA_FILE);\n this.constantAutomata = new FA(CONSTANT_AUTOMATA_FILE);\n }", "public XPathParser(java_cup.runtime.Scanner s) {super(s);}", "public HumanPlayer(Scanner scanner) {\n this.scanner = scanner;\n }", "public ContentScanner(\n IContentContext contentContext\n )\n {this(contentContext.getContents());}", "public TokenScanner(final File f) throws FileNotFoundException {\n\t\tfileScanner = new Scanner(file = f);\n\t}", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }", "public InputReader() {\n reader = new Scanner(System.in);\n }", "void makeDeck(Scanner scanner) \n\t\t\tthrows IOException {\n\t\tCardNode cn = null;\n\t\tif (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t\twhile (scanner.hasNextInt()) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = scanner.nextInt();\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return new Symbol (sym.EOF); \n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }" ]
[ "0.70184577", "0.6995181", "0.6993494", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.66455257", "0.6599448", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6569486", "0.6510001", "0.6377581", "0.6369186", "0.6338234", "0.6288102", "0.62420654", "0.6238479", "0.62367743", "0.6234265", "0.6223293", "0.6223293", "0.6179389", "0.6179389", "0.6151572", "0.6143058", "0.61248904", "0.6123854", "0.61232376", "0.60844225", "0.6062503", "0.6048141", "0.60417837", "0.6027999", "0.6019498", "0.59948283", "0.5971439", "0.5971439", "0.5959572", "0.59595394", "0.595831", "0.5948784", "0.59298563", "0.59298563", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5923914", "0.5922065", "0.59072775", "0.5901725", "0.5901725", "0.5901725", "0.5901725", "0.5901725", "0.5901725", "0.5901725", "0.5893243", "0.5875552", "0.586246", "0.5862297", "0.58445174", "0.58377695", "0.5829068", "0.58266336", "0.5806441", "0.5771194", "0.5767364", "0.5751365", "0.573949", "0.5731958", "0.5713767", "0.57056075", "0.57006305", "0.5695496", "0.5679925", "0.567098", "0.5666009", "0.5636769", "0.563668", "0.56134176", "0.5611127", "0.56032014", "0.5564176", "0.5563071", "0.55623186", "0.55513155", "0.5540127", "0.55275434" ]
0.0
-1
Unpacks the compressed character translation table.
private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x110000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 1182) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int yy_unpack(String packed, int offset, int [] trans) {\n int i = 0; /* index in packed string */\n int j = offset; /* index in unpacked array */\n int l = packed.length();\n while (i < l) {\n int count = packed.charAt(i++);\n int value = packed.charAt(i++);\n value--;\n do trans[j++] = value; while (--count > 0);\n }\n return j;\n }", "private static int yy_unpack(String packed, int offset, int [] trans) {\n int i = 0; /* index in packed string */\n int j = offset; /* index in unpacked array */\n int l = packed.length();\n while (i < l) {\n int count = packed.charAt(i++);\n int value = packed.charAt(i++);\n value--;\n do trans[j++] = value; while (--count > 0);\n }\n return j;\n }", "private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 2224) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }", "private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x110000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 172) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 128) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 182) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 166) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 228) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 228) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char[] zzUnpackCMap(String packed) {\n char[] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2808) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 178) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2928) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\r\n char [] map = new char[0x10000];\r\n int i = 0; /* index in packed string */\r\n int j = 0; /* index in unpacked array */\r\n while (i < 152) {\r\n int count = packed.charAt(i++);\r\n char value = packed.charAt(i++);\r\n do map[j++] = value; while (--count > 0);\r\n }\r\n return map;\r\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2266) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 210) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2106) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2820) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2244) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1348) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2894) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 164) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 166) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 86) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 366) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 258) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n int size = 0;\n for (int i = 0, length = packed.length(); i < length; i += 2) {\n size += packed.charAt(i);\n }\n char[] map = new char[size];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < packed.length()) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 174) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 174) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x110000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 2480) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1690) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static int [] yy_unpack() {\n int [] trans = new int[8174];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }", "private static char [] zzUnpackCMap(String packed) {\n\t\tchar [] map = new char[0x10000];\n\t\tint i = 0; /* index in packed string */\n\t\tint j = 0; /* index in unpacked array */\n\t\twhile (i < 2312) {\n\t\t\tint count = packed.charAt(i++);\n\t\t\tchar value = packed.charAt(i++);\n\t\t\tdo map[j++] = value; while (--count > 0);\n\t\t}\n\t\treturn map;\n\t}", "private static char [] zzUnpackCMap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1774) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private static int [] yy_unpack() {\n int [] trans = new int[5476];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }", "private static char [] yy_unpack_cmap(String packed) {\n char [] map = new char[0x10000];\n int i = 0; /* index in packed string */\n int j = 0; /* index in unpacked array */\n while (i < 1742) {\n int count = packed.charAt(i++);\n char value = packed.charAt(i++);\n do map[j++] = value; while (--count > 0);\n }\n return map;\n }", "private void unpack() {\n if (!isInPackedState)\n return;\n try {\n ByteArrayInputStream bs = new ByteArrayInputStream(data);\n DataInputStream dis = new DataInputStream(bs);\n line_number_table_length = (dis.readUnsignedShort());\n line_number_table = new LineNumber[line_number_table_length];\n for (int i = 0; i < line_number_table_length; i++) line_number_table[i] = new LineNumber(dis);\n dis.close();\n // throw it away now\n data = null;\n } catch (IOException e) {\n throw new RuntimeException(\"Unpacking of LineNumberTable attribute failed\");\n }\n isInPackedState = false;\n }", "public String decompress() {\r\n \tString decompressed = \"\";\r\n \tString cursor = \"\";\r\n \tfor (int i = 0; i < compressedText.length(); i++) {\r\n \t\tcursor += compressedText.charAt(i);\r\n \t\tif (codeToChar.containsKey(cursor)) {\r\n \t\t\tdecompressed += codeToChar.get(cursor);\r\n \t\t\tcursor = \"\";\r\n \t\t}\r\n \t}\r\n return decompressed;\r\n }", "private void initTables()\n {\n if ( vc == null )\n {\n // statics are not initialised yet\n vc = new char[ 64 ];\n cv = new int[ 256 ];\n // build translate valueToChar table only once.\n // 0..25 -> 'A'..'Z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i ] = ( char ) ( 'A' + i );\n }\n // 26..51 -> 'a'..'z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i + 26 ] = ( char ) ( 'a' + i );\n }\n // 52..61 -> '0'..'9'\n for ( int i = 0; i <= 9; i++ )\n {\n vc[ i + 52 ] = ( char ) ( '0' + i );\n }\n vc[ 62 ] = spec1;\n vc[ 63 ] = spec2;\n // build translate charToValue table only once.\n for ( int i = 0; i < 256; i++ )\n {\n cv[ i ] = IGNORE;// default is to ignore\n }\n for ( int i = 0; i < 64; i++ )\n {\n cv[ vc[ i ] ] = i;\n }\n cv[ spec3 ] = PAD;\n }\n valueToChar = vc;\n charToValue = cv;\n }", "public static int decompose(char[] paramArrayOfChar1, int paramInt1, int paramInt2, char[] paramArrayOfChar2, int paramInt3, int paramInt4, boolean paramBoolean, int[] paramArrayOfInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 932 */ char[] arrayOfChar1 = new char[3];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 941 */ int i7 = paramInt3;\n/* 942 */ int i8 = paramInt1;\n/* 943 */ int i2; int k; if (!paramBoolean) {\n/* 944 */ i2 = (char)indexes[8];\n/* 945 */ k = 4;\n/* */ } else {\n/* 947 */ i2 = (char)indexes[9];\n/* 948 */ k = 8;\n/* */ }\n/* */ \n/* */ \n/* 952 */ int j = 0xFF00 | k;\n/* 953 */ int m = 0;\n/* 954 */ int i4 = 0;\n/* 955 */ long l = 0L;\n/* 956 */ int i1 = 0;\n/* 957 */ int i6 = 0;\n/* */ int i5;\n/* 959 */ int i3 = i5 = -1;\n/* */ \n/* */ \n/* */ \n/* */ for (;;)\n/* */ {\n/* 965 */ int i = i8;\n/* */ \n/* 967 */ while ((i8 != paramInt2) && (((i1 = paramArrayOfChar1[i8]) < i2) || \n/* 968 */ (((l = getNorm32(i1)) & j) == 0L))) {\n/* 969 */ i4 = 0;\n/* 970 */ i8++;\n/* */ }\n/* */ \n/* */ int n;\n/* 974 */ if (i8 != i) {\n/* 975 */ n = i8 - i;\n/* 976 */ if (i7 + n <= paramInt4) {\n/* 977 */ System.arraycopy(paramArrayOfChar1, i, paramArrayOfChar2, i7, n);\n/* */ }\n/* */ \n/* 980 */ i7 += n;\n/* 981 */ m = i7;\n/* */ }\n/* */ \n/* */ \n/* 985 */ if (i8 == paramInt2) {\n/* */ break;\n/* */ }\n/* */ \n/* */ \n/* 990 */ i8++;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char[] arrayOfChar2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c1;\n/* */ \n/* */ \n/* */ \n/* 1009 */ if (isNorm32HangulOrJamo(l)) {\n/* 1010 */ if (nx_contains(paramUnicodeSet, i1)) {\n/* 1011 */ c2 = '\\000';\n/* 1012 */ arrayOfChar2 = null;\n/* 1013 */ n = 1;\n/* */ }\n/* */ else {\n/* 1016 */ arrayOfChar2 = arrayOfChar1;\n/* 1017 */ i6 = 0;\n/* 1018 */ i3 = i5 = 0;\n/* */ \n/* 1020 */ c1 = (char)(i1 - 44032);\n/* */ \n/* 1022 */ c2 = (char)(c1 % '\\034');\n/* 1023 */ c1 = (char)(c1 / '\\034');\n/* 1024 */ if (c2 > 0) {\n/* 1025 */ arrayOfChar1[2] = ((char)('ᆧ' + c2));\n/* 1026 */ n = 3;\n/* */ } else {\n/* 1028 */ n = 2;\n/* */ }\n/* */ \n/* 1031 */ arrayOfChar1[1] = ((char)(4449 + c1 % '\\025'));\n/* 1032 */ arrayOfChar1[0] = ((char)(4352 + c1 / '\\025'));\n/* */ }\n/* */ } else {\n/* 1035 */ if (isNorm32Regular(l)) {\n/* 1036 */ c2 = '\\000';\n/* 1037 */ n = 1;\n/* */ \n/* */ }\n/* 1040 */ else if ((i8 != paramInt2) && \n/* 1041 */ (UTF16.isTrailSurrogate(c2 = paramArrayOfChar1[i8]))) {\n/* 1042 */ i8++;\n/* 1043 */ n = 2;\n/* 1044 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ } else {\n/* 1046 */ c2 = '\\000';\n/* 1047 */ n = 1;\n/* 1048 */ l = 0L;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1053 */ if (nx_contains(paramUnicodeSet, c1, c2))\n/* */ {\n/* 1055 */ i3 = i5 = 0;\n/* 1056 */ arrayOfChar2 = null;\n/* 1057 */ } else if ((l & k) == 0L)\n/* */ {\n/* 1059 */ i3 = i5 = (int)(0xFF & l >> 8);\n/* 1060 */ arrayOfChar2 = null;\n/* 1061 */ i6 = -1;\n/* */ } else {\n/* 1063 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* */ \n/* 1067 */ i6 = decompose(l, k, localDecomposeArgs);\n/* 1068 */ arrayOfChar2 = extraData;\n/* 1069 */ n = localDecomposeArgs.length;\n/* 1070 */ i3 = localDecomposeArgs.cc;\n/* 1071 */ i5 = localDecomposeArgs.trailCC;\n/* 1072 */ if (n == 1)\n/* */ {\n/* 1074 */ c1 = arrayOfChar2[i6];\n/* 1075 */ c2 = '\\000';\n/* 1076 */ arrayOfChar2 = null;\n/* 1077 */ i6 = -1;\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1085 */ if (i7 + n <= paramInt4) {\n/* 1086 */ int i9 = i7;\n/* 1087 */ if (arrayOfChar2 == null)\n/* */ {\n/* 1089 */ if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1093 */ i7 += n;\n/* 1094 */ i5 = insertOrdered(paramArrayOfChar2, m, i9, i7, c1, c2, i3);\n/* */ }\n/* */ else\n/* */ {\n/* 1098 */ paramArrayOfChar2[(i7++)] = c1;\n/* 1099 */ if (c2 != 0) {\n/* 1100 */ paramArrayOfChar2[(i7++)] = c2;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1107 */ else if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1111 */ i7 += n;\n/* 1112 */ i5 = mergeOrdered(paramArrayOfChar2, m, i9, arrayOfChar2, i6, i6 + n);\n/* */ }\n/* */ else\n/* */ {\n/* */ do {\n/* 1117 */ paramArrayOfChar2[(i7++)] = arrayOfChar2[(i6++)];\n/* 1118 */ n--; } while (n > 0);\n/* */ }\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1124 */ i7 += n;\n/* */ }\n/* */ \n/* 1127 */ i4 = i5;\n/* 1128 */ if (i4 == 0) {\n/* 1129 */ m = i7;\n/* */ }\n/* */ }\n/* */ \n/* 1133 */ paramArrayOfInt[0] = i4;\n/* */ \n/* 1135 */ return i7 - paramInt3;\n/* */ }", "public static void decompress(PfssCompressed _src, PfssDecompressed _dest)\n\t{\n\t\tif (!_src.isLoaded())\n\t\t\treturn;\n\n\t\tif (_dest.isDataAssigned())\n\t\t\treturn;\n\t\t\n\t\ttry (InputStream is = new ByteArrayInputStream(UnRar.unrarData(_src).toByteArray()))\n\t\t{\n\t\t\tFits fits = new Fits(is, false);\n\t\t\tBasicHDU hdus[] = fits.read();\n\t\t\tBinaryTableHDU bhdu = (BinaryTableHDU) hdus[1];\n\n\t\t\tfloat b0 = bhdu.getHeader().getFloatValue(\"B0\");\n\t\t\tfloat l0 = bhdu.getHeader().getFloatValue(\"L0\");\n\t\t\tfloat Q1 = bhdu.getHeader().getFloatValue(\"Q1\");\n\t\t\tfloat Q2 = bhdu.getHeader().getFloatValue(\"Q2\");\n\t\t\tfloat Q3 = bhdu.getHeader().getFloatValue(\"Q3\");\n\n\t\t\tbyte[] line_length = ((byte[][]) bhdu.getColumn(\"LEN\"))[0];\n\t\t\tbyte[] xRaw = ((byte[][]) bhdu.getColumn(\"X\"))[0];\n\t\t\tbyte[] yRaw = ((byte[][]) bhdu.getColumn(\"Y\"))[0];\n\t\t\tbyte[] zRaw = ((byte[][]) bhdu.getColumn(\"Z\"))[0];\n\n\t\t\tint[] lengths = ByteDecoder.decodeAdaptiveUnsigned(line_length);\n\t\t\tint[] xInt = ByteDecoder.decodeAdaptive(xRaw);\n\t\t\tint[] yInt = ByteDecoder.decodeAdaptive(yRaw);\n\t\t\tint[] zInt = ByteDecoder.decodeAdaptive(zRaw);\n\n\t\t\tIntermediateLineData[] lines = IntermediateLineData.splitToLines(lengths, xInt, yInt, zInt);\n\t\t\tfor (IntermediateLineData l : lines)\n\t\t\t\tl.decodePrediction(Q1, Q2, Q3);\n\n\t\t\tArrayList<DecompressedLine> decompressedLines = new ArrayList<>(lines.length);\n\t\t\tfor (IntermediateLineData line : lines)\n\t\t\t\tdecompressedLines.add(new DecompressedLine(line));\n\n\t\t\tconvertToBuffers(decompressedLines, l0, b0, _dest);\n\t\t}\n\t\tcatch (FitsException | IOException e)\n\t\t{\n\t\t\tTelemetry.trackException(e);\n\t\t}\n\t}", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "private void ReadDecompression(String aux) {\n StringBuilder calidadS = new StringBuilder();\n while (i < 8) {\n calidadS.append(aux.charAt(i));\n ++i;\n }\n quality = Integer.parseInt(calidadS.toString(), 2);\n StringBuilder widthS = new StringBuilder();\n while (i < 24) {\n widthS.append(aux.charAt(i));\n ++i;\n }\n width = Integer.parseInt(widthS.toString(), 2);\n StringBuilder heightS = new StringBuilder();\n while (i < 40) {\n heightS.append(aux.charAt(i));\n ++i;\n }\n height = Integer.parseInt(heightS.toString(), 2);\n StringBuilder sizeYS = new StringBuilder();\n while (i < 72) {\n sizeYS.append(aux.charAt(i));\n ++i;\n }\n sizeY = Integer.parseInt(sizeYS.toString(), 2);\n StringBuilder sizeCBS = new StringBuilder();\n while (i < 104) {\n sizeCBS.append(aux.charAt(i));\n ++i;\n }\n sizeCB = Integer.parseInt(sizeCBS.toString(), 2);\n StringBuilder sizeCRS = new StringBuilder();\n while (i < 136) {\n sizeCRS.append(aux.charAt(i));\n ++i;\n }\n sizeCR = Integer.parseInt(sizeCRS.toString(), 2);\n StringBuilder sizeYcS = new StringBuilder();\n while (i < 168) {\n sizeYcS.append(aux.charAt(i));\n ++i;\n }\n sizeYc = Integer.parseInt(sizeYcS.toString(), 2);\n StringBuilder sizeCBcS = new StringBuilder();\n while (i < 200) {\n sizeCBcS.append(aux.charAt(i));\n ++i;\n }\n sizeCBc = Integer.parseInt(sizeCBcS.toString(), 2);\n StringBuilder sizeCRcS = new StringBuilder();\n while (i < 232) {\n sizeCRcS.append(aux.charAt(i));\n ++i;\n }\n sizeCRc = Integer.parseInt(sizeCRcS.toString(), 2);\n }", "public void translate() {\n\t\twhile (!inputBuffer.endOfBuffer()) {\n\t\t\tMsgChar get = inputBuffer.getChar();\n\t\t\tif (get == null) continue;\n\t\t\tif (inputBuffer.isEndOfSentence()) {\n\t\t\t\toutputBuffer.markEndOfSentence();\n\t\t\t} else if (inputBuffer.isEndOfWord()) {\n\t\t\t\toutputBuffer.markEndOfWord();\n\t\t\t} else {\n\t\t\t\toutputBuffer.putChar(get.convert());\n\t\t\t}\n\t\t}\n\t\tinputBuffer.getReader().close();\n\t\toutputBuffer.close();\n\t}", "private void CreateDecompression() {\n int iteradorY = 0;\n int iteradorarray = 0;\n int fila = 0;\n int columna = 0;\n while (iteradorY < width / 8 * height / 8) {\n int u = 1;\n int k = 1;\n double[][] Y = new double[8][8];\n double[][] CB = new double[8][8];\n double[][] CR = new double[8][8];\n for (int element = 0; element < 64; ++element) {\n Y[u - 1][k - 1] = (double) Ydes.get(iteradorarray);\n CB[u - 1][k - 1] = (double) CBdes.get(iteradorarray);\n CR[u - 1][k - 1] = (double) CRdes.get(iteradorarray);\n if ((k + u) % 2 != 0) {\n if (k < 8)\n k++;\n else\n u += 2;\n if (u > 1)\n u--;\n } else {\n if (u < 8)\n u++;\n else\n k += 2;\n if (k > 1)\n k--;\n }\n iteradorarray++;\n }\n ++iteradorY;\n //DESQUANTIZAMOS\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Y[m][n] = Y[m][n] * QtablesLuminance[quality][m][n];\n CB[m][n] = CB[m][n] * QtablesChrominance[quality][m][n];\n CR[m][n] = CR[m][n] * QtablesChrominance[quality][m][n];\n }\n }\n //INVERSA DE LA DCT2\n double[][] Ydct = dct3(Y);\n double[][] CBdct = dct3(CB);\n double[][] CRdct = dct3(CR);\n\n //SUMAR 128\n for (int m = 0; m < 8; ++m) {\n for (int n = 0; n < 8; ++n) {\n Ydct[m][n] = Ydct[m][n] + 128;\n CBdct[m][n] = CBdct[m][n] + 128;\n CRdct[m][n] = CRdct[m][n] + 128;\n int[] YCbCr = {(int) Ydct[m][n], (int) CBdct[m][n], (int) CRdct[m][n]};\n int[] RGB = YCbCrtoRGB(YCbCr);\n if (fila + m < height & columna + n < width) {\n FinalR[fila + m][columna + n] = RGB[0];\n FinalG[fila + m][columna + n] = RGB[1];\n FinalB[fila + m][columna + n] = RGB[2];\n }\n }\n }\n if (columna + 8 < width) columna = columna + 8;\n else {\n fila = fila + 8;\n columna = 0;\n }\n }\n }", "public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }", "protected void buildFastLatinTable(android.icu.impl.coll.CollationData r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: android.icu.impl.coll.CollationDataBuilder.buildFastLatinTable(android.icu.impl.coll.CollationData):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.buildFastLatinTable(android.icu.impl.coll.CollationData):void\");\n }", "public static void decompress(String inFile) throws Exception{\n\tIO.Decompressor io = new IO.Decompressor(inFile);\n HashMap<Integer, String> dictionary = new HashMap<Integer, String>();\n int count = 1;\n dictionary.put(new Integer(0), new String() );\n String output = \"\";\n Integer index;\n char character = 1;\n while( character != 0 ) {\n \t IO.Pair next = io.decode();\n index = new Integer(next.getIndex());\n character = next.getCharacter();\n \n output = dictionary.get(index);\n if (character == 0) io.append(output);\n else output = output + character;\n \t io.append(output);\n dictionary.put(new Integer(count), output);\n count++;\n }\n \n \n /* Close all relevant files */\n io.done();\n\n\n\n }", "public PDFDecompressorFlate(Hashtable attrs, byte[] data) {\r\n this.attrs = attrs;\r\n this.data = data;\r\n this.in = new InflaterInputStream(new ByteArrayInputStream(data));\r\n this.out = new ByteArrayOutputStream();\r\n }", "public static void main(String[] args) {\n\t\tDecompress d = new Decompress(args[0]);\n\t\tif(d.data.loadFailure()) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Attempt to read the header and rebuild the original Huffman tree\n\t\td.rebuildTree(d.readHeader());\n\n\t\t//Convert all codes back to their original bitstrings\n\t\td.decode(args[0]);\n\t}", "UnescapeTransliterator(String ID, char[] spec)\n/* */ {\n/* 131 */ super(ID, null);\n/* 132 */ this.spec = spec;\n/* */ }", "public void popTranslationTable() {\n m_translateTable = (int[])m_translateTableStack.pop();\n }", "public static void inverseTransform() {\n int first = BinaryStdIn.readInt();\n List<Integer> chars = new ArrayList<>();\n Map<Integer, Queue<Integer>> charPosition = new HashMap<>();\n int currentIndex = 0;\n\n while (!BinaryStdIn.isEmpty()) {\n int i = BinaryStdIn.readInt(8);\n chars.add(i);\n Queue<Integer> position = charPosition.get(i);\n\n if (position == null) {\n position = new Queue<>();\n charPosition.put(i, position);\n }\n\n position.enqueue(currentIndex);\n currentIndex += 1;\n }\n\n int N = chars.size();\n int R = 256;\n int[] count = new int[R + 1];\n\n for (int i = 0; i < N; i++) {\n count[chars.get(i) + 1]++;\n }\n\n for (int r = 0; r < R; r++) {\n count[r + 1] += count[r];\n }\n\n int[] h = new int[N];\n\n for (int i = 0; i < N; i++) {\n h[count[chars.get(i)]++] = chars.get(i);\n }\n\n int[] next = new int[N];\n\n for (int i = 0; i < N; i++) {\n int index = charPosition.get(h[i]).dequeue();\n next[i] = index;\n }\n\n int current = first;\n\n for (int i = 0; i < N; i++) {\n BinaryStdOut.write(h[current], 8);\n current = next[current];\n }\n\n BinaryStdOut.flush();\n }", "private void translate()\r\n {\r\n for(int x = 0;x<14;x++)\r\n {\r\n pack.add(new Card(sPack.get(x)));\r\n }\r\n \r\n }", "private static char recompose(RecomposeArgs paramRecomposeArgs, int paramInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 1315 */ int i3 = 0;int i4 = 0;\n/* */ \n/* */ \n/* */ \n/* 1319 */ int[] arrayOfInt = new int[2];\n/* 1320 */ int i7 = -1;\n/* 1321 */ int n = 0;\n/* 1322 */ int i6 = 0;\n/* 1323 */ int i5 = 0;\n/* */ \n/* 1325 */ NextCombiningArgs localNextCombiningArgs = new NextCombiningArgs(null);\n/* 1326 */ localNextCombiningArgs.source = paramRecomposeArgs.source;\n/* */ \n/* 1328 */ localNextCombiningArgs.cc = '\\000';\n/* 1329 */ localNextCombiningArgs.c2 = '\\000';\n/* */ for (;;)\n/* */ {\n/* 1332 */ localNextCombiningArgs.start = paramRecomposeArgs.start;\n/* 1333 */ int m = getNextCombining(localNextCombiningArgs, paramRecomposeArgs.limit, paramUnicodeSet);\n/* 1334 */ int i1 = localNextCombiningArgs.combiningIndex;\n/* 1335 */ paramRecomposeArgs.start = localNextCombiningArgs.start;\n/* */ \n/* 1337 */ if (((m & 0x80) != 0) && (i7 != -1)) { int i;\n/* 1338 */ int j; int k; if ((i1 & 0x8000) != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 1343 */ if (((paramInt & 0x100) != 0) || (i5 == 0)) {\n/* 1344 */ i = -1;\n/* 1345 */ m = 0;\n/* 1346 */ localNextCombiningArgs.c2 = paramRecomposeArgs.source[i7];\n/* 1347 */ if (i1 == 65522)\n/* */ {\n/* */ \n/* */ \n/* 1351 */ localNextCombiningArgs.c2 = ((char)(localNextCombiningArgs.c2 - 'ᄀ'));\n/* 1352 */ if (localNextCombiningArgs.c2 < '\\023') {\n/* 1353 */ i = paramRecomposeArgs.start - 1;\n/* 1354 */ localNextCombiningArgs.c = ((char)(44032 + (localNextCombiningArgs.c2 * '\\025' + (localNextCombiningArgs.c - 'ᅡ')) * 28));\n/* */ \n/* 1356 */ if ((paramRecomposeArgs.start != paramRecomposeArgs.limit) && ((localNextCombiningArgs.c2 = (char)(paramRecomposeArgs.source[paramRecomposeArgs.start] - 'ᆧ')) < '\\034'))\n/* */ {\n/* */ \n/* 1359 */ paramRecomposeArgs.start += 1; NextCombiningArgs \n/* 1360 */ tmp261_259 = localNextCombiningArgs;tmp261_259.c = ((char)(tmp261_259.c + localNextCombiningArgs.c2));\n/* */ }\n/* */ else {\n/* 1363 */ m = 64;\n/* */ }\n/* 1365 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c)) {\n/* 1366 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c;\n/* */ }\n/* */ else {\n/* 1369 */ if (!isHangulWithoutJamoT(localNextCombiningArgs.c)) {\n/* 1370 */ paramRecomposeArgs.start -= 1;\n/* */ }\n/* */ \n/* 1373 */ i = paramRecomposeArgs.start;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1388 */ else if (isHangulWithoutJamoT(localNextCombiningArgs.c2)) {\n/* 1389 */ NextCombiningArgs tmp351_349 = localNextCombiningArgs;tmp351_349.c2 = ((char)(tmp351_349.c2 + (localNextCombiningArgs.c - 'ᆧ')));\n/* 1390 */ if (!nx_contains(paramUnicodeSet, localNextCombiningArgs.c2)) {\n/* 1391 */ i = paramRecomposeArgs.start - 1;\n/* 1392 */ paramRecomposeArgs.source[i7] = localNextCombiningArgs.c2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1397 */ if (i != -1)\n/* */ {\n/* 1399 */ j = i;\n/* 1400 */ k = paramRecomposeArgs.start;\n/* 1401 */ while (k < paramRecomposeArgs.limit) {\n/* 1402 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1404 */ paramRecomposeArgs.start = i;\n/* 1405 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* 1408 */ localNextCombiningArgs.c2 = '\\000';\n/* */ \n/* 1410 */ if (m != 0)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1417 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1418 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1422 */ n = 65520;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1438 */ else if (((n & 0x8000) == 0) && ((paramInt & 0x100) != 0 ? (i5 == localNextCombiningArgs.cc) || (i5 != 0) : (i5 < localNextCombiningArgs.cc) || (i5 == 0)))\n/* */ {\n/* */ int i2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1446 */ if (0 != (i2 = combine(combiningTable, n, i1, arrayOfInt)))\n/* */ {\n/* */ \n/* 1449 */ if (!nx_contains(paramUnicodeSet, (char)i3, (char)i4))\n/* */ {\n/* 1451 */ i3 = arrayOfInt[0];\n/* 1452 */ i4 = arrayOfInt[1];\n/* */ \n/* */ \n/* */ \n/* 1456 */ i = localNextCombiningArgs.c2 == 0 ? paramRecomposeArgs.start - 1 : paramRecomposeArgs.start - 2;\n/* */ \n/* */ \n/* 1459 */ paramRecomposeArgs.source[i7] = ((char)i3);\n/* 1460 */ if (i6 != 0) {\n/* 1461 */ if (i4 != 0)\n/* */ {\n/* 1463 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ else\n/* */ {\n/* 1467 */ i6 = 0;\n/* 1468 */ j = i7 + 1;\n/* 1469 */ k = j + 1;\n/* 1470 */ while (k < i) {\n/* 1471 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1473 */ i--;\n/* */ }\n/* 1475 */ } else if (i4 != 0) {\n/* 1476 */ i6 = 1;\n/* 1477 */ paramRecomposeArgs.source[(i7 + 1)] = ((char)i4);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1483 */ if (i < paramRecomposeArgs.start) {\n/* 1484 */ j = i;\n/* 1485 */ k = paramRecomposeArgs.start;\n/* 1486 */ while (k < paramRecomposeArgs.limit) {\n/* 1487 */ paramRecomposeArgs.source[(j++)] = paramRecomposeArgs.source[(k++)];\n/* */ }\n/* 1489 */ paramRecomposeArgs.start = i;\n/* 1490 */ paramRecomposeArgs.limit = j;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1496 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1497 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1501 */ if (i2 > 1) {\n/* 1502 */ n = getCombiningIndexFromStarter((char)i3, (char)i4); continue;\n/* */ }\n/* */ \n/* 1505 */ i7 = -1;\n/* */ \n/* */ \n/* */ \n/* 1509 */ continue;\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 1514 */ i5 = localNextCombiningArgs.cc;\n/* 1515 */ if (paramRecomposeArgs.start == paramRecomposeArgs.limit) {\n/* 1516 */ return (char)i5;\n/* */ }\n/* */ \n/* */ \n/* 1520 */ if (localNextCombiningArgs.cc == 0)\n/* */ {\n/* 1522 */ if ((m & 0x40) != 0)\n/* */ {\n/* 1524 */ if (localNextCombiningArgs.c2 == 0) {\n/* 1525 */ i6 = 0;\n/* 1526 */ i7 = paramRecomposeArgs.start - 1;\n/* */ } else {\n/* 1528 */ i6 = 0;\n/* 1529 */ i7 = paramRecomposeArgs.start - 2;\n/* */ }\n/* 1531 */ n = i1;\n/* */ }\n/* */ else {\n/* 1534 */ i7 = -1;\n/* */ }\n/* 1536 */ } else if ((paramInt & 0x2000) != 0)\n/* */ {\n/* 1538 */ i7 = -1;\n/* */ }\n/* */ }\n/* */ }", "public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "private void nocompressedUnPack()throws UnpackException,ZipEndException{\n skipByte();\n //get the len\n long LEN = 0x00;\n byte byte0 = getByte();\n byte byte1 = getByte();\n byte byte2 = getByte();\n byte byte3 = getByte();\n LEN |= byte1;\n LEN |= (byte0 << 8);\n LEN &= 0X0000ffff;\n// LEN |= (byte2<<24);\n// LEN |= (byte3<<16);\n int l = 0;\n try{\n for (long num = 0; num < LEN ; num ++){\n outputStoredByte(getByte());\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "int externalToUnicode(byte[] src, final int srcOff, final int srcLen,\n char[] dst, final int dstOff, final int dstLen,\n IntPtr srcReadPtr, IntPtr dstWrotePtr, IntPtr dstCharsPtr,\n ArrayList charToBytes) {\n final boolean debug = false;\n final boolean debug_decode_loop = debug && false;\n int result = TCL.OK;\n\n if (encoding == null) {\n // This should never happen\n throw new TclRuntimeError(\"externalToUnicode called with null encoding\");\n }\n\n if (debug) {\n System.out.println(\"externalToUnicode( \" + srcLen + \" \" + dstLen + \" )\");\n }\n\n // If decoder was flushed already then return 0.\n\n if ((srcLen == 0) && !encodingEnd) {\n if (debug) {\n System.out.println(\"srcLen is zero and encodingEnd is false\");\n }\n\n srcReadPtr.i = 0;\n if (dstWrotePtr != null)\n dstWrotePtr.i = 0;\n if (dstCharsPtr != null)\n dstCharsPtr.i = 0;\n return 0;\n }\n\n // Convert bytes from src into unicode chars and store them in dst.\n\n if (debug) {\n System.out.println(\"now to decode byte array of length \" + srcLen);\n System.out.println(\"srcOff is \" + srcOff);\n for (int i=srcOff ; i < (srcOff+srcLen); i++) {\n System.out.println(\"(byte) '\" + ((char) src[i]) + \"'\" +\n \" (int) \" + ((int) src[i]) +\n \" (hex) 0x\" + Integer.toHexString(src[i]) );\n }\n System.out.println(\"encoded as \" + encoding);\n System.out.println(\"encodingStart is \" + encodingStart);\n System.out.println(\"eofCond is \" + eofCond);\n }\n\n // FIXME: In the cases where we know that we don't actually want\n // to copy the data, we could pass a flag so that we could\n // take advantage of encodings that had a one to one mapping\n // from bytes to chars (now need to copy then to find bytes used).\n\n if (csd == null) {\n // Note that UnsupportedCharsetException should never be raised\n // here since EncodingCmd.isSupported() should have already\n // returned true for this encoding.\n\n Charset chrset = Charset.forName(encoding);\n csd = chrset.newDecoder();\n }\n if (encodingStart) {\n csd.reset();\n }\n\n // Note that the default action on bad encoded\n // input is to stop and and report the error.\n\n // Implement byte -> char decoding loop. The\n // Java charset APIs provide no way to save\n // a decoder state or determine how many bytes\n // were consumed when a char is decoded. Since\n // we can't keep a copy of all data ever read,\n // this module has to make sure that only\n // one decode operation is done for input bytes\n // and that the number of bytes consumed for\n // each char is saved.\n\n int bytes_read = 0;\n int chars_written = 0;\n int dstOffI = dstOff;\n\n ByteBuffer srcb = ByteBuffer.wrap(src, srcOff, srcLen);\n CharBuffer oneChar = CharBuffer.allocate(1);\n\n while ((srcb.remaining() > 0) && (dstOffI < dstLen)) {\n if (debug_decode_loop) {\n System.out.println(\"char decode loop \" + (chars_written + 1));\n System.out.println(\"srcb.position() is \" + srcb.position());\n System.out.println(\"srcb.remaining() is \" + srcb.remaining());\n byte b = srcb.get(srcb.position()); // Get byte without moving position\n System.out.println(\"current byte is '\" + ((char) b) + \"' \" +\n \"0x\" + Integer.toHexString(b) );\n }\n\n int srcbStartPos = srcb.position();\n oneChar.rewind();\n\n // srcb is never empty when this method is invoked\n\n CoderResult cresult = csd.decode(srcb, oneChar, false);\n\n if (cresult == CoderResult.UNDERFLOW) {\n // An UNDERFLOW could mean that srcb is now\n // empty. It could also mean that a valid char\n // char could not be decoded from srcb bytes.\n\n if (debug_decode_loop) {\n System.out.println(\"UNDERFLOW detected\");\n }\n\n if ((oneChar.position() == 0) && (srcb.remaining() > 0)) {\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE set\");\n }\n result = TCL_CONVERT_MULTIBYTE;\n break;\n } else {\n // Some bytes were decoded into 1 char.\n\n if (debug_decode_loop) {\n System.out.println(\"some bytes decoded\");\n }\n }\n } else if (cresult == CoderResult.OVERFLOW) {\n // Bytes from src have been decoded into 1 char.\n\n if (debug_decode_loop) {\n System.out.println(\"OVERFLOW detected\");\n }\n } else {\n // Some unexpected result, like an invalid character\n result = TCL_CONVERT_MULTIBYTE;\n break;\n }\n\n int bytes_this_char = srcb.position() - srcbStartPos;\n\n if (oneChar.position() != 1) {\n throw new TclRuntimeError(\"expected 1 char to be decoded, got \" + oneChar.position());\n }\n\n char c = oneChar.get(0);\n dst[dstOffI++] = c;\n\n if (charToBytes != null) {\n Integer iobj;\n if (bytes_this_char == 1) {\n iobj = oneInteger;\n } else if (bytes_this_char == 2) {\n iobj = twoInteger;\n } else if (bytes_this_char == 3) {\n iobj = threeInteger;\n } else {\n iobj = new Integer(bytes_this_char);\n }\n charToBytes.add( iobj );\n }\n\n bytes_read += bytes_this_char;\n chars_written++;\n\n if (debug_decode_loop) {\n System.out.println(\"char '\" + c + \"' \" +\n \"0x\" + Integer.toHexString(c) +\n \" decoded from \" +\n bytes_this_char + \" bytes\");\n }\n }\n\n if (debug) {\n System.out.println(\"decoded \" + chars_written + \" chars from \" +\n bytes_read + \" bytes\");\n\n for (int i=0 ; i < chars_written; i++) {\n int ind = dstOff + i;\n System.out.println(\"(char) '\" + dst[ind] + \"'\" +\n \" (int) \" + ((int) dst[ind]) +\n \" (hex) 0x\" + Integer.toHexString(dst[ind]) );\n\n if (charToBytes != null) {\n Integer iobj = (Integer) charToBytes.get(i);\n System.out.println(\"char was decoded from \" + iobj.intValue() + \" bytes\");\n }\n }\n }\n\n if (!(dstOffI < dstLen) && (srcb.remaining() > 0)) {\n // The dst buffer is full but bytes remain\n // in srcb. This could happen when this\n // method is invoked with a small buffer\n // so that the number of consumed bytes\n // can be determined.\n\n if (debug) {\n System.out.println(\"TCL_CONVERT_NOSPACE detected\");\n }\n\n result = TCL_CONVERT_NOSPACE;\n }\n\n boolean atEOF = (eofCond && encodingEnd);\n\n if (atEOF && !(dstOffI < dstLen)) {\n result = TCL_CONVERT_NOSPACE;\n }\n\n if (atEOF && (result == TCL.OK)) {\n // EOF flag must be passed to the decoder before\n // it can be flushed. This can only be done after\n // EOF was read from the input. If there was an\n // error, then don't pass EOF or flush the decoder.\n\n ByteBuffer emptyBytes = ByteBuffer.allocate(0);\n CharBuffer dstb = CharBuffer.wrap(dst, dstOffI, dstLen - dstOffI);\n\n int dstbStartPos = dstb.position();\n\n CoderResult cresult1 = csd.decode(emptyBytes, dstb, true);\n CoderResult cresult2 = csd.flush(dstb);\n\n if (cresult2 == CoderResult.OVERFLOW) {\n result = TCL_CONVERT_NOSPACE;\n } else {\n encodingEnd = false;\n }\n\n int chars_flushed = dstb.position() - chars_written;\n chars_written += chars_flushed;\n\n if (debug) {\n System.out.println(\"flushed \" + chars_flushed + \" chars at EOF\");\n }\n }\n\n srcReadPtr.i = bytes_read;\n if (dstWrotePtr != null)\n dstWrotePtr.i = chars_written;\n if (dstCharsPtr != null)\n dstCharsPtr.i = chars_written;\n\n return result;\n }", "@Override\n\tpublic void Decompress() {\n\t\t\n\t}", "protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;", "private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {\n byte[] srcArray = src.array();\n int srcPosition = src.arrayOffset() + src.position();\n int srcLength = src.arrayOffset() + src.limit();\n\n char[] destArray = dst.array();\n int destPosition = dst.arrayOffset() + dst.position();\n int destLength = dst.arrayOffset() + dst.limit();\n int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);\n\n // ASCII only loop\n while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {\n destArray[destPosition++] = (char) srcArray[srcPosition++];\n }\n\n while (srcPosition < srcLength) {\n int b1 = srcArray[srcPosition];\n if (b1 >= 0) {\n // 1 byte, 7 bits: 0xxxxxxx\n if (destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 1);\n }\n destArray[destPosition++] = (char) b1;\n srcPosition++;\n } else if ((b1 >> 5) == -2) {\n // 2 bytes, 11 bits: 110xxxxx 10xxxxxx\n if (srcLength - srcPosition < 2 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 2);\n }\n int b2 = srcArray[srcPosition + 1];\n if (isMalformed2(b1, b2)) {\n return malformed(src, srcPosition, dst, destPosition, 2);\n }\n destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);\n srcPosition += 2;\n } else if ((b1 >> 4) == -2) {\n // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 3 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 3);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n if (isMalformed3(b1, b2, b3)) {\n return malformed(src, srcPosition, dst, destPosition, 3);\n }\n destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);\n srcPosition += 3;\n } else if ((b1 >> 3) == -2) {\n // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 4);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n int b4 = srcArray[srcPosition + 3];\n int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);\n if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {\n return malformed(src, srcPosition, dst, destPosition, 4);\n }\n destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));\n destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));\n srcPosition += 4;\n } else {\n return malformed(src, srcPosition, dst, destPosition, 1);\n }\n }\n return xflow(src, srcPosition, srcLength, dst, destPosition, 0);\n }", "private String[][] decompose(MinorBoard[][] superBoard) {\n\t\tString[][] fullDecomp = new String[27][3];\n\t\tint decompNext = 0;\n\t\t\n\t\tMinorBoard[] tempSup = superBoard[2];\n\t\t//Switches the top and bottom minorBoards to print in the right order\n\t\t//(Top boards need to be printed first)\n\t\tsuperBoard[2] = superBoard[0];\n\t\tsuperBoard[0] = tempSup;\n\t\t\n\t\t//Unpack the superBoard into a nested array of strings\n\t\tfor (MinorBoard[] superRow : superBoard) {\n\t\t\tfor (MinorBoard minorBoard : superRow) {\n\t\t\t\tString[][] minDecomp = minorBoard.getBoard();\n\t\t\t\t//Switches the top and bottom row of each minorBoard in prep for printing\n\t\t\t\tString[] temp = minDecomp[2];\n\t\t\t\tminDecomp[2] = minDecomp[0];\n\t\t\t\tminDecomp[0] = temp;\n\t\t\t\tfor (String[] row : minDecomp) {\n\t\t\t\t\tfullDecomp[decompNext] = row;\n\t\t\t\t\tdecompNext++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString[][] organisedDecomp = new String[27][3];\n\t\tint current = 0;\n\t\tint[] order = {0,3,6};\n\t\tint target = 0;\n\t\t//Reorganises the nested strings so that they represent the superBoard from left to right\n\t\tfor (int supLayer = 0; supLayer < 3; supLayer++) {\n\t\t\tfor (int minorLayer = 0; minorLayer < 3; minorLayer++) {\n\t\t\t\tfor (int cycle = 0; cycle < 3; cycle++) {\n\t\t\t\t\ttarget = order[cycle] + minorLayer + supLayer*9;\n\t\t\t\t\torganisedDecomp[current] = fullDecomp[target];\n\t\t\t\t\tcurrent ++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn organisedDecomp;\n\t}", "private StandardDeCompressors() {}", "public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }", "public void unpack(MAVLinkPayload payload) {\n\t\tpayload.resetIndex();\n\t\tthis.propeller1 = payload.getFloat();\n\t\tthis.propeller2 = payload.getFloat();\n\t\tthis.propeller3 = payload.getFloat();\n\t\tthis.propeller4 = payload.getFloat();\n\n\t}", "public ProtocolObject unpack(GameTransportPacket packet) {\n ProtocolObject gamePacket;\r\n gamePacket = styxDecoder.unpack(ByteBuffer.wrap(packet.gamedata));\r\n return gamePacket;\r\n }", "private static int decompose(long paramLong, DecomposeArgs paramDecomposeArgs)\n/* */ {\n/* 456 */ int i = getExtraDataIndex(paramLong);\n/* 457 */ paramDecomposeArgs.length = extraData[(i++)];\n/* */ \n/* 459 */ if ((paramDecomposeArgs.length & 0x80) > 0)\n/* */ {\n/* 461 */ int j = extraData[(i++)];\n/* 462 */ paramDecomposeArgs.cc = (0xFF & j >> 8);\n/* 463 */ paramDecomposeArgs.trailCC = (0xFF & j);\n/* */ }\n/* */ else {\n/* 466 */ paramDecomposeArgs.cc = (paramDecomposeArgs.trailCC = 0);\n/* */ }\n/* */ \n/* 469 */ paramDecomposeArgs.length &= 0x7F;\n/* 470 */ return i;\n/* */ }", "Object unpack(Info vi, Buffer opb) {\n\t\tInfoMapping0 info = new InfoMapping0();\n\n\t\tif (opb.read(1) != 0) {\n\t\t\tinfo.submaps = opb.read(4) + 1;\n\t\t} else {\n\t\t\tinfo.submaps = 1;\n\t\t}\n\n\t\tif (opb.read(1) != 0) {\n\t\t\tinfo.coupling_steps = opb.read(8) + 1;\n\n\t\t\tfor (int i = 0; i < info.coupling_steps; i++) {\n\t\t\t\tint testM = info.coupling_mag[i] = opb.read(Util\n\t\t\t\t\t\t.ilog2(vi.channels));\n\t\t\t\tint testA = info.coupling_ang[i] = opb.read(Util\n\t\t\t\t\t\t.ilog2(vi.channels));\n\n\t\t\t\tif (testM < 0 || testA < 0 || testM == testA\n\t\t\t\t\t\t|| testM >= vi.channels || testA >= vi.channels) {\n\t\t\t\t\t// goto err_out;\n\t\t\t\t\tinfo.free();\n\t\t\t\t\treturn (null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (opb.read(2) > 0) { /* 2,3:reserved */\n\t\t\tinfo.free();\n\t\t\treturn (null);\n\t\t}\n\n\t\tif (info.submaps > 1) {\n\t\t\tfor (int i = 0; i < vi.channels; i++) {\n\t\t\t\tinfo.chmuxlist[i] = opb.read(4);\n\t\t\t\tif (info.chmuxlist[i] >= info.submaps) {\n\t\t\t\t\tinfo.free();\n\t\t\t\t\treturn (null);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < info.submaps; i++) {\n\t\t\tinfo.timesubmap[i] = opb.read(8);\n\t\t\tif (info.timesubmap[i] >= vi.times) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t\tinfo.floorsubmap[i] = opb.read(8);\n\t\t\tif (info.floorsubmap[i] >= vi.floors) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t\tinfo.residuesubmap[i] = opb.read(8);\n\t\t\tif (info.residuesubmap[i] >= vi.residues) {\n\t\t\t\tinfo.free();\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t}\n\t\treturn info;\n\t}", "String[][] packData();", "public static void main(String[] args) {\n List<String> res = CompressStringToi18n.compress(\"careercup\");\n for(String str : res) {\n System.out.println(str);\n }\n }", "protected void decodeIndexEntry(IEntryResult entryResult) {\n\tchar[] word = entryResult.getWord();\n\tint tagLength = currentTag.length;\n\tint nameLength = CharOperation.indexOf(SEPARATOR, word, tagLength);\n\tif (this.simpleName == null)\n\t\t// Optimization, eg. type reference is 'org.eclipse.jdt.core.*'\n\t\tthis.decodedSegment = CharOperation.subarray(word, tagLength, nameLength);\n\telse\n\t\tthis.decodedSimpleName = CharOperation.subarray(word, tagLength, nameLength);\n}", "public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "private TranslatedString deBuffer(GtfsRealtime.TranslatedString buffered) {\n TranslatedString result = new TranslatedString();\n for (Translation translation : buffered.getTranslationList()) {\n String language = translation.getLanguage();\n String string = translation.getText();\n result.addTranslation(language, string);\n }\n return result;\n }", "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}", "private void _testSimple(ChunkDecoder decoder) throws IOException\n {\n byte[] orig = \"Another trivial test\".getBytes(\"UTF-8\");\n byte[] compressed = compress(orig);\n byte[] result = decoder.decode(compressed);\n Assert.assertEquals(result, orig);\n\n // also, ensure that offset, length are passed\n byte[] compressed2 = new byte[compressed.length + 4];\n System.arraycopy(compressed, 0, compressed2, 2, compressed.length);\n\n result = decoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n\n // two ways to do that as well:\n result = LZFDecoder.decode(compressed2, 2, compressed.length);\n Assert.assertEquals(result, orig);\n }", "public static void inverseTransform() {\r\n \tint start = BinaryStdIn.readInt();\r\n \tString str = BinaryStdIn.readString();;\r\n \tchar[] lastCol = str.toCharArray();\r\n \tint[] count = new int[256];\r\n \tfor (char c : lastCol) {\r\n \t\tcount[c]++;\r\n \t}\r\n \tfor (int i = 1; i < count.length; i++) {\r\n \t\tcount[i] += count[i - 1];\r\n \t}\r\n \tint[] next = new int[lastCol.length];\r\n \tchar[] firstCol = new char[lastCol.length];\r\n \tfor (int i = lastCol.length - 1; i >= 0; i--) {\r\n \t\tint index = --count[lastCol[i]];\r\n \t\tfirstCol[index] = lastCol[i];\r\n \t\tnext[index] = i;\r\n \t}\r\n \tint sum = 0;\r\n \twhile (sum < lastCol.length) {\r\n \t\tBinaryStdOut.write(firstCol[start]);\r\n \t\tstart = next[start];\r\n \t\tsum++;\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "public void decode(byte[] in_buf, int in_off, int in_len,\r\n char[] out_buf, int out_off, int out_len, int[] result)\r\n throws CharConversionException;", "private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }", "private void ReadHuffman(String aux) {\n\n Huffman DY = new Huffman();\n Huffman DCB = new Huffman();\n Huffman DCR = new Huffman();\n DY.setFrequencies(FreqY);\n DCB.setFrequencies(FreqCB);\n DCR.setFrequencies(FreqCR);\n\n StringBuilder encoding = new StringBuilder();\n int iteradorMatrix = aux.length() - sizeYc - sizeCBc - sizeCRc;\n for (int x = 0; x < sizeYc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n Ydes = DY.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCBc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CBdes = DCB.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCRc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CRdes = DCR.decompressHuffman(encoding.toString());\n }", "Hashtable<String, String> unpack_cursor(Cursor cursor)\n {\n \tHashtable<String, String> result = null;\n \tif(cursor == null) return null;\n \telse if(cursor.getCount() == 0) return null;\n \telse\n \t{\n \t\tresult= new Hashtable<String, String>();\n\t \tcursor.moveToFirst(); \n\t \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t\t\twhile (cursor.moveToNext()) \n\t \t{\n\t \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n\t \t}\n \t}\n \treturn result;\n }", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "Hashtable<String, String> unpack_cursor(Cursor cursor,Hashtable<String, String> result)\n {\n \tif(cursor == null) return null;\n \tcursor.moveToFirst(); \n \tif(result == null)\n \tresult = new Hashtable<String, String>();\n \t\n \tint keyIndex = cursor.getColumnIndex(KEY_FIELD);\n\t\tint valueIndex = cursor.getColumnIndex(VALUE_FIELD);\n\t\twhile (cursor.moveToNext()) \n \t{\n \t\tresult.put(cursor.getString(keyIndex), cursor.getString(valueIndex));\n \t}\n \treturn result;\n }", "public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "AstroArg unpack(Astro litChars);", "public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }", "@Test\n public void Test4179686() throws Exception {\n RuleBasedCollator en_us = (RuleBasedCollator) Collator.getInstance(Locale.US);\n // Create a collator with a few expanding character sequences in it....\n RuleBasedCollator coll = new RuleBasedCollator(en_us.getRules()\n + \" & ae ; \\u00e4 & AE ; \\u00c4\"\n + \" & oe ; \\u00f6 & OE ; \\u00d6\"\n + \" & ue ; \\u00fc & UE ; \\u00dc\");\n\n String text = \"T\\u00f6ne\"; // o-umlaut\n\n CollationElementIterator iter = coll.getCollationElementIterator(text);\n List elements = new ArrayList();\n int elem;\n\n // Iterate forward and collect all of the elements into a Vector\n while ((elem = iter.next()) != CollationElementIterator.NULLORDER) {\n elements.add(new Integer(elem));\n }\n\n // Now iterate backward and make sure they're the same\n iter.reset();\n int index = elements.size() - 1;\n while ((elem = iter.previous()) != CollationElementIterator.NULLORDER) {\n int expect = ((Integer)elements.get(index)).intValue();\n\n if (elem != expect) {\n errln(\"Mismatch at index \" + index\n + \": got \" + Integer.toString(elem,16)\n + \", expected \" + Integer.toString(expect,16));\n }\n index--;\n }\n }", "public static void inverseTransform()\r\n {\r\n \tint first = BinaryStdIn.readInt();\r\n \tString s = BinaryStdIn.readString();\r\n \tBinaryStdIn.close();\r\n \t\r\n \tchar[] t = s.toCharArray();\r\n \r\n \tchar[] firstCharacters = t.clone();\r\n \tArrays.sort(firstCharacters);\r\n \t\r\n \t// Construction next[] using t[] and first\r\n \tint[] next = constructNext(t, firstCharacters, first);\r\n \t\r\n \t// Writing original string to StdOut using next[] and first\r\n \tint index = first;\r\n \tfor (int i = 0; i < t.length; i++)\r\n \t{\r\n \t\tBinaryStdOut.write(firstCharacters[index]);\r\n \t\tindex = next[index];\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "private static void decodeStage()\n\t{\n\t\tif (isValidSource)\n\t\t{\n\t\t\tif (latches.containsKey(\"F\") && !latches.get(\"F\").isNOP())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tlatches.put(\"F\", getSRCFromRegister(latches.get(\"F\")));\n\t\t\t\t} catch (Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"Error while reading values from Registers in Decode function\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tmoveInstruction(\"D\", \"F\");\n\t\t} else\n\t\t{\n\t\t\tlatches.put(\"D\", new Instruction());\n\t\t}\n\t}", "public static String decompress(final String treeString, final String message) {\n\n BinaryNodeInterface<Character> rootNode = new BinaryNode<Character>();\n generateTree(rootNode, treeString);\n String result = message;\n\n if (result.length() == 0) {\n return result;\n }\n\n while (result.charAt(0) == '0' || result.charAt(0) == '1') {\n result = traverse(rootNode, result);\n result = result.substring(1);\n }\n\n return result;\n }", "public void decodeIndexEntry(IEntryResult entryResult){\n char[] word = entryResult.getWord();\n int size = word.length;\n int tagLength = REF.length;\n int nameLength = CharOperation.indexOf(SEPARATOR, word, tagLength);\n if (nameLength < 0) nameLength = size;\n this.decodedSegment = CharOperation.subarray(word, tagLength, nameLength); }" ]
[ "0.6268001", "0.6268001", "0.61182714", "0.61120105", "0.6109145", "0.61077017", "0.61047965", "0.6101135", "0.6101135", "0.6099395", "0.6099287", "0.60950166", "0.6091184", "0.60895145", "0.6088585", "0.6087667", "0.6081806", "0.6081659", "0.608088", "0.60797596", "0.607945", "0.6078492", "0.6077767", "0.60681206", "0.6066226", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6063578", "0.6062162", "0.6061311", "0.6056702", "0.60558355", "0.6027869", "0.601372", "0.6000014", "0.59228766", "0.5792289", "0.57722557", "0.5517124", "0.52203", "0.5081227", "0.49558756", "0.48912176", "0.48590815", "0.48259026", "0.48154795", "0.47990102", "0.4791696", "0.47755128", "0.47698048", "0.4726163", "0.4722224", "0.47109056", "0.46978635", "0.46956375", "0.46888226", "0.4673841", "0.4670231", "0.45796022", "0.45529643", "0.44856596", "0.4483551", "0.44100836", "0.44029015", "0.4371485", "0.43562996", "0.43432754", "0.4325777", "0.4318725", "0.4317079", "0.42956215", "0.42846423", "0.42820877", "0.42812386", "0.42748225", "0.42645377", "0.42547935", "0.42538556", "0.42104402", "0.42029488", "0.41978905", "0.41891858", "0.4188225", "0.41879666", "0.4184414", "0.4182444", "0.41710442", "0.41633636", "0.41560036", "0.41556725", "0.41533595", "0.41471255", "0.41449147", "0.41442305" ]
0.6102622
7
Closes the input stream.
public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void close() throws IOException {\n input.close();\n }", "public void closeStream() {\n output.close();\n input.close();\n }", "public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() throws IOException\n {\n in.close();\n }", "public static void close(){\n\t\tin.close();\n\t}", "@Override\n public void close() throws IOException\n {\n InputStream in = _inputSource;\n\n if (in != null) {\n _inputSource = null;\n if (_autoClose) {\n in.close();\n }\n }\n freeBuffers();\n }", "public synchronized void close() {\n try {\n audioInputStream.close();\n } catch (IOException ioe) {\n System.err.println(\"Problem while closing the audioInputSteam\");\n }\n\n }", "@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }", "@Override\n\tpublic void close() {\n\t\tfinal Socket input = getSocket();\n\n\t\tif (input != null) {\n\t\t\tif (!input.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t// we cannot do anything\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void close() throws IOException\n {\n try\n {\n fAVMRemote.closeInputHandle(fTicketHolder.getTicket(), fHandle);\n }\n catch (Exception e)\n {\n throw new IOException(\"Remote Error closing input stream.\");\n }\n }", "public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }", "public void close() throws IOException {\n open = false;\n stream.close();\n }", "protected void closeStream ()\n {\n stream.close ();\n }", "private void closeStream() throws IOException {\n if (originalInputStream != inputStream) {\n // Close the byte input stream or file input stream, if either is the current one\n inputStream.close();\n }\n\n if (closeOriginalStreamOnClose) {\n originalInputStream.close();\n }\n }", "public static void closeIO()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream.close();\r\n\t\t\toutStream.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void close() throws FormatException, IOException {\n if (in != null) in.close();\n in = null;\n currentId = null;\n }", "public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}", "public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}", "protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}", "public void close() throws IOException\n {\n try\n {\n flush();\n }\n catch (IOException ignored)\n {\n // ignore\n }\n getStream().close();\n }", "public void closeStream() {\n\t\ttry {\n\t\t\tisReaderStatusClosed = true;\n\t\t\tif(buffReader != null) {\n\t\t\t\tbuffReader.close();\n\t\t\t}\n\t\t} catch(Exception e) { }\n\t}", "public void close()\n throws IOException\n {\n outstream.close();\n }", "public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}", "private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}", "public static void close( InputStream ins )\n {\n if ( ins != null )\n {\n try\n {\n ins.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing input stream.\", e );\n }\n }\n }", "public void close() throws IOException {\n\t\tthis.finish();\n\t\tthis.buffer.close();\n\t\t}", "public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }", "protected void close() {\n\t\tif(sOutput != null) {\n\t\t\ttry {\n\t\t\t\tsOutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"error closing output stream\");\n\t\t\t}\n\t\t\t\n\t\t\tsOutput = null;\n\t\t}\n\t}", "public final void yyclose() throws IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public void \n close() \n throws PipeException \n {\n in = -1;\n closedByReader = true;\n }", "public void close() throws IOException {\n if (!closed) {\n // Android-changed: Unconditionally close external inflaters (b/26462400)\n //if (usesDefaultInflater)\n inf.end();\n in.close();\n closed = true;\n }\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }", "public void close() {\n if (numDigits > 0)\n flush();\n try {\n output.close();\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n }", "public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }", "public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }", "public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }", "public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }", "public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }", "public void closeFile(){\n\t\t\n\t\ttry{\n\n\t\t\tbufferedInput.close();\n\t\t}\n\t\tcatch(IOException ex) {\n \t\tSystem.err.println(\"Error: Some problem while closing file\");; \n\t\t\tSystem.exit(1); \n \t}\n\t}", "public final void yyclose() throws java.io.IOException {\n\t\tzzAtEOF = true; /* indicate end of file */\n\t\tzzEndRead = zzStartRead; /* invalidate buffer */\n\n\t\tif (zzReader != null)\n\t\t\tzzReader.close();\n\t}", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public void close() throws IOException {\n source.close();\n }", "public static void closeFile() {\n\t\tif (input != null)\n\t\t\tinput.close();\n\t\t\n\t}", "final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }", "final public void yyclose() throws java.io.IOException {\n yy_atEOF = true; /* indicate end of file */\n yy_endRead = yy_startRead; /* invalidate buffer */\n\n if (yy_reader != null)\n yy_reader.close();\n }", "private void closeInputFile() {\n try {\n fileInputStream.close();\n } catch (IOException ioException) {\n Log.d(LOG_TAG, \"closeInputFile (165): Error while closing input file.\");\n ioException.printStackTrace();\n this.finishedEncoding = true;\n }\n }", "@Override\n\t public synchronized void close() throws IOException {\n\t\tout.close();\n\t\topen = false;\n\t }", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() {\n this.output.flush();\n this.output.close();\n }", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }", "public void close() {\r\n\t\tflush();\r\n\t\ttry {\r\n\t\t\tdos.close();\r\n\t\t\ts.close();\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 void close ()\n {\n StreamHelper.flush (this);\n StreamHelper.close (m_aOS);\n m_aOS = null;\n }", "@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }", "protected void close()\n {\n out.close();\n }", "public static void closeFile() throws IOException {\n\t\ttry {\n\t\t\tinput.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not close input file. Make sure it isn't open elsewhere.\");\n\t\t\tthrow e;\n\t\t}\t\t\n\t}", "public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public synchronized void close() throws IOException {\n\t\tm_reader.close();\n\t}", "@Override\n public void close() throws IOException {\n inputMessageStream.close();\n outputMessageStream.close();\n socket.close();\n }", "public void close() throws IOException {\n reader.close();\n }", "public void close(InputStream inputStream) {\n inputStream.close();\n }", "@Override\n public void close() throws IOException\n {\n _out.close();\n }", "private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}", "@Override\n public void close() throws IOException {\n isClosed = true;\n }", "public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }", "@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }", "private void CloseInputAndOutputStreams() {\n if (mOut != null)\n mOut.close();\n\n if (mIn != null)\n try {\n mIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void close() throws IOException {\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n\t\tpublic void close() throws IOException {\n\t\t\tout.close();\n\t\t}" ]
[ "0.7759348", "0.7442554", "0.7431424", "0.73467964", "0.7202436", "0.71076065", "0.69819653", "0.6875819", "0.6849541", "0.6823288", "0.67786884", "0.67334956", "0.6719289", "0.66913164", "0.66824675", "0.65635204", "0.656225", "0.65205383", "0.6506908", "0.6488402", "0.64391965", "0.6427573", "0.6374822", "0.636991", "0.6355696", "0.63488257", "0.6332873", "0.63288236", "0.631258", "0.63106686", "0.63089395", "0.6298559", "0.6298559", "0.62830967", "0.62770796", "0.62770796", "0.62770796", "0.62770796", "0.62770796", "0.62733686", "0.62675434", "0.6255954", "0.6252387", "0.62475795", "0.6227085", "0.6227085", "0.6224305", "0.6212209", "0.62118995", "0.62118995", "0.62118995", "0.62118995", "0.62118995", "0.62118995", "0.62118995", "0.62118995", "0.61893886", "0.61851287", "0.61685884", "0.6154595", "0.61541855", "0.61511856", "0.6140531", "0.6137095", "0.6133407", "0.6129735", "0.61291736", "0.6128519", "0.61258763", "0.6122652", "0.61225355", "0.61138636", "0.61135393", "0.60934144", "0.6091656", "0.6071652", "0.60704255", "0.6063343" ]
0.63178
48
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.
public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEOFDone = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = 0; zzFinalHighSurrogate = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; if (zzBuffer.length > ZZ_BUFFERSIZE) zzBuffer = new char[ZZ_BUFFERSIZE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n zzFinalHighSurrogate = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n if (zzBuffer.length > ZZ_BUFFERSIZE)\r\n zzBuffer = new char[ZZ_BUFFERSIZE];\r\n }", "public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n zzFinalHighSurrogate = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n if (zzBuffer.length > ZZ_BUFFERSIZE)\r\n zzBuffer = new char[ZZ_BUFFERSIZE];\r\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }", "public final void yyreset(Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n zzFinalHighSurrogate = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n if (zzBuffer.length > ZZ_BUFFERSIZE)\n zzBuffer = new char[ZZ_BUFFERSIZE];\n }", "private void resetScanner(SourcePosition start) {\n lastSourcePosition = start;\n scanner.setPosition(lastSourcePosition);\n }", "public void reset(Reader input) {\n this.buffer.dispose();\n this.buffer = new ReaderBuffer(input);\n this.previousToken = null;\n this.lastMatch.clear();\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\n zzReader = reader;\n zzAtBOL = true;\n zzAtEOF = false;\n zzEOFDone = false;\n zzEndRead = zzStartRead = 0;\n zzCurrentPos = zzMarkedPos = 0;\n yyline = yychar = yycolumn = 0;\n zzLexicalState = YYINITIAL;\n }", "public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n }", "public final void yyreset(java.io.Reader reader) {\r\n zzReader = reader;\r\n zzAtBOL = true;\r\n zzAtEOF = false;\r\n zzEOFDone = false;\r\n zzEndRead = zzStartRead = 0;\r\n zzCurrentPos = zzMarkedPos = 0;\r\n yyline = yychar = yycolumn = 0;\r\n zzLexicalState = YYINITIAL;\r\n }", "public final void yyreset(java.io.Reader reader) {\r\n\t\t// 's' has been updated.\r\n\t\tzzBuffer = s.array;\r\n\t\t/*\r\n\t\t * We replaced the line below with the two below it because zzRefill\r\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\r\n\t\t * \"full\" the first time through, since it points to the segment's\r\n\t\t * array). So, we assign zzEndRead here.\r\n\t\t */\r\n\t\t//zzStartRead = zzEndRead = s.offset;\r\n\t\tzzStartRead = s.offset;\r\n\t\tzzEndRead = zzStartRead + s.count - 1;\r\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\r\n\t\tzzLexicalState = YYINITIAL;\r\n\t\tzzReader = reader;\r\n\t\tzzAtEOF = false;\r\n\t}", "private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }", "final public void yyreset(java.io.Reader reader) throws java.io.IOException {\n yyclose();\n yy_reader = reader;\n yy_atBOL = true;\n yy_atEOF = false;\n yy_endRead = yy_startRead = 0;\n yy_currentPos = yy_markedPos = yy_pushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n yy_lexical_state = YYINITIAL;\n }", "final public void yyreset(java.io.Reader reader) throws java.io.IOException {\n yyclose();\n yy_reader = reader;\n yy_atBOL = true;\n yy_atEOF = false;\n yy_endRead = yy_startRead = 0;\n yy_currentPos = yy_markedPos = yy_pushbackPos = 0;\n yyline = yychar = yycolumn = 0;\n yy_lexical_state = YYINITIAL;\n }", "private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }", "public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtBOL = true;\n\t\tzzAtEOF = false;\n\t}", "public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtEOF = false;\n\t}", "public void reset() {\r\n\t\tnextTokenPos = 0;\r\n\t}", "public void reset() {\n try {\n is.reset();\n }catch(IOException ioe) {\n }\n }", "public synchronized void reset() throws IOException {\n\t\t\tdata.seek(firstPosition);\n\t\t}", "@Override\n public void reset() throws IOException {\n setPosition(startPosition);\n }", "public synchronized void resetInputStream()\r\n\t{\r\n\t\tthis.inputStream = new BodyReusableServletInputStream(this.bodyBytes);\r\n\t\tthis.bufferedReader = new BufferedReader(new InputStreamReader(this.inputStream)); \r\n\t}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public void rewind() throws IOException {\n if (closed) {\n throw new IOException(\"Stream is already closed\");\n }\n\n if (storeOutputStream != null) {\n storeOutputStream.close();\n storeOutputStream = null;\n }\n\n // Close the byte input stream or file input stream\n if (inputStream != originalInputStream) {\n inputStream.close();\n }\n\n bufferHighWaterMark = Math.max(bufferPointer, bufferHighWaterMark);\n bufferPointer = bufferHighWaterMark;\n\n if (bufferHighWaterMark > 0) {\n // If we have a buffer, then we'll read from it\n if (byteBuffer != null) {\n readingFromBuffer = true;\n inputStream = new UnsynchronizedByteArrayInputStream(byteBuffer, 0, bufferHighWaterMark);\n } else {\n // No buffer, which means we've switched to a file\n inputStream = new BufferedInputStream(new FileInputStream(storeFile));\n }\n } else {\n inputStream = originalInputStream;\n }\n }", "public void reset() {\n\n operator.reset(); // reset Scan Operator\n }", "void seekReset() {\n discardQueued(false);\n eofCond = false;\n stickyEofCond = false;\n blocked = false;\n sawCR = false;\n // FIXME: Change needed in Tcl\n //needNL = false;\n }", "synchronized protected void rewind() {\n\t\ttry {\n\t\t\tais.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new CCSoundException(\"JSPCMAudioRecordingStream::rewind - Error closing the stream before reload\", e);\n\t\t}\n\t\tais = CCSoundIO.getAudioInputStream(meta.fileName());\n\t}", "protected void fill() throws IOException {\n ensureOpen();\n len = in.read(buf, 0, buf.length);\n if (len == -1) {\n throw new EOFException(\"Unexpected end of ZLIB input stream\");\n }\n inf.setInput(buf, 0, len);\n }", "@Override\n public void reset() {\n isDone = false;\n if (content.markSupported()) {\n try {\n content.reset();\n } catch (IOException ioe) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Unable to reset the input stream: {}\", ioe.getMessage());\n }\n }\n\n content.mark(0);\n }\n super.reset();\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public void reset () {\n input = 0;\n }", "private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }", "RmsLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "public void reset() {\n bytes.reset();\n bytes.readVariableLengthInt();\n }", "protected final void resetBuffer() {\n buffer.reset();\n }", "void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}", "public void resetBuffer(){\n bufferSet = false;\n init();\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "@Override\n\tpublic void reset() {\n\t\tthis.buffer = new String();\n\t}", "public void reset() {\r\n\t\tcursor = mark;\r\n\t}", "public void resetBuffer() {\n\n\t}", "protected void resetIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out().clearHistory();\r\n SystemIOUtilities.err().clearHistory();\r\n SystemIOUtilities.restoreSystemIn();\r\n }", "public void reset()\n {\n currentPosition = 0;\n }", "public void reset()\n {\n myOffset = 0;\n amIInsideDoubleQuotes = false;\n amIInsideSingleQuotes = false;\n myCurrLexeme = null;\n }", "public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}", "private void rewind() {\n currentPos = markPos;\n }", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "private void resetIterator() {\n\t\titerator = head;\n\t}", "public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public synchronized void reset() throws IOException {\n super.reset();\n if(!iMaxSet) {\n iMaximum = available();\n }\n iRemainder = iMaximum;\n }", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public Lexer(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "private void resetBuffer() {\n baos.reset();\n }", "private void reset() throws IOException {\n }", "@Override\n\tpublic synchronized void reset() {\n\t\tiOBuffer.reset();\n\t}", "private void resetToHtmlInitial() {\n int i = 0;\n for (i = 0; i < zzEndRead; i++) {\n if (!Character.isWhitespace(zzBuffer.charAt(i))) break;\n }\n reset(zzBuffer, i, zzEndRead, HTML_INITIAL);\n }", "@Test\n public void testReset() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result1 = readLine(in, output.length());\n assertEquals(output, result1);\n\n in.reset();\n String result2 = readLine(in, output.length());\n assertEquals(output, result2);\n\n String result3 = readLine(in, output.length());\n assertNull(\"Should be null: \" + result3, result3);\n\n in.close();\n }", "public void restart_lookahead() throws Exception {\r\n for (int i = 1; i < error_sync_size(); i++) {\r\n Symbol[] symbolArr = this.lookahead;\r\n symbolArr[i - 1] = symbolArr[i];\r\n }\r\n this.cur_token = scan();\r\n this.lookahead[error_sync_size() - 1] = this.cur_token;\r\n this.lookahead_pos = 0;\r\n }", "void reset() throws IOException;", "void reset() throws IOException;", "public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public void reset() {\n this.index = this.startIndex;\n }", "public void reset() {\n started = false;\n flushing = false;\n moreText = true;\n headerCount = 0;\n actualLen = 0;\n }", "@Test(timeout = 4000)\n public void test131() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 5, 5);\n javaCharStream0.ReInit((Reader) stringReader0, 754, 754);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "public void init() throws IOException {\n restart(scan.getStartRow());\n }", "private void reset() {\n // Reset to the inital state.\n command = null;\n headers = new DefaultHeaders();\n body = null;\n currentDecodedByteCount = 0;\n totalDecodedByteCount = 0;\n }", "public void resetDFA() {\n currentState = State.START;\n }", "public final void rewind() {\n branch = 0;\n }", "public final void resetDataBuffer() {\n dataBuffer_.resetReaderIndex();\n lastValidBytePosition_ = 0;\n currentRowPosition_ = 0;\n nextRowPosition_ = 0;\n setAllRowsReceivedFromServer(false);\n }", "public _RestFlexLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public synchronized void reset() {\n }", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tthis.guessHistory.clear();\r\n\t}", "public void reset() {\n bb.clear();\n cb.clear();\n found = false;\n }" ]
[ "0.6697287", "0.6697287", "0.6693725", "0.6686321", "0.6544516", "0.6493272", "0.6353528", "0.6353528", "0.6351495", "0.6351495", "0.6351495", "0.6351495", "0.6351495", "0.6331942", "0.6331942", "0.6079476", "0.60689527", "0.6067086", "0.6067086", "0.6061992", "0.6055418", "0.60204965", "0.6019391", "0.5942693", "0.5860053", "0.5848946", "0.58186847", "0.58100045", "0.57814497", "0.57798445", "0.5743346", "0.570724", "0.56362915", "0.5632017", "0.5589841", "0.5585805", "0.5583584", "0.5579812", "0.55758667", "0.55758667", "0.5558248", "0.5539781", "0.5535604", "0.5508044", "0.5506074", "0.54796195", "0.54518586", "0.5436255", "0.53946614", "0.53695357", "0.53623044", "0.5328401", "0.5314304", "0.5304537", "0.52883375", "0.5286392", "0.5280292", "0.5261159", "0.52585965", "0.52518237", "0.52518237", "0.5247305", "0.52407205", "0.5218309", "0.5194397", "0.51832145", "0.51398015", "0.5137479", "0.5127897", "0.5127897", "0.51179147", "0.5114135", "0.5113182", "0.5104001", "0.5096405", "0.50801843", "0.5068334", "0.5065931", "0.5065665", "0.505656", "0.50357693", "0.50136125", "0.5004078", "0.50031644", "0.49957114", "0.49884483" ]
0.6720135
14
Returns the current lexical state.
public final int yystate() { return zzLexicalState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LexerState getState() {\n\t\treturn state;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}", "final public int yystate() {\n return yy_lexical_state;\n }", "final public int yystate() {\n return yy_lexical_state;\n }", "public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}", "public interface LexicalStates\n{\n\t/** lexical states */\n\tpublic static final int LEX_NORMAL =\t\t10; /* normal code (ie not within \"...\") */\n\tpublic static final int LEX_INTERPNORMAL = 9; /* code within a string, eg \"$foo[$x+1]\" */\n\tpublic static final int LEX_INTERPCASEMOD = 8; /* expecting a \\U, \\Q or \\E etc */\n\tpublic static final int LEX_INTERPPUSH =\t 7; /* starting a new sublex parse level */\n\tpublic static final int LEX_INTERPSTART\t= \t 6; /* expecting the start of a $var */\n\n\t/* at end of code, eg \"$x\" followed by: */\n\tpublic static final int LEX_INTERPEND = \t 5; /* ... eg not one of [, { or -> */\n\tpublic static final int LEX_INTERPENDMAYBE = 4; /* ... eg one of [, { or -> */\n\n\tpublic static final int LEX_INTERPCONCAT =\t 3; /* expecting anything, eg at start of\n\t\t\t\t\tstring or after \\E, $foo, etc */\n\tpublic static final int LEX_INTERPCONST =\t 2; /* NOT USED */\n\tpublic static final int LEX_FORMLINE =\t\t 1; /* expecting a format line */\n\tpublic static final int LEX_KNOWNEXT =\t\t 0; /* next token known; just return it */\n\n}", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public final int yystate() {\r\n return zzLexicalState;\r\n }", "public final int yystate() {\r\n return zzLexicalState;\r\n }", "public final int yystate() {\r\n return zzLexicalState;\r\n }", "public final int yystate() {\r\n return zzLexicalState;\r\n }", "public final int yystate() {\r\n return zzLexicalState;\r\n }", "public S getCurrentState();", "public final int yystate() {\n return zzLexicalState;\n }", "public java.lang.CharSequence getState() {\n return state;\n }", "public final int yystate() {\n\t\treturn zzLexicalState;\n\t}", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public java.lang.CharSequence getState() {\n return state;\n }", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public State getCurrentState() {\n \t\treturn currentState;\n \t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public java.lang.String getState() {\r\n return state;\r\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public java.lang.String getState() {\n return state;\n }", "public java.lang.String getState() {\n return state;\n }", "public String getStateToken() {\n\t\treturn stateToken;\n\t}", "public java.lang.String getState() {\n return State;\n }", "public final char getState() {\n\t\treturn _state;\n\t}", "public String getState() {\n\t\treturn state;\n\t}", "public State getCurrentState() {\n return currentState;\n }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "java.lang.String getState();", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public S getState() {\n return currentState;\n }", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "@AutoEscape\n\tpublic String getState();", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "String getState();", "String getState();", "String getState();", "public static States getState() {\r\n\t\treturn currentState;\r\n\t}", "public int getCurrentState() {\n return myState;\n }", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public String getState() {\n\t\treturn state.toString();\n\t}", "public String getState()\n {\n \treturn state;\n }", "public String getState() {\n\t\treturn State;\n\t}", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public State getState();", "public State getState();", "public String getState() {\n return state;\n }", "public String getState() {\n return state;\n }", "public String getState() {\n return state;\n }" ]
[ "0.777735", "0.7045248", "0.69731486", "0.69486177", "0.69486177", "0.6926388", "0.68727165", "0.6855888", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.6828191", "0.68169594", "0.6794179", "0.6780457", "0.67754173", "0.6752172", "0.6720868", "0.66741174", "0.65927356", "0.6583865", "0.6583865", "0.6559515", "0.65509236", "0.6549206", "0.6549206", "0.6487395", "0.6481853", "0.64811754", "0.6453403", "0.6452989", "0.6444753", "0.6442819", "0.64422286", "0.64322335", "0.642815", "0.642815", "0.642815", "0.64205277", "0.64189065", "0.64189065", "0.6395655", "0.63911563", "0.63911563", "0.6385675", "0.6378763", "0.6378763", "0.6378763", "0.6362729", "0.6356979", "0.63490087", "0.63490087", "0.6346223", "0.6332672", "0.6329203", "0.6322009", "0.6307191", "0.6307191", "0.62789536", "0.62789536", "0.62789536" ]
0.68280005
44
Enters a new lexical state
public final void yybegin(int newState) { zzLexicalState = newState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\r\n zzLexicalState = newState;\r\n }", "public final void yybegin(int newState) {\n zzLexicalState = newState;\n }", "final public void yybegin(int newState) {\n yy_lexical_state = newState;\n }", "final public void yybegin(int newState) {\n yy_lexical_state = newState;\n }", "public final void yybegin(int newState) {\n\t\tzzLexicalState = newState;\n\t}", "public void SwitchTo(int lexState)\n{\n if (lexState >= 1 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}", "public void SwitchTo(int lexState)\n{\n if (lexState >= 4 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}", "static public void SwitchTo(int lexState)\n{\n if (lexState >= 2 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n}", "static public void SwitchTo(int lexState)\n {\n if (lexState >= 3 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }", "private void start() {\n getDispenser().advance();\n if (getDispenser().tokenIsNumber()) setState(State.NUMBER); \n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM_OR_LEFT_PAREN);\n }", "public void SwitchTo(int lexState)\n {\n if (lexState >= 4 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }", "static public void SwitchTo(int lexState) {\n if (lexState >= 2 || lexState < 0)\n throw new TokenMgrError(\"Error: Ignoring invalid lexical state : \" + lexState + \". State unchanged.\", TokenMgrError.INVALID_LEXICAL_STATE);\n else\n curLexState = lexState;\n }", "public SLR1_automat.State next_state(String symbol) throws Exception;", "public interface LexicalStates\n{\n\t/** lexical states */\n\tpublic static final int LEX_NORMAL =\t\t10; /* normal code (ie not within \"...\") */\n\tpublic static final int LEX_INTERPNORMAL = 9; /* code within a string, eg \"$foo[$x+1]\" */\n\tpublic static final int LEX_INTERPCASEMOD = 8; /* expecting a \\U, \\Q or \\E etc */\n\tpublic static final int LEX_INTERPPUSH =\t 7; /* starting a new sublex parse level */\n\tpublic static final int LEX_INTERPSTART\t= \t 6; /* expecting the start of a $var */\n\n\t/* at end of code, eg \"$x\" followed by: */\n\tpublic static final int LEX_INTERPEND = \t 5; /* ... eg not one of [, { or -> */\n\tpublic static final int LEX_INTERPENDMAYBE = 4; /* ... eg one of [, { or -> */\n\n\tpublic static final int LEX_INTERPCONCAT =\t 3; /* expecting anything, eg at start of\n\t\t\t\t\tstring or after \\E, $foo, etc */\n\tpublic static final int LEX_INTERPCONST =\t 2; /* NOT USED */\n\tpublic static final int LEX_FORMLINE =\t\t 1; /* expecting a format line */\n\tpublic static final int LEX_KNOWNEXT =\t\t 0; /* next token known; just return it */\n\n}", "static void EnterScope(){\r\n\t\tcurLevel++;\r\n\t\tScope scope = new Scope(curLevel);\r\n\t\t//scope.nextAdr = 3;\r\n\t\ttopScope.ant = scope;\r\n\t\tscope.sig = topScope; \r\n\t\ttopScope = scope;\r\n }", "public void enterScope(){\n\t\tscope.add(0, new ArrayList<SymbolEntry>());\n\t\t++scopeLevel;\n\t}", "public void enterBlock(CymbolParser.BlockContext ctx) {\n currentScope = new LocalScope(currentScope);\n saveScope(ctx, currentScope);\n }", "public void add_switch(String symbol, SLR1_automat.State state) throws Exception;", "public void pushState( TurtleState state ) {\n\t\tstates.push( state );\n\t}", "@Override\r\n\tpublic void addState(String nextToken) {\r\n\t\tNFAState s = checkIfExists(nextToken);\r\n\t\tif (s == null) {\r\n\t\t\tstates.add(new NFAState(nextToken));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Error: this state already exists.\");\r\n\t\t}\r\n\t}", "public void enterNormalState() {\n\n\t}", "public void enterHatchingState() {\n\n\t}", "@Override\n\tpublic void addStartState(String name) {\n\t\tNFAState s = checkIfExists(name);\n\t\tif(s == null){\n\t\t\ts = new NFAState(name);\n\t\t\taddState(s);\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: A state with name \" + name + \" already exists in the NFA\");\n\t\t}\n\t\tstart = s;\n\t\t\n\t}", "public ATNState newState(GrammarAST node) {\n ATNState n = new BasicState();\n if (currentRule != null) {\n n.setRuleIndex(currentRule.index);\n }\n atn.addState(n);\n return n;\n }", "public void applyNewState() {\n this.setAlive(this.newState);\n }", "void nextState();", "@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}", "private InterpreterState(final String statename) {\n name = statename;\n }", "public abstract ALRState<I> goTo(Symbol symbol);", "State(Main aMain) {\n\tmain = aMain;\n\tback = Integer.parseInt(main.myProps.getProperty(\"yesterdays\"));\n\tfront = Integer.parseInt(main.myProps.getProperty(\"tomorrows\"));\n\tmaps = new Hashtable();\n availWeath = new Hashtable();\n\n main.myFrw.listen(new MapListener(), ScaledMap.TYPE, null);\n main.myFrw.announce(this);\n stateDoc = Framework.parse(main.myPath + \"state.xml\", \"state\");\n availWeath = loadFromDoc();\n }", "public void storeState(StateInfo stateInfo) {\n \n// Thread.dumpStack();\n super.storeState(stateInfo); \n \n JJStateInfo info = (JJStateInfo) stateInfo;\n info.setSubStates(lexan.getStateInfo());\n \n if (DEBUG) debug.println(\"Storing state [\"+ offset + \",\" + tokenOffset + \"]: \" + info + \"@\" + stopOffset); // NOI18N\n \n }", "public void setState(LexerState state) {\n\t\tif (state == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.state = state;\n\t}", "public void setState(LexerState state) {\n\t\tif (state == null) {\n\t\t\tthrow new IllegalArgumentException(\"State cannot be \" + state);\n\t\t}\n\t\tthis.state = state;\n\t}", "protected void sequence_State(ISerializationContext context, State semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, TP1_EMPackage.Literals.STATE__NAME) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TP1_EMPackage.Literals.STATE__NAME));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getStateAccess().getNameEStringParserRuleCall_2_0(), semanticObject.getName());\r\n\t\tfeeder.finish();\r\n\t}", "public State(String name) {\n\t\tthis.name = name;\n\t\tif (name.endsWith(\"a\")) {\n\t\t\tsetAccepting();\n\t\t} else if (name.endsWith(\"d\")) {\n\t\t\tsetDeclining();\n\t\t} else if (name.endsWith(\"f\")) {\n\t\t\tsetFinal(true);\n\t\t}\n\t}", "protected void enter() {\n \tresult.setForeground(red);\n \tif (entered == true) {\n \t\tshow(current);\n \t}\n \tentered = true;\n \tstack.add(current);\n \tcurrent = 0;\n }", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "public void getState();", "private LRState createStartState(final Grammar grammar) {\n final Production production = grammar.getStartProduction();\n final HashSet<Symbol> terminalSymbols = new HashSet<>();\n terminalSymbols.add(END_SYMBOL);\n final LRItem startItem = new LRItem(production, 0, terminalSymbols);\n return new LRState(Arrays.asList(new LRItem[] { startItem }), 0);\n }", "public void enter();", "synchronized void advanceState()\n {\n state = state.advance();\n notifyAll();\n }", "public LexerState getState() {\n\t\treturn state;\n\t}", "LabState state();", "public void setState(int synstate){\n\tsynState = synstate;\n }", "public void FSMProcess(String currentInput) throws BadInputException{\n if (contentsMap.containsKey(currentState + currentInput)) {\n System.out.print(contentsMap.get(currentState + currentInput).getOutputSymbol());\n this.currentState = contentsMap.get(currentState + currentInput).getNextState();\n }\n else throw new BadInputException();\n }", "public DFAState(String name) {\n this.name = name;\n this.hashCode = name.hashCode();\n }", "public State next () { return nextState(); }", "public void setState (int philosphoer, String state){\n currentState[philosphoer] = state;\n }", "private void enterRules()\n {\n String ruleString = ruleTextField.getText();\n transition.buildRulesFromString(ruleString);\n ruleString = transition.buildStringFromRules();\n ruleTextField.setText(ruleString);\n optionsPanel.getWorkspacePanel().requestFocusInWindow();\n optionsPanel.getWorkspacePanel().repaint();\n // Daniel didn't like this automatic switching any more.\n // optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n }", "@Override\n\tpublic void addState(String name) {\n\t\tNFAState s = checkIfExists(name);\n\t\tif( s == null){\n\t\t\ts = new NFAState(name);\n\t\t\taddState(s);\n\t\t} else {\n\t\t\tSystem.out.println(\"WARNING: A state with name \" + name + \" already exists in the NFA\");\n\t\t}\n\t\t\n\t}", "void enter();", "public void setCameFrom(State n)\r\n\t{\r\n\t\tthis.previousState = new State(n);\r\n\t}", "@Override\n public void setState(String s)\n {\n state = s;\n nbChanges++;\n }", "public void Activate() {\n state.Activate();\n }", "public void next()\r\n\t{\r\n\t\tif(state<3)\r\n\t\t\tstate++;\r\n\t\telse\r\n\t\t\tstate=1;\r\n\t}", "public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }", "@Override\r\n\tpublic void enter() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}" ]
[ "0.73873174", "0.73873174", "0.73873174", "0.73873174", "0.73873174", "0.72941506", "0.7226648", "0.7226648", "0.71508276", "0.67628527", "0.675286", "0.66516984", "0.62365973", "0.6181515", "0.61330837", "0.6028637", "0.6020987", "0.59391516", "0.59199816", "0.5890798", "0.5875512", "0.58046514", "0.57238895", "0.57177275", "0.5656443", "0.5620161", "0.5614717", "0.5598218", "0.5589737", "0.5581988", "0.5566714", "0.5546274", "0.55406994", "0.5533377", "0.552367", "0.550816", "0.5502893", "0.55012566", "0.5456661", "0.5451478", "0.5435046", "0.5416135", "0.54146284", "0.5400702", "0.53828895", "0.53801304", "0.5365147", "0.5350195", "0.5311098", "0.5308529", "0.52941406", "0.52824825", "0.5277627", "0.52679616", "0.5262274", "0.5258218", "0.5254931", "0.52547026", "0.5254015", "0.52511466", "0.5245394", "0.52409154" ]
0.734593
37
Returns the text matched by the current regular expression.
public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRegularExpression() {\n\t\treturn enteredText;\n\t}", "java.lang.String getRegex();", "java.lang.String getRegex();", "@Override\r\n\tpublic String getMatch() {\n\t\treturn match;\r\n\t}", "public String getRegex();", "public String getRegEx();", "public String getMatched() {\r\n\t\treturn matched;\r\n\t}", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public final CharSequence yytext() {\n return zzBuffer.subSequence(zzStartRead, zzMarkedPos);\n }", "public String getMatchRegex() {\n return matchRegex;\n }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "public static String getAfterRegex(String text, String regex) {\n\t\tMatcher textMatcher = Pattern.compile(regex).matcher(text);\n\t\ttextMatcher.find();\n\t\tint foundI = textMatcher.end();\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tfor (int i=foundI; i<chars.length; i++) {\n\t\t\tsb.append(chars[i]);\n\t\t}\n\t\tString tokens = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn tokens;\n\t}", "public final String getRegex() {\n\t\treturn JsUtils.getNativePropertyString(this, \"regex\");\n\t}", "public String getRegEx() {\r\n return regex;\r\n }", "public final String yytext() {\n\t\treturn new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\n\t}", "public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regex_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regex_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.Short getRegexMatch() {\r\n return regexMatch;\r\n }", "public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }", "public java.lang.String getGet() {\n java.lang.String ref = \"\";\n if (patternCase_ == 2) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }", "public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }", "public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }", "public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }", "public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }", "public final String yytext() {\r\n return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );\r\n }", "public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);\n }", "public P getText() {\n return this.slp.getProduction(text);\n }", "public final String yytext() {\n return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);\n }", "final public String yytext() {\n return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );\n }", "final public String yytext() {\n return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );\n }", "public String getSourceText() {\n\t\treturn getSource().replaceAll(\"<a.*>(.*)</a>\", \"$1\");\n\t}", "public String getTextInCurrentElement() throws ParseException {\n int lessThan = html.lastIndexOf(\"<\", position);\n if (lessThan == -1) {\n throw new ParseException(\"Cannot find text in current element\", position);\n }\n position = lessThan;\n String tag = findCurrentTag(html, position);\n return getTextInNextElement(tag);\n }", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "public String returnRegex() {\n\t\tString chosenRegex;\n\t\tSystem.out.println(\"selectedRegex value is: \" + selectedRegex);\n\t\tswitch (selectedRegex) {\n\t\tcase 1:\n\t\t\tchosenRegex = \"(\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*)\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tchosenRegex = \"(\\\\&list=[a-zA-Z 0-9 -]+\\\\&?index=?\\\\d+?)\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tchosenRegex = \"(\\\\&feature=youtu.be)\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tchosenRegex = \"\\\\?t.*|\\\\&t.*|\\\\&l.*|\\\\&f.*\"; // alternative:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// (\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*|\\\\&list=[a-zA-Z\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0-9 -]*)\n\t\t\tbreak;\n\t\t}\n\t\tSystem.out.println(chosenRegex);\n\t\treturn chosenRegex;\n\t}", "public String getText() {\n return text.getText();\n }", "public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}", "@java.lang.Override\n public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regex_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getRegex() {\n java.lang.Object ref = regex_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regex_ = s;\n return s;\n }\n }", "public java.lang.String getRegexStr() {\r\n return regexStr;\r\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "private String getStringMatching(final String input, final String regex) {\n\t\tLOGGER.debug(\"trying to locate a pattern {} in the input {}\", regex, input);\n\t\tPattern pattern = Pattern.compile(regex);\n\t\tString match = null;\n\t\tMatcher m = pattern.matcher(input);\n\t\twhile (m.find()) {\n\t\t\tfinal String matchingGroup = m.group().trim();\n\t\t\tif (matchingGroup.length() > 0) {\n\t\t\t\tmatch = matchingGroup;\n\t\t\t}\n\t\t}\n\t\treturn match;\n\t}", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "public final String yytext() {\n return input.readText().toString();\n }", "public String getTextOnPage()\n {\n return mainText.getText();\n }", "Match getResultMatch();", "@Nullable\n String getMatch() {\n if (getAnchorType() == STRING_LITERAL || getAnchorType() == CHAR_LITERAL) {\n // Remove quotes inserted by parboiled for completion suggestions\n String fullToken = _anchor.getLabel();\n if (fullToken.length() >= 2) { // remove surrounding quotes\n fullToken = fullToken.substring(1, fullToken.length() - 1);\n }\n return fullToken;\n }\n return null;\n }", "public String getText()\n {\n return (this.text);\n }", "protected abstract Regex pattern();", "public String getPattern() {\r\n return this.currPattern;\r\n }", "public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }", "public MatchResult getResult() {\n return result;\n }", "String text();", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(stringDfaMatcher);\n buffer.append(nfaMatcher);\n buffer.append(regExpMatcher);\n return buffer.toString();\n }", "public String previewNextToken() {\r\n matcher.find();\r\n String nextOne = matcher.group();\r\n updateMatcher(); // Return matcher to its previous state\r\n return nextOne;\r\n }" ]
[ "0.70918065", "0.6484353", "0.6484353", "0.6231338", "0.6081341", "0.6011239", "0.59774715", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.5966505", "0.594106", "0.58467793", "0.57840997", "0.5781989", "0.5691061", "0.56247616", "0.56243914", "0.562349", "0.56010646", "0.5586059", "0.5563483", "0.55582124", "0.55582124", "0.55582124", "0.55582124", "0.55582124", "0.5550914", "0.5549363", "0.55393475", "0.5517683", "0.5517683", "0.55167186", "0.5508398", "0.5448301", "0.5437464", "0.54361844", "0.54159194", "0.54098195", "0.5408319", "0.5388305", "0.5375658", "0.5375658", "0.5375658", "0.5375658", "0.5375658", "0.5375658", "0.5375658", "0.5375658", "0.53742635", "0.536935", "0.536935", "0.536935", "0.536935", "0.536935", "0.536935", "0.536935", "0.53546596", "0.5341025", "0.5332981", "0.5329512", "0.5320878", "0.53195256", "0.5273523", "0.5272645", "0.52618897", "0.5260471", "0.5256495", "0.5250461" ]
0.5595711
49
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster
public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final char yycharat(int pos) {\n return input.readText().charAt(pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public char charAt(int pos) {\n return content.charAt(pos);\n }", "final public char yycharat(int pos) {\n return yy_buffer[yy_startRead+pos];\n }", "final public char yycharat(int pos) {\n return yy_buffer[yy_startRead+pos];\n }", "public final char yycharat(int pos) {\n return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n }", "public final char yycharat(int pos) {\n return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);\n }", "public char charAt(int index);", "public final char yycharat(int pos) {\n return zzBuffer[zzStartRead + pos];\n }", "public final char yycharat(int pos) {\n\t\treturn zzBuffer[zzStartRead+pos];\n\t}", "public char charAt(int charOffset);", "public char charAt(int index)\r\n/* 31: */ {\r\n/* 32: 44 */ if (index > this.pos) {\r\n/* 33: 45 */ throw new IndexOutOfBoundsException();\r\n/* 34: */ }\r\n/* 35: 47 */ return this.chars[index];\r\n/* 36: */ }", "@Override\n public final char charAt(final int index) {\n return text.charAt(index);\n }", "public char charAt(int index) {\n/* 121 */ return this.m_str.charAt(index);\n/* */ }", "public char at(int pos) {\r\n return fCharBuffer.at(pos);\r\n }", "public char get_char(int k) throws Exception {\r\n\t\tif (k < 0 || k >= text.length())\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + k);\r\n\t\telse\r\n\t\t\treturn text.charAt(k);\r\n\t}", "public char charAt(int anIndex)\n {\n return _xstr.charAt(_start + anIndex);\n }", "@Override\r\n\tpublic char charAt(int index) {\n\t\treturn chars[index];\r\n\t}", "private String getCharacter(final int index) {\n String s = null;\n try {\n s = document.getText(index, 1);\n } catch (final BadLocationException e) {\n }\n return s;\n }", "public char charAt(int index)\n\t{\n\t\tif (index < 0 || index > (length - 1))\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tCNode character = getCNodeAt(index, firstC);\n\t\treturn character.data;\n\t}", "public char charAt(int index) throws stackException\n {\n char ans;\n if(index >= 0 && index < numNodes)\n {\n Node n = this.get(index);\n ans = n.item;\n return ans;\n }\n else\n {\n throw new stackException(\"Index Is Out Of Bounds\");\n }\n }", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "@Override\n\tpublic char charAt(int index) {\n\t\tif (index >= this.size()) throw new IndexOutOfBoundsException(\"out of bounds gah\");\n\t\tif (index<0) throw new IndexOutOfBoundsException(\"invalid index\");\n\n\t\tif (index<myIndex) {\n\t\t\tmyIndex = 0;\n\t\t\tmyLocalIndex=0;\n\t\t\tmyCurrent = myFirst;\n\t\t}\n\t\twhile (myIndex != index) {\n\n\t\t\tmyIndex++;\n\t\t\tmyLocalIndex++;\n\t\t\t\n\t\t\tif (myLocalIndex >= myCurrent.info.length()) {\n\t\t\t\tmyLocalIndex = 0;\n\t\t\t\t\n\t\t\t\tif (myCurrent.next.info == null) throw new IndexOutOfBoundsException(\"out of nodes\");\n\t\t\t\tmyCurrent = myCurrent.next;\n\t\t\t\t\n\t\t\t}\n\t\t}\n return myCurrent.info.charAt(myLocalIndex);\n }", "int getStartCharIndex();", "public int getCharPos(){\n return charPos;\n }", "public char getChar(int pos)\n {\n if (pos < 0) {\n if(this.post_comma_digits >= -pos)\n return this.raw_value[this.pre_comma()-1-pos];\n else return '0';\n } else {\n if(pos < this.pre_comma())\n return this.raw_value[this.pre_comma()-1-pos];\n else return '0';\n }\n }", "public char getChar(int index) throws ArrayIndexOutOfBoundsException\n\t{\n\t\treturn (char) bytes[index];\n\t}", "public Character charAt(int i) {\n\t\t\treturn null;\n\t\t}", "public Character charAt(int i) {\n\t\t\treturn null;\n\t\t}", "char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }", "char getChar(int offset) throws BadLocationException;", "char toChar(int index) {\n return _chars.charAt(index);\n }", "private static int charAt(String data) {\n\t\treturn 0;\n\t}", "@Override\n public final char setIndex(final int position) {\n ArgumentChecks.ensureBetween(\"position\", lower, upper, position);\n return ((index = position) != upper) ? text.charAt(position) : DONE;\n }", "public char charAt(String str, int index) {\n char charAt = ' ';\n\n try {\n charAt = str.charAt(index);\n } catch (IndexOutOfBoundsException e) {\n System.err.print(\"Index out of bounds exception: \" + e.getMessage());\n }\n\n return charAt;\n }", "public char getLetter(int index) {\n\t\treturn _objMyStringBuilder.getCharAt(index);\n\t}", "public char peek() {\n try {\n return this.input.charAt(this.index);\n } catch (StringIndexOutOfBoundsException e) {\n throw this.buildException(\"truncated input\");\n }\n }", "char toChar(int index) {\n if (index >= 0 && index < size()) {\n return _chars[index];\n } else {\n throw new EnigmaException(\"Index out of bounds.\");\n }\n }", "public char getChar();", "public char givenIndex(String str, int index)\r\n {\r\n char a= str.charAt(index);\r\n return a;\r\n }", "static int getIdx(char ch)\n {\n return (ch - 'a');\n }", "private int readCharBackward() {\r\n \t\tif (--index < 0 || \r\n \t\t\t\tdocumentContent == null ||\r\n \t\t\t\tdocumentContent.length() <= index)\r\n \t\t\treturn -1;\r\n \r\n \t\ttry {\r\n \t\t\treturn documentContent.charAt(index);\r\n \t\t} catch (StringIndexOutOfBoundsException e) {\r\n \t\t\treturn -1;\r\n \t\t}\r\n \t}", "int getEndCharIndex();", "@Override\n public final char current() {\n return (index != upper) ? text.charAt(index) : DONE;\n }", "public static void showChar(String s, int pos)\n {\n char chAtPos = s.charAt (pos);\n System.out.println(\"Character at position \" + pos +\n \" is \" + chAtPos);\n }", "public char getChar(int index)\r\n/* 191: */ {\r\n/* 192:208 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 193:209 */ return super.getChar(index);\r\n/* 194: */ }", "public abstract char getStarterChar();", "public final int getContinuationCharacter(int index) {\n return this.continuationCharacters[index];\n }", "char toChar(int index) {\n return _letters.charAt(index);\n }", "public char currentChar() throws Exception {\n // first line?\n if (currentPos == -2) {\n readLine();\n return nextChar();\n }\n\n // at end of file?\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n\n // at end of line?\n if (currentPos == -1 || currentPos == line.length()) {\n return PascalToken.EOL_CHAR;\n }\n\n // Need to read next line?\n if (currentPos > line.length()) {\n readLine();\n return nextChar();\n }\n // return char at current pos\n return line.charAt(currentPos);\n }", "public int getCharStart() {\n\t\treturn -1;\n\t}", "public static char toChar(String str) {\n/* 173 */ if (StringUtils.isEmpty(str)) {\n/* 174 */ throw new IllegalArgumentException(\"The String must not be empty\");\n/* */ }\n/* 176 */ return str.charAt(0);\n/* */ }", "private char peek(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex);//return current character\r\n \r\n }", "public char getChar()\n throws IOException\n {\n return (char) lineNumberReader.read();\n }", "private int getChar() {\n\n\t\ttry {\n\t\t\treturn stream.read();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.print(e.getMessage());\n\t\t\tSystem.err.println(\"IOException occured in Lexer::getChar()\");\n\t\t\treturn -1;\n\t\t}\n\n\t}", "CharacterInfo getCharacter();", "public char getChar(int wordIndex, int charIndex) {\n return this.words.get(wordIndex).charAt(charIndex);\n }", "public String getWordAt(int pos){\n\t\treturn sentence.get(pos).getWord();\n\t}", "public char getChar(String name) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return (char)-1;\n }", "public static char getChar() throws IOException {\n\t\nString s = getString();\nreturn s.charAt(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the first letter of the string, to help idiot proof it.\n\n}", "public static char getLetter(String s){\n //A variable used in the helper method\n int i = 0;\n return getLetter(codeTree, s, i);\n }", "@Test\n public void testCharAt() {\n LOGGER.info(\"testCharAt\");\n final AtomString atomString1 = new AtomString(\"Hello\");\n final char expected = 'e';\n final char actual = atomString1.charAt(1);\n assertEquals(expected, actual);\n }", "public int getIndex() {\r\n return textIndex;\r\n }", "public static String getWord(JTextComponent c, int offset)\n throws BadLocationException {\n int[] blk = getIdentifierBlock(c, offset);\n Document doc = c.getDocument();\n return (blk != null) ? doc.getText(blk[0], blk[1] - blk[0]) : null;\n }", "public char getChar() throws IOException {\r\n\t\treturn (char)lineReader.read();\r\n\t}", "public static char getChar(KeyStroke ks) {\n Character ch = (Character)chars.get(ks);\n if (ch == null) {\n // Try again, but strip all modifiers but shift\n int mask = ks.getModifiers() & ~KeyEvent.SHIFT_MASK;\n ks = KeyStroke.getKeyStroke(ks.getKeyCode(), mask);\n ch = (Character)chars.get(ks);\n if (ch == null)\n return KeyEvent.CHAR_UNDEFINED;\n }\n return ch.charValue();\n }" ]
[ "0.79012674", "0.7562809", "0.7562809", "0.7562809", "0.7562809", "0.7562809", "0.7562809", "0.7562809", "0.7562809", "0.7484132", "0.7484132", "0.7484132", "0.7484132", "0.7484132", "0.746413", "0.74302125", "0.74302125", "0.7390061", "0.7390061", "0.73842096", "0.73841447", "0.73158836", "0.7289713", "0.72628117", "0.7228505", "0.7091299", "0.70635945", "0.66867733", "0.6667236", "0.6631629", "0.6612956", "0.6609919", "0.65309095", "0.63398033", "0.632254", "0.618311", "0.6102222", "0.6082436", "0.60516256", "0.60151374", "0.60151374", "0.59775645", "0.5948061", "0.594157", "0.5936374", "0.5925689", "0.5890368", "0.58869386", "0.5841397", "0.5826854", "0.5796246", "0.57947373", "0.5786276", "0.57829595", "0.57574266", "0.57467926", "0.5744189", "0.57057714", "0.57020086", "0.56933856", "0.5671785", "0.56694216", "0.5651379", "0.56440234", "0.5629677", "0.5626501", "0.5593052", "0.5586794", "0.55810666", "0.5568725", "0.5524539", "0.5521721", "0.5516548", "0.55043566", "0.55034125", "0.5483837", "0.54746485", "0.5453624" ]
0.7513381
31
Returns the length of the matched text region.
public final int yylength() { return zzMarkedPos-zzStartRead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTextLength();", "public int length() {\r\n\t\treturn text.length();\r\n\t}", "public int getTextLength();", "public int getLength() {\n\t\t\treturn this.text.length();\n\t}", "@Override\r\n \tpublic final int getLength() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getEndPos() - getStartPos();\r\n \t}", "public int getTextLength() {\r\n return text.length();\r\n }", "public int numMatches();", "public int getMinMatchLength() {\n int[] allele = {getAllele(0), getAllele(1)};\n byte[][] alt = {getAlt(allele[0]).getSequence(), getAlt(allele[1]).getSequence()};\n byte[] ref = getReference();\n\n int[] matchLength = {0, 0};\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < Math.min(ref.length, alt[i].length); j++) {\n if (alt[i][j] == ref[j]) {\n matchLength[i]++;\n } else {\n break;\n }\n }\n }\n return Math.min(matchLength[0], matchLength[1]);\n }", "int getSearchLength();", "int getGrammarMatchCount();", "int computeNumberOfLines(String text);", "public int size() {\n return text.size();\n }", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public double length(){\n return end.distance(getStart());\n }", "protected int length() { return FormatTools.getRasterLength(lengths); }", "public final int termLength() {\n initTermBuffer();\n return termLength;\n }", "public int rectangleCount() {\n return this.root.rectangleCount();\n }", "public float getWidth() {\n\t\t\n\t\tfloat width= 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\twidth += font.getChar(text.charAt(i)).X_ADVANCE * size;\n\t\t}\n\t\t\n\t\treturn width;\n\t}", "public int matchLength() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int, dex: in method: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.MatchInfo.matchLength():int\");\n }", "public double length() {\n\t\treturn startPoint.distance(endPoint);\n\t}", "public int height()\n throws Exception\n {\n return this.text.height();\n }", "public final int yylength() {\n return zzMarkedPos - zzStartRead;\n }", "int getLinesCount();", "public final int yylength() {\n return zzMarkedPos - zzStartRead;\n }", "int getNumberOfLines(int offset, int length) throws BadLocationException;", "public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }", "public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }", "public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }", "public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }", "public final int yylength() {\r\n return zzMarkedPos-zzStartRead;\r\n }", "private int getOffsetLength(final String message, final ResourceText text,\n\t\t\tfinal int offset) {\n\t\tint length = 1;\n\t\tif (isUnunsedVariable(message) //\n\t\t\t\t|| isUnunsedMacro(message) //\n\t\t\t\t|| isLowerCase(message)) {\n\t\t\tfinal int start = message.indexOf(QUOTE_CHAR);\n\t\t\tfinal int end = message.indexOf(QUOTE_CHAR, start + 1);\n\t\t\tif (start != -1 && end != -1) {\n\t\t\t\tlength = end - start - 1;\n\t\t\t}\n\t\t} else if (isNoSpace(message)) {\n\t\t\tint end = offset;\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\twhile (isWhitespace(content, end)) {\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tlength = end - offset;\n\t\t} else if (isOneSpace(message) || isEndLineSpace(message)) {\n\t\t\tint end = offset + 1;\n\t\t\tfinal byte[] content = text.getContent();\n\t\t\twhile (isWhitespace(content, end)) {\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tlength = end - offset;\n\t\t}\n\n\t\treturn Math.max(length, 1);\n\t}", "public int getStringWidth(String text);", "public int getGrammarMatchCount() {\n if (grammarMatchBuilder_ == null) {\n return grammarMatch_.size();\n } else {\n return grammarMatchBuilder_.getCount();\n }\n }", "public int length() { return _end - _start; }", "public final int yylength() {\n\t\treturn zzMarkedPos-zzStartRead;\n\t}", "public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}", "public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }", "public int getWordLength();", "public int length();", "public int length();", "public int length();", "public int length();", "public int length();", "@Override\n public int height()\n {\n return textCent.height();\n }", "public int get_length();", "private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}", "public int length() {\n \t\tif (-1 == n_points) setupForDisplay();\n \t\treturn n_points;\n \t}", "public double getLength() {\n return VectorXZ.distance(p1, p2);\n }", "public int getMazeWidth() {\n\t\tint result = 0;\n\t\t\n\t\tfor (String line : this.mMazeChars) {\n\t\t\tif (result < line.length()) \n\t\t\t\tresult = line.length();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public int length() {\n return nextindex - startIndex;\n }", "@Override\n public int computeLength()\n {\n if ( matchingRule != null )\n {\n matchingRuleBytes = Strings.getBytesUtf8( matchingRule );\n extensibleMatchLength = 1 + TLV.getNbBytes( matchingRuleBytes.length ) + matchingRuleBytes.length;\n }\n\n if ( type != null )\n {\n typeBytes = Strings.getBytesUtf8( type );\n extensibleMatchLength += 1 + TLV.getNbBytes( typeBytes.length ) + typeBytes.length;\n }\n\n if ( matchValue != null )\n {\n int bytesLength = matchValue.getBytes().length;\n extensibleMatchLength += 1 + TLV.getNbBytes( bytesLength ) + bytesLength;\n }\n\n if ( dnAttributes )\n {\n extensibleMatchLength += 1 + 1 + 1;\n }\n\n return 1 + TLV.getNbBytes( extensibleMatchLength ) + extensibleMatchLength;\n }", "public int length()\r\n/* 26: */ {\r\n/* 27: 39 */ return this.pos;\r\n/* 28: */ }", "@java.lang.Override\n public int getGrammarMatchCount() {\n return grammarMatch_.size();\n }", "public int getWidth(CharSequence text) {\r\n\t\tint width = 0, lineWidth = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tchar character = text.charAt(i);\r\n\t\t\t\r\n\t\t\tif (character == '\\n') { // New line\r\n\t\t\t\twidth = Math.max(width, lineWidth);\r\n\t\t\t\tlineWidth = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Ignore carriage returns\r\n\t\t\tif (character == '\\r') continue;\r\n\t\t\t\r\n\t\t\tGlyph glyph = glyphs.get(character);\r\n\t\t\tif (glyph == null) continue;\r\n\t\t\t\r\n\t\t\tlineWidth += glyph.getWidth();\r\n\t\t}\r\n\t\t\r\n\t\twidth = Math.max(width, lineWidth);\r\n\t\treturn width;\r\n\t}", "int getNumberOfLines();", "int getLineLength(int line) throws BadLocationException;", "public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }", "public int getCount() {\n return m_stringOffsets != null ?\n m_stringOffsets.length :\n 0;\n }", "public int length() {\n\treturn tokens.length;\n}", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();" ]
[ "0.6528484", "0.6524071", "0.636394", "0.6363093", "0.61599505", "0.6144468", "0.60899585", "0.6083994", "0.607981", "0.6014312", "0.6012768", "0.60009634", "0.59647894", "0.5935444", "0.5883292", "0.5819961", "0.5805488", "0.57757026", "0.5772788", "0.5771723", "0.57381433", "0.5736751", "0.57170707", "0.5708871", "0.5691757", "0.5684845", "0.5684845", "0.5684845", "0.5684845", "0.5684845", "0.56836575", "0.56816185", "0.56722504", "0.5664663", "0.5642051", "0.56175935", "0.5615893", "0.56133527", "0.5610425", "0.5610425", "0.5610425", "0.5610425", "0.5610425", "0.5598322", "0.5596918", "0.5592805", "0.55829555", "0.55432", "0.5530951", "0.5523193", "0.55159557", "0.55140084", "0.5510568", "0.5509233", "0.5494084", "0.5489734", "0.5485191", "0.5483054", "0.54786164", "0.54784447", "0.54784447", "0.54784447", "0.54784447", "0.54784447" ]
0.5758411
54
Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a matchall fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). Usual syntax/scanner level error handling should be done in error fallback rules.
private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void yy_ScanError(int errorCode) {\n String message;\n try {\n message = YY_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }", "private void yy_ScanError(int errorCode) {\n String message;\n try {\n message = YY_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }", "private void parseError() {\r\n System.out.print(\"Parse Error on:\");\r\n tokens.get(position).print();\r\n }", "public void syntax_error(Symbol current_token){}", "@Override\n public final void syntaxError(Recognizer<?, ?> recognizer,\n Object offendingSymbol, int line, int charPositionInLine,\n String msg, RecognitionException e) {\n ResolveToken offendingToken = (ResolveToken) offendingSymbol;\n String input;\n if (recognizer == null) {\n input = offendingToken.getTokenSource().getInputStream().toString();\n }\n else {\n CommonTokenStream src =\n (CommonTokenStream) recognizer.getInputStream();\n input = src.getTokenSource().getInputStream().toString();\n }\n String[] lines = input.split(\"\\n\");\n String errorLine = lines[line - 1].replaceAll(\"\\t\", \" \");\n\n // Obtain the location from the token if it is not null\n Location location = null;\n if (offendingToken != null) {\n location = offendingToken.getLocation();\n }\n\n String errorMsg = buildErrorMsg(charPositionInLine, errorLine, msg);\n myStatusHandler.error(location, errorMsg);\n }", "public static void scannerError(String fmt, Object... varArgs) throws Exception\r\n\t{\r\n\t\tString diagnosticTxt = String.format(fmt, varArgs);\r\n\t\tthrow new ScannerException((Scanner.iSourceLineNr + 1), diagnosticTxt);\r\n\t}", "private void error(@Nonnull Token pptok, boolean is_error)\r\n throws IOException,\r\n LexerException {\r\n StringBuilder buf = new StringBuilder();\r\n buf.append('#').append(pptok.getText()).append(' ');\r\n /* Peculiar construction to ditch first whitespace. */\r\n Token tok = source_token_nonwhite();\r\n ERROR:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case NL:\r\n case EOF:\r\n break ERROR;\r\n default:\r\n buf.append(tok.getText());\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n if (is_error)\r\n error(pptok, buf.toString());\r\n else\r\n warning(pptok, buf.toString());\r\n }", "@Override\n protected void reportUnwantedToken(Parser recognizer) {\n super.reportUnwantedToken(recognizer);\n System.exit(SYNTAX_ERROR_CODE);\n }", "@Override\n protected void visit(final SpreadsheetErrorParserToken token) {\n this.add(\n Expression.value(\n token.value()\n .kind()\n .toError()\n ),\n token\n );\n }", "int yyparse()\n {\n boolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\");\n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\n case 1:\n//#line 25 \"GramaticaGrupo8.y\"\n {}\n break;\n case 2:\n//#line 26 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 3:\n//#line 27 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 4:\n//#line 27 \"GramaticaGrupo8.y\"\n {}\n break;\n case 5:\n//#line 30 \"GramaticaGrupo8.y\"\n {}\n break;\n case 6:\n//#line 31 \"GramaticaGrupo8.y\"\n {}\n break;\n case 7:\n//#line 34 \"GramaticaGrupo8.y\"\n {}\n break;\n case 8:\n//#line 35 \"GramaticaGrupo8.y\"\n {}\n break;\n case 9:\n//#line 38 \"GramaticaGrupo8.y\"\n {\n Vector<ParserVal> vectorTokens = (Vector<ParserVal>)(val_peek(1).obj);\n String tipo = (val_peek(2).sval);/* para que esto ande tocar la regla del no terminal tipo*/\n tipo = tipo.toLowerCase();\n for(int i=0; i< vectorTokens.size();i++){\n ParserVal token = vectorTokens.elementAt(i);\n Symbol simbolo =(Symbol) token.obj;\n if (!simbolo.isUsada()){\n simbolo.setUsada(true);\n simbolo.setEsMutable(true);\n simbolo.setTipoVar(val_peek(2).sval);}\n else\n yyerror(\"Se esta intentado redeclarar la variable \"+simbolo.getLexema(),token.getFila(),token.getColumna());\n }\n\n }\n break;\n case 10:\n//#line 54 \"GramaticaGrupo8.y\"\n {yyerror(\"Declaracion mal definida \");}\n break;\n case 11:\n//#line 57 \"GramaticaGrupo8.y\"\n {/* id.add( ((Symbol)($1.obj)).getLexema() );*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$1 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol?*/\n yyval.obj = vect; }\n break;\n case 12:\n//#line 61 \"GramaticaGrupo8.y\"\n {\t((Symbol)(val_peek(0).obj)).setEspuntero(true); /*reconoce puntero*/\n /*id.add(((Symbol)($2.obj)).getLexema());//} //agrega a lista de identificadores reconocidos*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$2 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 13:\n//#line 68 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($1.obj)).getLexema());*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$3 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 14:\n//#line 73 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($2.obj)).getLexema());*/\n ((Symbol)(val_peek(2).obj)).setEspuntero(true); /*reconoce puntero*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$4 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 15:\n//#line 79 \"GramaticaGrupo8.y\"\n {yyerror(\"Se esperaba ';' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 16:\n//#line 82 \"GramaticaGrupo8.y\"\n {yyval.sval=\"integer\";}\n break;\n case 17:\n//#line 83 \"GramaticaGrupo8.y\"\n {yyval.sval=\"single\";}\n break;\n case 18:\n//#line 84 \"GramaticaGrupo8.y\"\n {yyerror(\"Tipo indefinido\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 19:\n//#line 87 \"GramaticaGrupo8.y\"\n {}\n break;\n case 20:\n//#line 88 \"GramaticaGrupo8.y\"\n {}\n break;\n case 21:\n//#line 91 \"GramaticaGrupo8.y\"\n {}\n break;\n case 22:\n//#line 92 \"GramaticaGrupo8.y\"\n {/*#######Solo llego aca si termino un if o un loop*/\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BI\")\n {\n listaTercetos.get(i).setOperando1(contadorTerceto);\n\n }\n if (listaTercetos.get(i).getOperador() == \"BF\")\n {\tlistaTercetos.get(i).setOperando2(contadorTerceto);\n }\n if (intLoop == 0){\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n }\n else\n { ((T_BF)listaTercetos.get(i)).invertFlags();\n listaTercetos.get(i).setOperando2(intLoop);\n intLoop=0;\n }\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n }\n break;\n case 23:\n//#line 104 \"GramaticaGrupo8.y\"\n {}\n break;\n case 24:\n//#line 107 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"+\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 25:\n//#line 121 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"-\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 26:\n//#line 135 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n yyval.obj=val_peek(0).obj; /*creo que es necesario para que no se pierdan los lexemas, si quieren reveanlo*/\n }\n break;\n case 27:\n//#line 141 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"/\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 28:\n//#line 155 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"*\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 29:\n//#line 168 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n /* terceto*/\n yyval.obj=val_peek(0).obj;\n }\n break;\n case 30:\n//#line 175 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 31:\n//#line 176 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 32:\n//#line 177 \"GramaticaGrupo8.y\"\n {if(!((Symbol)(val_peek(0).obj)).isUsada()){\n /*error*/\n yyerror(\"variable no declarada\",val_peek(0).getFila(),val_peek(0).getColumna());\n }\n yyval=val_peek(0);\n }\n break;\n case 33:\n//#line 183 \"GramaticaGrupo8.y\"\n { /** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /*Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 34:\n//#line 188 \"GramaticaGrupo8.y\"\n {\t\t\t/** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /* Antes qedaban atributos sin setear*/\n /* Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 35:\n//#line 196 \"GramaticaGrupo8.y\"\n {\t\t/*necesito el tipo de la expresion*/\n if (!((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable no esta definida \",val_peek(2).getFila(),val_peek(2).getColumna());\n }else{if (!((Symbol)(val_peek(2).obj)).getEsMutable()){\n yyerror(\"La variable no es mutable \",val_peek(2).getFila(),val_peek(2).getColumna());\n }}\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);//casi seguro que si hay que crearla aca*\n contadorVarAux++;//*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(2).getFila()+\" columna \"+val_peek(2).getColumna());}\n break;\n case 36:\n//#line 215 \"GramaticaGrupo8.y\"\n { /* Estoy definiendo una variable*/\n if (((Symbol)(val_peek(3).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(3).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(true);\n s.setTipoVar(val_peek(5).sval);\n /* faltaria mutabilidad de lo apuntado*/\n }\n if (!((Symbol)(val_peek(0).obj)).isUsada()){\n yyerror(\"La variable no esta definida, &ID \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(0).obj));\n Symbol sy = ((Symbol)(val_peek(3).obj));\n if (s.isEsPuntero())\n yyerror(\"No se permiten punteros multiples \",val_peek(6).getFila(),val_peek(6).getColumna());\n }\n Terceto t = new T_Asignacion(contadorTerceto,\"&\",val_peek(3).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(6).getFila(),val_peek(6).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(6);\n yyval.obj = t;\n estructuras.add(\"Asignacion de puntero \"+\" fila \"+val_peek(6).getFila()+\" columna \"+val_peek(6).getColumna());}\n break;\n case 37:\n//#line 246 \"GramaticaGrupo8.y\"\n {/*Estoy definiendo una variable*/\n if (((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(4).getFila(),val_peek(4).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(2).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(false);\n s.setTipoVar(val_peek(3).sval);\n /* faltaria mutabilidad de lo apuntado }*/\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(4).getFila(),val_peek(4).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(4);\n yyval.obj = t;\n }\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(4).getFila()+\" columna \"+val_peek(4).getColumna());}\n break;\n case 38:\n//#line 269 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion y palabra reservada 'let'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 39:\n//#line 270 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 40:\n//#line 271 \"GramaticaGrupo8.y\"\n {yyerror(\"no se encontro ':=' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 41:\n//#line 274 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Expresion print \"+\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());\n Terceto t = new T_Print(contadorTerceto,\"PRINT\",val_peek(1).obj,\"\",st);\n // t.setVariableAux(contadorVarAux); //un print no tiene resultado por ende no tiene tipo*/\n //contadorVarAux++; // creo que para los print no es necesario porque los aux son para el resultado*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(3).getFila(),val_peek(3).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(3);\n yyval.obj = t;\n }\n break;\n case 42:\n//#line 287 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Error en la construccion del print\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 43:\n//#line 290 \"GramaticaGrupo8.y\"\n {}\n break;\n case 44:\n//#line 291 \"GramaticaGrupo8.y\"\n {}\n break;\n case 45:\n//#line 295 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF Else\" +\" fila \"+val_peek(5).getFila()+\" columna \"+val_peek(5).getColumna());\n\n /*Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);*/\n }\n break;\n case 46:\n//#line 296 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 47:\n//#line 297 \"GramaticaGrupo8.y\"\n {yyerror(\" falta la palabra reservada IF\",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 48:\n//#line 298 \"GramaticaGrupo8.y\"\n {yyerror(\" Error en la construccion de la sentencia IF \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 49:\n//#line 299 \"GramaticaGrupo8.y\"\n {yyerror(\" Falta la palabra reservada ELSE \",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 50:\n//#line 302 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia Loop \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 51:\n//#line 303 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Falta palabra reservada UNTIL\",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 52:\n//#line 306 \"GramaticaGrupo8.y\"\n {}\n break;\n case 53:\n//#line 307 \"GramaticaGrupo8.y\"\n {}\n break;\n case 54:\n//#line 308 \"GramaticaGrupo8.y\"\n {yyerror(\"LInea Omision de la palabra reservada '{' \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 55:\n//#line 311 \"GramaticaGrupo8.y\"\n {/*#### unica forma de marcar donde comienza el loop y ver donde salto (no diferenciamos bloque de loop)*/\n p.push(contadorTerceto);\n intLoop = contadorTerceto;\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n\n listaTercetos.add(t);\n contadorTerceto ++;\n }\n break;\n case 56:\n//#line 316 \"GramaticaGrupo8.y\"\n {/*#### aca hacemos el salto incondicional, debimos inventar este no terminal porque no diferenciamos bloque else de bloque if*/\n /*aca ya hicimos el pop cuando termino el cuerpo del if*/\n Terceto t = new T_BI(contadorTerceto,\"BI\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BF\")\n listaTercetos.get(i).setOperando2(contadorTerceto);\n else\n listaTercetos.get(i).setOperando1(contadorTerceto);\n p.push(contadorTerceto-1);\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n System.out.println(t.toString());\n yyval=val_peek(0);\n yyval.obj = t;\n }\n break;\n case 57:\n//#line 334 \"GramaticaGrupo8.y\"\n { /*#### aca hacemos lo del salto para no repetirlo en todas las condiciones*/\n p.push(contadorTerceto);\n Terceto t = new T_BF(contadorTerceto,\"BF\",val_peek(1).obj,\"trampita\",st);/*##use trampita por las dudas, ya por deporte, no parece que sea necesario*/\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 58:\n//#line 345 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 59:\n//#line 358 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 60:\n//#line 370 \"GramaticaGrupo8.y\"\n { Terceto t = new T_Comparador(contadorTerceto,\"=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 61:\n//#line 381 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"!=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 62:\n//#line 393 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 63:\n//#line 405 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 64:\n//#line 417 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 65:\n//#line 418 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 66:\n//#line 419 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 67:\n//#line 420 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n//#line 1102 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"pZhZ$;yY23j:\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 121, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo((-1));\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : -1. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "private static void fail(String filename, String errMsg, Module_itemContext itemCon)\n\t\t\tthrows UnsupportedGrammerException {\n\n\t\tInterval int1 = itemCon.getSourceInterval(); // get token interval\n\n\t\tToken firstToken = tokenStream.get(int1.a);\n\n\t\tint lineNum = firstToken.getLine(); // get line of first token\n\n\t\t// Determining j, first token in int1 which occurs at a different line\n\n\t\tint j;\n\n\t\tfor (j = int1.a; j < int1.b; j++) {\n\n\t\t\tif (tokenStream.get(j).getLine() != lineNum)\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// form a string from tokens 1 through j-1\n\n\t\tString tokenStr = tokenStream.getText(new Interval(int1.a, j));\n\n\t\tSystem.err.printf(\"Parser error (%s:%d): %s\\n\", filename, lineNum, tokenStr);\n\n\t\tfail(errMsg);\n\n\t}", "private void zzScanError(int errorCode) {\n\t\tString message;\n\t\ttry {\n\t\t\tmessage = ZZ_ERROR_MSG[errorCode];\n\t\t}\n\t\tcatch (ArrayIndexOutOfBoundsException e) {\n\t\t\tmessage = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n\t\t}\n\n\t\tthrow new Error(message);\n\t}", "protected static void reportParseError(int expectedToken, int otherExpectedToken, int anotherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 533 */ if (LogSupport.isLoggable()) {\n/* 534 */ LogSupport.log(\"PARSE ERROR: Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \", a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \", or a \" + MailcapTokenizer.nameForToken(anotherExpectedToken) + \" token.\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 540 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \", a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \", or a \" + MailcapTokenizer.nameForToken(anotherExpectedToken) + \" token.\");\n/* */ }", "int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 63 \"./sinj.y\"\n{ this.ast = new Program (lexico.getLine(), lexico.getColumn(), (List<Sentence>)val_peek(1), (List<Definition>)val_peek(8),(List<VariableDefinition>)val_peek(2) ); }\nbreak;\ncase 2:\n//#line 66 \"./sinj.y\"\n{ yyval = new ArrayList<Definition>(); }\nbreak;\ncase 3:\n//#line 67 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1);\n\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Definition> )yyval).addAll((ArrayList<Definition>)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 6:\n//#line 78 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\tTypeFunction type = new TypeFunction ((Type)val_peek(8), (ArrayList<VariableDefinition>) val_peek(5));\n\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> body = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\tbody.addAll((List<Sentence>)val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\tbody.addAll((List<Sentence>)val_peek(1));\n\t\t\t\t\t\t\t\t\t\t\t\tDefinition def = new FunctionDefinition (lexico.getLine(), lexico.getColumn(), type, (String) val_peek(7), body);\n\t\t\t\t\t\t\t\t\t\t\t\tList<Definition> xx = new ArrayList<Definition> ();\n\t\t\t\t\t\t\t\t\t\t\t\txx.add(def);\n\t\t\t\t\t\t\t\t\t\t\t\tyyval = xx;\n }\nbreak;\ncase 7:\n//#line 89 \"./sinj.y\"\n{ yyval = new ArrayList<VariableDefinition> (); }\nbreak;\ncase 9:\n//#line 93 \"./sinj.y\"\n{ \n\t\t\t\t\t\tyyval = new ArrayList<VariableDefinition>();\n\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString());\n\t\t\t\t\t\t((ArrayList<Definition>)yyval).add(new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(1)));\n\t\t\t\t\t}\nbreak;\ncase 10:\n//#line 98 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\tyyval = val_peek(3);\n\t\t\t\t\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString());\n\t\t\t\t\t\t\t\t\t\tVariableDefinition vd = new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(1));\n\t\t\t\t\t\t\t\t\t\tif (!((ArrayList<VariableDefinition>)yyval).contains (vd))\n\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Definition>) yyval).add(vd);\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException (\"One param is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 11:\n//#line 111 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<VariableDefinition> xx = new ArrayList<VariableDefinition>();\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (Variable v: (ArrayList<Variable>)val_peek(1)) \n\t\t\t\t\t\t\t\t\t\t\t\t\t \txx.add(new VariableDefinition(lexico.getLine(), lexico.getColumn(), v, (Type)val_peek(2))); \n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = xx; \n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 12:\n//#line 123 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\tList<Variable> xx = new ArrayList<Variable>(); \n\t\t\t\t\t\t\t\txx.add(new Variable (lexico.getLine(), lexico.getColumn(), (String) val_peek(0))); \n\t\t\t\t\t\t\t\tyyval = xx; \n\t\t\t\t\t\t\t\t}\nbreak;\ncase 13:\n//#line 128 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(2); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVariable v = new Variable (lexico.getLine(), lexico.getColumn(), (String)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!((ArrayList<Variable>)yyval).contains(v))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Variable>)yyval).add(v); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException (\"One variable is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 14:\n//#line 144 \"./sinj.y\"\n{ yyval = new ArrayList<VariableDefinition> ();}\nbreak;\ncase 15:\n//#line 145 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (VariableDefinition vd: (ArrayList<VariableDefinition>)val_peek(0)) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!((ArrayList<VariableDefinition>)yyval).contains(vd))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<VariableDefinition>)yyval).add(vd); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow new RuntimeException(\"One field struct is duplicate\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 16:\n//#line 156 \"./sinj.y\"\n{yyval = new ArrayList<Sentence> (); }\nbreak;\ncase 17:\n//#line 157 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\t\t\t\tyyval = val_peek(1);\n\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Sentence>)yyval).add((Sentence)val_peek(0)); \n\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 18:\n//#line 163 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\tyyval = new ArrayList<Expression>();\n\t\t\t\t\t\t\t((ArrayList<Expression>)yyval).add((Expression)val_peek(0)); \n\t\t\t\t\t\t\t}\nbreak;\ncase 19:\n//#line 167 \"./sinj.y\"\n{\n\t\t\t\t\t \t\t\t\t\t\t\tyyval = val_peek(2);\n\t\t\t\t\t\t\t\t\t\t\t\t((ArrayList<Expression>)yyval).add((Expression)val_peek(0)); \n\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 20:\n//#line 174 \"./sinj.y\"\n{ yyval = new ArrayList<Expression> (); }\nbreak;\ncase 29:\n//#line 187 \"./sinj.y\"\n{yyval = new Write(lexico.getLine(), lexico.getColumn(), (List<Expression>)val_peek(1)); }\nbreak;\ncase 30:\n//#line 188 \"./sinj.y\"\n{ yyval = new Read(lexico.getLine(), lexico.getColumn(), (List<Expression>)val_peek(1)); }\nbreak;\ncase 31:\n//#line 189 \"./sinj.y\"\n{ yyval = new Assign(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(3), (Expression)val_peek(1)); }\nbreak;\ncase 32:\n//#line 190 \"./sinj.y\"\n{ yyval = new Invocation (lexico.getLine(), lexico.getColumn(), (String) val_peek(4), (List<Expression>)val_peek(2)); }\nbreak;\ncase 33:\n//#line 191 \"./sinj.y\"\n{ yyval = new Return (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(1)); }\nbreak;\ncase 34:\n//#line 192 \"./sinj.y\"\n{ yyval = new While (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(4), (List<Sentence>) val_peek(1)); }\nbreak;\ncase 35:\n//#line 195 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\tifBody.add((Sentence) val_peek(0));\n\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), ifBody, new ArrayList<Sentence>());\n\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 36:\n//#line 200 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.add((Sentence) val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.add((Sentence)val_peek(0));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(4), ifBody, elseBody);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\nbreak;\ncase 37:\n//#line 207 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(4));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.add((Sentence)val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(6), ifBody, elseBody);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 38:\n//#line 215 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(6));\n\t\t\t\t\t\t\t\t\t\t\t\t\telseBody.addAll((List<Sentence>)val_peek(4));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(8), ifBody, elseBody);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\nbreak;\ncase 39:\n//#line 223 \"./sinj.y\"\n{\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> ifBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tList<Sentence> elseBody = new ArrayList<Sentence> ();\n\t\t\t\t\t\t\t\t\t\t\t\t\tifBody.addAll((List<Sentence>) val_peek(2));\n\t\t\t\t\t\t\t\t\t\t\t\t\tyyval = new If(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(4), ifBody, elseBody);\n\t}\nbreak;\ncase 40:\n//#line 234 \"./sinj.y\"\n{ yyval = new TypeInteger(); }\nbreak;\ncase 41:\n//#line 235 \"./sinj.y\"\n{ yyval = new TypeDouble(); }\nbreak;\ncase 42:\n//#line 236 \"./sinj.y\"\n{ yyval = new TypeChar(); }\nbreak;\ncase 43:\n//#line 237 \"./sinj.y\"\n{ yyval = createArray((Type)val_peek(3), Integer.parseInt(String.valueOf((val_peek(1)))));/*$$ = new TypeArray((Type)$1, Integer.parseInt(String.valueOf(($3))));*/ }\nbreak;\ncase 44:\n//#line 238 \"./sinj.y\"\n{ yyval = new TypeVoid (); }\nbreak;\ncase 45:\n//#line 239 \"./sinj.y\"\n{ \n\t\t\t\t\t\t\tList <VariableDefinition> variables = (ArrayList<VariableDefinition>) val_peek(1);\n\t\t\t\t\t\t\tList <FieldDefinition> fieldsStruct = new ArrayList<FieldDefinition> ();\n\t\t\t\t\t\t\tfor (VariableDefinition vd : variables) {\n\t\t\t\t\t\t\t\tFieldDefinition field = new FieldDefinition (vd.getLine(), vd.getColumn(), vd.getType(), vd.getVariable());\n\t\t\t\t\t\t\t\tfieldsStruct.add(field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tyyval = new TypeStruct (fieldsStruct);\n\t\t\t\t\t\t\t}\nbreak;\ncase 46:\n//#line 253 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 47:\n//#line 254 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 48:\n//#line 255 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 49:\n//#line 256 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 50:\n//#line 257 \"./sinj.y\"\n{ yyval= new Arithmetic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 51:\n//#line 258 \"./sinj.y\"\n{ yyval= new AccesoArray(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(3), (Expression)val_peek(1)); }\nbreak;\ncase 52:\n//#line 259 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 53:\n//#line 260 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 54:\n//#line 261 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 55:\n//#line 262 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 56:\n//#line 263 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 57:\n//#line 264 \"./sinj.y\"\n{ yyval = new Comparation(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 58:\n//#line 265 \"./sinj.y\"\n{ yyval = new Logic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 59:\n//#line 266 \"./sinj.y\"\n{ yyval = new Logic(lexico.getLine(), lexico.getColumn(), (Expression)val_peek(2), (String)val_peek(1) , (Expression)val_peek(0)); }\nbreak;\ncase 60:\n//#line 267 \"./sinj.y\"\n{ yyval= new UnaryNegation (lexico.getLine(), lexico.getColumn(), (Expression)val_peek(0)); }\nbreak;\ncase 61:\n//#line 268 \"./sinj.y\"\n{ yyval= new Literal (lexico.getLine(), lexico.getColumn(), (Integer) val_peek(0)); }\nbreak;\ncase 62:\n//#line 269 \"./sinj.y\"\n{ yyval = new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()); }\nbreak;\ncase 63:\n//#line 270 \"./sinj.y\"\n{ yyval= new RealNumber (lexico.getLine(), lexico.getColumn(), (Double) val_peek(0)); }\nbreak;\ncase 64:\n//#line 271 \"./sinj.y\"\n{ yyval= val_peek(1);}\nbreak;\ncase 65:\n//#line 272 \"./sinj.y\"\n{ yyval = new FieldAccess (lexico.getLine(), lexico.getColumn(), (Expression) val_peek(2), new Variable (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()));}\nbreak;\ncase 66:\n//#line 273 \"./sinj.y\"\n{ yyval = new FunctionInvocation (lexico.getLine(), lexico.getColumn(), (String) val_peek(3), (List<Expression>)val_peek(1)); }\nbreak;\ncase 67:\n//#line 274 \"./sinj.y\"\n{ yyval = new Cast (lexico.getLine(), lexico.getColumn(), (Type) val_peek(2), (Expression) val_peek(0)); }\nbreak;\ncase 68:\n//#line 275 \"./sinj.y\"\n{ yyval = new LogicalNegation (lexico.getLine(), lexico.getColumn(), (Expression)val_peek(0)); }\nbreak;\ncase 69:\n//#line 276 \"./sinj.y\"\n{ yyval = new Char (lexico.getLine(), lexico.getColumn(), val_peek(0).toString()); }\nbreak;\n//#line 1070 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}", "int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 36 \"src/parsers/AdvConditionParser.y\"\n{\r\n\ttopAdvCondition=(AdvCondition)val_peek(0).obj;\r\n\tSystem.out.println(\"AdvConditionParser work completed. \"); \r\n}\nbreak;\ncase 2:\n//#line 42 \"src/parsers/AdvConditionParser.y\"\n{Expression e=new tokens.Number(val_peek(0).ival);yyval=new AdvConditionParserVal(e);}\nbreak;\ncase 3:\n//#line 43 \"src/parsers/AdvConditionParser.y\"\n{Expression e=new Variable(getStringValue(val_peek(0)));yyval=new AdvConditionParserVal(e);}\nbreak;\ncase 4:\n//#line 45 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_PLUS);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 5:\n//#line 50 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_MINUS);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 6:\n//#line 55 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new CompositeExpression((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,CompositeExpression.TYPE_MULTIPLY);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 7:\n//#line 61 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tExpression e=new NegativeExpression((Expression)val_peek(0).obj);\r\n \tyyval=new AdvConditionParserVal(e);\r\n }\nbreak;\ncase 8:\n//#line 67 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tyyval=val_peek(1);\r\n }\nbreak;\ncase 9:\n//#line 72 \"src/parsers/AdvConditionParser.y\"\n{yyval=new AdvConditionParserVal(new AdvCondition((Condition)val_peek(0).obj));}\nbreak;\ncase 10:\n//#line 74 \"src/parsers/AdvConditionParser.y\"\n{\r\n yyval=new AdvConditionParserVal(new AdvCondition((AdvCondition)val_peek(3).obj,(AdvCondition)val_peek(0).obj,AdvCondition.Type_AND)); \r\n}\nbreak;\ncase 11:\n//#line 79 \"src/parsers/AdvConditionParser.y\"\n{\r\n yyval=new AdvConditionParserVal(new AdvCondition((AdvCondition)val_peek(3).obj,(AdvCondition)val_peek(0).obj,AdvCondition.Type_OR));\r\n}\nbreak;\ncase 12:\n//#line 84 \"src/parsers/AdvConditionParser.y\"\n{yyval=val_peek(1);}\nbreak;\ncase 13:\n//#line 88 \"src/parsers/AdvConditionParser.y\"\n{yyval=val_peek(0);((AdvCondition)yyval.obj).negateSelf();}\nbreak;\ncase 14:\n//#line 91 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equal);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 15:\n//#line 96 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.notequal);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 16:\n//#line 101 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equalsmaller);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 17:\n//#line 106 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(3).obj,(Expression)val_peek(0).obj,ConType.equallarger);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 18:\n//#line 111 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,ConType.smaller);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\ncase 19:\n//#line 116 \"src/parsers/AdvConditionParser.y\"\n{\r\n \tCondition c=new Condition((Expression)val_peek(2).obj,(Expression)val_peek(0).obj,ConType.larger);\r\n \tyyval=new AdvConditionParserVal(c);\r\n }\nbreak;\n//#line 689 \"AdvConditionParser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}", "int yyparse()\n{\nboolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n //if (yydebug) debug(\"loop\"); \n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n //if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n //if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n //if (yychar < 0) //it it didn't work/error\n // {\n // yychar = 0; //change it to default string (no -1!)\n //if (yydebug)\n // yylexdebug(yystate,yychar);\n // }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n //if (yydebug)\n //debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n //if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0 || valptr<0) //check for under & overflow here\n {\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n //if (yydebug)\n //debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n //if (yydebug)\n //debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0 || valptr<0) //check for under & overflow here\n {\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n //if (yydebug)\n //{\n //yys = null;\n //if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n //if (yys == null) yys = \"illegal-symbol\";\n //debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n //}\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n //if (yydebug)\n //debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n if (reduceListener == null || reduceListener.onReduce(yyrule[yyn])) // if intercepted!\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\ncase 1:\n//#line 61 \"Parser.y\"\n{\n\t\t\t\t\t\ttree = new Tree.TopLevel(val_peek(0).clist, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 2:\n//#line 67 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.clist.add(val_peek(0).cdef);\n\t\t\t\t\t}\nbreak;\ncase 3:\n//#line 71 \"Parser.y\"\n{\n \t\tyyval.clist = new ArrayList<Tree.ClassDef>();\n \t\tyyval.clist.add(val_peek(0).cdef);\n \t}\nbreak;\ncase 5:\n//#line 81 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.vdef = new Tree.VarDef(val_peek(0).ident, val_peek(1).type, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 6:\n//#line 87 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.type = new Tree.TypeIdent(Tree.INT, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 7:\n//#line 91 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.VOID, val_peek(0).loc);\n \t}\nbreak;\ncase 8:\n//#line 95 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.BOOL, val_peek(0).loc);\n \t}\nbreak;\ncase 9:\n//#line 99 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeIdent(Tree.STRING, val_peek(0).loc);\n \t}\nbreak;\ncase 10:\n//#line 103 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeClass(val_peek(0).ident, val_peek(1).loc);\n \t}\nbreak;\ncase 11:\n//#line 107 \"Parser.y\"\n{\n \t\tyyval.type = new Tree.TypeArray(val_peek(2).type, val_peek(2).loc);\n \t}\nbreak;\ncase 12:\n//#line 113 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc,false);\n\t\t\t\t\t}\nbreak;\ncase 13:\n//#line 117 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc,true);\n\t\t\t\t\t}\nbreak;\ncase 14:\n//#line 123 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.ident = val_peek(0).ident;\n\t\t\t\t\t}\nbreak;\ncase 15:\n//#line 127 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 16:\n//#line 133 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).vdef);\n\t\t\t\t\t}\nbreak;\ncase 17:\n//#line 137 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).fdef);\n\t\t\t\t\t}\nbreak;\ncase 18:\n//#line 141 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.flist = new ArrayList<Tree>();\n \t}\nbreak;\ncase 20:\n//#line 149 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>(); \n \t}\nbreak;\ncase 21:\n//#line 156 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\n\t\t\t\t\t}\nbreak;\ncase 22:\n//#line 160 \"Parser.y\"\n{\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>();\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\n \t}\nbreak;\ncase 23:\n//#line 167 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.fdef = new MethodDef(true, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 24:\n//#line 171 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.fdef = new MethodDef(false, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 25:\n//#line 177 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Block(val_peek(1).slist, val_peek(2).loc);\n\t\t\t\t\t}\nbreak;\ncase 26:\n//#line 183 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\n\t\t\t\t\t}\nbreak;\ncase 27:\n//#line 187 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.slist = new ArrayList<Tree>();\n \t}\nbreak;\ncase 28:\n//#line 194 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = val_peek(0).vdef;\n\t\t\t\t\t}\nbreak;\ncase 29:\n//#line 199 \"Parser.y\"\n{\n \t\tif (yyval.stmt == null) {\n \t\t\tyyval.stmt = new Tree.Skip(val_peek(0).loc);\n \t\t}\n \t}\nbreak;\ncase 40:\n//#line 217 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Foreach(val_peek(6).bvar,val_peek(4).expr,val_peek(2).expr,val_peek(0).stmt, val_peek(6).loc);\n\t\t\t\t\t}\nbreak;\ncase 41:\n//#line 221 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Foreach(val_peek(4).bvar,val_peek(2).expr,val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 42:\n//#line 227 \"Parser.y\"\n{\n\t\t\t\t\tyyval.bvar = new Tree.BoundVariable(val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 43:\n//#line 231 \"Parser.y\"\n{\n\t\t\t\t\tyyval.bvar = new Tree.BoundVariable(val_peek(1).type,val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 44:\n//#line 236 \"Parser.y\"\n{\n\t\t\t\t\tyyval.stmt = new Tree.GuardedStmt(val_peek(1).elist, val_peek(1).loc);\n\t\t\t\t}\nbreak;\ncase 45:\n//#line 241 \"Parser.y\"\n{\n\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 46:\n//#line 246 \"Parser.y\"\n{\n yyval = new SemValue();\n yyval.elist = new ArrayList<Expr> ();\n yyval.elist.add(val_peek(0).expr);\n }\nbreak;\ncase 47:\n//#line 252 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 48:\n//#line 258 \"Parser.y\"\n{\n\t\t\t\t\tyyval.expr = new Tree.IfBranch(val_peek(2).expr, val_peek(0).stmt, val_peek(2).loc);\t\t\t\t\n\t\t\t\t}\nbreak;\ncase 49:\n//#line 263 \"Parser.y\"\n{\n\t\t\t\t\tyyval.stmt = new Scopy(val_peek(3).ident,val_peek(1).expr,val_peek(5).loc);\t\n\t\t\t\t}\nbreak;\ncase 50:\n//#line 269 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Assign(val_peek(2).lvalue, val_peek(0).expr, val_peek(1).loc);\n\t\t\t\t\t}\nbreak;\ncase 51:\n//#line 273 \"Parser.y\"\n{\n \t\tyyval.stmt = new Tree.Exec(val_peek(0).expr, val_peek(0).loc);\n \t}\nbreak;\ncase 52:\n//#line 277 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 54:\n//#line 284 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t}\nbreak;\ncase 55:\n//#line 290 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.lvalue = new Tree.Ident(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\nbreak;\ncase 56:\n//#line 297 \"Parser.y\"\n{\n \t\tyyval.lvalue = new Tree.Indexed(val_peek(3).expr, val_peek(1).expr, val_peek(3).loc);\n \t}\nbreak;\ncase 58:\n//#line 304 \"Parser.y\"\n{\n \tyyval.lvalue = new Tree.Var(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\n\t\t\t\t\t\t}\n }\nbreak;\ncase 59:\n//#line 313 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Tree.CallExpr(val_peek(4).expr, val_peek(3).ident, val_peek(1).elist, val_peek(3).loc);\n\t\t\t\t\t\tif (val_peek(4).loc == null) {\n\t\t\t\t\t\t\tyyval.loc = val_peek(3).loc;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\nbreak;\ncase 60:\n//#line 322 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = val_peek(0).lvalue;\n\t\t\t\t\t}\nbreak;\ncase 63:\n//#line 328 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.PLUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 64:\n//#line 332 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MINUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 65:\n//#line 336 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MUL, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 66:\n//#line 340 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.DIV, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 67:\n//#line 344 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.MOD, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 68:\n//#line 348 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.EQ, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 69:\n//#line 352 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.NE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 70:\n//#line 356 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.LT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 71:\n//#line 360 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.GT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 72:\n//#line 364 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.LE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 73:\n//#line 368 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.GE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 74:\n//#line 372 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.AND, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 75:\n//#line 376 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Binary(Tree.OR, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 76:\n//#line 380 \"Parser.y\"\n{\n \t\tyyval = val_peek(1);\n \t}\nbreak;\ncase 77:\n//#line 384 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Unary(Tree.NEG, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 78:\n//#line 388 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.Unary(Tree.NOT, val_peek(0).expr, val_peek(1).loc);\n \t}\nbreak;\ncase 79:\n//#line 392 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ReadIntExpr(val_peek(2).loc);\n \t}\nbreak;\ncase 80:\n//#line 396 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ReadLineExpr(val_peek(2).loc);\n \t}\nbreak;\ncase 81:\n//#line 400 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ThisExpr(val_peek(0).loc);\n \t}\nbreak;\ncase 82:\n//#line 404 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.NewClass(val_peek(2).ident, val_peek(3).loc);\n \t}\nbreak;\ncase 83:\n//#line 408 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.NewArray(val_peek(3).type, val_peek(1).expr, val_peek(4).loc);\n \t}\nbreak;\ncase 84:\n//#line 412 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.TypeTest(val_peek(3).expr, val_peek(1).ident, val_peek(5).loc);\n \t}\nbreak;\ncase 85:\n//#line 416 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.TypeCast(val_peek(2).ident, val_peek(0).expr, val_peek(0).loc);\n \t}\nbreak;\ncase 86:\n//#line 420 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayRepeat(val_peek(2).expr, val_peek(0).expr, val_peek(2).loc);\n \t}\nbreak;\ncase 87:\n//#line 424 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayAdd(val_peek(2).expr, val_peek(0).expr, val_peek(2).loc);\n\t }\nbreak;\ncase 88:\n//#line 428 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.subArray(val_peek(5).expr, val_peek(3).expr,val_peek(1).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 89:\n//#line 432 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayDefault(val_peek(5).expr, val_peek(3).expr,val_peek(0).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 90:\n//#line 436 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayPython(val_peek(5).expr, val_peek(3).ident,val_peek(1).expr,val_peek(5).loc);\n\t \t}\nbreak;\ncase 91:\n//#line 440 \"Parser.y\"\n{\n \t\tyyval.expr = new Tree.ArrayPython(val_peek(7).expr, val_peek(5).ident,val_peek(3).expr,val_peek(1).expr,val_peek(7).loc);\n\t \t}\nbreak;\ncase 92:\n//#line 446 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Tree.Literal(val_peek(0).typeTag, val_peek(0).literal, val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 93:\n//#line 450 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.expr = new Null(val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 94:\n//#line 454 \"Parser.y\"\n{\n\t\t\t\t\n\t\t\t\t\t\tyyval.expr = new Tree.ListConst(val_peek(1).elist, val_peek(1).loc);\n\t\t\t\t}\nbreak;\ncase 95:\n//#line 461 \"Parser.y\"\n{\n\t\t\t\t\tyyval = new SemValue();\n yyval.elist = new ArrayList<Expr> ();\n yyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 96:\n//#line 467 \"Parser.y\"\n{\n\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t}\nbreak;\ncase 97:\n//#line 471 \"Parser.y\"\n{\n\t\t\t\t\tyyval = new SemValue();\n\t\t\t\t}\nbreak;\ncase 99:\n//#line 479 \"Parser.y\"\n{\n \t\tyyval = new SemValue();\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\n \t}\nbreak;\ncase 100:\n//#line 486 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n\t\t\t\t\t}\nbreak;\ncase 101:\n//#line 490 \"Parser.y\"\n{\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\n \t}\nbreak;\ncase 102:\n//#line 497 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.WhileLoop(val_peek(2).expr, val_peek(0).stmt, val_peek(4).loc);\n\t\t\t\t\t}\nbreak;\ncase 103:\n//#line 503 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.ForLoop(val_peek(6).stmt, val_peek(4).expr, val_peek(2).stmt, val_peek(0).stmt, val_peek(8).loc);\n\t\t\t\t\t}\nbreak;\ncase 104:\n//#line 509 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Break(val_peek(0).loc);\n\t\t\t\t\t}\nbreak;\ncase 105:\n//#line 515 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.If(val_peek(3).expr, val_peek(1).stmt, val_peek(0).stmt, val_peek(5).loc);\n\t\t\t\t\t}\nbreak;\ncase 106:\n//#line 521 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = val_peek(0).stmt;\n\t\t\t\t\t}\nbreak;\ncase 107:\n//#line 525 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval = new SemValue();\n\t\t\t\t\t}\nbreak;\ncase 108:\n//#line 531 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Tree.Return(val_peek(0).expr, val_peek(1).loc);\n\t\t\t\t\t}\nbreak;\ncase 109:\n//#line 535 \"Parser.y\"\n{\n \t\tyyval.stmt = new Tree.Return(null, val_peek(0).loc);\n \t}\nbreak;\ncase 110:\n//#line 541 \"Parser.y\"\n{\n\t\t\t\t\t\tyyval.stmt = new Print(val_peek(1).elist, val_peek(3).loc);\n\t\t\t\t\t}\nbreak;\n//#line 1539 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n //if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n //if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n //if (yychar<0) yychar=0; //clean, if necessary\n //if (yydebug)\n //yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n //if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n}", "private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }", "private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }", "private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }", "private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }", "private void zzScanError(int errorCode) {\r\n String message;\r\n try {\r\n message = ZZ_ERROR_MSG[errorCode];\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\r\n }\r\n\r\n throw new Error(message);\r\n }", "protected void error(int line, int column, @Nonnull String msg)\r\n throws LexerException {\r\n if (listener != null)\r\n listener.handleError(source, line, column, msg);\r\n //else\r\n // throw new LexerException(\"Error at \" + line + \":\" + column + \": \" + msg);\r\n }", "void yylexdebug(int state,int ch)\r\n{\r\nString s=null;\r\n if (ch < 0) ch=0;\r\n if (ch <= YYMAXTOKEN) //check index bounds\r\n s = yyname[ch]; //now get it\r\n if (s==null)\r\n s = \"illegal-symbol\";\r\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\r\n}", "void cannotRecognize(Term token);", "int yyparse()\r\n{\r\nboolean doaction;\r\n init_stacks();\r\n yynerrs = 0;\r\n yyerrflag = 0;\r\n yychar = -1; //impossible char forces a read\r\n yystate=0; //initial state\r\n state_push(yystate); //save it\r\n while (true) //until parsing is done, either correctly, or w/error\r\n {\r\n doaction=true;\r\n //if (yydebug) debug(\"loop\"); \r\n //#### NEXT ACTION (from reduction table)\r\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\r\n {\r\n //if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\r\n if (yychar < 0) //we want a char?\r\n {\r\n yychar = yylex(); //get next token\r\n //if (yydebug) debug(\" next yychar:\"+yychar);\r\n //#### ERROR CHECK ####\r\n //if (yychar < 0) //it it didn't work/error\r\n // {\r\n // yychar = 0; //change it to default string (no -1!)\r\n //if (yydebug)\r\n // yylexdebug(yystate,yychar);\r\n // }\r\n }//yychar<0\r\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\r\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\r\n {\r\n //if (yydebug)\r\n //debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\r\n //#### NEXT STATE ####\r\n yystate = yytable[yyn];//we are in a new state\r\n state_push(yystate); //save it\r\n val_push(yylval); //push our lval as the input for next rule\r\n yychar = -1; //since we have 'eaten' a token, say we need another\r\n if (yyerrflag > 0) //have we recovered an error?\r\n --yyerrflag; //give ourselves credit\r\n doaction=false; //but don't process yet\r\n break; //quit the yyn=0 loop\r\n }\r\n\r\n yyn = yyrindex[yystate]; //reduce\r\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\r\n { //we reduced!\r\n //if (yydebug) debug(\"reduce\");\r\n yyn = yytable[yyn];\r\n doaction=true; //get ready to execute\r\n break; //drop down to actions\r\n }\r\n else //ERROR RECOVERY\r\n {\r\n if (yyerrflag==0)\r\n {\r\n yyerror(\"syntax error\");\r\n yynerrs++;\r\n }\r\n if (yyerrflag < 3) //low error count?\r\n {\r\n yyerrflag = 3;\r\n while (true) //do until break\r\n {\r\n if (stateptr<0 || valptr<0) //check for under & overflow here\r\n {\r\n return 1;\r\n }\r\n yyn = yysindex[state_peek(0)];\r\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\r\n {\r\n //if (yydebug)\r\n //debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\r\n yystate = yytable[yyn];\r\n state_push(yystate);\r\n val_push(yylval);\r\n doaction=false;\r\n break;\r\n }\r\n else\r\n {\r\n //if (yydebug)\r\n //debug(\"error recovery discarding state \"+state_peek(0)+\" \");\r\n if (stateptr<0 || valptr<0) //check for under & overflow here\r\n {\r\n return 1;\r\n }\r\n state_pop();\r\n val_pop();\r\n }\r\n }\r\n }\r\n else //discard this token\r\n {\r\n if (yychar == 0)\r\n return 1; //yyabort\r\n //if (yydebug)\r\n //{\r\n //yys = null;\r\n //if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\r\n //if (yys == null) yys = \"illegal-symbol\";\r\n //debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\r\n //}\r\n yychar = -1; //read another\r\n }\r\n }//end error recovery\r\n }//yyn=0 loop\r\n if (!doaction) //any reason not to proceed?\r\n continue; //skip action\r\n yym = yylen[yyn]; //get count of terminals on rhs\r\n //if (yydebug)\r\n //debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\r\n if (yym>0) //if count of rhs not 'nil'\r\n yyval = val_peek(yym-1); //get current semantic value\r\n if (reduceListener == null || reduceListener.onReduce(yyrule[yyn])) // if intercepted!\r\n switch(yyn)\r\n {\r\n//########## USER-SUPPLIED ACTIONS ##########\r\ncase 1:\r\n//#line 59 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\ttree = new Tree.TopLevel(val_peek(0).clist, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 2:\r\n//#line 65 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.clist.add(val_peek(0).cdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 3:\r\n//#line 69 \"Parser.y\"\r\n{\r\n \t\tyyval.clist = new ArrayList<Tree.ClassDef>();\r\n \t\tyyval.clist.add(val_peek(0).cdef);\r\n \t}\r\nbreak;\r\ncase 5:\r\n//#line 79 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.vdef = new Tree.VarDef(val_peek(0).ident, val_peek(1).type, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 6:\r\n//#line 85 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.type = new Tree.TypeIdent(Tree.INT, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 7:\r\n//#line 89 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.VOID, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 8:\r\n//#line 93 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.BOOL, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 9:\r\n//#line 97 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeIdent(Tree.STRING, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 10:\r\n//#line 101 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeClass(val_peek(0).ident, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 11:\r\n//#line 105 \"Parser.y\"\r\n{\r\n \t\tyyval.type = new Tree.TypeArray(val_peek(2).type, val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 12:\r\n//#line 111 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.cdef = new Tree.ClassDef(val_peek(4).ident, val_peek(3).ident, val_peek(1).flist, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 13:\r\n//#line 117 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.ident = val_peek(0).ident;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 14:\r\n//#line 121 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 15:\r\n//#line 127 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).vdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 16:\r\n//#line 131 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.flist.add(val_peek(0).fdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 17:\r\n//#line 135 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.flist = new ArrayList<Tree>();\r\n \t}\r\nbreak;\r\ncase 19:\r\n//#line 143 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>(); \r\n \t}\r\nbreak;\r\ncase 20:\r\n//#line 150 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 21:\r\n//#line 154 \"Parser.y\"\r\n{\r\n \t\tyyval.vlist = new ArrayList<Tree.VarDef>();\r\n\t\t\t\t\t\tyyval.vlist.add(val_peek(0).vdef);\r\n \t}\r\nbreak;\r\ncase 22:\r\n//#line 161 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.fdef = new MethodDef(true, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 23:\r\n//#line 165 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.fdef = new MethodDef(false, val_peek(4).ident, val_peek(5).type, val_peek(2).vlist, (Block) val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 24:\r\n//#line 171 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Block(val_peek(1).slist, val_peek(2).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 25:\r\n//#line 177 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 26:\r\n//#line 181 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.slist = new ArrayList<Tree>();\r\n \t}\r\nbreak;\r\ncase 27:\r\n//#line 188 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = val_peek(0).vdef;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 28:\r\n//#line 193 \"Parser.y\"\r\n{\r\n \t\tif (yyval.stmt == null) {\r\n \t\t\tyyval.stmt = new Tree.Skip(val_peek(0).loc);\r\n \t\t}\r\n \t}\r\nbreak;\r\ncase 39:\r\n//#line 211 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Assign(val_peek(2).lvalue, val_peek(0).expr, val_peek(1).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 40:\r\n//#line 215 \"Parser.y\"\r\n{\r\n \t\tyyval.stmt = new Tree.Exec(val_peek(0).expr, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 41:\r\n//#line 219 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 43:\r\n//#line 226 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t}\r\nbreak;\r\ncase 44:\r\n//#line 232 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.lvalue = new Tree.Ident(val_peek(1).expr, val_peek(0).ident, val_peek(0).loc);\r\n\t\t\t\t\t\tif (val_peek(1).loc == null) {\r\n\t\t\t\t\t\t\tyyval.loc = val_peek(0).loc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 45:\r\n//#line 239 \"Parser.y\"\r\n{\r\n \t\tyyval.lvalue = new Tree.Indexed(val_peek(3).expr, val_peek(1).expr, val_peek(3).loc);\r\n \t}\r\nbreak;\r\ncase 46:\r\n//#line 245 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Tree.CallExpr(val_peek(4).expr, val_peek(3).ident, val_peek(1).elist, val_peek(3).loc);\r\n\t\t\t\t\t\tif (val_peek(4).loc == null) {\r\n\t\t\t\t\t\t\tyyval.loc = val_peek(3).loc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 47:\r\n//#line 254 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = val_peek(0).lvalue;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 50:\r\n//#line 260 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.PLUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 51:\r\n//#line 264 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MINUS, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 52:\r\n//#line 268 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MUL, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 53:\r\n//#line 272 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.DIV, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 54:\r\n//#line 276 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.MOD, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 55:\r\n//#line 280 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.EQ, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 56:\r\n//#line 284 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.NE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 57:\r\n//#line 288 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.LT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 58:\r\n//#line 292 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.GT, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 59:\r\n//#line 296 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.LE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 60:\r\n//#line 300 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.GE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 61:\r\n//#line 304 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.AND, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 62:\r\n//#line 308 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.OR, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 63:\r\n//#line 312 \"Parser.y\"\r\n{\r\n \t\tyyval = val_peek(1);\r\n \t}\r\nbreak;\r\ncase 64:\r\n//#line 316 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Unary(Tree.NEG, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 65:\r\n//#line 320 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Unary(Tree.NOT, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 66:\r\n//#line 324 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ReadIntExpr(val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 67:\r\n//#line 328 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ReadLineExpr(val_peek(2).loc);\r\n \t}\r\nbreak;\r\ncase 68:\r\n//#line 332 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.ThisExpr(val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 69:\r\n//#line 336 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.NewClass(val_peek(2).ident, val_peek(3).loc);\r\n \t}\r\nbreak;\r\ncase 70:\r\n//#line 340 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.NewArray(val_peek(3).type, val_peek(1).expr, val_peek(4).loc);\r\n \t}\r\nbreak;\r\ncase 71:\r\n//#line 344 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.TypeTest(val_peek(3).expr, val_peek(1).ident, val_peek(5).loc);\r\n \t}\r\nbreak;\r\ncase 72:\r\n//#line 348 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.TypeCast(val_peek(2).ident, val_peek(0).expr, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 73:\r\n//#line 352 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Ternary(Tree.COND, val_peek(4).expr, val_peek(2).expr, val_peek(0).expr, val_peek(4).loc);\r\n \t}\r\nbreak;\r\ncase 74:\r\n//#line 356 \"Parser.y\"\r\n{\r\n \t\tyyval.expr = new Tree.Binary(Tree.PCLONE, val_peek(2).expr, val_peek(0).expr, val_peek(1).loc);\r\n \t}\r\nbreak;\r\ncase 75:\r\n//#line 362 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Tree.Literal(val_peek(0).typeTag, val_peek(0).literal, val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 76:\r\n//#line 366 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.expr = new Null(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 78:\r\n//#line 373 \"Parser.y\"\r\n{\r\n \t\tyyval = new SemValue();\r\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\r\n \t}\r\nbreak;\r\ncase 79:\r\n//#line 380 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 80:\r\n//#line 384 \"Parser.y\"\r\n{\r\n \t\tyyval.elist = new ArrayList<Tree.Expr>();\r\n\t\t\t\t\t\tyyval.elist.add(val_peek(0).expr);\r\n \t}\r\nbreak;\r\ncase 81:\r\n//#line 391 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.WhileLoop(val_peek(2).expr, val_peek(0).stmt, val_peek(4).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 82:\r\n//#line 397 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Repeat(val_peek(4).stmt, val_peek(1).expr, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 83:\r\n//#line 403 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.ForLoop(val_peek(6).stmt, val_peek(4).expr, val_peek(2).stmt, val_peek(0).stmt, val_peek(8).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 84:\r\n//#line 409 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Break(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 85:\r\n//#line 415 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.If(val_peek(3).expr, val_peek(1).stmt, val_peek(0).stmt, val_peek(5).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 86:\r\n//#line 421 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = val_peek(0).stmt;\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 87:\r\n//#line 425 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 88:\r\n//#line 431 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Return(val_peek(0).expr, val_peek(1).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 89:\r\n//#line 435 \"Parser.y\"\r\n{\r\n \t\tyyval.stmt = new Tree.Return(null, val_peek(0).loc);\r\n \t}\r\nbreak;\r\ncase 90:\r\n//#line 441 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Print(val_peek(1).elist, val_peek(3).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 91:\r\n//#line 447 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Switch(val_peek(5).expr, val_peek(2).slist, val_peek(1).stmt, val_peek(7).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 92:\r\n//#line 453 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.slist.add(val_peek(0).stmt);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 93:\r\n//#line 457 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n \t\tyyval.slist = new ArrayList<Tree>();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 94:\r\n//#line 464 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Case(val_peek(2).expr, val_peek(0).slist, val_peek(3).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 95:\r\n//#line 470 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Default(val_peek(0).slist, val_peek(2).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 96:\r\n//#line 474 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval = new SemValue();\r\n\t\t\t\t\t}\r\nbreak;\r\ncase 97:\r\n//#line 480 \"Parser.y\"\r\n{\r\n\t\t\t\t\t\tyyval.stmt = new Tree.Continue(val_peek(0).loc);\r\n\t\t\t\t\t}\r\nbreak;\r\n//#line 1319 \"Parser.java\"\r\n//########## END OF USER-SUPPLIED ACTIONS ##########\r\n }//switch\r\n //#### Now let's reduce... ####\r\n //if (yydebug) debug(\"reduce\");\r\n state_drop(yym); //we just reduced yylen states\r\n yystate = state_peek(0); //get new state\r\n val_drop(yym); //corresponding value drop\r\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\r\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\r\n {\r\n //if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\r\n yystate = YYFINAL; //explicitly say we're done\r\n state_push(YYFINAL); //and save it\r\n val_push(yyval); //also save the semantic value of parsing\r\n if (yychar < 0) //we want another character?\r\n {\r\n yychar = yylex(); //get next character\r\n //if (yychar<0) yychar=0; //clean, if necessary\r\n //if (yydebug)\r\n //yylexdebug(yystate,yychar);\r\n }\r\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\r\n break; //quit the loop--all DONE\r\n }//if yystate\r\n else //else not done yet\r\n { //get next state and push, for next yydefred[]\r\n yyn = yygindex[yym]; //find out where to go\r\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\r\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\r\n yystate = yytable[yyn]; //get new state\r\n else\r\n yystate = yydgoto[yym]; //else go to new defred\r\n //if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\r\n state_push(yystate); //going again, so push state & val...\r\n val_push(yyval); //for next action\r\n }\r\n }//main loop\r\n return 0;//yyaccept!!\r\n}", "@FormatMethod\n private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {\n if (parseTree == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(parseTree.location.start, message, arguments);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~:}LC@A$L'2q+~$ja\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo(91);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : 91. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return lexer.nextToken(); \n }", "private void parseErrorUnlessPermittedSlash() throws SAXException,\n IOException {\n if (endTag) {\n err(\"Stray \\u201C/\\u201D in an end tag.\");\n return;\n }\n char c = read();\n if (c == '>') {\n if (!currentIsVoid() && !html4) {\n if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4.\");\n } else {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is only permitted on void elements.\");\n }\n } else if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4. (HTML4-only error)\");\n }\n } else {\n err(\"Stray \\u201C/\\u201D in tag.\");\n }\n unread(c);\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo(4);\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : 4. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.consume((-796));\n // Undeclared exception!\n try { \n xPathLexer0.number();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n } catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }", "static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }", "void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}", "void yylexdebug(int state,int ch)\n{\nString s=null;\n if (ch < 0) ch=0;\n if (ch <= YYMAXTOKEN) //check index bounds\n s = yyname[ch]; //now get it\n if (s==null)\n s = \"illegal-symbol\";\n debug(\"state \"+state+\", reading \"+ch+\" (\"+s+\")\");\n}", "public void unrecovered_syntax_error(Symbol s) throws java.lang.Exception\n { \n String lexema = s.value.toString();\n int fila = s.right;\n int columna = s.left;\n \n System.out.println(\"!!!!!!! Error Sintactico, Panic Mode !!!!!!! \");\n System.out.println(\"\\t\\tLexema: \"+lexema);\n System.out.println(\"\\t\\tFila: \"+fila);\n System.out.println(\"\\t\\tColumna: \"+columna);\n\n /*AcepErr datos =new AcepErr(lexema, \"ERROR SINTACTICO\" ,fila,columna,\"Simbolo no esperado Error Fatal\");\n TablaErr.add(datos);\n */\n //lista_errores.add(new ErrorT(lexema, fila, columna,\"sintactico\" ,\"Simbolo no esperado, Panic Mode\"));\n }", "protected static void reportParseError(int expectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 514 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \" token.\");\n/* */ }", "private void errorCheck( Token token, String kind ) {\n if( ! token.isKind( kind ) ) {\n System.out.println(\"Error: expected \" + token + \" to be of kind \" + kind );\n System.exit(1);\n }\n }", "public void reportError(final int category, final ErrorMsg error) {\n switch (category) {\n case Constants.INTERNAL:\n // Unexpected internal errors, such as null-ptr exceptions, etc.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.UNSUPPORTED:\n // XSLT elements that are not implemented and unsupported ext.\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.FATAL:\n // Fatal error in the stylesheet input (parsing or content)\n // Immediately terminates compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.ERROR:\n // Other error in the stylesheet input (parsing or content)\n // Does not terminate compilation, no translet produced\n _errors.add(error);\n break;\n case Constants.WARNING:\n // Other error in the stylesheet input (content errors only)\n // Does not terminate compilation, a translet is produced\n _warnings.add(error);\n break;\n }\n }", "@Test(timeout = 4000)\n public void test150() throws Throwable {\n StringReader stringReader0 = new StringReader(\"'L+XUG}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2292, 16, 18);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 2292, column 18. Encountered: \\\"+\\\" (43), after : \\\"\\\\'L\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\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}", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n StringReader stringReader0 = new StringReader(\"}y5+{SPClS&QvLb0Qm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.jjFillToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void unrecovered_syntax_error(Symbol s) throws java.lang.Exception\n { \n String lexema = s.value.toString();\n int fila = s.right;\n int columna = s.left;\n \n System.out.println(\"!!!!!!! Error Sintactico, Panic Mode !!!!!!! \");\n System.out.println(\"\\t\\tLexema: \"+lexema);\n System.out.println(\"\\t\\tFila: \"+fila);\n System.out.println(\"\\t\\tColumna: \"+columna);\n \n lista_errores.add(new ErrorT(lexema, fila, columna,\"sintactico\" ,\"Simbolo no esperado, Panic Mode\"));\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\" 6PR~\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 2);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 2. Encountered: \\\"6\\\" (54), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n StringReader stringReader0 = new StringReader(\"NXMnbm>`7-o(jz g3N\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-439), 1101);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line -439, column 1108. Encountered: \\\"`\\\" (96), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public void correctErrors();", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.consume((-2521));\n // Undeclared exception!\n try { \n xPathLexer0.nextToken();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public static void registerError() {\r\n errorCount++;\r\n }", "@FormatMethod\n private void reportError(Token token, @FormatString String message, Object... arguments) {\n if (token == null) {\n reportError(message, arguments);\n } else {\n errorReporter.reportError(token.getStart(), message, arguments);\n }\n }", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"}tH?N[RLAs'&]u\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 128, 29);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 128, column 44. Encountered: <EOF> after : \\\"\\\\\\\"}tH?N[RLAs\\\\'&]u\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "@Override\n public void warning(SAXParseException sAXParseException) throws SAXException {\n ErrorListener errorListener = this.m_transformer.getErrorListener();\n if (errorListener instanceof ErrorHandler) {\n ((ErrorHandler)((Object)errorListener)).warning(sAXParseException);\n return;\n }\n try {\n TransformerException transformerException = new TransformerException(sAXParseException);\n errorListener.warning(transformerException);\n return;\n }\n catch (TransformerException transformerException) {\n throw sAXParseException;\n }\n }", "private static void fail(Scanner scanner, String message) throws RuntimeException {\n String msg = message + \"\\n @ ...\";\n for (int i = 0; i < 10 && scanner.hasNext(); i++) {\n msg += \" \" + scanner.next();\n }\n throw new RuntimeException(msg + \"...\");\n }", "@Test(timeout = 4000)\n public void test153() throws Throwable {\n StringReader stringReader0 = new StringReader(\"#crIx\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 32);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 2897, column 32. Encountered: \\\"#\\\" (35), after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n byte[] byteArray0 = new byte[1];\n byteArray0[0] = (byte) (-25);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0, 119, (-820), 29);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 119, column -819. Encountered: <EOF> after : \\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public static void errorRecovery (CD19Parser p) throws Exception {\n\n int nextComma = p.nextTokenOccursAt(Token.TCOMA);\n\n int nextMinViableTokenBesidesComma = -1;\n int nextSemiComma = p.nextTokenOccursAt(Token.TSEMI);\n int nextLeftParanthesis = p.nextTokenOccursAt(Token.TLPAR);\n if (nextSemiComma != -1) {\n nextMinViableTokenBesidesComma = nextSemiComma;\n }\n if (nextLeftParanthesis != -1 && nextLeftParanthesis < nextMinViableTokenBesidesComma) {\n nextMinViableTokenBesidesComma = nextLeftParanthesis;\n }\n\n // if there is no necessary token for\n // NREPT or NFOR then just fail anyway\n // as it will fail NREPT or NFOR ultimately\n if (nextMinViableTokenBesidesComma == -1) {\n throw new Exception(\"Unable to recover.\");\n }\n\n // there is no next comma\n // i.e. we have to jump the parser\n // the next sensible section\n if (nextComma == -1) {\n // there is a next comma but it doesn't occur\n // in the <initlist>. thus we can only attempt to jump\n // the parser to the next sensisble section\n if (nextMinViableTokenBesidesComma != -1) {\n p.tokensJumpTo(nextMinViableTokenBesidesComma);\n } else {\n throw new Exception(\"Unable to recover\");\n }\n return;\n }\n\n // if next comma occurs before the next ';' or ')'\n // jump there\n if (nextComma < nextMinViableTokenBesidesComma) {\n p.tokensJumpTo(nextComma);\n return;\n }\n\n\n throw new Exception(\"Unable to recover\");\n }", "@Test(timeout = 4000)\n public void test166() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\">>=\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.ReInit(javaCharStream0, (-378));\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : -378. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public ParseResult failure (Object input) {\n return failure(input, 1);\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n StringReader stringReader0 = new StringReader(\"interface\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaCharStream0.nextCharInd = (-1232);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[9];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 1, column 3. Encountered: \\\"t\\\" (116), after : \\\"\\\\'#\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "protected static void reportParseError(int expectedToken, int otherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException {\n/* 523 */ throw new MailcapParseException(\"Encountered a \" + MailcapTokenizer.nameForToken(actualToken) + \" token (\" + actualTokenValue + \") while expecting a \" + MailcapTokenizer.nameForToken(expectedToken) + \" or a \" + MailcapTokenizer.nameForToken(otherExpectedToken) + \" token.\");\n/* */ }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.6194608", "0.6194608", "0.6183865", "0.57072043", "0.5630518", "0.55534446", "0.55396795", "0.54884464", "0.54847294", "0.5471924", "0.5428808", "0.5340148", "0.53103244", "0.53082144", "0.5302697", "0.5302697", "0.5287284", "0.52871525", "0.52871525", "0.52871525", "0.52871525", "0.52871525", "0.5270121", "0.5245895", "0.52457345", "0.5233556", "0.5233085", "0.52192104", "0.52107775", "0.52077305", "0.5201499", "0.51976746", "0.5190985", "0.51855344", "0.51826155", "0.51826155", "0.5175883", "0.5166327", "0.5110203", "0.50963223", "0.50958145", "0.5082806", "0.50715506", "0.5068224", "0.5065735", "0.505133", "0.50437945", "0.5036768", "0.5025916", "0.50241745", "0.50150484", "0.50129896", "0.5009132", "0.499837", "0.49950215", "0.4987473", "0.49822375", "0.49776924", "0.49713665", "0.49712178", "0.49516258", "0.494558", "0.4944602", "0.49406072" ]
0.5259511
57
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method
public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }", "public void finish() {\n charScanner.pushBack(currentCharToken);\n }", "@Override\n public void mark(final int readlimit) {\n input.mark();\n }", "private void trim() {\n read(0);\n }", "protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }", "private int _readMore(InputStream in, byte[] readBuffer, int inputPtr, int inputEnd, int maxRead)\n/* */ throws IOException\n/* */ {\n/* 1580 */ int i = 0;\n/* 1581 */ while (inputPtr < inputEnd) {\n/* 1582 */ readBuffer[(i++)] = readBuffer[(inputPtr++)];\n/* */ }\n/* 1584 */ inputPtr = 0;\n/* 1585 */ inputEnd = i;\n/* 1586 */ maxRead = Math.min(maxRead, readBuffer.length);\n/* */ do\n/* */ {\n/* 1589 */ int length = maxRead - inputEnd;\n/* 1590 */ if (length == 0) {\n/* */ break;\n/* */ }\n/* 1593 */ int count = in.read(readBuffer, inputEnd, length);\n/* 1594 */ if (count < 0) {\n/* 1595 */ return inputEnd;\n/* */ }\n/* 1597 */ inputEnd += count;\n/* 1598 */ } while (inputEnd < 3);\n/* 1599 */ return inputEnd;\n/* */ }", "private void fillBuf(int need) throws IOException {\n\n\t\tif (count > pos) {\n\t\t\tSystem.arraycopy(buf, pos, buf, 0, count - pos);\n\t\t\tcount -= pos;\n\t\t\tneed -= count;\n\t\t\tpos = 0;\n\t\t} else {\n\t\t\tcount = 0;\n\t\t\tpos = 0;\n\t\t}\n\n\t\twhile (need > 0) {\n\n\t\t\tint len = in.read(buf, count, buf.length - count);\n\t\t\tif (len <= 0) {\n\t\t\t\tthrow new EOFException();\n\t\t\t}\n\t\t\tcount += len;\n\t\t\tneed -= len;\n\t\t}\n\n\t}", "public static void main(String[] args) throws IOException {\n\n String s = scanner.nextLine();\n\n String t = scanner.nextLine();\n\n int k = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n String result = appendAndDelete(s, t, k);\n System.out.println(result);\n\n// bufferedWriter.write(result);\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n scanner.close();\n }", "public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}", "private void unread(char c) {\n unreadBuffer = c;\n }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }", "private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}", "@Override\n public void flush() throws IOException\n {\n for(;;) {\n int index = indexOneOf(builder, '\\r', '\\n');\n if(index == -1) {\n break;\n }\n // ignore false returned by offer when queue is full\n queue.offer(builder.substring(0, index));\n\n if(builder.charAt(index) == '\\r') {\n ++index;\n }\n if(builder.charAt(index) != '\\n') {\n throw new IllegalStateException();\n }\n ++index;\n builder.delete(0, index);\n }\n }", "private final int bufferedInputBytesRemaining() {\n return reading ? (buffer.remaining() + (ungotc != -1 ? 1 : 0)) : 0;\n }", "void setCharacterStream(int index, Reader reader, int count)\n throws SQLException;", "void peekAhead(GetsState gs) {\n ChannelBuffer buf;\n //Tcl_DriverBlockModeProc *blockModeProc;\n int bytesLeft;\n boolean goto_cleanup = false; // Set to true when jumping to the\n // cleanup label, used to simulate a goto.\n\n buf = gs.buf;\n\n // If there's any more raw input that's still buffered, we'll peek into\n // that. Otherwise, only get more data from the channel driver if it\n // looks like there might actually be more data. The assumption is that\n // if the channel buffer is filled right up to the end, then there\n // might be more data to read.\n\n cleanup:{\n //blockModeProc = NULL;\n if (buf.next == null) {\n bytesLeft = buf.nextAdded - (buf.nextRemoved + gs.rawRead.i);\n if (bytesLeft == 0) {\n if (buf.nextAdded < buf.bufLength) {\n // Don't peek ahead if last read was short read.\n goto_cleanup = true;\n break cleanup;\n }\n // FIXME: This non-blocking check is currently disabled, non-blocking\n // is not currently supported and it is not clean why we would\n // need to depend on non-blocking IO when peeking anyway.\n if (blocking) {\n //blockModeProc = Tcl_ChannelBlockModeProc(chanPtr->typePtr);\n if (false /*blockModeProc == NULL*/) {\n // Don't peek ahead if cannot set non-blocking mode.\n goto_cleanup = true;\n break cleanup;\n }\n //StackSetBlockMode(chanPtr, TCL_MODE_NONBLOCKING);\n }\n }\n }\n filterBytes(gs);\n //if (blockModeProc != NULL) {\n // StackSetBlockMode(chanPtr, TCL_MODE_BLOCKING);\n //}\n }\n\n if (goto_cleanup) {\n buf.nextRemoved += gs.rawRead.i;\n gs.rawRead.i = 0;\n gs.totalChars += gs.charsWrote.i;\n //gs.bytesWrote.i = 0;\n gs.charsWrote.i = 0;\n }\n }", "private void flushChars() throws SAXException, IOException {\n if (cstart != -1) {\n if (pos > cstart) {\n int currCol = col;\n int currLine = line;\n col = colPrev;\n line = linePrev;\n try {\n tokenHandler.characters(buf, cstart, pos - cstart);\n } finally {\n col = currCol;\n line = currLine;\n }\n }\n }\n cstart = -1;\n }", "public FastCharStream(final Reader reader) {\n\t\tinput = reader;\n\t}", "private char peekFurther(int distance) {\n if (current + distance >= source.length()) {\n return '\\0';\n }\n\n return source.charAt(current + distance);\n }", "private synchronized void read(byte[] dest, int amt) throws IOException {\n\t\tread(in, dest, amt);\n\t}", "public void run() {\n try {\n byte b[] = new byte[100];\n for (;;) {\n int n = in.read(b);\n String str;\n if (n < 0) {\n break;\n }\n str = new String(b, 0, n);\n buffer.append(str);\n System.out.print(str);\n }\n } catch (IOException ioe) { /* skip */ }\n }", "private static String readUntil(InputStreamReader r, char limit)\n\t\t\tthrows IOException {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = r.read(); i != -1; i = r.read()) {\n\t\t\tchar c = (char) i;\n\t\t\tbuilder.append(c);\n\t\t\tif (c == limit) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn builder.toString();\n\t}", "public void unreadToken(SQLToken c) {\n synchronized (lock) {\n if (tokensBufferPosition == 0) {\n throw new SQLParserException(\"Pushback buffer overflow\");\n }\n tokensBuffer[--tokensBufferPosition] = c;\n }\n }", "public void advance() {\r\n this.command = in.nextLine();\r\n }", "void readNextChar() throws ReaderException;", "private int readChar(boolean movePointer) throws Exception {\n if (_bi >= _blen) {\n _blen = _reader.read(_buf, 0, 2048);\n if (log) {\n StringBuffer sbBuffer = new StringBuffer();\n for (int i = 0; i < 300; i++) {\n sbBuffer.append(_buf[i]);\n }\n }\n log = false;\n\n _bi = 0;\n if (_blen < 0)\n return -1;\n }\n char ret = _buf[_bi];\n if (movePointer)\n _bi++;\n return ret;\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "public LengthLimitedInputStream(InputStream in, int limit) {\n\tsuper(in);\n\tleft = limit;\n }", "private String readFixedString(int size, DataInput in) throws IOException\n { \n var b = new StringBuilder(size);\n int i = 0;\n var done = false;\n while (!done && i < size)\n { \n char ch = in.readChar();\n i++;\n if (ch == 0) {\n done = true;\n }\n else {\n b.append(ch);\n }\n }\n \n in.skipBytes(2 * (size - i));\n return b.toString();\n }", "public void feedAndCut() throws IOException {\n feed();\n cut();\n writer.flush();\n }", "public int cscan () throws IOException {\n\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\tnumChars = stream.read (buf);\n\n\t\t\t\t//if (numChars <= 0) return -1;\n\t\t\t}\n\n\t\t\treturn buf[curChar++];\n\t\t}", "public synchronized long skip(long charsToSkip) throws IOException {\n\t\tlong processed = 0;\n\n\t\t// first disregard what's in our small queue:\n\t\twhile (charsToSkip > 0 && m_queueLength > 0) {\n\t\t\tnext(false);\n\t\t\tcharsToSkip--;\n\t\t\tprocessed++;\n\t\t}\n\n\t\t// the efficient way to skip:\n\t\twhile (charsToSkip > 0) {\n\t\t\tlong skipped = m_reader.skip(charsToSkip);\n\t\t\tif (skipped == 0) {\n\t\t\t\treturn processed;\n\t\t\t}\n\t\t\tcharsToSkip -= skipped;\n\t\t\tprocessed += skipped;\n\t\t\tm_read += skipped;\n\t\t}\n\n\t\tpopulateQueue();\n\n\t\treturn processed;\n\t}", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.getLine();\n assertEquals(4094, javaCharStream0.bufpos);\n }", "void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}", "private void getNextChar() \n {\n try\n {\n int temp = in.read();\n if (temp == -1)\n eof = true;\n currentChar = (char)temp;\n }\n catch (IOException e)\n {\n System.err.println(\"Catastrophic File IO error.\\n\" + e);\n System.exit(1); \n //exit with nonzero exit code to indicate catastrophic error\n }\n }", "@Override\n\tpublic void consume(Scan scan) {\n\n\t}", "private boolean loadMore(int available) throws IOException\n {\n _byteCount += (_inputEnd - available);\n\n // Bytes that need to be moved to the beginning of buffer?\n if (available > 0) {\n if (_inputPtr > 0) {\n if (!canModifyBuffer()) {\n // 15-Aug-2022, tatu: Occurs (only) if we have half-decoded UTF-8\n // characters; uncovered by:\n //\n // https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50036\n //\n // and need to be reported as IOException\n if (_inputSource == null) {\n throw new IOException(String.format(\n\"End-of-input after first %d byte(s) of a UTF-8 character: needed at least one more\",\navailable));\n }\n }\n for (int i = 0; i < available; ++i) {\n _inputBuffer[i] = _inputBuffer[_inputPtr+i];\n }\n _inputPtr = 0;\n _inputEnd = available;\n }\n } else {\n // Ok; here we can actually reasonably expect an EOF, so let's do a separate read right away:\n int count = readBytes();\n if (count < 1) {\n freeBuffers(); // to help GC?\n if (count < 0) { // -1\n return false;\n }\n // 0 count is no good; let's err out\n reportStrangeStream();\n }\n }\n\n // We now have at least one byte... and that allows us to\n // calculate exactly how many bytes we need!\n @SuppressWarnings(\"cast\")\n int c = (int) _inputBuffer[_inputPtr];\n if (c >= 0) { // single byte (ascii) char... cool, can return\n return true;\n }\n\n // Ok, a multi-byte char, let's check how many bytes we'll need:\n int needed;\n if ((c & 0xE0) == 0xC0) { // 2 bytes (0x0080 - 0x07FF)\n needed = 2;\n } else if ((c & 0xF0) == 0xE0) { // 3 bytes (0x0800 - 0xFFFF)\n needed = 3;\n } else if ((c & 0xF8) == 0xF0) {\n // 4 bytes; double-char BS, with surrogates and all...\n needed = 4;\n } else {\n // 25-Aug-2016, tatu: As per [dataformat-csv#132], let's not throw\n // exception from here but let caller handle\n return true;\n }\n\n // And then we'll just need to load up to that many bytes;\n // if an EOF is hit, that'll be an error. But we need not do\n // actual decoding here, just load enough bytes.\n while ((_inputPtr + needed) > _inputEnd) {\n int count = readBytesAt(_inputEnd);\n if (count < 1) {\n if (count < 0) { // -1, EOF... no good!\n freeBuffers();\n reportUnexpectedEOF(_inputEnd, needed);\n }\n // 0 count is no good; let's err out\n reportStrangeStream();\n }\n }\n return true;\n }", "private String _read(InputStream in, String enc) throws IOException\n {\n int ptr = 0;\n int count;\n \n while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) {\n ptr += count;\n // buffer full? Need to realloc\n if (ptr == _readBuffer.length) {\n _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr);\n }\n }\n \n return new String(_readBuffer, 0, ptr, enc);\n }", "private boolean fill() throws IOException {\n if (in == null)\n return false;\n if (bufEnd == buf.length) {\n Tokenizer.movePosition(buf, posOff, bufStart, pos);\n /* The last read was complete. */\n int keep = bufEnd - bufStart;\n if (keep == 0)\n\tbufEnd = 0;\n else if (keep + READSIZE <= buf.length) {\n\t/*\n\t * There is space in the buffer for at least READSIZE bytes.\n\t * Choose bufEnd so that it is the least non-negative integer\n\t * greater than or equal to <code>keep</code>, such\n\t * <code>bufLength - keep</code> is a multiple of READSIZE.\n\t */\n\tbufEnd = buf.length - (((buf.length - keep)/READSIZE) * READSIZE);\n\tfor (int i = 0; i < keep; i++)\n\t buf[bufEnd - keep + i] = buf[bufStart + i];\n }\n else {\n\tchar newBuf[] = new char[buf.length << 1];\n\tbufEnd = buf.length;\n\tSystem.arraycopy(buf, bufStart, newBuf, bufEnd - keep, keep);\n\tbuf = newBuf;\n }\n bufStart = bufEnd - keep;\n posOff = bufStart;\n }\n int nChars = in.read(buf, bufEnd, buf.length - bufEnd);\n if (nChars < 0) {\n in.close();\n in = null;\n return false;\n }\n bufEnd += nChars;\n bufEndStreamOffset += nChars;\n return true;\n }", "public void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}", "private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}", "public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}", "protected int filterBytes()\n throws IOException {\n\n if (headerPending) {\n parseHeader();\n }\n\n //System.out.println(\"nEncoded: \" + nEncoded);\n //System.out.println(\"Current: \" + current);\n \n if (nEncoded <= current) {\n int br = readEncodedBytes();\n System.out.println(\"reb: \" + br);\n if (br < 0) {\n return -1;\n }\n }\n\n // bytes decoding loop\n int inserted = 0;\n while (current < nEncoded) {\n \t\n if (current < firstQuantum) {\n if (decode(current) == 0) {\n // this is the end of the encoded data\n parseTrailer();\n return inserted;\n }\n\n // store the expected number of raw bytes encoded in the line\n remaining = decode(current);\n current = firstQuantum;\n\n }\n\n if (encoded[current] == '\\n' && encoded[current + 1] != '\\n') {\n \t \n \t \n \t System.out.println(\"Cur rEad\");\n \t \n \t \n if (remaining != 0) {\n throw new IOException(\"encoded length inconsistent with encoded data\");\n }\n\n //System.out.println(\"Remaning: \" + remaining);\n \n // update state for next line\n firstQuantum = current + 2;\n\n } else if (encoded[current] == '\\n') {\n \t System.out.println(\"CurrEad\");\n \t current = current + 1;\n } else {\n // this is an encoded data byte\n int fByte;\n \n // combine the various 6-bits bytes to produce 8-bits bytes\n switch ((current - firstQuantum) % 4) {\n case 0:\n // nothing to do\n break;\n case 1:\n fByte = ((decode(current - 1) & 0x3F) << 2)\n | ((decode(current) & 0x30) >> 4);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n case 2:\n fByte = ((decode(current - 1) & 0x0F) << 4)\n | ((decode(current) & 0x3C) >> 2);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n default:\n fByte = ((decode(current - 1) & 0x03) << 6)\n | (decode(current) & 0x3F);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n \n }\n }\n\n ++current;\n\n }\n \n //System.out.println(inserted);\n\n // preserve current quantum for next round\n int start = current - ((current - firstQuantum) % 4);\n \n //System.out.println(\"FQ: \" + firstQuantum + \"S: \" + (char)encoded[current - 1]);\n \n //System.out.println(\"start: \" + start + \" nEenc-stsrt: \" + (nEncoded - start));\n \n if (firstQuantum < start) {\n System.arraycopy(encoded, start, encoded, 0, nEncoded - start);\n nEncoded -= start;\n current -= start;\n firstQuantum -= start;\n } else {\n \tnEncoded = 0;\n \tcurrent = 0;\n \tfirstQuantum = 0;\n }\n \n //System.out.println(\"out!\");\n //System.out.println (\"inserted == \" + inserted);\n \n return inserted;\n \n }", "private void readMoreBytesFromStream() throws IOException {\n if (!innerStreamHasMoreData) {\n return;\n }\n\n int bufferSpaceAvailable = buffer.length - bytesInBuffer;\n if (bufferSpaceAvailable <= 0) {\n return;\n }\n\n int bytesRead =\n stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);\n\n if (bytesRead == -1) {\n innerStreamHasMoreData = false;\n } else {\n bytesInBuffer += bytesRead;\n }\n }", "protected LookAheadReader(Reader reader, int queueSize) throws IOException {\n\t\tthis.m_queue = new char[queueSize];\n\t\tthis.m_reader = reader;\n\t\tpopulateQueue();\n\t}", "private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}", "private char advance() {\n current++;\n return source.charAt(current - 1);\n }", "@Override\n\t\tpublic void characters(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\tbuffer.append(ch);\n\t\t}", "void onInput(Terminal terminal, int numChars, String current);", "public void reset(Reader input) {\n this.buffer.dispose();\n this.buffer = new ReaderBuffer(input);\n this.previousToken = null;\n this.lastMatch.clear();\n }", "@Override\n protected List<CharSequence> getNextInput() {\n if (!mInputIterator.hasNext())\n // No more input, so we're done.\n return null;\n else {\n // Start a new cycle.\n incrementCycle();\n\n // Return a list containing character sequences to search.\n return mInputIterator.next();\n }\n }", "public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {\n currentPreparedStatement.setNCharacterStream(parameterIndex, value, length);\n\n }", "private void compactIfNeeded() {\n\n // if the scan point is more than 25% into the buffer, compact...\n if( buffer.position() >= (buffer.capacity() >> 2 ) ) {\n int newLimit = buffer.limit() - buffer.position();\n buffer.compact();\n buffer.position( 0 );\n buffer.limit( newLimit );\n }\n }", "@Override\r\n public Integer numberOfCharacters(InputStream ins) throws Exception {\n return null;\r\n }", "private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}", "void skip(int bytes) throws IOException {\n this.input.skip(bytes);\n }", "@Override\n\tpublic void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {\n\t\t\n\t}", "public char read() {\n char ch = this.peek();\n this.index++;\n return ch;\n }", "char getPreviousReadChar();", "private String next(int i) throws IOException {\r\n\t\tif(buffer!=null) {\r\n\t\t\tString s=buffer;\r\n\t\t\tbuffer=null;\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif (i==0) {\r\n\t\t\treturn in.readLine();\r\n\t\t} else return in2.readLine();\r\n\t}", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "void newconsume() {\n\t\tfor (;;) {\n\t\t\tif (printnewline > newinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tif (newinfo.other[printnewline] < 0)\n\t\t\t\tshowinsert();\n\t\t\telse showmove();\n\t\t}\n\t}", "void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}", "@Override\n\tpublic void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {\n\t\t\n\t}", "synchronized void receive(int preknownDataLength) throws EOFException, IOException {\n byte[] buffer = new byte[preknownDataLength];\n dataInput.readFully(buffer);\n pipedOutputStream.write(buffer);\n }", "@Override\n public ByteBuffer readInput(int minBytes) throws IOException {\n if (minBytes <= byteBuffer.remaining())\n return byteBuffer;\n else\n throw new EOFException(\"Cannot read more bytes - end of buffer reached\");\n }", "public byte[] getNextInput(byte[] buffer) throws IOException {\r\n // byte[] buffer = new byte[8192];\r\n file.seek(currOffset);\r\n file.read(buffer);\r\n currOffset += buffer.length;\r\n return buffer;\r\n }", "@Test(timeout = 4000)\n public void test131() throws Throwable {\n StringReader stringReader0 = new StringReader(\"QXw?YE]We2j)\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 5, 5);\n javaCharStream0.ReInit((Reader) stringReader0, 754, 754);\n assertEquals((-1), javaCharStream0.bufpos);\n }", "@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}", "public void advance() {\n // Get the next instruction\n instruction = fileStream.next();\n removeWhitespace();\n // Split instruction apart\n instructionChunks = instruction.split(\" \");\n }", "int filterBytes(GetsState gs) {\n ChannelBuffer buf;\n byte[] raw;\n int rawStart, rawEnd;\n char[] dst;\n int offset, toRead, /*dstNeeded,*/ spaceLeft, result, rawLen, length;\n TclObject obj;\n final int ENCODING_LINESIZE = 20; // Lower bound on how many bytes\n // to convert at a time. Since we\n // don't know a priori how many\n // bytes of storage this many\n // source bytes will use, we\n // actually need at least\n // ENCODING_LINESIZE bytes of room.\n\n boolean goto_read = false; // Set to true when jumping to the read\n // label, used to simulate a goto.\n\n final boolean debug = false;\n\n obj = gs.obj;\n\n // Subtract the number of bytes that were removed from channel buffer\n // during last call.\n\n buf = gs.buf;\n if (buf != null) {\n buf.nextRemoved += gs.rawRead.i;\n if (buf.nextRemoved >= buf.nextAdded) {\n buf = buf.next;\n }\n }\n gs.totalChars += gs.charsWrote.i;\n\n read: while (true) {\n if (goto_read || (buf == null) || (buf.nextAdded == buf.BUFFER_PADDING)) {\n // All channel buffers were exhausted and the caller still hasn't\n // seen EOL. Need to read more bytes from the channel device.\n // Side effect is to allocate another channel buffer.\n\n //read:\n if (blocked) {\n if (!blocking) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n blocked = false;\n }\n if (getInput() != 0) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n buf = inQueueTail;\n gs.buf = buf;\n }\n\n // Convert some of the bytes from the channel buffer to characters.\n // Space in obj's string rep is used to hold the characters.\n\n rawStart = buf.nextRemoved;\n raw = buf.buf;\n rawEnd = buf.nextAdded;\n rawLen = rawEnd - rawStart;\n\n toRead = ENCODING_LINESIZE;\n if (toRead > rawLen) {\n toRead = rawLen;\n }\n dst = new char[toRead];\n result = externalToUnicode(raw, rawStart, rawLen,\n dst, 0, toRead,\n gs.rawRead, /*gs.bytesWrote*/ null, gs.charsWrote,\n gs.charToBytes);\n TclString.append(gs.obj, dst, 0, gs.charsWrote.i);\n\n if (debug) {\n System.out.println(\"filterBytes chars\");\n\n String srep = gs.obj.toString();\n int len = srep.length();\n\n for (int i=0; i < len; i++) {\n char c = srep.charAt(i);\n String prep;\n if (c == '\\r') {\n prep = \"\\\\r\";\n } else if (c == '\\n') {\n prep = \"\\\\n\";\n } else {\n prep = \"\" + c;\n }\n\n System.out.println(\"filtered[\" + i + \"] = '\" +\n prep +\n \"' (int) \" + ((int) srep.charAt(i)) +\n \" 0x\" + Integer.toHexString((int) srep.charAt(i)));\n }\n }\n\n // Make sure that if we go through 'gets', that we reset the\n // TCL_ENCODING_START flag still. [Bug #523988]\n\n encodingStart = false;\n\n if (result == TCL_CONVERT_MULTIBYTE) {\n // The last few bytes in this channel buffer were the start of a\n // multibyte sequence. If this buffer was full, then move them to\n // the next buffer so the bytes will be contiguous. \n\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE decode result found\");\n }\n\n ChannelBuffer next;\n int extra;\n\n next = buf.next;\n if (buf.nextAdded < buf.bufLength) {\n if (gs.rawRead.i > 0) {\n // Some raw bytes were converted to UTF-8. Fall through,\n // returning those UTF-8 characters because a EOL might be\n // present in them.\n } else if (eofCond) {\n // There was a partial character followed by EOF on the\n // device. Fall through, returning that nothing was found.\n\n buf.nextRemoved = buf.nextAdded;\n } else {\n // There are no more cached raw bytes left. See if we can\n // get some more.\n\n goto_read = true;\n continue read; //goto read;\n }\n } else {\n if (next == null) {\n next = new ChannelBuffer(bufSize);\n buf.next = next;\n inQueueTail = next;\n }\n extra = rawLen - gs.rawRead.i;\n System.arraycopy(raw, rawStart + gs.rawRead.i,\n next.buf, buf.BUFFER_PADDING - extra, extra);\n next.nextRemoved -= extra;\n buf.nextAdded -= extra;\n\n if (debug) {\n System.out.println(\"copied \" + extra + \" bytes to \" +\n \"next ChannelBuffer\");\n }\n }\n }\n\n break read; // End loop in the normal case\n } // End read labeled while loop\n\n gs.buf = buf;\n return 0;\n }", "public static void maxTokens(Scanner in) {\n }", "private void goBack() throws IOException{\n\t\tif(\"\\n\".equals(currentChar)){\n\t\t\tline--;\n\t\t}\n\t\tpos--;\n\t\tsourceReader.reset();\n\t}", "private int fillBuffer(InputStream is) throws IOException {\n int len = buffer.length;\n int pos = 0;\n while (pos < buffer.length) {\n int read = is.read(buffer, pos, len);\n if (read == -1)\n return pos;\n pos += read;\n len -= read;\n }\n return pos;\n }", "void setReadPosition(int minus) {\n/* 159 */ this.pos -= minus;\n/* 160 */ this.readerIndex = getReadPosition(this.pos);\n/* 161 */ this.buffer.readerIndex(this.readerIndex);\n/* */ }", "private static char[] growBuffer(char[] dest, int index, int size) {\n char[] copy = new char[size];\n if (index > 0) {\n System.arraycopy(dest, 0, copy, 0, index);\n }\n return copy;\n }", "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 updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {\n\n updateCharacterStream(columnIndex, x, (long) length);\n }", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "@Override\n public Token nextToken(\n PushbackReader r, int cin, Tokenizer t)\n throws IOException {\n\n int i = 0;\n charbuf[i++] = (char) cin;\n int c;\n do {\n c = r.read();\n if (c < 0) {\n c = cin;\n }\n checkBufLength(i);\n charbuf[i++] = (char) c;\n } while (c != cin);\n\n String sval = copyValueOf(charbuf, 0, i);\n return new Token(TT_QUOTED, sval, 0);\n }", "private void skipBytes(int count) throws IOException {\n long currentPosition = archive.position();\n long newPosition = currentPosition + count;\n if (newPosition > archive.size()) {\n throw new EOFException();\n }\n archive.position(newPosition);\n }", "private void releaseChar() {\r\n \t\tif (index < documentContent.length())\r\n \t\t\tindex++;\r\n \t}", "public static void inputFlush() {\n int dummy;\n int bAvail;\n\n try {\n while ((System.in.available()) != 0)\n dummy = System.in.read();\n } catch (java.io.IOException e) {\n System.out.println(\"Input error\");\n }\n }", "public void updateNCharacterStream(String columnName, Reader x) throws SQLException {\n\n updateNCharacterStream(columnName, x, -1);\n }", "public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}", "public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException {\n\n updateCharacterStream(columnName, x, (long) length);\n }", "public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {\n\n updateNCharacterStream(columnIndex, x, -1);\n }", "protected void fill() throws IOException {\n ensureOpen();\n len = in.read(buf, 0, buf.length);\n if (len == -1) {\n throw new EOFException(\"Unexpected end of ZLIB input stream\");\n }\n inf.setInput(buf, 0, len);\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "void mark(@Nonnegative int readLimit);", "@Override\n public int read() throws IOException {\n if (pos >= count) {\n fill();\n if (pos >= count) {\n return -1;\n }\n }\n checkIfClosed();\n return buf[pos++] & 0xFF;\n }", "public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {\n currentPreparedStatement.setCharacterStream(parameterIndex, reader, length);\n }", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "protected void readNextChar() throws IOException {\n nextChar = inputReader.read();\n switch (nextChar) {\n case -1: // EOF\n if (char_num == 0) {\n char_num = -1;\n break;\n }\n nextChar = '\\n';\n // fall thru\n case '\\n':\n line_num++;\n char_num = 0;\n break;\n default:\n line.append((char) nextChar);\n char_num++;\n return;\n }\n line.setLength(0);\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "@Override\n public void consume(ParsableByteArray data) {\n checkStateNotNull(sampleReader);\n checkStateNotNull(output);\n int offset = data.getPosition();\n int limit = data.limit();\n byte[] dataArray = data.getData();\n\n // Append the data to the buffer.\n totalBytesWritten += data.bytesLeft();\n output.sampleData(data, data.bytesLeft());\n\n while (true) {\n int startCodeOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);\n\n if (startCodeOffset == limit) {\n // We've scanned to the end of the data without finding another start code.\n if (!hasOutputFormat) {\n csdBuffer.onData(dataArray, offset, limit);\n }\n sampleReader.onData(dataArray, offset, limit);\n if (userData != null) {\n userData.appendToNalUnit(dataArray, offset, limit);\n }\n return;\n }\n\n // We've found a start code with the following value.\n int startCodeValue = data.getData()[startCodeOffset + 3] & 0xFF;\n // This is the number of bytes from the current offset to the start of the next start\n // code. It may be negative if the start code started in the previously consumed data.\n int lengthToStartCode = startCodeOffset - offset;\n\n if (!hasOutputFormat) {\n if (lengthToStartCode > 0) {\n csdBuffer.onData(dataArray, offset, /* limit= */ startCodeOffset);\n }\n // This is the number of bytes belonging to the next start code that have already been\n // passed to csdBuffer.\n int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;\n if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {\n // The csd data is complete, so we can decode and output the media format.\n output.format(\n parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));\n hasOutputFormat = true;\n }\n }\n\n sampleReader.onData(dataArray, offset, /* limit= */ startCodeOffset);\n\n if (userData != null) {\n int bytesAlreadyPassed = 0;\n if (lengthToStartCode > 0) {\n userData.appendToNalUnit(dataArray, offset, /* limit= */ startCodeOffset);\n } else {\n bytesAlreadyPassed = -lengthToStartCode;\n }\n\n if (userData.endNalUnit(bytesAlreadyPassed)) {\n int unescapedLength = NalUnitUtil.unescapeStream(userData.nalData, userData.nalLength);\n castNonNull(userDataParsable).reset(userData.nalData, unescapedLength);\n castNonNull(userDataReader).consume(pesTimeUs, userDataParsable);\n }\n\n if (startCodeValue == START_CODE_VALUE_USER_DATA\n && data.getData()[startCodeOffset + 2] == 0x1) {\n userData.startNalUnit(startCodeValue);\n }\n }\n\n int bytesWrittenPastPosition = limit - startCodeOffset;\n long absolutePosition = totalBytesWritten - bytesWrittenPastPosition;\n sampleReader.onDataEnd(absolutePosition, bytesWrittenPastPosition, hasOutputFormat);\n // Indicate the start of the next chunk.\n sampleReader.onStartCode(startCodeValue, pesTimeUs);\n // Continue scanning the data.\n offset = startCodeOffset + 3;\n }\n }", "@Override\n protected int update(byte[] array, int off, int count) throws IOException {\n int mark = (int)limit;\n \n if(count >= limit) {\n append(array, off, mark);\n finished = true;\n limit = 0;\n return count - mark;\n } \n if(count > 0) {\n append(array, off, count);\n limit -= count; \n }\n return 0;\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }" ]
[ "0.5734373", "0.5665254", "0.5241355", "0.51768184", "0.51327187", "0.5131074", "0.5105206", "0.50397587", "0.5017513", "0.5015112", "0.50047463", "0.5002526", "0.4988889", "0.49811333", "0.49780416", "0.4958394", "0.49544096", "0.49515522", "0.49430543", "0.4930276", "0.49261603", "0.49245235", "0.49081114", "0.49017903", "0.49016368", "0.48913535", "0.48874757", "0.48717552", "0.48690906", "0.4860119", "0.48552942", "0.48427564", "0.4842053", "0.48418704", "0.48295897", "0.48258418", "0.48189366", "0.48143363", "0.48077172", "0.47881815", "0.47785193", "0.47713566", "0.476946", "0.47663042", "0.47373992", "0.47283247", "0.47221482", "0.47185782", "0.4709512", "0.4709448", "0.47086275", "0.47084367", "0.4701634", "0.46817577", "0.46798983", "0.4679302", "0.46775493", "0.4676594", "0.46739542", "0.4664531", "0.4660529", "0.46595377", "0.46520278", "0.46435937", "0.4642011", "0.463956", "0.46331757", "0.46306297", "0.4629568", "0.46185416", "0.46147895", "0.46048346", "0.45948723", "0.45942605", "0.458835", "0.4573183", "0.45729852", "0.45725936", "0.4571613", "0.45698684", "0.45696315", "0.45613676", "0.45578134", "0.45516792", "0.4546144", "0.45399347", "0.45359406", "0.45323843", "0.45316595", "0.45293", "0.4528854", "0.4518873", "0.45187035", "0.45139736", "0.44986498", "0.4495486", "0.4494879", "0.4494879", "0.44941503", "0.448969", "0.44879186" ]
0.0
-1
main method for decompression. Takes command line arguments. To use, type: java Puff inputfilename outputfilename at the commandline prompt.
public static void main(String[] args) throws IOException { ObjectInputStream in = null; // reads in the compressed file FileWriter out = null; // writes out the decompressed file // Check for the file names on the command line. if (args.length != 2) { System.out.println("Usage: java Puff <in fname> <out fname>"); System.exit(1); } // Open the input file. try { in = new ObjectInputStream(new FileInputStream(args[0])); } catch (FileNotFoundException e) { System.out.println("Can't open file " + args[0]); System.exit(1); } // Open the output file. try { out = new FileWriter(args[1]); } catch (FileNotFoundException e) { System.out.println("Can't open file " + args[1]); System.exit(1); } Puff pf = new Puff(); pf.getFrequencies(in); // Create a BitReader that is able to read the compressed file. BitReader reader = new BitReader(in); /****** Add your code here. ******/ pf.createTree(); pf.unCompress(reader,out); /* Leave these lines at the end of the method. */ in.close(); out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tDecompress d = new Decompress(args[0]);\n\t\tif(d.data.loadFailure()) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Attempt to read the header and rebuild the original Huffman tree\n\t\td.rebuildTree(d.readHeader());\n\n\t\t//Convert all codes back to their original bitstrings\n\t\td.decode(args[0]);\n\t}", "public static void main(String[] args) throws IOException{\n\t\tSystem.exit((new BitCompresser()).run(args));\n\t}", "public static void main(String[] args){\n huffmanCoder(args[0],args[1]);\n }", "public static void main(String[] args) {\n\tchar[] inChar;\n\ttry{\n\tif( args[0].equals(\"c\")){\n\tcompress(args[1]);\n\n\t}\n\telse if(args[0].equals(\"d\")){ // \n\tdecompress(args[1]);\n\t}\n\telse{\n\tthrow new Exception();\n\t}\n\n\n\t}//end try\n\n\t\n\tcatch(Exception e){\n\tSystem.err.println(\"exception thrown: \" + e.getMessage() );\n\t\t}\n\t}", "public static void main(String[] args){\r\n List<File> xzQueue = new ArrayList<>();\r\n List<File> unpackQueue = new ArrayList<>();\r\n List<File> packXZQueue = new ArrayList<>();\r\n\r\n for(int i=0; i<args.length; ++i){\r\n if(args[i].equalsIgnoreCase(\"-packxz\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n packXZQueue.add(new File(s));\r\n }\r\n }\r\n } else if(args[i].equalsIgnoreCase(\"-xz\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n xzQueue.add(new File(s));\r\n }\r\n }\r\n } else if(args[i].equalsIgnoreCase(\"-pack\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n unpackQueue.add(new File(s));\r\n }\r\n }\r\n }\r\n }\r\n\r\n for(File f : packXZQueue) unpack(extractXZ(f));\r\n for(File f : xzQueue) extractXZ(f);\r\n for(File f : unpackQueue) unpack(f);\r\n }", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "public static void main(String args[]) {\n\t\t\r\n\t\tnew HuffmanEncode(\"book3.txt\", \"book3Comp.txt\");\r\n\t\t//do not add anything here\r\n\t}", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException {\n\t\tRiffRaff riff = new RiffRaff();\n\t\triff.readIn();\n\t}", "public static void main(String[] args) {\r\n \r\n\t\tchar runType = '\\u0000';\r\n\t\ttry {\r\n\t\t\tif( args.length <= 2){\r\n\t\t\t\trunType = 'R'; //default recursive calculation by Laplacian method\r\n\t\t\t}else{\r\n\t\t\t\trunType = args[2].charAt(0); //choice of the caller: Laplacian or iterative Gaussian\r\n\t\t\t}\r\n\t\t\tfileReader(args[0], args[1], runType);\r\n\t\t\tSystem.out.println(\"Processing Completed. Please Check the output file \" + args[1]);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.out.println(\"Please specify valid file names as arguments\");\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(\"Please enter the input file and the output file as \" + \"the two arguments\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tHuffmanCodes MyHuffmanCodes = new HuffmanCodes();\n\t\tMyHuffmanCodes.run();\n\t}", "public static void main(String[] args) {\n if (args.length != 1) {\n System.out.println(\"Usage: java pktanalyzer datafile.\\nPlease use correctly.\");\n System.exit(0);\n }\n String fileName = args[0];\n\n try (InputStream inputStream = new FileInputStream(fileName)) {\n byte[] fullPacket = new byte[(int) new File(fileName).length()];\n inputStream.read(fullPacket);\n unwrapEthernet(fullPacket);\n } catch (Exception e) {\n System.out.println(e);\n }\n }", "public static void main(String[] args) {\n\n /* \n algorithms to choose:\n\n 0 - ASCON\n 1 - AESOTRS\n 2 - AESOTRP\n\n ------ not yet supported ------\n 3 - Acorn\n 4 - Keyak\n 5 - OCB\n 6 - Norx\n 7 - Deoxys\n 8 - Ketje\n 9 - AEZ\n 10 - MORUS\n */\n\n\n // enter input file path\n String path_in = args[0];\n\n // enter encrypted output file path\n String path_out = args[1];\n\n // enter decrypted output file path\n String path_out2 = args[2];\n\n // Algorithm number\n int alg = Integer.parseInt(args[3]);\n\n // enter key (in this case 16B)\n byte[] key = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // enter nonce (int his case 16B)\n byte[] nonce = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // call encryption function which will do the rest and output the file\n new JNI().dll_encrypt(path_in, path_out, nonce, key, alg); // invoke the native method\n\n new JNI().dll_decrypt(path_out, path_out2, nonce, key, alg);\n\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader bin = new BufferedReader(\n\t\t\t\tnew InputStreamReader(System.in));\n\t\tFrodoPillows l = new FrodoPillows();\n\t\tl.readData(bin);\n\t\tl.calculate();\n\t\tl.printRes();\n\t}", "public static void main(String[] args) {\n if (args.length != 2 && args.length != 3) {\n System.out.println(\"wrong args\");\n return;\n }\n try {\n String name, filename;\n if (args.length == 3) {\n if (!\"-jar\".equals(args[0])) {\n System.out.println(\"wrong flag\");\n return;\n }\n\n name = args[1];\n filename = args[2].substring(0, args[2].indexOf(\".jar\"));\n } else {\n name = args[0];\n filename = args[1];\n }\n File root = new File(filename);\n Class<?> token = Class.forName(name);\n Implementor implementor = new Implementor();\n if (args.length == 3) {\n implementor.implementJar(token, new File(args[2]));\n } else {\n implementor.implement(token, root);\n }\n } catch (ClassNotFoundException e) {\n System.out.println(\"Class not found:(\");\n } catch (ImplerException e) {\n System.out.println(\"An error occured\");\n } catch (Exception e) {\n System.out.println(\"Something wrong\");\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(compressBad(\"aaaabbbccccccd\"));\r\n\t}", "public static void main(String[] args)\n {\n switch (args[0]) {\n case \"-\":\n encode();\n break;\n case \"+\":\n decode();\n break;\n default:\n System.out.println(\"Invalid arguments, needs to be a '-' or '+'\");\n break;\n }\n }", "public static void main(String[] args) throws Exception {\n\t\ttry {\n\t\t\tHuffmanCompressor.HuffmanTree(args[0], args[1]);\n\t\t}\n\t\tcatch (IndexOutOfBoundsException c){\n\t\t\tSystem.out.println(\"Please input valid files\");\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader buffRead = new BufferedReader(new FileReader(\"/home/hsnavarro/IdeaProjects/Aula 1/src/input\"));\n FileOutputStream output = new FileOutputStream(\"src/output\", true);\n String s = \"\";\n s = buffRead.readLine().toLowerCase();\n System.out.println(s);\n CifraCesar c = new CifraCesar(0, s, true);\n c.getInfo();\n int[] freq = new int[26];\n for (int i = 0; i < 26; ++i) freq[i] = 0;\n for (int i = 0; i < c.criptografada.length(); i++) {\n freq[c.criptografada.charAt(i) - 97]++;\n }\n Huffman h = new Huffman(freq, c.criptografada);\n h.printHuffman();\n h.descriptografiaHuffman();\n System.out.println(\"huffman: \" + h.descriptoHuffman);\n CifraCesar d = new CifraCesar(h.criptoAnalisis(), h.descriptoHuffman, false);\n\n System.out.println(d.descriptografada);\n System.out.println(d.descriptografada);\n\n System.out.println(\"Comparando:\");\n System.out.println(\"Antes da compressão:\" + s.length());\n\n byte inp = 0;\n int cnt = 0;\n for (int i = 0; i < h.criptografada.length(); i++) {\n int idx = i % 8;\n if (h.criptografada.charAt(i) == '1') inp += (1 << (7 - idx));\n if (idx == 7) {\n cnt++;\n output.write(inp);\n inp = 0;\n }\n }\n if(h.criptografada.length() % 8 != 0){\n cnt++;\n output.write(inp);\n }\n System.out.println(\"Depois da compressão:\" + cnt);\n buffRead.close();\n output.close();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(zipZap(((\"azbcpppzop\") ) ));\n\t}", "List<CompressResult> decompress(Path input, Path output) throws IOException;", "public static void main(String args[]){\r\n\t\ttry{\r\n\t\t\tExtract ex = new Extract();\r\n\t\t\t\r\n\t\t\t// TODO: remove hard coded file\r\n\t\t\t//ex.unZip(\"D:\\\\Workspace\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t//ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t// ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\YPmobile.apk\");\r\n\t\t\t\r\n\t\t\tif(args == null || args.length == 0){\r\n\t\t\t\tthrow new Exception(\"Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString file = args[0];\r\n\t\t\tif(args.length > 1){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tSystem.out.println(\"Log Level: \"+ args[1]);\r\n\t\t\t\t\tSystem.out.println(\"1- Debug, 2- Production. Debug is slow.\");\r\n\t\t\t\t\tint logLevel = Integer.parseInt(args[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(logLevel != Log.DEBUG_LEVEL && logLevel != Log.PRODUCTION_LEVEL)\r\n\t\t\t\t\t\tthrow new Exception(\"Unsupported loglevel \"+ logLevel +\". Supported values: Debug- 1, Production - 2\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tLog.setLogLevel(logLevel);\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tthrow new Exception(\"Incorrect Log Level. Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Parsing data, please wait...\");\r\n\t\t\t// Unzip content\r\n\t\t\tex.unZip(file);\r\n\t\t\t// Parse Binary XML\r\n\t\t\tex.decodeBX();\r\n\t\t\t// Decode DEX file\r\n\t\t\tex.decodeDex();\r\n\t\t\t\r\n\t\t\tLog.exitLogger();\r\n\t\t\tSystem.out.println(\"Done!\");\r\n\t\t\t// EXperimentel. Still working on it...\r\n\t\t\t//ex.decodeResource();\r\n\t\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n PixelateFilter pixelateFilter = new PixelateFilter(new File(args[0]), new File(args[1]), Integer.parseInt(args[2]));\n pixelateFilter.export(new File(args[1]));\n }", "public static void main(String[] args) throws IOException {\n Charset windows = Charset.forName(\"Windows-1251\");\n String sourceFile = args[0];\n String destFile = args[1];\n\n BufferedReader in = new BufferedReader(new FileReader(sourceFile));\n PrintWriter out = new PrintWriter(new FileWriter(destFile));\n\n ArrayList<String > source = new ArrayList<>();\n String line;\n while ((line = in.readLine()) != null){\n source.add(line);\n }\n ArrayList<String> decod = new ArrayList<>();\n\n for (String current: source){\n decod.add(new String(current.getBytes(windows)));\n }\n for(String item: decod){\n out.println(item);\n }\n in.close();\n out.close();\n }", "public static void main(String[] args) {\n String fileName = null;\n if (args.length >= 2) {\n // ignore [0] = \"-f\"\n fileName = args[1];\n }\n ArrayList<BigInteger> seq = (new BFileReader()).read(fileName);\n int index = 0;\n while (index < seq.size()) {\n System.out.println(index + \" \" + seq.get(index).toString());\n index ++;\n } // while index\n }", "public static void main(String[] args) {\n String input_file = (args.length > 2) ? args[1] : args[0];\n String output_file = (args.length > 2) ? args[2] : args[1];\n String parserModel = (args.length > 2) ? args[0] : \"edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz\";\n\n LexicalizedParser lp = LexicalizedParser.loadModel(parserModel);\n demoDP(lp, input_file, output_file);\n\n }", "public static void main(String[] args) {\n if (args.length < 2) {\n System.out.println(\"The first argument must be -e or -d\");\n System.out.println(\n \"while the second argument must be -ECB, -CBC. or -CTR\");\n System.exit(1);\n }\n if (args[1].equals(\"-ECB\")) {\n if (args.length == 4) {\n String filename = args[2];\n String key = args[3];\n if (args[0].equals(\"-e\")) {\n encryptECB(filename,key);\n }\n else if (args[0].equals(\"-d\")) {\n decryptECB(filename,key);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -ECB \" +\n \"<image file name without .pgm> <key>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CBC\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String IV = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCBC(filename,key,IV);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCBC(filename,key,IV);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CBC \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CTR\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String counter = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCTR(filename,key,counter);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCTR(filename,key,counter);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CTR \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else {\n System.out.println(\"The second argument must be -ECB, -CBC, or \" +\n \"-CTR\");\n System.exit(1);\n }\n\n }", "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 void main(String [] args){\n\t\n\tFile speedfile = new File(args[0]);\n\tFile category = new File(args[1]);\n\tFile datafile = new File(args[2]);\n\t\n\tDataset data = Dataset.VERBEECK;//decides which kind it is (SCHILDE, VERBEEK)\n\tnew TripSetup(speedfile, category, datafile, data);\n}", "public static void main(String[] args) throws IOException{\n\t\tdeque myDeque = new deque();\r\n\t\t\r\n\t\t//file paths for the input and output files\r\n\t\tString inPath = \"E:\\\\SchoolWork\\\\CSC364\\\\prog1\\\\IO\\\\inf5.txt\";\r\n\t\tString outPath = \"E:\\\\SchoolWork\\\\CSC364\\\\prog1\\\\IO\\\\outf5.txt\";\r\n\t\t\r\n\t\t//create a new file reader\r\n\t\tBufferedReader reader = new BufferedReader(new FileReader(inPath));\r\n\r\n\t\tString line = null;\r\n\t\t\r\n\t\t//read in each line in the input file\r\n\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\r\n\t\t\t//split the line into the command and the data sections\r\n\t\t\tString[] lineParts = line.split(\" \");\r\n\t\t\t\r\n\t\t\t//switch on the command section of the line\r\n\t\t\tswitch (lineParts[0]){\r\n\t\t\t\tcase \"PR\":\tmyDeque.printDeque(outPath);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"IF\":\tmyDeque.insertFront(Integer.parseInt(lineParts[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"IR\":\tmyDeque.insertRear(Integer.parseInt(lineParts[1]));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"DF\":\tmyDeque.deleteFront();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"DR\":\tmyDeque.deleteRear();\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//close the file reader\r\n\t\treader.close();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n String operation = args[0];\r\n switch (operation) {\r\n case \"+\": // decode\r\n decode();\r\n break;\r\n case \"-\": // encode\r\n encode();\r\n break;\r\n default: // invalid command-line argument\r\n StdOut.println(\"Invalid command line argument: \" + operation);\r\n break;\r\n } \r\n }", "public static void main(String[] args){\n\n String mode = \"enc\";\n String data = \"\";\n String out = \"\";\n String path;\n String alg = \"unicode\";\n int key = 0;\n\n try {\n for (int i = 0; i < args.length; i++) {\n if (args[i].equals(\"-data\") || args[i].equals(\"-in\")) {\n data = args[i + 1];\n }\n if (args[i].equals(\"-mode\")) {\n mode = args[i + 1];\n }\n if (args[i].equals(\"-key\")) {\n key = Integer.parseInt(args[i + 1]);\n }\n if (args[i].equals(\"-out\")) {\n out = args[i + 1];\n }\n if (args[i].equals(\"-alg\")) {\n alg = args[i + 1];\n }\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Missing option\");\n }\n\n File file = new File(data);\n\n if (file.exists() && !file.isDirectory()) {\n path = data;\n\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encryptFromFile(path, key);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decryptFromFile(path,key);\n break;\n }\n\n } else {\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encrypt(key, data);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decrypt(key, data);\n break;\n }\n }\n\n if (out.isEmpty()) {\n System.out.println(data);\n } else {\n writeIntoFile(out, data);\n }\n\n }", "public static void main(String[] args) throws IOException {\n\t \n\t copyInputFilesToOutputDirectory();\n\t \n\t System.out.println(\"done\"); \n\t \n\t \n\t \n\t}", "public static void main(String[]args){\n\n if (args.length==0) {return;}\n else{\n arguments = args[0].split(\" \");\n //1st index is size, 2nd is conflict resolution scheme, 3rd is input data file, 4th is number of keys to be searched\n size = Integer.parseInt(arguments[0]); //size input\n scheme = arguments[1];\n name = arguments[2];\n k = Integer.parseInt(arguments[3]);\n }\n if(!HashBank.isPrime(size)){System.out.println(\"Size entered is not a prime number!\");return;} //returns if not prime\n if(!scheme.equals(\"linear\") && !scheme.equals(\"quadratic\") && !scheme.equals(\"chaining\")){System.out.println(\"Incorrect scheme!\");return;} //checks scheme\n\n if (scheme.equals(\"linear\")){Implementation.linear(size,data,k);}\n else if (scheme.equals(\"quadratic\")){Implementation.quadratic(size,data,k);}\n else {Implementation.chaining(size,data,k);}\n }", "public static void main(String[] args) {\r\n System.out.println(\"Starting\");\r\n try {\r\n File fastq = new File(\"data/HW4.fastq\");\r\n if (!fastq.exists()) {\r\n System.out.println(\"Can't find input file \" + fastq.getAbsolutePath());\r\n System.exit(1);\r\n }\r\n File fasta = new File(\"data/HW4.fasta\");\r\n FileConverter converter = new FileConverter(fastq, fasta);\r\n converter.convert();\r\n } catch (IOException x) {\r\n System.out.println(x.getMessage());\r\n }\r\n System.out.println(\"Done\");\r\n }", "public static void main(String[] args) {\n\t\tString inputFile = null;\n\t\tString outputFile = null;\n\n\t\tif (args.length > 0) {\n\t\t\tinputFile = args[0];\n\t\t\tif (args.length > 1) {\n\t\t\t\toutputFile = args[1];\n\t\t\t}\n\t\t}\n\n\t\tStraightforwardReduction reduction = new StraightforwardReduction(inputFile);\n\n\t\tKCol kcol = reduction.getKCol();\n\t\tSAT newsat = kcol.convert_kcol_to_sat();\n\t\tnewsat.printCNF(outputFile);\n\n\t\t//If the program success, it should exit with exit code 0.\n\t\tSystem.exit(0);\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tif(args.length == 0)\r\n\t\t{\r\n\t\t\tPrintUsage();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString inputPath = args[0];\r\n\t\tString outputPath = args[1];\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Panorama2Cube is runing...\");\r\n\t\t\t\r\n\t\t\tBufferedImage ImgIn = ImageIO.read(\r\n\t\t\t\t\tnew File(inputPath));//读取全景图\r\n\t\t\t\r\n\t\t\tint inWidth = ImgIn.getWidth(null);//全景图宽\r\n\t\t\t\r\n\t\t\tBufferedImage ImgOut2 = new BufferedImage(inWidth, inWidth * 3/4, BufferedImage.TYPE_INT_ARGB);\r\n\t\t\t\r\n\t\t\t(new Convert()).convertBack(ImgIn, ImgOut2);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Convert successfully!\\nOutputing image...\");\r\n\t\t\t\r\n\t\t\tImageIO.write(ImgOut2, \"png\", \r\n\t\t\t\t\tnew File(outputPath));//输出图片\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Bingo!\\n\");\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}", "public static void main(String[] args) {\n // Check if the input file and output file are specified in the arguments\n if (args == null || args.length != 2) {\n System.out.println(\"Invalid arguments for the program.\");\n return;\n }\n\n String inputFile = args[0];\n Path inputFilePath = Paths.get(inputFile);\n\n String outputFile = args[1];\n Path outputFilePath = Paths.get(outputFile);\n\n // Check if the input file is valid\n if (Files.notExists(inputFilePath) || !Files.isReadable(inputFilePath) || !Files.isRegularFile(inputFilePath)) {\n System.out.println(\"Invalid input file.\");\n return;\n }\n\n // Create the output file if it doesn't exist\n if (Files.notExists(outputFilePath)) {\n try {\n Files.createFile(outputFilePath);\n } catch (IOException e) {\n System.out.println(\"Failed to create output file.\");\n e.printStackTrace();\n return;\n }\n }\n\n // Check if the output file is valid\n if (Files.notExists(outputFilePath) || !Files.isWritable(outputFilePath) || !Files.isRegularFile(outputFilePath)) {\n System.out.println(\"Invalid output file.\");\n return;\n }\n\n\n try {\n // Create folders for the temp generated files\n createTempFolder(TEMP_FOLDER);\n createTempFolder(TEMP_LONG_WORD_FOLDER);\n createTempFolder(TEMP_SORTED_WORD_FOLDER);\n\n // Analyze the words from the input file\n // Save words which are too long to separate files\n Path analyzeFile = analyzeFile(inputFilePath);\n\n // Read the words batch by batch\n // And save each batch of sorted words to separate files\n splitFileAndSortWord(analyzeFile);\n Files.delete(analyzeFile);\n\n // Merge sort the batches of sorted words to one file\n Path tempResultPath = mergeSortWord();\n deleteTempFolder(TEMP_SORTED_WORD_FOLDER);\n\n // Insert long words to the sorted word\n tempResultPath = mergeLongWord(tempResultPath);\n deleteTempFolder(TEMP_LONG_WORD_FOLDER);\n\n // Copy to results to the output file\n copyFile(tempResultPath, outputFilePath);\n\n } catch (IOException | RuntimeException | Error e) {\n System.out.println(\"Error occurred when running the program: \");\n e.printStackTrace();\n } finally {\n try {\n // Cleanup the temp generated files\n deleteTempFolder(TEMP_FOLDER);\n } catch (IOException e) {\n System.out.println(\"Error occurred when deleting temp generated files.\");\n }\n }\n }", "public static void \n main\n (\n String[] args /* IN: command line arguments */\n )\n {\n FileCleaner.init();\n\n try {\n TestJarReaderApp app = new TestJarReaderApp();\n app.run();\n } \n catch (Exception ex) {\n ex.printStackTrace();\n System.exit(1);\n } \n \n System.exit(0);\n }", "public static void main(String[] args) {\n\t\tBackpack result = new Backpack();\n\t\tSystem.out.println(result.backPack(10, new int[] {3,4,8,5}));\n\t\tSystem.out.println(result.backPackI(10, new int[] {3,4,8,5}));\n\t}", "public static void main(String[] args) {\n int arg = 0;\n int seedNum = 100;\n int trainNum = 0;\n int testNum = 0;\n boolean treeFlag = false;\n boolean textFlag = false;\n //handle options\n while (args[arg].startsWith(\"-\")) {\n switch(args[arg]) {\n case (\"-tree\"):\n treeFlag = true;\n break;\n case (\"-text\"):\n textFlag = true;\n break;\n case (\"-seednum\"):\n arg++;\n seedNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainnum\"):\n arg++;\n trainNum = Integer.parseInt(args[arg]);\n break;\n case (\"-testnum\"):\n arg++;\n testNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainall\"):\n trainNum = Integer.MAX_VALUE;\n break;\n case (\"-testall\"):\n testNum = Integer.MAX_VALUE;\n break;\n default:\n throw new IllegalArgumentException(\"Unrecognized command: \" + args[arg]);\n }\n arg++;\n }\n File sourceDirectory = new File(args[arg]);\n arg++;\n File destinationDirectory = new File(args[arg]);\n\n if(treeFlag && textFlag) {\n System.err.println(\"Both text and tree flags detected, which one do you want?\");\n System.exit(2);\n }\n\n if (trainNum == Integer.MAX_VALUE && testNum == Integer.MAX_VALUE) {\n System.err.println(\"Can't max both train and test values!\");\n System.exit(3);\n }\n\n if (!sourceDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + sourceDirectory.getName() + \"is not a directory!\");\n System.exit(4);\n }\n if (!destinationDirectory.exists()) {\n destinationDirectory.mkdirs();\n } else if (!destinationDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + destinationDirectory.getName() + \"is not a directory!\");\n System.exit(5);\n }\n\n if (treeFlag) {\n createSeededFiles(\"tree\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n } else if (textFlag) {\n createSeededFiles(\"text\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n }\n }", "public static void main(String[] args) throws Exception{\n \n if(args.length != 1){\n System.out.println(\"Usage: java TextDecoder filename\");\n System.exit(0);\n }\n \n File messageFile = new File(args[0]); \n TextDecoder decoder = new TextDecoder();\n decoder.readMessagesFromFile(messageFile);\n decoder.printMessages();\n }", "public static void main(String[] args) {\n\n\t\t// File file=new File(\"./testClasses/binarysearch.java\");\n\t\tCharStream input = null;\n\t\tif (args.length > 0) {\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(args[0]);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(\"./testFiles/factorial.java\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tMiniJavaLexer lexer = new MiniJavaLexer(input);\n\t\tMiniJavaParser parser = new MiniJavaParser(new BufferedTokenStream(\n\t\t\t\tlexer));\n\t\tParseTree tree = parser.program();\n\t\tTrees.inspect(tree, parser);\n\n\t\t// ---------PrintVisitor-------------\n\t\tPrintVisitor pv = new PrintVisitor();\n\t\tpv.visitMiniJava(tree);\n\n\t\t// --------SymbolTableVisitor--------\n\t\tSymbolTableVisitor symbolTableVisitor = new SymbolTableVisitor();\n\t\tSymbolTable visitedST = (SymbolTable) symbolTableVisitor.visit(tree);\n\t\tif (symbolTableVisitor.getErrorFlag()) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(BGSTYLE\n\t\t\t\t\t\t\t+ RED\n\t\t\t\t\t\t\t+ \"THE PROGRAM COTAINS ERRORS! \\n CHECK CONSOLE AND PARSE TREE WINDOW FOR MORE INFO!\");\n\t\t} else {\n\t\t\tvisitedST.printTable();\n\t\t\tvisitedST.resetTable();\n\n\t\t\t// ------TypeCheckVisitor\n\t\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(visitedST);\n\t\t\ttcv.visit(tree);\n\t\t\tif (tcv.getErrorCount() > 0) {\n\t\t\t\tSystem.err.println(\"The Program contains \"\n\t\t\t\t\t\t+ tcv.getErrorCount() + \" Type Errors!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"TypeChecking Done With No Errors!\");\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(decodificadorDeNakamas(\"\"));\r\n\t\t}", "public static void main(String[] args)\n\t{\n\t\tif(args.length < 2)\n\t\t{\n\t\t\tSystem.err.println(\"USAGE: java ConvertPRG <infile> <outfile>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Use these to be sure it's okay to overwrite\n\t\t// an existing file.\n\t\tScanner userIn = new Scanner(System.in);\n\t\tchar overwriteChar = 'n';\n\n\t\t// Use these to see whether the files exist\n\t\tFile inFile;\n\t\tFile outFile;\n\n\t\t// Use these to read and write the files\n\t\tDataInputStream in;\n\t\tDataOutputStream out;\n\n\t\t// Store the ROM data in here, minus INES header\n\t\tbyte[] rom = new byte[0x4000];\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinFile = new File(args[0]);\n\t\t\toutFile = new File(args[1]);\n\t\t\t\n\t\t\t// Make sure the input file exists. Chastise foolish user if it doesn't.\n\t\t\tif(!inFile.isFile())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"File \" + inFile.getName() + \" not found.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t// It's okay if the output file already exists, but make sure\n\t\t\t// we really want to overwrite it if it does.\n\t\t\tif(outFile.isFile())\n\t\t\t{\n\t\t\t\t// If this loop repeats, the user input gibberish.\n\t\t\t\twhile(overwriteChar != 'y')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Really overwrite \" + outFile.getName() + \"? (y/n)\");\n\t\t\t\t\toverwriteChar = Character.toLowerCase(userIn.next().charAt(0));\n\t\t\t\t\t\n\t\t\t\t\tif(overwriteChar == 'n')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tin = new DataInputStream(new FileInputStream(inFile));\n\t\t\tout = new DataOutputStream(new FileOutputStream(outFile));\n\t\t\t\n\t\t\tin.skipBytes(16); // skip the INES header\n\t\t\tin.read(rom); // read in the prg rom data\n\n\t\t\tout.write(rom, 0, rom.length); // write the rom without INES header\n\t\t\tout.write(rom, 0, rom.length); // write the same data to bank 2\n\t\t\t\n\t\t\t// Let's just be sure the sizes are correct.\n\t\t\tSystem.out.println(\"Size of input file: 0x\" + Long.toHexString(inFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x4010)\");\n\t\t\tSystem.out.println(\"Size of output file: 0x\" + Long.toHexString(outFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x8000)\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) encode();\n else if (args[0].equals(\"+\")) decode();\n else throw new IllegalArgumentException(\"Command line argument error !!!\");\n }", "@SuppressWarnings(\"unchecked\") \n public static void main(String[] args) {\n if (args.length < 1) { // No input file given\n System.out.println(Constants.ERROR);\n return;\n }\n String input = args[0]; // Stores input name\n String output; // Stores output name\n if (args.length == Constants.OUTPUT_LEN) { // Given output name\n output = args[1];\n } else { // Default output name\n output = Constants.DEFAULT_NAME; \n }\n valid = new TreeMap<Integer, String>(); // Initializes data structure\n\n JSONParser parser = new JSONParser();\n try (FileReader reader = new FileReader(input)) { // Parses through file\n Object obj = parser.parse(reader);\n JSONArray customerList = (JSONArray)obj; // Gets array of customers\n customerList.forEach(cus->objParse((JSONObject)cus)); // Iterates\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n writeFile(output); // Writes results to the output file\n return;\n }", "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 }", "public static void main(String[] args)\n {\n\t\t\tHuffman tree= new Huffman();\n \t \t Scanner sc=new Scanner(System.in);\n\t\t\tnoOfFrequencies=sc.nextInt();\n\t\t\t// It adds all the user input values in the tree.\n\t\t\tfor(int i=1;i<=noOfFrequencies;i++)\n\t\t\t{\n\t\t\t\tString temp=sc.next();\n\t\t\t\ttree.add(temp,sc.next());\n\t\t\t}\n\t\tint lengthToDecode=sc.nextInt();\n\t\tString encodedValue=sc.next();\n\t\t// This statement decodes the encoded values.\n\t\ttree.getDecodedMessage(encodedValue);\n\t\tSystem.out.println();\n\t\t}", "public static void main(String[] args) {\n switch (args[0]) {\n case \"-\":\n String modeChoice = args[1].toLowerCase();\n switch (modeChoice) {\n case \"n\": // Do nothing mode\n mode = 0;\n break;\n case \"r\": // Reset mode\n mode = 1;\n break;\n case \"m\": // Monitor mode\n mode = 2;\n break;\n }\n compress();\n break;\n case \"+\":\n expand();\n break;\n default:\n throw new IllegalArgumentException(\"Illegal command line argument\");\n }\n }", "public static void main(String[] args) {\n\t\tPreprocessing p = new Preprocessing();\r\n\t\tp.ZAData();\r\n\t\t//String ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\zeroaccess\";\r\n\t\t//String[] ZA_samples = p.get_samples(ZA_dir);\r\n\t\t// HashMap<String, Integer> ZA_opcode_dict = opcode_occurrences(ZA_dir,\r\n\t\t// ZA_samples);\r\n\t\t// System.out.println(ZA_opcode_dict);\r\n\t\t//String replace_ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\replace_za\";\r\n\t\t/* HashMap<String, String> ZA_OPCODE = new HashMap<String, String>() {\r\n\t\t\t{\r\n\t\t\t\tput(\"mov\", \"A\");\r\n\t\t\t\tput(\"push\", \"B\");\r\n\t\t\t\tput(\"call\", \"C\");\r\n\t\t\t\tput(\"cmp\", \"D\");\r\n\t\t\t\tput(\"pop\", \"E\");\r\n\t\t\t\tput(\"jz\", \"F\");\r\n\t\t\t\tput(\"jnz\", \"G\");\r\n\t\t\t\tput(\"add\", \"H\");\r\n\t\t\t\tput(\"test\", \"I\");\r\n\t\t\t\tput(\"lea\", \"J\");\r\n\t\t\t\tput(\"jmp\", \"K\");\r\n\t\t\t\tput(\"retn\", \"L\");\r\n\t\t\t\tput(\"xor\", \"M\");\r\n\t\t\t\tput(\"and\", \"N\");\r\n\t\t\t\tput(\"inc\", \"O\");\r\n\t\t\t\tput(\"sub\", \"P\");\r\n\t\t\t};\r\n\t\t};\r\n\t\tp.copy_replace(ZA_dir, replace_ZA_dir, ZA_samples, ZA_OPCODE);\r\n\t\tString[] ZA_modelData = p.splittingData(replace_ZA_dir);\r\n\t\tfor (String s : ZA_modelData)\r\n\t\t\tSystem.out.println(s);\r\n\t*/\r\n\t}", "public static void main(String[] args){\n if (args.length < 3){\n System.out.println(\"Please specify data path, support frequency and output path\");\n return;\n }\n int supportThreshold = Integer.parseInt(args[1]);\n long startTime = System.nanoTime();\n\n Apriori apriori = new Apriori(args[0], supportThreshold);\n\n apriori.generateFIS();\n writeToOutput(args[2], apriori);\n long endTime = System.nanoTime();\n long duration = (endTime - startTime);\n\n System.out.println(\"Run Time: \" + duration / 1000000000.0);\n }", "private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }", "public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }", "public static void main (String[] args) {\n if (args[0].equals(\"-\"))\n encode();\n if (args[0].equals(\"+\"))\n decode();\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 }", "public static void main(String[] args) throws IOException {\n\t\t\tFile f1=new File(\"E:\\\\py\\\\img\\\\1.jpg\");\r\n\t\t\tFile f2=new File(\"C:\\\\Users\\\\meng\\\\Desktop\\\\1.jpg\");\r\n\t\t\tFile f3=new File(\"C:\\\\Users\\\\meng\\\\Desktop\\\\liaotian.txt\");\r\n\t\t\tFile f4=new File(\"C:\\\\Users\\\\meng\\\\Desktop\\\\country.txt\");\r\n\t\t\tcp(f1, f2);\r\n\t\t\t//2\r\n\t\t\tliaotian(f3);\r\n\t\t\t//3\r\n\t\t\tArrayList<CIty> a4=duxushuji(f4);\r\n\t\t\tchaxun(a4);\r\n\t}", "public static void main(String[] args) {\n\t\tString inputFile = null;\n\n\t\tfinal int GCT_OUTPUT_FORMAT = 0;\n\t\tfinal int RES_OUTPUT_FORMAT = 1;\n\t\tfinal int ODF_OUTPUT_FORMAT = 2;\n\t\tfinal int SAME_OUTPUT_FORMAT = 3;\n\t\tint outputFormat = SAME_OUTPUT_FORMAT;\n\n\t\tint filterFlag = 0; // 0=no filter (default), 1=filter\n\t\tint rownormFlag = 0; // 0=no disc or norm (default), 1=disc., 2=normalization\n\t\tint log2Flag = 0; // 0=no transform, 1=log2 transform\n\t\tdouble minFoldChange = 1;\n\t\tdouble minDelta = 0;\n\n\t\tdouble threshold = 20;\n\t\tdouble ceiling = 16000;\n\t\tdouble remColThreshold = 0;\n\t\tint columnsAboveThreshold = -1;\n\n\t\tdouble probabilityThreshold = 1; // value for uniform probablity threshold filter\n\t\tint numExclude = 0; // number of experiments to exclude (max & min before applying variation filter\n\t\tString outputFileName = null;\n\n\t\tfor(int i = 0, length = args.length; i < length; i++) {\n\t\t\tif(args[i].charAt(0) != '-') {\n\t\t\t\tAnalysisUtil.exit(\"options must start with '-'\");\n\t\t\t}\n\t\t\tswitch (args[i].charAt(1)) {\n\t\t\t\tcase 'O':\n\t\t\t\t\toutputFileName = args[++i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'f':\n\t\t\t\t\tminFoldChange = Double.parseDouble(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'd':\n\t\t\t\t\tminDelta = Double.parseDouble(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\tthreshold = Double.parseDouble(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'c':\n\t\t\t\t\tceiling = Double.parseDouble(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'p':\n\t\t\t\t\tprobabilityThreshold = Double.parseDouble(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'e':\n\t\t\t\t\tnumExclude = Integer.parseInt(args[++i]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\trownormFlag = Integer.parseInt(args[++i]);\n\t\t\t\t\tif(rownormFlag != 0 && rownormFlag != 1 && rownormFlag != 2) {\n\t\t\t\t\t\tAnalysisUtil.exit(\"Illegal option for row normalization.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'F':\n\t\t\t\t\tinputFile = args[++i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\toutputFormat = Integer.parseInt(args[++i]);\n\t\t\t\t\tif(outputFormat != GCT_OUTPUT_FORMAT && outputFormat != RES_OUTPUT_FORMAT && outputFormat != ODF_OUTPUT_FORMAT && outputFormat != SAME_OUTPUT_FORMAT) {\n\t\t\t\t\t\tAnalysisUtil.exit(\"Illegal option for output format.\");\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'g':\n\t\t\t\t\tlog2Flag = Integer.parseInt(args[++i]);\n\t\t\t\t\tif(log2Flag != 0 && log2Flag != 1) {\n\t\t\t\t\t\tAnalysisUtil.exit(\"Illegal option for log2 transform.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'a':\n try {\n columnsAboveThreshold = Integer.parseInt(args[++i]);\n } catch (NumberFormatException nfe) {\n AnalysisUtil.exit(\"Number of columns above threshold is not a number\");\n }\n if (columnsAboveThreshold <= 0) {\n AnalysisUtil.exit(\"Number of columns above threshold must be > 0\");\n }\n break;\n case 'b':\n try {\n remColThreshold = Double.parseDouble(args[++i]);\n } catch (NumberFormatException nfe) {\n System.err.println(\"threshold seen: \" + args[i] + \".\");\n AnalysisUtil.exit(\"Minimum threshold is not a number\");\n\n }\n break;\n\t\t\t\tcase 'V':\n\t\t\t\t\tfilterFlag = Integer.parseInt(args[++i]);\n\t\t\t\t\tif(filterFlag != 0 && filterFlag != 1) {\n\t\t\t\t\t\tAnalysisUtil.exit(\"Illegal option for filtering.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'R': // for backwards compatibility\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tAnalysisUtil.exit(\"unrecognized option: \" + args[i]);\n\t\t\t}\n\t\t}\n\n if(rownormFlag == 1 && log2Flag == 1) {\n AnalysisUtil.exit(\"Cannot take the log2 of zero-centered data due to negative values. Please select row normalization OR log2 transform.\");\n }\n\n\t\tif(inputFile == null) {\n\t\t\tAnalysisUtil.exit(\"No input file specified.\");\n\t\t}\n\n\t\tif(outputFileName == null) {\n\t\t\tAnalysisUtil.exit(\"No output file specified.\");\n\t\t}\n\n\t\tIExpressionDataReader reader = AnalysisUtil.getExpressionReader(inputFile);\n\t\tExpressionData expressionData = (ExpressionData) AnalysisUtil.readExpressionData(reader, inputFile, new PreprocessExpressionDataCreator());\n\t\tDoubleMatrix2D dataset = (DoubleMatrix2D) expressionData.getExpressionMatrix();\n\t\tdouble[] geneArray = new double[dataset.getColumnCount()];\n\t\tTIntArrayList rowIndices = new TIntArrayList(); // indices to keep\n\t\tint columns = dataset.getColumnCount();\n\t\tRandom random = new Random();\n\t\tfor(int i = 0, rows = dataset.getRowCount(); i < rows; i++) {\n\t\t\tdouble mean = 0;\n\t\t\tdouble temp = 0;\n\t\t\tint numColAboveThres = 0;\n\t\t\tfor(int j = 0; j < columns; j++) {\n\t\t\t\tdouble datum = dataset.get(i, j);\n if (columnsAboveThreshold != -1 && datum >= remColThreshold) {\n numColAboveThres++;\n }\n\t\t\t\tif(filterFlag == 1) {\n\t\t\t\t\tif(datum < threshold) {\n\t\t\t\t\t\tdataset.set(i, j, threshold);\n\t\t\t\t\t}\n\t\t\t\t\tif(datum > ceiling) {\n\t\t\t\t\t\tdataset.set(i, j, ceiling);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgeneArray[j] = dataset.get(i, j);\n\t\t\t\tmean = mean + geneArray[j];\n\t\t\t\ttemp = temp + geneArray[j] * geneArray[j];\n\t\t\t}\n\n\t\t\tArrays.sort(geneArray);\n\t\t\tdouble min = geneArray[numExclude];\n\t\t\tif(min == 0) {\n\t\t\t\tmin = 0.001;\n\t\t\t}\n\t\t\tdouble max = geneArray[columns - 1 - numExclude];\n\t\t\tmean = mean / columns;\n double sigma=temp / columns;\n sigma=sigma - mean * mean;\n sigma=(sigma>0) ? Math.sqrt(sigma) : 0.001;\n\n\t\t\tif( ( (filterFlag == 0 && random.nextDouble() < probabilityThreshold) ||\n\t\t\t (filterFlag == 1 && Math.abs(max)/Math.abs(min) >= minFoldChange && max - min >= minDelta))\n\t\t\t && (columnsAboveThreshold == -1 || numColAboveThres >= columnsAboveThreshold) ) {\n\t\t\t\trowIndices.add(i);\n for(int k = 0; k < columns; k++) {\n if(rownormFlag == 1) {\n dataset.set(i, k, (dataset.get(i, k) - mean) / sigma);\n }\n\n if(log2Flag == 1) {\n double x=Math.log(dataset.get(i, k));\n x/=log2;\n dataset.set(i, k, x);\n }\n }\n\t\t\t}\n\t\t}\n\n\t\tint[] indices = rowIndices.toNativeArray();\n\t\tif (indices.length == 0) {\n\t\t\tAnalysisUtil.exit(\"Filtered all genes.\");\n\t\t}\n\n\t\tString outputFormatName = null;\n\t\tswitch (outputFormat) {\n\t\t\tcase GCT_OUTPUT_FORMAT:\n\t\t\t\toutputFormatName = \"gct\";\n\t\t\t\tbreak;\n\t\t\tcase RES_OUTPUT_FORMAT:\n\t\t\t\toutputFormatName = \"res\";\n\t\t\t\tbreak;\n\t\t\tcase ODF_OUTPUT_FORMAT:\n\t\t\t\toutputFormatName = \"odf\";\n\t\t\t\tbreak;\n\t\t\tcase SAME_OUTPUT_FORMAT:\n\t\t\t\toutputFormatName = reader.getFormatName();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tAnalysisUtil.write(expressionData.slice(rowIndices.toNativeArray(), null), outputFormatName, outputFileName, true);\n\t}", "public static void main(String[] args)\n\t\t\tthrows FileNotFoundException, IOException {\n\t\tFileReader reader=new FileReader();\n\t\tEncryptDencrypt enDencrypt=new EncryptDencrypt();\n\t\tFileWriter writer=new FileWriter();\n\t\t\n\t\tSystem.out.println(\"加密文件:\");\n\t\tString plainStr=reader.read(\"src.txt\");\n\t\tString encryptStr=enDencrypt.encrypt(plainStr);\n\t\twriter.write(encryptStr, \"desprotype.txt\");\n\t\t\n\t\tSystem.out.println(\"解密文件:\");\n\t\tString enStr=reader.read(\"desprotype.txt\");\n\t\tString proStr=enDencrypt.deencrypyt(enStr);\n\t\twriter.write(proStr, \"srcprotype.txt\");\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "public int runTest(String[] args, Configuration conf) throws Exception {\n\n Job job = new Job(conf);\n job.setJobName(\"4mz.TestTextInput\");\n\n job.setJarByClass(getClass());\n job.setMapperClass(com.fing.fourmc.mapreduce.text.zstd.TestTextInput.TestMapper.class);\n job.setNumReduceTasks(0);\n\n job.setInputFormatClass(FourMzTextInputFormat.class);\n job.setOutputFormatClass(TextOutputFormat.class);\n\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(Text.class);\n\n if (args[2].equals(\"fast\")) {\n TextOutputFormat.setCompressOutput(job, true);\n TextOutputFormat.setOutputCompressorClass(job, FourMzCodec.class);\n System.out.println(\"Output: 4MZ FAST\");\n } else if (args[2].equals(\"medium\")) {\n TextOutputFormat.setCompressOutput(job, true);\n TextOutputFormat.setOutputCompressorClass(job, FourMzMediumCodec.class);\n System.out.println(\"Output: 4MZ MEDIUM\");\n } else if (args[2].equals(\"high\")) {\n TextOutputFormat.setCompressOutput(job, true);\n TextOutputFormat.setOutputCompressorClass(job, FourMzHighCodec.class);\n System.out.println(\"Output: 4MZ HIGH\");\n } else if (args[2].equals(\"ultra\")) {\n TextOutputFormat.setCompressOutput(job, true);\n TextOutputFormat.setOutputCompressorClass(job, FourMzUltraCodec.class);\n System.out.println(\"Output: 4MZ ULTRA\");\n } else {\n System.out.println(\"Output: PLAIN\");\n }\n\n\n FileInputFormat.setInputPaths(job, new Path(args[0]));\n FileOutputFormat.setOutputPath(job, new Path(args[1]));\n\n int result = job.waitForCompletion(true) ? 0 : 1;\n return result;\n }", "public static void main(String[] args) {\r\n\t\tSPECCompressCountingStarter sccs = new SPECCompressCountingStarter();\r\n\t\tsccs.runAll();\r\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new FileReader(\"cave.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"cave.out\")));\n new cave(in, out);\n in.close();\n out.close();\n }", "public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException {\r\n // Check arguments\r\n if(argv.length <= 0) { System.err.println(\"Usage: <filename>\"); return; }\r\n\r\n // Start the machine\r\n Main.traceStream = System.out;\r\n Machine.powerOn();\r\n\r\n // Assemble the file\r\n Assembler assembler = new Assembler();\r\n InputStream stream = new FileInputStream(argv[0]);\r\n try { assembler.Assemble(stream); }\r\n catch(InvalidInstructionException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(LabelNotResolvedException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(ProgramSizeException e)\r\n { System.err.println(e.getMessage()); return; }\r\n\r\n // Run the code\r\n Machine.setPC((short) 0);\r\n Machine.setMSP((short) assembler.getSize());\r\n Machine.setMLP((short) (Machine.memorySize - 1));\r\n Machine.run();\r\n }", "public static void main(String[] args)\r\n\t{\n\t\tacceptConfig();\r\n\t\treadDictionary();\r\n\t\t//Then, it reads the input file and it prints the word (if contained on the file) or the suggestions\r\n\t\t//(if not contained) in the output file. These files are given by command line arguments\r\n\t\tprocessFile(args[0], args[1]);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tString path = \"data2.bin\";\n\t\tFile file = new File(path);\n\t\tif(!file.exists()) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tFileOutputStream fos = null;\n\t\tDataOutputStream dos = null;\n\t\t\n\t\ttry {\n\t\t\tfos = new FileOutputStream(file);\n\t\t\tdos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tdos.write(97);\n\t\t\tdos.writeByte(128);\n\t\t\tdos.writeShort(128);\n\t\t\tdos.writeInt(65);\n\t\t\tdos.writeLong(97L);\n\t\t\tdos.writeFloat(3.14F);\n\t\t\tdos.writeDouble(3.14);\n\t\t\tdos.writeChar('A');\n\t\t\tdos.writeBoolean(true);\n\t\t\tdos.writeUTF(\"¹®ÀÚ¿­\");\n\t\t\tdos.writeInt(99);\n\t\t\tdos.writeInt(100);\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} finally {\n\t\t\ttry {\n\t\t\t\tif(dos != null) {\n\t\t\t\t\tdos.close();\n\t\t\t\t}\n\t\t\t\tif(fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tCommandLineParser parser = new DefaultParser();\n\n\t\t// create the Options\n\t\tOptions options = new Options();\n\t\toptions.addOption( \"h\", \"help\", false, \"display help\" );\n\t\toptions.addOption( \"i\", \"input\", true, \"the file or directory of files with .fsm extension to compile\" );\n\t\toptions.addOption( \"o\", \"output\", true, \"the directory to put the .jff output files\" );\n\n\t\ttry {\n\t\t // parse the command line arguments\n\t\t CommandLine line = parser.parse( options, args );\n\t\t \n\t\t\tFile input = null;\n\t\t\tFile output = null;\n\n\t\t // validate that block-size has been set\n\t\t if( line.hasOption( 'h' ) ) {\n\t\t \tHelpFormatter formatter = new HelpFormatter();\n\t\t \tformatter.printHelp( \"fsm2jff\", options );\n\t\t } else {\n\t\t \t\n\t\t \tif( line.hasOption('i') ) {\n\t\t \t\tString i = line.getOptionValue('i');\n\t\t \t\tinput = new File(i);\n\t\t \t\tif( input.exists() ) {\n\t\t \t\t\tSystem.out.println( \"input exists\");\n\t\t \t\t} else {\n\t\t \t\t\tSystem.out.println( \"Cannot file input: \" + i);\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\tinput = new File(\".\");\n\t\t \t}\n\t\t \t\n\t\t \tif( line.hasOption('o') ) {\n\t\t \t\tString o = line.getOptionValue('o');\n\t\t \t\toutput = new File(o);\n\t\t \t\tif( output.exists() && output.isFile() ) {\n\t\t \t\t\tSystem.out.println( \"Output exists as a file, not directory\");\n\t\t \t\t} \n\t\t \t} else {\n\t\t \t\toutput = new File(\".\");\n\t\t \t}\n\t\t }\n\t\t \n\t\t\tprocessInput( input, output );\n\n\t\t}\n\t\tcatch( ParseException exp ) {\n\t\t System.out.println( \"Unexpected exception:\" + exp.getMessage() );\n\t\t}\n\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(args[0]);\r\n\t\tSystem.out.println(args[1]);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tFileInputStream f1=new FileInputStream(args[0]);\r\n\t\t\tFileInputStream f2=new FileInputStream(args[1]);\r\n\t\t\tInputStreamReader input= new InputStreamReader(f1);\r\n\t\t\tBufferedReader reader=new BufferedReader(input);\r\n\t\t\t\r\n\t\t\tString x= reader.readLine();\r\n\t\t\twhile(x!=null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(x);\r\n\t\t\t\tx=reader.readLine();\r\n\t\t\t}\r\n\t\t\tf1.close();\r\n\t\t\tf2.close();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(IOException o1) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"I/O Error\"+o1);\r\n\t\t}\r\n\r\n\t}", "public static void main(String args[]) {\n\tif (args.length == 0) new GUI();\n\telse { \n\t PredPrey pp = new PredPrey();\n\t double[] params = pp.getSettings();\n\t String inputFile = args[0];\n\t pp.run(params, inputFile);\n\t}\n }", "static void decompress(final DataInputStream input, final byte[] result, int offset, int length) throws IOException {\n int resultPos = offset;\n int remaining = length;\n\n while (remaining > 0) {\n byte run = input.readByte();\n int runLength;\n\n if ((run & 0x80) != 0) {\n // Compressed run\n runLength = run + 131; // PackBits: -run + 1 and run == 0x80 is no-op... This allows 1 byte longer runs...\n\n byte runData = input.readByte();\n\n for (int i = 0; i < runLength; i++) {\n result[resultPos++] = runData;\n }\n }\n else {\n // Uncompressed run\n runLength = run + 1;\n\n input.readFully(result, resultPos, runLength);\n resultPos += runLength;\n }\n\n remaining -= runLength;\n }\n }", "public static void decompress(String inFile) throws Exception{\n\tIO.Decompressor io = new IO.Decompressor(inFile);\n HashMap<Integer, String> dictionary = new HashMap<Integer, String>();\n int count = 1;\n dictionary.put(new Integer(0), new String() );\n String output = \"\";\n Integer index;\n char character = 1;\n while( character != 0 ) {\n \t IO.Pair next = io.decode();\n index = new Integer(next.getIndex());\n character = next.getCharacter();\n \n output = dictionary.get(index);\n if (character == 0) io.append(output);\n else output = output + character;\n \t io.append(output);\n dictionary.put(new Integer(count), output);\n count++;\n }\n \n \n /* Close all relevant files */\n io.done();\n\n\n\n }", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "void decode(){\n int bit = -1; // next bit from compressed file: 0 or 1. no more bit: -1\r\n int k = 0; // index to the Huffman tree array; k = 0 is the root of tree\r\n int n = 0; // number of symbols decoded, stop the while loop when n == filesize\r\n int numBits = 0; // number of bits in the compressed file\r\n FileOutputStream file = null;\r\n try {\r\n file = new FileOutputStream(\"uncompressed.txt\");\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"Could not open file to write to.\");\r\n }\r\n while ((bit = inputBit()) >= 0){\r\n k = codetree[k][bit];\r\n numBits++;\r\n if (codetree[k][0] == 0){ // leaf\r\n try {\r\n file.write(codetree[k][1]);\r\n } catch (IOException ex) {\r\n System.err.println(\"Failed to write to file.\");\r\n }\r\n System.out.write(codetree[k][1]);\r\n if (n++ == filesize) break; // ignore any additional bits\r\n k = 0;\r\n }\r\n }\r\n System.out.printf(\"\\n\\n------------------------------\\n\" +\r\n \"%d bytes in uncompressed file.\\n\", filesize);\r\n System.out.printf(\"%d bytes in compressed file.\\n\", numBits / 8);\r\n System.out.printf(\"Compression ratio of %f.\", (double)numBits / (double)filesize);\r\n System.out.flush();\r\n }", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public static void main(String[] args)\n\t{\n\t\t// Input validation\n\t\tif(args.length < 3)\n\t\t{\n\t\t\tSystem.out.println(\"Error - Wrong input parameters\");\n\t\t\tSystem.out.println(\"Usage:\");\n\t\t\tSystem.out.println(\" in - Input file name\");\n\t\t\tSystem.out.println(\" ob - Output file name for best solution\");\n\t\t\tSystem.out.println(\" ow - Output file name for worst solution\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Argument extraction\n\t\tString inputFile = args[0];\n\t\tString outputFileBest = args[1];\n\t\tString outputFileWorst = args[2];\n\t\t\n\t\tDataSource sourceInput = null;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t// Load the analysis data\n\t\t\tsourceInput = new DataSource(inputFile);\n\t\t\tInstances inputData = sourceInput.getDataSet();\n\t\t\tif (inputData.classIndex() == -1)\n\t\t\t\tinputData.setClassIndex(inputData.numAttributes() - 1);\n\t\t\t\n\t\t\t// Use the best method\n\t\t\tanalyzeData(inputData, BestClassifier, outputFileBest);\n\t\t\t\n\t\t\t// Use the worst method\n\t\t\tanalyzeData(inputData, WorstClassifier, outputFileWorst);\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\tFileDescriptor fin;\n\tFileWriter output;\n\n\t// Default: use STDIN and STDOUT\n\tfin = FileDescriptor.in;\n\toutput = new FileWriter( FileDescriptor.out );\n\n\t// Parse command-line options\n\tString inputFileName = \"\";\n\tString outputFileName = \"\";\n\tint argCounter = 0;\n\tfor ( int i=0; i<args.length; i++ ) {\n\t String arg = args[ i ];\n\t if ( arg.equals( \"--debug\" ) )\n\t\tGenerator.DEBUG = true;\n\t else if ( arg.equals( \"-h\" ) || arg.equals( \"--help\") || arg.equals( \"-?\" ) )\n\t\tusage( 0 );\n\t else {\n\t\tif ( 0 == argCounter ) {\n\t\t inputFileName = arg;\n\t\t argCounter++;\n\t\t}\n\t\telse if ( 1 == argCounter ) {\n\t\t outputFileName = arg;\n\t\t argCounter++;\n\t\t}\n\t\telse\n\t\t usage( 1 );\n\t }\n\t}\n\n\tif ( ! inputFileName.equals (\"\") )\n\t fin = new FileInputStream( inputFileName ).getFD();\n\tif ( ! outputFileName.equals(\"\") ) {\n\t File outputFile = new File( outputFileName );\n\t if ( outputFile.exists() ) {\n\t\tif ( ! outputFile.isFile() ) {\n\t\t System.err.println(\"Object exists, but is not a file: \"+outputFileName);\n\t\t} else if ( ! outputFile.canWrite() ) {\n\t\t System.err.println(\"Cannot write to file: \"+outputFileName);\n\t\t}\n\t } else {\n\t\toutputFile.createNewFile();\n\t }\n\t output = new FileWriter( outputFile );\n\t}\n\n\tGenerator generator = new Generator( fin, output );\n }", "public int compress(InputStream in, OutputStream out, boolean force) throws IOException {\n int walk = 0; // Temp storage for incoming byte from read file\n int walkCount = 0; // Number of total bits read\n char codeCheck = ' '; // Used as a key to find the code in the code map\n String[] codeMap = HuffEncoder.encoding(); // Stores the character codes, copied from HuffEncode\n String s2b = \"\"; // Temp string storage \n int codeLen = 0; // Temp storage for code length (array storage)\n BitInputStream bitIn = new BitInputStream(in); \n BitOutputStream bitOut = new BitOutputStream(out);\n\n // Writes the code array at the top of the file. It first writes the number of bits in the code, then \n // the code itself. In the decode proccess, the code length is first read, then the code is read using the length\n // as a guide.\n // A space at top of file ensures the following is the array, and the file will correctly decompress\n out.write(32);\n for (int i = 0; i < codeMap.length; i++) {\n // Value of the character\n s2b = codeMap[i];\n // If null, make it zero\n if(s2b == null){\n s2b = \"0\";\n }\n // Record length of code\n codeLen = s2b.length();\n // Write the length of the code, to use for decoding\n bitOut.writeBits(8, codeLen);\n // Write the value of the character\n for (int j = 0; j < s2b.length(); j++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(j)));\n }\n }\n\n // Reads in a byte from the file, converts it to a character, then uses that \n // caracter to look up the huffman code. The huffman code is writen to the new \n // file.\n try {\n while(true){\n // Read first eight bits\n walk = bitIn.read();\n // -1 means the stream has reached the end\n if(walk == -1){break;}\n // convert the binary to a character\n codeCheck = (char) walk;\n // find the huff code for the character\n s2b = codeMap[codeCheck];\n // write the code to new file\n for (int i = 0; i < s2b.length(); i++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(i)));\n }\n walkCount += 8; // Number of bits read\n }\n bitIn.close();\n bitOut.close();\n return walkCount; \n } catch (IOException e) {\n bitIn.close();\n bitOut.close();\n throw e;\n }\n }", "public static void main(String[] args) {\n List<String> res = CompressStringToi18n.compress(\"careercup\");\n for(String str : res) {\n System.out.println(str);\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(\"fff/ddd.abc\");\r\n\t\t\tDataInputStream dis = new DataInputStream(fis);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdis.readInt();\r\n\t\t\tdis.readBoolean();\r\n\t\t\tdis.readDouble();\r\n\t\t\tdis.readUTF();\r\n\t\t\t\r\n\t\t\t//순서가 맞아야한다.\r\n\t\t\t\r\n\t\t\tdis.close();\r\n\t\t\tfis.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n File file = new File(\"src/main/resources/2017/oversizedpancakeflipper/A-large.in\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n Scanner scanner = new Scanner(br);\n int testCases = scanner.nextInt();\n for (int t = 1; t <= testCases; t++) {\n char[] pancakes = scanner.next().toCharArray();\n int k = scanner.nextInt();\n System.out.println(String.format(\"Case #%d: %s\", t, pancakeFlipper(pancakes, k)));\n }\n }\n }", "public static void main(String[] args) {\n Fakultet faks = new Fakultet();\n\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) {\n BurrowsWheeler.transform();\n }\n else {\n BurrowsWheeler.inverseTransform();\n }\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java CBS <inputfile>\");\n }\n else {\n for (int i = 0; i < argv.length; i++) {\n CBS scanner = null;\n try {\n scanner = new CBS( new java.io.FileReader(argv[i]) );\n while ( !scanner.yy_atEOF ) scanner.yylex();\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 void main(String[] args) {\n\t\t new _06_IPodShuffle();\n\t}", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) transform();\n else if (args[0].equals(\"+\")) inverseTransform();\n else throw new IllegalArgumentException(\"Illegal command line argument\");\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java Yylex [ --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 Yylex 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 Yylex(reader);\n while ( !scanner.zzAtEOF ) scanner.yylex();\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 Decode(String inputFileName, String outputFileName){\r\n try(\r\n BitInputStream in = new BitInputStream(new FileInputStream(inputFileName));\r\n OutputStream out = new FileOutputStream(outputFileName))\r\n {\r\n int[] characterFrequency = readCharacterFrequency(in);//\r\n int frequencySum = Arrays.stream(characterFrequency).sum();\r\n BinNode root = HoffmanTree.HoffmanTreeFactory(characterFrequency).rootNode;\r\n //Generate Hoffman tree and get root\r\n\r\n int bit;\r\n BinNode currentNode = root;\r\n int byteCounter = 0;\r\n\r\n while ((bit = in.readBit()) != -1 & frequencySum >= byteCounter){\r\n //Walk the tree based on the incoming bits\r\n if (bit == 0){\r\n currentNode = currentNode.leftLeg;\r\n } else {\r\n currentNode = currentNode.rightLeg;\r\n }\r\n\r\n //If at end of tree, treat node as leaf and consider key as character instead of weight\r\n if (currentNode.leftLeg == null){\r\n out.write(currentNode.k); //Write character\r\n currentNode = root; //Reset walk\r\n byteCounter++; //Increment byteCounter to protect from EOF 0 fill\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) {\r\n MemoryManager memory = new MemoryManager(Integer.parseInt(args[0]));\r\n HashTable hasher = new HashTable(Integer.parseInt(args[1]), memory);\r\n if (args[2] != null) {\r\n File commands = new File(args[2]);\r\n Processor processor = new Processor(commands, hasher);\r\n processor.process();\r\n }\r\n //System.exit(0);\r\n \r\n }", "public static void main(String[] args) throws FileNotFoundException, IOException{\n InputStream inputStream = new FileInputStream(new File(\"./src/B-large.in\"));\n OutputStream outputStream = new FileOutputStream(new File(\"./src/B-large.out\"));\n InputReaderRevengePancakes in = new InputReaderRevengePancakes(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskRevengePancakes solver = new TaskRevengePancakes();\n solver.solve(1, in, out);\n out.close();\n }", "public static void main(String[] args) {\n\t\t\n\t\tBasicRLECompression compress = new BasicRLECompression('$');\n\t\t//String res = compress.compress(str);\n\t\t//System.out.println(res);\n\t\tString out = compress.uncompress(\"a$4g$4e$4f$1e$1a$f6\");\n\t\t//System.out.println(out);\n\t\t//System.out.println(str);\n\t\t//System.out.print(out.equals(str));\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tSystem.out.println(parseInputFile());\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString line = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\t\t\n\t\tFiles.write(Paths.get(\"outputh.txt\"), getOutput(line).getBytes(), StandardOpenOption.CREATE);\n\t\t\n\t}", "public static void main(final String[] args) throws Exception {\n\t\tif(args.length < 1) throw new IllegalArgumentException(\"Cannot run the fizz-buzz algorithm without a data file.\");\n\t\t\n\t\tString fileName = args[0];\n\t\tFile inputFile = new File(fileName);\n\t\tif((!inputFile.exists()) || (!inputFile.canRead())) throw new FileNotFoundException(\"Cannot find or read the given file (\" + fileName + \").\");\n\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(inputFile));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null) {\n\t\t\tStringTokenizer st = new StringTokenizer(line, \" \");\n\t\t\tString fNumString = st.nextToken();\n\t\t\tString bNumString = st.nextToken();\n\t\t\tString tNumString = st.nextToken();\n\t\t\t\n\t\t\tint fNum = Integer.parseInt(fNumString);\n\t\t\tint bNum = Integer.parseInt(bNumString);\n\t\t\tint tNum = Integer.parseInt(tNumString);\n\t\t\t\n\t\t\tprintFizzBuzz(fNum, bNum, tNum);\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "public static void main(String[] argv) throws IOException, ParseException {\r\n\r\n\t\tif (argv.length < 1) {\r\n\t\t\tSystem.err.println(\"Usage: java GeoGDSPArser inputFilename.soft\");\r\n\t\t\tSystem.exit(2);\r\n\t\t}\r\n\r\n\t\tGeoGDSParser parser = new GeoGDSParser();\r\n\t\tparser.parseFile(argv[0]);\t\t\r\n\r\n\t\tfor (String k: parser.singleKeys) {\r\n\t\t\tString val = parser.getSingleValue(k);\r\n\t\t\tif (val != null) {\r\n\t\t\t\tSystem.out.println(k + \": \" + val);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (String k: parser.multiKeys) {\r\n\t\t\tArrayList<String> vals = parser.getValues(k);\t\t\t\t\t\r\n\t\t\tif (vals != null) {\r\n\t\t\t\tSystem.out.println(k + \":\");\r\n\t\t\t\tfor (String v: vals) {\r\n\t\t\t\t\tSystem.out.println(\"\\t\" + v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String args[])\r\n\t\tthrows Exception\r\n\t{\n\t\twrkDir = FileUtils.getTempUserDirectory(\"jhi-flapjack\");\r\n\t\twrkDir = new File(wrkDir, \"GobiiMabcConverter\");\r\n\t\twrkDir.mkdirs();\r\n\r\n\t\tGobiiMabcConverter converter = new GobiiMabcConverter();\r\n\r\n\t\t// Read/create the markers\r\n\t\tconverter.createMap(new File(args[0]));\r\n\t\t// Read/create the genotypes\r\n\t\tconverter.createGenotypes(new File(args[1]));\r\n\t\t// Read/create the qtls\r\n\t\tconverter.createQTL(new File(args[2]));\r\n\r\n\t\tCreateProjectSettings projectSettings = new CreateProjectSettings(\r\n\t\t\tnew File(wrkDir, \"map\"),\r\n\t\t\tnew File(wrkDir, \"geno\"),\r\n\t\t\tnull,\r\n\t\t\tnew File(wrkDir, \"qtl\"),\r\n\t\t\tnew FlapjackFile(args[3]),\r\n\t\t\tnull);\r\n\r\n\t\tDataImportSettings importSettings = new DataImportSettings();\r\n\t\timportSettings.setDecimalEnglish(true);\r\n\r\n\t\t// Make a Flapjack project\r\n\t\tCreateProject cp = new CreateProject(projectSettings, importSettings);\r\n\r\n\t\tcp.doProjectCreation();\r\n\t}", "public static void main (String[] args) throws IOException {\n File inFile = new File(\"/Users/kbye10/Documents/CS 250 test files/sample1.data\");\r\n FileInputStream inStream = new FileInputStream(inFile);\r\n\r\n //set up an array to read data in\r\n int fileSize = (int)inFile.length();\r\n byte[] byteArray = new byte[fileSize];\r\n\r\n //read data in and display them\r\n inStream.read(byteArray);\r\n for (int i = 0; i < fileSize; i++) {\r\n System.out.println(byteArray[i]);\r\n }\r\n\r\n inStream.close();\r\n }", "public static void main(String[] args) {\n\t\t//Variables\n\t\tint chunkSize = Integer.parseInt(args[1]);\n\t\tint numThreads = Integer.parseInt(args[2]);\n\t\tBufferedReader br = null;\n\t\tReadFromFile rf = new ReadFromFile();\n\t\tArrayList<String> filesInFolder = inputValidation(args);\n\n\t\t//Delete the output folder if it exists\n\t\tFile dirName = new File(\"output\");\n\t\tFile[] files = dirName.listFiles();\n\n\t\t//check if output/ already exists. If exists check for files and delete them\n\t\ttry {\n\t\t\tif (dirName.isDirectory()) {\n\t\t\t\t//Check if files are in folder that need to be deleted\n\t\t\t\tif (files != null) {\n\t\t\t\t\t//delete files in folder\n\t\t\t\t\tfor (File f : files) {\n\t\t\t\t\t\tf.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Delete the directory before before starting new run of program\n\t\t\t\tdirName.delete();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Cannot delete output directory, please try again!\");\n\t\t\tSystem.exit(2);\n\t\t}\n\n\t\t//for loop to open and read each individual file\n\t\tfor (String file : filesInFolder) {\n\t\t\ttry {\n\n\t\t\t\tFileReader reader = new FileReader(directoryName + \"\\\\\" + file);\n\t\t\t\tbr = new BufferedReader(reader);\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\trf.readFromFile(chunkSize, br, numThreads, file);\n\n\t\t}\n\n\t\t//Call getResults method to start process of combining chunk files\n\t\tgetResults();\n\t\t//Call writeResults method to write results file\n\t\twriteResults();\n\n\t\t//close any streams\n\t\ttry {\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"br did not close!\");\n\t\t}\n\t}", "public void testMain()\r\n {\r\n InputStream instream = null;\r\n OutputStream outstream = null;\r\n\r\n try\r\n {\r\n File afile = new File(\"testfiles/testfile.txt\");\r\n File bfile = new File(\"testfiles/testfilecopy.txt\");\r\n instream = new FileInputStream(afile);\r\n outstream = new FileOutputStream(bfile);\r\n byte[] buffer = new byte[1024];\r\n int length;\r\n // copy the file content in bytes\r\n while ((length = instream.read(buffer)) > 0)\r\n {\r\n\r\n outstream.write(buffer, 0, length);\r\n\r\n }\r\n\r\n instream.close();\r\n outstream.close();\r\n }\r\n catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n String[] args = new String[3];\r\n args[0] = \"testfiles/testfilecopy.txt\";\r\n args[1] = \"1\";\r\n args[2] = \"testfiles/output.txt\";\r\n Quicksort.main(args);\r\n assertTrue(systemOut().getHistory().contains(\"Time to run: \"));\r\n\r\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java PasitoScanner <inputfile>\");\n }\n else {\n for (int i = 0; i < argv.length; i++) {\n PasitoScanner scanner = null;\n try {\n scanner = new PasitoScanner( new java.io.FileReader(argv[i]) );\n do {\n System.out.println(scanner.next_token());\n } while (!scanner.yy_atEOF);\n\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 }" ]
[ "0.7299599", "0.68286616", "0.6805052", "0.6632482", "0.6397687", "0.62121385", "0.6156839", "0.60779524", "0.6044625", "0.5934504", "0.5908697", "0.5860374", "0.5844901", "0.5842377", "0.5809351", "0.5802865", "0.5776783", "0.5766611", "0.57489395", "0.5725719", "0.57114375", "0.5689186", "0.5628905", "0.560384", "0.5589267", "0.5568725", "0.55426854", "0.5540965", "0.5537093", "0.5532579", "0.55215055", "0.5520291", "0.5519626", "0.5512552", "0.5508347", "0.55033886", "0.54994386", "0.5479021", "0.54577607", "0.5449053", "0.54473835", "0.5440084", "0.5434967", "0.54253185", "0.5424647", "0.5424235", "0.5422568", "0.54145586", "0.54117745", "0.540155", "0.5393048", "0.53870565", "0.5374713", "0.5372137", "0.5363458", "0.5362725", "0.53575385", "0.5352831", "0.53439224", "0.53341246", "0.5331668", "0.5325046", "0.53240716", "0.53166664", "0.530946", "0.5306155", "0.52872396", "0.5284942", "0.5283821", "0.52825207", "0.52785665", "0.52762717", "0.5272279", "0.5270868", "0.52649885", "0.52564645", "0.523667", "0.5230623", "0.5221976", "0.5218178", "0.5194722", "0.5191604", "0.51876545", "0.51867276", "0.51816994", "0.5177253", "0.51731205", "0.5167172", "0.51648295", "0.51603836", "0.51602423", "0.51538587", "0.51447064", "0.51431686", "0.51373637", "0.5133852", "0.51335955", "0.5129995", "0.5128301", "0.5126592" ]
0.8276575
0
Draw line dividing hours and events
@Override /** * Defines the look of the day view grid (the division of hours and events throughout the day) * @param c GregorianCalendar holding the year to be drawn * @param d the data model holding event information * @param g2 the graphics package * @param container the container that will rely on this method to define it's look and feel */ public void drawEventGrid(GregorianCalendar c, DataModel d, Graphics2D g2, Component container) { Line2D.Double vertLine = new Line2D.Double(60, 0, 60, container.getHeight()); g2.setColor(Color.LIGHT_GRAY); g2.draw(vertLine); //Draw the time text int hour = 1; String halfOfDay = "am"; for (int i = 0; i<24; i ++) { if (i < 23) { g2.setColor(Color.BLACK); if (i == 11) { halfOfDay = "pm"; } if (i == 12) { hour = 1; } String time = Integer.toString(hour) + halfOfDay; hour++; g2.drawString(time, 20, ( i + 1 )*60); } //Draw the Lines indicating where hours begin g2.setColor(Color.LIGHT_GRAY); Line2D.Double hourLine = new Line2D.Double(60, i*60, container.getWidth(), i*60); g2.draw(hourLine); } //Get events from the datModel TreeSet<Event> events = d.getEvents(c.get(Calendar.MONTH) + 1 , c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.YEAR)); if (events.size() != 0) { for (Event e : events) { g2.setColor(Color.BLUE); String eventStart = e.getStartTime(); String eventEnd = e.getEndTime(); int startHour = Integer.parseInt(eventStart.substring(0,2)); int startMin = Integer.parseInt(eventStart.substring(3)); int endHour = Integer.parseInt(eventEnd.substring(0,2)); int endMin = Integer.parseInt(eventEnd.substring(3)); //Draw the Rectangle representing the scheduled event Rectangle2D.Double eventBox = new Rectangle2D.Double(60, ((startHour * 60) + startMin), container.getWidth(), ((endHour * 60) - (startHour * 60) + (endMin - startMin)) ); g2.fill(eventBox); //Draw the event details onto the rectangle FontMetrics fm = g2.getFontMetrics(container.getFont()); g2.setColor(Color.WHITE); g2.drawString( " " + e.getName() + " " + e.getStartTime() + " - " + e.getEndTime(), 60, ((startHour * 60) + startMin + fm.getHeight())); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawTimeLine (Graphics g) {\n g.setColor (parent.parent.parent.rulerColor);\n g.fillRect (0, _yPix - 3 * parent.lineSize, _xPix, 3 * parent.lineSize);\n \n g.setColor (Color.black);\n g.drawLine (0, _yPix - 3 * parent.lineSize, _xPix, _yPix - 3 * parent.lineSize);\n double inchT = parent.getTime (parent.dpi); if (inchT <= 0) return;\n int i = (int)Math.rint (begT / inchT);\n double t = i * inchT;\n while (t < endT) {\n int xcord = i * parent.dpi - parent.getEvtXCord (begT) - \n (int)Math.rint (parent.fm.charWidth ('|') / 2.0);\n \n g.drawString (\"|\", xcord, _yPix - 2 * parent.lineSize - parent.fDescent);\n \n String t1 = (new Float (t)).toString (), t2;\n \n if (t1.indexOf ('E') == -1) {\n\tint index = max;\n\tif (index > t1.length ()) index = t1.length ();\n\tt2 = t1.substring (0, index);\n }\n else {\n\tint exp = t1.indexOf ('E');\n\tString e = t1.substring (exp, t1.length ());\n\t\n\tint si = 5; if (exp < si) si = exp;\n\tString a = t1.substring (0, si);\n\t\n\tt2 = a + e;\n }\n \n g.drawString (t2,\n xcord - (int)Math.rint (parent.fm.stringWidth (t2) / 2.0),\n _yPix - (parent.lineSize + parent.fDescent));\n t = (++i * inchT);\n }\n }", "private void drawTimeLine(Graphics2D g2d, RenderContext myrc) {\n if (mouseIn()) {\n double mxc = mx, myc = my; // Save the mouse coords so they are static\n\n // Find the closest line segment\n Line2D closest_line = null; double closest_line_d = Double.MAX_VALUE;\n Iterator<Line2D> it = myrc.line_to_bundles.keySet().iterator();\n while (it.hasNext()) {\n Line2D line = it.next();\n\tdouble d = line.ptSegDist(mxc,myc);\n\tif (d < closest_line_d) { closest_line = line; closest_line_d = d; }\n }\n\n // If we found an edge, create the timeline\n if (closest_line != null && closest_line_d < 20.0) {\n\t// Darken background\n Composite orig_comp = g2d.getComposite(); \n\tg2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f));\n\tg2d.setColor(RTColorManager.getColor(\"brush\", \"dim\"));\n\tg2d.fillRect(0,0,myrc.getRCWidth(),myrc.getRCHeight());\n\tg2d.setComposite(orig_comp);\n\n // Create the composites\n\tComposite trans = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f), full = g2d.getComposite();\n\n\t// Determine the timeline geometry\n\tint txt_h = Utils.txtH(g2d, \"0\");\n int tl_x0 = 10, tl_x1 = myrc.w - 10, tl_w = tl_x1 - tl_x0;\n\tint tl_y0 = myrc.h - txt_h - 4, tl_h = 6;\n\n // Get the time bounds\n\tlong ts0 = getRenderBundles().ts0(), ts1 = getRenderBundles().ts1dur();\n\n\t// Give it labels\n\tString str = Utils.humanReadableDate(ts0); Color fg = RTColorManager.getColor(\"label\", \"defaultfg\"), bg = RTColorManager.getColor(\"label\", \"defaultbg\");\n\tg2d.setColor(RTColorManager.getColor(\"axis\",\"default\")); g2d.drawLine(tl_x0, tl_y0+1, tl_x1, tl_y0+1);\n clearStr(g2d, str, tl_x0, tl_y0 + txt_h+2, fg, bg);\n\tstr = Utils.humanReadableDate(ts1);\n clearStr(g2d, str, tl_x1 - Utils.txtW(g2d,str), tl_y0 + txt_h+2, fg, bg);\n\n // Highlight the line itself\n g2d.setColor(RTColorManager.getColor(\"annotate\",\"cursor\"));\n\tdrawTimeLineForLine(g2d, myrc, closest_line, full, trans, tl_x0, tl_x1, tl_w, tl_y0, tl_h, ts0, ts1);\n\n\t// Create a bitvector representing locations in the timeline... use minute resolution... unless unreasonable (like decades...)\n\tlong resolution = 60L*1000L;\n\tint minutes = (int) ((ts1 - ts0)/resolution);\n\tif (minutes > 0 && minutes < 5*365*24*60) {\n\t boolean mask[] = new boolean[minutes+1]; // Give it a little extra...\n\t fillTimeLineMask(myrc,closest_line,mask,ts0,resolution);\n\n // Count matches across the rest of the lines...\n\t List<LineCountSorter> sorter = new ArrayList<LineCountSorter>();\n it = myrc.line_to_bundles.keySet().iterator();\n while (it.hasNext()) {\n Line2D line = it.next();\n\t if (line != closest_line) {\n\t int matches = countTimeLineMatches(myrc, line, mask, ts0, resolution);\n\t if (matches > 0) { sorter.add(new LineCountSorter(line, matches)); }\n\t }\n\t }\n\n\t // If we have matches, sort them\n Collections.sort(sorter);\n\n\t // Display the top twenty or so...\n\t for (int i=0;i<(sorter.size() > 20 ? 20 : sorter.size());i++) {\n\t tl_y0 -= tl_h; g2d.setColor(RTColorManager.getColor(sorter.get(i).getLine().toString()));\n\t drawTimeLineForLine(g2d, myrc, sorter.get(i).getLine(), full, trans, tl_x0, tl_x1, tl_w, tl_y0, tl_h, ts0, ts1);\n\t }\n\n\t if (sorter.size() > 20) { // Let the user know that the display is abridged...\n\t tl_y0 -= tl_h;\n\t fg = RTColorManager.getColor(\"label\", \"errorfg\"); bg = RTColorManager.getColor(\"label\", \"errorbg\");\n\t clearStr(g2d, \"Edges Truncated\", tl_x0, tl_y0, fg, bg);\n\t }\n }\n }\n }\n }", "private void drawTimeLineForLine(Graphics2D g2d, RenderContext myrc, Line2D line, \n Composite full, Composite trans,\n int tl_x0, int tl_x1, int tl_w, int tl_y0, int tl_h, \n long ts0, long ts1) {\n g2d.setComposite(full); \n\t// Parametric formula for line\n double dx = line.getX2() - line.getX1(), dy = line.getY2() - line.getY1();\n\tdouble len = Utils.length(dx,dy);\n\tif (len < 0.001) len = 0.001; dx = dx/len; dy = dy/len; double pdx = dy, pdy = -dx;\n\tif (pdy < 0.0) { pdy = -pdy; pdx = -pdx; } // Always point down\n double gather_x = line.getX1() + dx*len/2 + pdx*40, gather_y = line.getY1() + dy*len/2 + pdy*40;\n\n\t// Find the bundles, for this with timestamps, construct the timeline\n\tSet<Bundle> set = myrc.line_to_bundles.get(line);\n\tIterator<Bundle> itb = set.iterator(); double x_sum = 0.0; int x_samples = 0;\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n\t if (bundle.hasTime()) { x_sum += (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0)); x_samples++; }\n }\n\tif (x_samples == 0) return;\n\tdouble x_avg = x_sum/x_samples;\n ColorScale timing_marks_cs = RTColorManager.getTemporalColorScale();\n itb = set.iterator();\n\twhile (itb.hasNext()) { \n\t Bundle bundle = itb.next();\n\n\t if (bundle.hasTime()) {\n double ratio = ((double) (bundle.ts0() - ts0))/((double) (ts1 - ts0));\n\t g2d.setColor(timing_marks_cs.at((float) ratio));\n\n\t int xa = (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0));\n // g2d.setComposite(full); \n g2d.draw(line);\n\t if (bundle.hasDuration()) {\n int xb = (int) (tl_x0 + (tl_w*(bundle.ts1() - ts0))/(ts1 - ts0)); \n double r = (tl_h-2)/2;\n g2d.fill(new Ellipse2D.Double(xa-r,tl_y0-tl_h/2-r,2*r,2*r));\n g2d.fill(new Ellipse2D.Double(xb-r,tl_y0-tl_h/2-r,2*r,2*r));\n if (xa != xb) g2d.fill(new Rectangle2D.Double(xa, tl_y0-tl_h/2-r, xb-xa, 2*r));\n\t if (xa != xb) { g2d.drawLine(xa,tl_y0-tl_h,xb,tl_y0); g2d.drawLine(xa,tl_y0, xb,tl_y0); }\n\t }\n\t g2d.drawLine(xa,tl_y0-tl_h,xa,tl_y0); // Make it slightly higher at the start\n double x0 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio,\n\t y0 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio;\n\t g2d.draw(new CubicCurve2D.Double(x0, y0, \n x0 + pdx*10, y0 + pdy*10,\n gather_x - pdx*10, gather_y - pdy*10,\n gather_x, gather_y));\n g2d.draw(new CubicCurve2D.Double(gather_x, gather_y, \n\t gather_x + pdx*40, gather_y + pdy*40,\n\t\t\t\t\t x_avg, tl_y0 - 10*tl_h, \n\t x_avg, tl_y0 - 8*tl_h));\n g2d.draw(new CubicCurve2D.Double(x_avg, tl_y0 - 8*tl_h,\n (x_avg+xa)/2, tl_y0 - 6*tl_h,\n xa, tl_y0 - 2*tl_h,\n xa, tl_y0 - tl_h/2));\n }\n\t}\n }", "private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "public void draw(int time, int number) {\n\t\t StdDraw.setPenRadius(0.005);\n\t\tStdDraw.setPenColor(StdDraw.GRAY);\n\t\tStdDraw.point(time, number);\n // draw a red point which gives cumulative average\n\t\t StdDraw.setPenRadius(0.0025);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.point(time, sum*1.0/time);\n //draw a horizontal line of the final average result\n\t\tif(time == 900) {\n\t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\t\tStdDraw.line(0, sum*1.0/time, MAX_CONNECTIONS, sum*1.0/time);\n\t\t\tFont font = new Font(\"Arial\", Font.ITALIC, 10);\n\t\t\tStdDraw.setFont(font);\n\t\t\tInteger avg =(int)(sum*1.0/time);\n\t\t\tString text = avg.toString();\n\t\t\tStdDraw.text(-MAX_CONNECTIONS/60, sum*1.0/time, text, 90);\n\t\t}\n\t\t\n\t}", "public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \n/* 62 */ if (t == 0.0D) {\n/* 63 */ prevPt.x = currPt.x;\n/* 64 */ prevPt.y = currPt.y;\n/* */ }\n/* */ \n/* 67 */ g.drawLine(prevPt.x, prevPt.y, currPt.x, currPt.y);\n/* */ \n/* 69 */ if (this.m_showTPoints) {\n/* 70 */ g.fillOval(currPt.x - this.PT_RADIUS, currPt.y - this.PT_RADIUS, this.PT_DIAMETER, this.PT_DIAMETER);\n/* */ }\n/* */ \n/* 73 */ prevPt.x = currPt.x;\n/* 74 */ prevPt.y = currPt.y;\n/* */ }\n/* */ }", "public void drawEventsForWeek(){\n WeekController.getController().drawEvents(PersonInfo.getPersonInfo().getEventsForWeek(weekNumber));\n }", "private void drawClockHand(GraphicsContext gc) {\n\t\t\n\t\tdouble x1 = getX();\n\t\t//double y1 = getY() + getHeight() / 2 - getTimeLabelHeight();\n\t\tdouble y1 = getY() + (getHeight() - getTimeLabelHeight()) / 2;\n\t\tdouble x2 = getX() + Math.cos(Math.toRadians(getClockHandAngle())) \n\t\t\t\t* getClockRadius();\n\t\t\n\t\tdouble y2 = (y1) + \n\t\t\t\tMath.sin(Math.toRadians(getClockHandAngle())) \n\t\t\t\t* getClockRadius();\n\t\t\n\t\tgc.setStroke(Color.BLACK);\n\t\tgc.strokeLine(x1, y1, x2, y2);\n\t\t\n\t}", "public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }", "public HBox answerLine(String date, String hour)\n {\n HBox answerLine = new HBox(5);\n answerLine.getChildren().addAll(new Label(\"Dia: \"), new Text(date), new Label(\" Horário: \"), new Text(hour));\n answerLine.setAlignment(Pos.BASELINE_LEFT);\n\n return answerLine; \n }", "public void drawChart() {\n ArrayList<Entry> confuse = new ArrayList<>();\n ArrayList<Entry> attention = new ArrayList<>();\n ArrayList<Entry> engagement = new ArrayList<>();\n ArrayList<Entry> joy = new ArrayList<>();\n ArrayList<Entry> valence = new ArrayList<>();\n // point = \"Brow Furrow: \\n\";\n String dum = null, dum2 = null;\n for (int i = 0; i < size; i++) {\n //point += (\"\" + Emotion.getBrowFurrow(i).getL() + \" seconds reading of \" + Emotion.getBrowFurrow(i).getR() + \"\\n\");\n dum2 = Emotion.getBrowFurrow(i).getL().toString();\n dum = Emotion.getBrowFurrow(i).getR().toString();\n confuse.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getAttention(i).getL().toString();\n dum = Emotion.getAttention(i).getR().toString();\n attention.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getEngagement(i).getL().toString();\n dum = Emotion.getEngagement(i).getR().toString();\n engagement.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getJoy(i).getL().toString();\n dum = Emotion.getJoy(i).getR().toString();\n joy.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getValence(i).getL().toString();\n dum = Emotion.getValence(i).getR().toString();\n valence.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n }\n\n LineDataSet data1 = new LineDataSet(confuse,\"Confuse\");\n LineDataSet data2 = new LineDataSet(attention,\"Attention\");\n LineDataSet data3 = new LineDataSet(engagement,\"Engagement\");\n LineDataSet data4 = new LineDataSet(joy,\"Engagement\");\n LineDataSet data5 = new LineDataSet(valence,\"Valence\");\n data1.setColor(Color.BLUE);\n data1.setDrawCircles(false);\n data2.setColor(Color.YELLOW);\n data2.setDrawCircles(false);\n data3.setColor(Color.GRAY);\n data3.setDrawCircles(false);\n data4.setColor(Color.MAGENTA);\n data4.setDrawCircles(false);\n data5.setColor(Color.GREEN);\n data5.setDrawCircles(false);\n\n\n dataSets.add(data1);\n dataSets.add(data2);\n dataSets.add(data3);\n dataSets.add(data4);\n dataSets.add(data5);\n }", "public void render() {\n\t\teventMap.clear();\n\t\t\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tint date = firstDateOfMonth.getDayOfWeek().getValue()%7;\n\t\t\n\t\t\n\t\teventSection.removeAll();\n\t\t// draw day string\n\t\tString[] headers = {\"SUN\", \"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\"};\n\t\tfor(int i = 0; i < headers.length; i++) {\n\t\t\tJLabel label = new CalendarDate(headers[i]);\t\n\t\t\tlabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t label.setVerticalAlignment(JLabel.CENTER); \n\t\t Border border = BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1);\n\t \tlabel.setBorder(border);\n\t\t eventSection.add(label);\n\t\t}\n\t\t// front padding\n\t\tLocalDate previousMonth = currentDate.minusMonths(1);\n\t\tfor(int i = date - 1; i >= 0; i--) {\n\t\t\tJLabel label = new CalendarDate(\"<html>\" + (previousMonth.getMonth().maxLength() - i) + \"</html>\");\n\t\t\tlabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t label.setVerticalAlignment(JLabel.TOP); \n\t\t Border border = BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1);\n\t \tlabel.setBorder(border);\n\t\t label.setForeground(Color.gray);\n\t\t eventSection.add(label);\n\t\t}\n\t\t// draw dates\n\t\tfor(int i = 1; i <= currentDate.getMonth().maxLength(); i++) {\n\t\t\tJPanel outerPanel = new JPanel();\n\t\t\touterPanel.setLayout(new BorderLayout());\n\t\t\touterPanel.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));\n\t\t\t\t\t\n\t\t\tJLabel label = new CalendarDate(\"<html>\" + i + \"</html>\");\n\t\t\tlabel.setPreferredSize(new Dimension(150,20));\n\t\t\tlabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));\n\t\t\tlabel.setHorizontalAlignment(JLabel.CENTER); \t\t \n\n\t\t outerPanel.add(label, BorderLayout.NORTH);\n\t\t \t \n\t\t LocalDate tmp = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), i);\n\t\t\tArrayList<Event> dateEvents = new ArrayList<Event>();\n\t\t\tdateEvents = EventProcessor.filterEvents(model.getEvents(), tmp, tmp);\n\t\t\t\n\t\t\tif (dateEvents.size() > 0) {\t\n\t\t\t\tJPanel container = new JPanel();\n\t\t\t\tcontainer.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));\n\t\t\t JScrollPane scrollablePanel = new JScrollPane(container, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t\t scrollablePanel.getVerticalScrollBar().setPreferredSize(new Dimension(0,0));\n\t\t\t outerPanel.add(scrollablePanel, BorderLayout.CENTER);\n\t\t\t \n\t\t\t\tfor (int j = 0; j < dateEvents.size(); j++) {\n\t\t\t\t\tEvent ev = dateEvents.get(j);\n\t\t\t\t\t\n\t\t\t\t\tJPanel panel = new JPanel();\t\t\t\n\t\t\t\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\t\t\t\t\tif (j % 2 == 1)\n\t\t\t\t\t\tpanel.setBackground(new Color(243, 243, 243));\n\t\t\t\t\telse\n\t\t\t\t\t\tpanel.setBackground(new Color(192, 219, 243));\n\t\t\t\t\tpanel.setOpaque(true);\n\t\t\t\t\t\n\t\t\t\t\tString eventName = ev.getName();\n\t\t\t\t\tJLabel eventPill = new JLabel(\"<html>\" + (eventName.length() > 20 ? eventName.substring(0, 17) + \"...\" : eventName) + \"</html>\");\n\t\t\t\t\teventPill.setHorizontalAlignment(JLabel.LEFT);\n\t\t\t\t\teventPill.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n\t\t\t\t\teventMap.put(eventPill, ev);\n\t\t\t\t\t\n\t\t\t\t\teventPill.addMouseListener(new MouseListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\tEvent event = eventMap.get((JLabel)e.getSource());\n\t\t\t\t\t\t\tString content = \"<html><strong>\" + event.getName() + \"</strong><br><span>\" + DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).format(event.getDate()) + \"</span><br><span>\" + event.getStartTime() + \":00 - \" + event.getEndTime() + \":00</span></html>\";\n\t\t\t\t\t\t\tpopupContent.setText(content);\n\t\t\t\t\t\t\tpopup.repaint();\n\t\t\t\t\t\t\tpopup.pack();\n\t\t\t\t\t\t\tpopup.setLocation(e.getXOnScreen(), e.getYOnScreen());\n\t\t\t\t\t\t\tpopup.setVisible(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void mousePressed(MouseEvent e) {}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void mouseExited(MouseEvent e) {}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tpanel.add(eventPill);\n\t\t\t\t\tcontainer.add(panel);\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t eventSection.add(outerPanel);\n\t\t}\n\t\t// rear padding\n\t\tint rearPaddingCount = 49 - currentDate.getMonth().maxLength() - headers.length - date;\n\t\tfor(int i = 0; i < rearPaddingCount; i++) {\n\t\t\tJLabel label = new CalendarDate(\"<html>\" + (i + 1) + \"</html>\");\n\t\t\tlabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t label.setVerticalAlignment(JLabel.TOP); \n\t\t label.setForeground(Color.gray);\n\t\t Border border = BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1);\n\t \tlabel.setBorder(border);\n\t\t\teventSection.add(label);\n\t\t\t\n\t\t}\n\t\trevalidate();\n\t\trepaint();\n\t}", "private void drawLoglines(Canvas canvas) {\n\n for(int i = 0; i < log.logLines.size(); i ++) {\n float txtYpos = (float) (\n firstLineYpos + // The height of the top bar\n (lineGap * (i + 0.5d)) + // Move down the log to the right spot\n (paint.getTextSize() / 3d) // Centering the text vertically\n );\n\n String dadTime = MyTime.getDadTime(\n log.logLines.get(i).startTime.hour,\n log.logLines.get(i).startTime.minute\n );\n canvas.drawText(\n String.valueOf(dadTime.charAt(0)), \n sideLimit,// Correct x-position according to the chart above\n txtYpos,\n paint\n );\n canvas.drawText(\n String.valueOf(dadTime.charAt(1)),\n sideLimit + paint.measureText(\"8\"), // Correct x-position according to the chart above\n txtYpos,\n paint\n );\n canvas.drawText(\n String.valueOf(dadTime.charAt(2)),\n sideLimit + paint.measureText(\"88\"), // Correct x-position according to the chart above\n txtYpos,\n paint\n );\n canvas.drawText(\n \"-\",\n sideLimit + paint.measureText(\"888N\"), // Correct x-position according to the chart above\n txtYpos,\n paint\n );\n canvas.drawText(\n log.logLines.get(i).subject.name,\n sideLimit + paint.measureText(\"888N-N\"), // Correct x-position according to the chart above\n txtYpos,\n paint\n );\n }\n }", "public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\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} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\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}", "public void drawLine(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);\n\n //drawGrid(g, width, height, minX, minY, maxX, maxY);\n\n g.setColor(LineColor);\n g.setStroke(new BasicStroke(curveThickness));\n //draws line from last point to current point\n for (int i = 2; i <= PointArray.length - 1; i += 2) {\n double x1 = ((PointArray[i - 2] * Xscale) + centerX);\n double y1 = ((centerY) - (PointArray[i - 1]) * Yscale);\n\n double x2 = ((PointArray[i] * Xscale) + centerX);\n double y2 = ((centerY) - (PointArray[i + 1]) * Yscale);\n\n if (Double.isNaN(y2)) {\n continue;\n }\n if (Double.isNaN(y1)) {\n continue;\n }\n if (y1 == Double.NaN) {\n i += 2;\n continue;\n } else if (y1 == Double.POSITIVE_INFINITY || y1 == Double.NEGATIVE_INFINITY) {\n continue;\n }\n\n if (y2 == Double.NaN) {\n i += 2;\n continue;\n } else if (y2 == Double.POSITIVE_INFINITY || y2 == Double.NEGATIVE_INFINITY) {\n if (i > 3) {\n if ((PointArray[i - 1] - PointArray[i - 3] > 0)) {\n y2 = YOffSet;\n } else {\n y2 = height;\n }\n } else {\n continue;\n }\n }\n if (x1 < XOffSet) {\n x1 = XOffSet;\n } else if (x1 > width) {\n continue;\n }\n if (x2 < XOffSet) {\n continue;\n } else if (x2 > width) {\n x2 = width;\n }\n\n if (y1 < YOffSet) {\n y1 = YOffSet;\n } else if (y1 > height) {\n continue;\n }\n if (y2 < YOffSet) {\n continue;\n } else if (y2 > height) {\n y2 = height;\n }\n g.drawLine((int) x1, (int) y1, (int) x2, (int) y2);\n }\n\n }", "public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }", "@Override\r\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\r\n\r\n // draw the notes, black and green\r\n for (INote n : no.getNotes()) {\r\n int x = (n.getStartBeat() + 2) * beatWidth;\r\n int y = ((no.highestNote().getNoteNumber() - n.getNoteNumber()) * lineHeight)\r\n + (lineHeight * 2);\r\n\r\n g.setColor(Color.BLACK);\r\n g.fillRect(x, y, beatWidth, lineHeight);\r\n\r\n for (int ii = 1; ii < n.getDuration(); ii++) {\r\n g.setColor(Color.GREEN);\r\n g.fillRect(x + (ii * beatWidth), y, beatWidth, lineHeight);\r\n }\r\n }\r\n\r\n g.setColor(Color.BLACK);\r\n\r\n //draw the row labels and lines\r\n int y1 = (lineHeight * 3) / 2;\r\n int y2 = lineHeight;\r\n\r\n g.drawLine((beatWidth * 2) - 1, (lineHeight * 2) - 1,\r\n (totalBeats + 2) * beatWidth, (lineHeight * 2) - 1);\r\n\r\n for (String row : this.rows()) {\r\n g.drawString(row, 0, y1 + g.getFontMetrics().getHeight());\r\n y1 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight, (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n y2 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight - 1,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight - 1);\r\n }\r\n g.drawLine((beatWidth * 2) - 1, y2 + lineHeight,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n\r\n //draw the column labels and lines\r\n int x1 = -(beatWidth * 2);\r\n int x2 = -(beatWidth * 2);\r\n\r\n g.drawLine((beatWidth * 2) - 1, lineHeight * 2, (beatWidth * 2) - 1, y2 + lineHeight - 1);\r\n\r\n for (int value : this.columns()) {\r\n g.drawString(Integer.toString(value), x1 + (beatWidth * 4), g.getFontMetrics().getHeight());\r\n x1 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight * 2, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n x2 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4) - 1, lineHeight * 2,\r\n x2 + (beatWidth * 4) - 1, y2 + lineHeight - 1);\r\n }\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n\r\n // useful numbers or drawing the piano\r\n int leftMargin = (beatWidth * 4) / 5;\r\n int keyWidth = leftMargin / 2;\r\n int pianoY = y2 + lineHeight;\r\n\r\n //draw the gray piano background\r\n g.setColor(Color.LIGHT_GRAY);\r\n g.fillRect(0, pianoY,\r\n (totalBeats + 2) * beatWidth, pianoY + (lineHeight * 15) + leftMargin);\r\n\r\n //draw white piano base\r\n g.setColor(Color.WHITE);\r\n g.fillRect(leftMargin, pianoY, keyWidth * 80, lineHeight * 15);\r\n\r\n //draw white piano keys\r\n g.setColor(Color.BLACK);\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth) {\r\n g.drawRect(ii, pianoY, keyWidth, lineHeight * 15);\r\n }\r\n\r\n // draw black piano keys\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth * 8) {\r\n g.fillRect(ii + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + keyWidth + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 3) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 4) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 5) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n }\r\n\r\n // draw line at beat\r\n g.setColor(Color.RED);\r\n g.drawLine((beatWidth * 2) - 1 + (beatWidth * currentBeat), lineHeight * 2,\r\n (beatWidth * 2) - 1 + (beatWidth * currentBeat), y2 + lineHeight - 1);\r\n\r\n }", "private void drawHorizontalLines(){\r\n\r\n\t\tdouble x1 = START_X;\r\n\t\tdouble x2 = getWidth();\r\n\t\tdouble y1 = GRAPH_MARGIN_SIZE;\r\n\t\tdouble y2 = y1;\r\n\r\n\t\tdrawLine(x1,y1,x2,y2);\r\n\r\n\t\tdouble newY1 = getHeight() - y1;\r\n\t\tdouble newY2 = newY1;\r\n\r\n\t\tdrawLine(x1,newY1,x2,newY2);\r\n\t}", "public void drawHorizontal(GC gc, Rectangle drawingArea, TimeBarViewerDelegate delegate, boolean top,\n boolean printing) {\n int ox = drawingArea.x;\n\n int basey;\n int minorOff;\n int majorOff;\n int majorLabelOff;\n int dayOff;\n\n if (!top) {\n basey = drawingArea.y;\n minorOff = scaleY(MINORLENGTH);\n majorOff = scaleY(MAJORLENGTH);\n majorLabelOff = scaleY(22);\n dayOff = scaleY(34);\n } else {\n basey = drawingArea.y + drawingArea.height - 1;\n minorOff = scaleY(-MINORLENGTH);\n majorOff = scaleY(-MAJORLENGTH);\n majorLabelOff = scaleY(-10);\n dayOff = scaleY(-22);\n }\n int oy = basey;\n\n int width = drawingArea.width;\n JaretDate date = delegate.getStartDate().copy();\n\n int idx;\n if (!printing) {\n idx = TickScaler.getTickIdx(delegate.getPixelPerSecond() / getScaleX());\n } else {\n idx = TickScaler.getTickIdx(delegate.getPixelPerSecond() / getScaleX());\n }\n int majTick = TickScaler.getMajorTickMinutes(idx);\n int minTick = TickScaler.getMinorTickMinutes(idx);\n TickScaler.Range range = TickScaler.getRange(idx);\n _lastRange = range;\n\n // clean starting date on a major tick minute position (starting with a\n // day)\n date.setMinutes(0);\n date.setHours(0);\n date.setSeconds(0);\n\n // if range is week take a week starting point\n if (range == Range.WEEK) {\n while (date.getDayOfWeek() != DateUtils.getFirstDayOfWeek()) {\n date.backDays(1.0);\n }\n } else if (range == Range.MONTH) {\n // month -> month starting point\n date.setDay(1);\n }\n JaretDate save = date.copy();\n\n if (printing) {\n gc.setLineWidth(1);\n }\n // draw top/bottom line\n gc.drawLine(ox, oy, ox + width, oy);\n\n // draw the minor ticks\n while (delegate.xForDate(date) < ox + width) {\n int x = delegate.xForDate(date);\n gc.drawLine(x, oy, x, oy + minorOff);\n if (range == Range.MONTH) {\n int adv = Math.round(minTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(minTick);\n }\n }\n\n date = save.copy();\n // draw the major ticks\n while (delegate.xForDate(date) < ox + width) {\n int x = delegate.xForDate(date);\n gc.drawLine(x, oy, x, oy + majorOff);\n if (range == Range.MONTH) {\n int adv = Math.round(majTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(majTick);\n }\n }\n\n gc.setLineWidth(1);\n\n // labels: draw every two major ticks\n date = save.copy();\n int lastDay = date.getDay();\n boolean second = true;\n int count = 0;\n boolean third = true;\n // Labels are drawn beyond the width. Otherwise when the beginning of\n // the labels\n // would not be drawn when the tick itself is out of sight\n while (delegate.xForDate(date) < drawingArea.x + drawingArea.width) {\n int x = delegate.xForDate(date);\n if (date.getMinutes() % (majTick * 2) == 0) {\n // Second line\n String str = null;\n if (range == Range.HOUR) {\n // time\n str = date.toDisplayStringTime();\n } else if (range == Range.DAY) {\n // day\n str = date.getShortDayOfWeekString();\n } else if (range == Range.WEEK) {\n // week\n str = \"KW\" + date.getWeekOfYear();\n } else if (range == Range.MONTH) {\n // month\n str = Integer.toString(date.getYear());\n }\n // draw\n if (x > SwtGraphicsHelper.getStringDrawingWidth(gc, str) / 2) {\n SwtGraphicsHelper.drawStringCentered(gc, str, x, oy + majorLabelOff);\n }\n // first line\n if (range == Range.HOUR) {\n if (date.getDay() != lastDay) {\n str = date.getDay() + \". (\" + date.getDayOfWeekString() + \")\";\n } else {\n str = \"\";\n }\n lastDay = date.getDay();\n } else if (range == Range.DAY || range == Range.WEEK) {\n str = date.getDay() + \".\" + (third ? date.getShortMonthString() : \"\");\n } else if (range == Range.MONTH) {\n str = date.getMonthString();\n }\n second = !second;\n third = count++ % 3 == 0;\n SwtGraphicsHelper.drawStringCentered(gc, str, x, oy + dayOff);\n }\n if (range == Range.MONTH) {\n int adv = Math.round(majTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(majTick);\n }\n }\n }", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "private void drawGantt(Gantt g, int id) {\n int x = DEFAULT_NAME_SPACE + 2*DEFAULT_HORIZONTAL_SPACE, y = DEFAULT_HEIGHT_GANTT*id+DEFAULT_VERTICAL_SPACE;\n \n //draw the resource name before each line\n this.drawString(g.resource, DEFAULT_HORIZONTAL_SPACE, y + (DEFAULT_HEIGHT_GANTT/2) + DEFAULT_HEIGHT_GANTT%2, Color.black);\n \n //controls how many segment lines each node will have\n int size = g.segmentLines.size();\n for (int i = 0; i < size; i++) {\n if (i != size -1) {\n float c = 1 - ((float)g.activeContainers.get(i)/(float)16);\n drawRectangle(x+g.segmentLines.get(i)*PxS,\n y,\n (g.segmentLines.get(i+1) - g.segmentLines.get(i))*PxS,\n DEFAULT_HEIGHT_GANTT,\n true,\n new Color(c,c,c));\n drawLine(x+g.segmentLines.get(i)*PxS,\n y,\n x+g.segmentLines.get(i)*PxS,\n y+DEFAULT_HEIGHT_GANTT,\n Color.black);\n } else {\n drawLine(x+g.segmentLines.get(i)*PxS,\n y,\n x+g.segmentLines.get(i)*PxS,\n y+DEFAULT_HEIGHT_GANTT,\n Color.black);\n }\n }\n //cosmetic lines \n drawLine(x+(latest_finish*PxS), y, x+(latest_finish*PxS), y+DEFAULT_HEIGHT_GANTT, Color.black);\n drawLine(x, y, x+(latest_finish*PxS), y, Color.black);\n drawLine(x, y+DEFAULT_HEIGHT_GANTT, x+(latest_finish*PxS), y+DEFAULT_HEIGHT_GANTT, Color.black);\n }", "private void drawTimeMarkers(int numberOfNodes) {\n int offset = OFFSET_SINGLE;\n int x = DEFAULT_NAME_SPACE + 2*DEFAULT_HORIZONTAL_SPACE, y = DEFAULT_HEIGHT_GANTT*(numberOfNodes)+DEFAULT_VERTICAL_SPACE;\n for (int i = 0; i <= latest_finish; i+=25) {\n String s = Integer.toString(i);\n if (i == 25) offset = OFFSET_DOUBLE;\n else if (i == 100) offset = OFFSET_TRIPLE;\n else if (i == 1000) offset = OFFSET_QUADRUPLE;\n \n if (i%50 == 0) {\n drawLine(x+i*PxS, y, x+i*PxS, y+MARKER_SPACE_50, Color.black);\n drawString(s, x+i*PxS-offset, y + MARKER_SPACE_50 + DEFAULT_VERTICAL_SPACE, Color.black);\n } else {\n drawLine(x+i*PxS, y, x+i*PxS, y+MARKER_SPACE_25, Color.black);\n drawString(s, x+i*PxS-offset, y + MARKER_SPACE_50 + DEFAULT_VERTICAL_SPACE, Color.black);\n }\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if (task.isFinished()) {\n int y = this.getHeight() / 2;\n g.drawLine(0, y, this.getWidth(), y);\n }\n }", "private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }", "public void drawGraph()\n\t{\n\t\tp.rectMode(PApplet.CORNERS);\n\n\t\t//background(0);\n\t\tp.stroke(255);\n\n\t\t// draw the logarithmic averages\n\t\t//spect.forward(jingle.mix);\n\n\t\tint w = PApplet.parseInt(p.width/spect.avgSize());\n\n\t\tfor(int i = 0; i < fTimer.length; i++)\n\t\t{\n\t\t\tint xPos = i*w;\n\n\t\t\t// Draw numbers\n\t\t\tp.fill(255);\n\t\t\tp.text(i, xPos + (w/2), height2 + 20);\n\n\t\t\t// check fill for beat \n\t\t\tlong clock = System.currentTimeMillis();\n\n\t\t\tif (clock - fTimer[i] < sensitivity)\n\t\t\t{\n\t\t\t\tp.noStroke();\n\n\t\t\t\tfloat h = PApplet.map(clock - fTimer[i], 0, sensitivity, 255, 0);\n\t\t\t\tp.fill(h);\n\t\t\t\tp.ellipse(xPos, height2 + 30, 15, 15); \n\t\t\t}\n\n\t\t\tp.stroke(255);\n\t\t\tp.noFill();\n\t\t\tp.rect(xPos, height2, xPos + w, height2 - spect.getAvg(i));\n\t\t}\n\t}", "public void drawLine(int x, int y, int x2, int y2, int color);", "@Override\r\n\tpublic void draw(Graphics2D g) {\n\t\tthis.setLinePosition();\t\t\t\t\t\t\t///设置线段中点\r\n\t\t///绘制箭头主体,三段分开的线段\r\n\t\tg.drawLine(startX, startY, midX1, midY1);\r\n\t\tg.drawLine(midX1, midY1, midX2, midY2);\r\n\t\tg.drawLine(midX2, midY2, endX, endY);\r\n\t\tthis.calAngleThreePoint();\t\t\t\t\t\t///计算箭头坐标\r\n\t\tPolygon po = creatPolygon();\t\t\t\t\t///菱形\r\n\t\tg.drawPolygon(po);\r\n\t}", "public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }", "public void drawLine(int x1, int y1, int x2, int y2);", "private void drawVerticalLines(GenericTabItem tab)\n\t{\n\t\tfor(Long cpuId : vLines.keySet())\n\t\t{\n\t\t\tVector<Line> cpuLines = vLines.get(cpuId);\n\n\t\t\t//Calculate line coordinates\n\t\t\tPoint cpuCoordinate = cpuCoordinates.get(cpuId);\n\t\t\tint lineXStartPos = cpuCoordinate.x;\n\t\t\tint lineXPos = lineXStartPos;\n\t\t\tint lineXOffset = (int)(CPU_WIDTH.intValue() / (cpuLines.size()+1));;\t\t\n\n\t\t\tfor(Line line : cpuLines)\n\t\t\t{\n\t\t\t\tlineXPos += lineXOffset;\n\t\t\t\t\n\t\t\t\t//Update x coordinates to match cpu coordinates\n\t\t\t\tPoint cpuStart = line.getStart();\n\t\t\t\tcpuStart.setX(lineXPos);\t\t\t\n\t\t\t\tPoint cpuEnd = line.getEnd();\n\t\t\t\tcpuEnd.setX(lineXPos);\n\t\t\t\t\n\t\t\t\tline.setStart(cpuStart);\n\t\t\t\tline.setEnd(cpuEnd);\t\t\n\t\t\t\ttab.addFigure(line);\n\t\t\t\t\n\t\t\t\t//Save x coordinate if this is the first or last connection on the horizontal lines\n\t\t\t\tLine busLine = hLines.get(new Long(cpuEnd.y));\n\t\t\t\tPoint busStart = busLine.getStart();\n\t\t\t\tPoint busEnd = busLine.getEnd();\n\t\t\t\t\n\t\t\t\tif(busStart.x > lineXPos || busStart.x == 0)\n\t\t\t\t\tbusStart.setX(lineXPos);\n\t\t\t\t\n\t\t\t\tif(busEnd.x < lineXPos)\n\t\t\t\t\tbusEnd.setX(lineXPos);\t\n\t\t\t\t\n\t\t\t\tbusLine.setStart(busStart);\n\t\t\t\tbusLine.setEnd(busEnd);\n\t\t\t}\t\t\n\t\t}\n\t}", "void addLIfeStoryLines(String personID, HashSet<Event> filteredEvents) {\n ArrayList<Event> personEvents = singleton.retrieveLifeStory(personID);\r\n if(personEvents.size() < 2) {\r\n return;\r\n }\r\n else {\r\n for(int n = 0; n < personEvents.size()-1; n++) {\r\n Event e1 = personEvents.get(n);\r\n Event e2 = personEvents.get(n+1);\r\n if(filteredEvents.contains(e1) && filteredEvents.contains(e2)) {\r\n double lat = e1.getLatitude();\r\n double longit = e1.getLongitude();\r\n LatLng p1 = new LatLng(lat,longit);\r\n lat = e2.getLatitude();\r\n longit = e2.getLongitude();\r\n LatLng p2 = new LatLng(lat,longit);\r\n drawLine(p1,p2,Color.RED,10);\r\n }\r\n }\r\n }\r\n\r\n }", "public void setTimeLine(double time) {\n if (yCoord != 0) {\n try {\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n } catch (Exception ex) {\n }\n }\n if (time > 0.0 && time < 1.0) {\n // store the new time line to the restoration array\n timeValue = time;\n yCoord = (int) (timeValue * height);\n offscreen.getRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n offscreen.setRGB(0, yCoord, width, 1, pixels, 0, 0);\n for (int x = 0; x < width; x++) {\n pixels[x] ^= 0x00FFFFFF;\n }\n }\n }", "public void draw(Graphics2D g2, GregorianCalendar calendar);", "private void drawVertical(GC gc, Rectangle drawingArea, TimeBarViewerDelegate delegate, boolean top,\n boolean printing) {\n int oy = drawingArea.y;\n\n int basex;\n int minorOff;\n int majorOff;\n int majorLabelOff;\n int dayOff;\n\n if (!top) {\n basex = drawingArea.x;\n minorOff = scaleX(MINORLENGTH);\n majorOff = scaleX(MAJORLENGTH);\n majorLabelOff = scaleX(22);\n dayOff = scaleX(34);\n } else {\n basex = drawingArea.x + drawingArea.width - 1;\n minorOff = scaleX(-MINORLENGTH);\n majorOff = scaleX(-MAJORLENGTH);\n majorLabelOff = scaleX(-10);\n dayOff = scaleX(-22);\n }\n int ox = basex;\n\n int height = drawingArea.height;\n JaretDate date = delegate.getStartDate().copy();\n\n int idx = TickScaler.getTickIdx(delegate.getPixelPerSecond() / getScaleY());\n\n int majTick = TickScaler.getMajorTickMinutes(idx);\n int minTick = TickScaler.getMinorTickMinutes(idx);\n TickScaler.Range range = TickScaler.getRange(idx);\n _lastRange = range;\n\n // clean starting date on a major tick minute position (starting with a\n // day)\n date.setMinutes(0);\n date.setHours(0);\n date.setSeconds(0);\n\n // if range is week take a week starting point\n if (range == Range.WEEK) {\n while (date.getDayOfWeek() != DateUtils.getFirstDayOfWeek()) {\n date.backDays(1.0);\n }\n } else if (range == Range.MONTH) {\n // month -> month starting point\n date.setDay(1);\n }\n JaretDate save = date.copy();\n\n if (printing) {\n gc.setLineWidth(1);\n }\n // draw top/bottom line\n gc.drawLine(ox, oy, ox, oy + height);\n\n // draw the minor ticks\n while (delegate.xForDate(date) < oy + height) {\n int y = delegate.xForDate(date);\n gc.drawLine(ox, y, ox + minorOff, y);\n if (range == Range.MONTH) {\n int adv = Math.round(minTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(minTick);\n }\n }\n\n date = save.copy();\n // draw the major ticks\n while (delegate.xForDate(date) < oy + height) {\n int y = delegate.xForDate(date);\n gc.drawLine(ox, y, ox + majorOff, y);\n if (range == Range.MONTH) {\n int adv = Math.round(majTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(majTick);\n }\n }\n\n gc.setLineWidth(1);\n\n // labels: draw every two major ticks\n date = save.copy();\n // Labels are drawn beyond the width. Otherwise when the beginning of\n // the labels\n // would not be drawn when the tick itself is out of sight\n while (delegate.xForDate(date) < drawingArea.y + drawingArea.height + 50) {\n int y = delegate.xForDate(date);\n if (date.getMinutes() % (majTick * 2) == 0) {\n // Second line\n String str = null;\n if (range == Range.HOUR) {\n // time\n str = date.toDisplayStringTime();\n } else if (range == Range.DAY) {\n // day\n str = date.getShortDayOfWeekString();\n } else if (range == Range.WEEK) {\n // week\n str = \"KW\" + date.getWeekOfYear();\n } else if (range == Range.MONTH) {\n // month\n str = Integer.toString(date.getYear());\n }\n // draw\n if (top) {\n SwtGraphicsHelper.drawStringRightAlignedVCenter(gc, str, drawingArea.x + drawingArea.width\n + majorOff, y);\n } else {\n SwtGraphicsHelper.drawStringLeftAlignedVCenter(gc, str, drawingArea.x + majorOff, y);\n }\n // // first line\n // if (range == Range.HOUR) {\n // if (date.getDay() != lastDay) {\n // str = date.getDay() + \". (\" + date.getDayOfWeekString() + \")\";\n // } else {\n // str = \"\";\n // }\n // lastDay = date.getDay();\n // } else if (range == Range.DAY || range == Range.WEEK) {\n // str = date.getDay() + \".\" + (third ? date.getShortMonthString() : \"\");\n // } else if (range == Range.MONTH) {\n // str = date.getMonthString();\n // }\n // second = !second;\n // third = count++ % 3 == 0;\n // SwtGraphicsHelper.drawStringCentered(gc, str, x, oy + dayOff);\n }\n if (range == Range.MONTH) {\n int adv = Math.round(majTick / APPROXSECONDSINMONTH);\n if (adv == 0) {\n adv = 1;\n }\n date.advanceMonths(adv);\n } else {\n date.advanceMinutes(majTick);\n }\n }\n }", "@Override\n public void draw(Graphics g) {\n g.setColor(Color.BLACK);\n g.drawLine(startingPoint.x, startingPoint.y, endingPoint.x, endingPoint.y);\n }", "public HBox timeLine(String date, String dateBegin, String dateEnd, String collar)\n {\n HBox timeLine = new HBox(5);\n timeLine.setAlignment(Pos.BASELINE_LEFT);\n \n if(date != null)\n {\n timeLine.getChildren().addAll(new Label(\"Colar: \"), new Text(collar), new Label(\" Data: \"), new Text(date));\n }\n else if(!dateBegin.isEmpty() && !dateEnd.isEmpty())\n {\n timeLine.getChildren().addAll(new Label(\"Colar: \"), new Text(collar), new Label(\" Datas: \"), new Text(\"Entre \" + dateBegin + \" e \" + dateEnd + \"\"));\n }\n else\n {\n timeLine.getChildren().addAll(new Label(\"Colar: \"), new Text(collar), new Label(\" Data: \"), new Text(\"TODAS\"));\n }\n\n return timeLine; \n }", "private void drawCalendar(Canvas c, Paint p) {\n\n boolean currentDaySaved = false;\n int currentDayIndex = 0;\n\n drawCurrentDayProgress(c, p);\n\n p.setTextSize(RECT_SIZE / 2);\n p.setTextAlign(Paint.Align.CENTER);\n\n int col = 0;\n int row = 0;\n int maxCol = getWidth() / (RECT_SIZE);\n int translateY = 20;\n c.translate(0, translateY);\n List<MyDay> myDaysCopied = (List<MyDay>) ((ArrayList) myDays).clone();\n for (MyDay myDay : myDaysCopied) {\n if (myDay.isCompleted()) {\n if (myDay.day.get(Calendar.DAY_OF_YEAR) == MyDay.now.get(Calendar.DAY_OF_YEAR) &&\n myDay.day.get(Calendar.YEAR) == MyDay.now.get(Calendar.YEAR)) {\n p.setColor(currentDayColor);\n } else {\n p.setColor(completedDayColor);\n }\n } else {\n\n if (!currentDaySaved) {\n currentDayIndex = myDaysCopied.indexOf(myDay);\n currentDaySaved = true;\n }\n p.setColor(notCompletedDayColor);\n\n }\n if (col != 0 && myDay.day.get(Calendar.DAY_OF_MONTH) == 1) {\n col = 0;\n row++;\n c.drawLine(MARGIN, row * (RECT_SIZE) + MARGIN / 2,\n getWidth() - MARGIN, row * (RECT_SIZE) + MARGIN / 2, p);\n\n c.drawText((myDay.day.get(Calendar.MONTH) + 1) + \".\" + myDay.day.get(Calendar.YEAR),\n getWidth() - 40, row * RECT_SIZE, p);\n\n }\n\n c.drawRect(col * RECT_SIZE + MARGIN,\n row * RECT_SIZE + MARGIN, col * RECT_SIZE + RECT_SIZE\n , row * RECT_SIZE + RECT_SIZE, p);\n\n p.setColor(TEXT_COLOR);\n c.drawText(myDay.day.get(Calendar.DAY_OF_MONTH) + \"\", col * RECT_SIZE\n + MARGIN + RECT_SIZE / 2,\n row * RECT_SIZE + MARGIN + (RECT_SIZE / 3) * 2, p\n );\n\n col++;\n if (col == maxCol) {\n col = 0;\n row++;\n }\n }\n p.setColor(completedDayColor);\n c.translate(0, -translateY);\n c.drawLine(MARGIN, RECT_SIZE / 2 + MARGIN / 2,\n getWidth() - MARGIN, RECT_SIZE / 2 + MARGIN / 2, p);\n\n c.drawText((myDaysCopied.get(0).day.get(Calendar.MONTH) + 1) + \".\" + myDaysCopied.get(0).day.get(Calendar.YEAR),\n getWidth() - 40, RECT_SIZE / 2, p);\n\n\n double progressPercent;\n\n long completedMills = MyDay.now.getTimeInMillis() - MyDay.startDate.getTimeInMillis();\n long allMillis = MyDay.endDate.getTimeInMillis() - MyDay.startDate.getTimeInMillis();\n progressPercent = (((double) completedMills) / allMillis) * 100;\n // Log.d(MY_TAG, \"completedMills: \" + completedMills + \" allMillis: \" + allMillis);\n\n int progressPixel = (int) Math.round(((float) getWidth() / 100f) * progressPercent);\n\n p.setColor(notCompletedDayColor);\n p.setStrokeWidth(15);\n\n c.drawLine(0, getHeight() - PROGRESS_LINE_MARGIN_Y, getWidth(),\n getHeight() - PROGRESS_LINE_MARGIN_Y, p);\n int daysCompleted = currentDayIndex - 1;\n int daysEstimated = DAYS_COUNT - daysCompleted;\n c.drawText(daysEstimated + \"\", getWidth() - 40, getHeight() - PROGRESS_LINE_MARGIN_Y - 20, p);\n p.setColor(completedDayColor);\n c.drawLine(0, getHeight() - PROGRESS_LINE_MARGIN_Y, progressPixel,\n getHeight() - PROGRESS_LINE_MARGIN_Y, p);\n c.drawText(daysCompleted + \"\", 40, getHeight() - PROGRESS_LINE_MARGIN_Y - 20, p);\n p.setTextSize(35);\n c.drawText(new DecimalFormat(\"#0.000000\").format(progressPercent) + \"%\", getWidth() / 2, getHeight() - PROGRESS_LINE_MARGIN_Y - 20, p);\n\n\n }", "public void drawGrid(){\r\n gc.setLineWidth(0.5f);//this is how thick the 'pen' will be, 1 pixel for now\r\n gc.setStroke(divisionsColour);\r\n //this for loop will start at (canvas.widthProperty().intValue()/2)%pixelsPerDivision\r\n //this means that one line will pass through the center of the screen, for 0 which we need\r\n //canvas width and height properties are the width and height of the display of the waves only\r\n //then we draw a line every pixelsPerDivision pixels, this is so one division is pixelsPerDivision pixels.\r\n //the one directly below is for the time domain\r\n for (int x = (canvas.widthProperty().intValue() / 2) % pixelsPerDivision; x < canvas.widthProperty().intValue(); x += pixelsPerDivision) {\r\n //we begin to draw a line\r\n gc.beginPath();\r\n //starting at the top of the page\r\n gc.moveTo(x, 0);\r\n //going to the bottom\r\n gc.lineTo(x, canvas.heightProperty().intValue());\r\n //then finish this line\r\n gc.stroke();\r\n }\r\n\r\n\r\n //the one directly below is for the voltage domain\r\n //this one it is much more important that a line goes through the center as this is where the 0 mark for the waves is\r\n for (int y = (canvas.heightProperty().intValue() / 2) % pixelsPerDivision; y < canvas.heightProperty().intValue(); y += pixelsPerDivision) {\r\n gc.beginPath();\r\n gc.moveTo(0, y);\r\n gc.lineTo(canvas.widthProperty().intValue(), y);\r\n gc.stroke();\r\n }\r\n gc.setStroke(voltageTextColour);\r\n int numberOfPositiveDivisions = (canvas.heightProperty().intValue() / 2) / pixelsPerDivision;\r\n\r\n\r\n\r\n\r\n for (int i = 0; i < numberOfPositiveDivisions; i+=2) {\r\n gc.strokeText(\"+\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"+\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i));\r\n if (i != 0) {\r\n gc.strokeText(\"-\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"-\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i));\r\n }\r\n }\r\n gc.rotate(-90);\r\n\r\n for (int i=4; i<canvasSizeXY/pixelsPerDivision;i+=4){\r\n gc.strokeText(getScienceNumber(i*secondsPerDivision)+\"ms\", -(canvasSizeXY-10),(pixelsPerDivision * i)+5);\r\n }\r\n gc.rotate(90);\r\n //the following will draw a center line over the 0V axis part, but with a thicker pen so we can see 0 clearer\r\n gc.beginPath();\r\n gc.setLineWidth(3);//makes the line thicker\r\n gc.moveTo(0, canvas.heightProperty().intValue() / 2);\r\n gc.lineTo(canvas.widthProperty().intValue(), canvas.heightProperty().intValue() / 2);\r\n gc.stroke();\r\n\r\n }", "public void draw(Graphics g) {\r\n g.drawLine(line.get(0).getX() + 4, line.get(0).getY() + 4, line.get(4).getX() + 4, line.get(4).getY() + 4);\r\n }", "public void listenerPaint(java.awt.Graphics g) {\n for (int i = 0; i < segments.size() - 1; i++) {\n paintLine((LatLonPoint) (segments.elementAt(i)),\n (LatLonPoint) (segments.elementAt(i + 1)),\n g);\n }\n paintRubberband(rPoint1, rPoint2, g);\n }", "public void drawGrid(Graphics g)\n {\n //g.setColor(Color.GREEN);\n \n \n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor); \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n else\n { \n if(lastpowerUp.equals(\"BLUE\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray); \n } \n else if(difficult.equals(\"GHOST\"))\n g.setColor(Color.WHITE);\n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n }", "void addFamilyLines(Event event,HashSet<Event> filteredEvents,int genLevel) {\n HashSet<Event> parentEvents = singleton.retrieveParentLines(event.getPersonID());\r\n Log.d(TAG,String.valueOf(parentEvents.size()));\r\n for(Event parEvent: parentEvents) {\r\n if(filteredEvents.contains(parEvent)) {\r\n int color;\r\n if(genLevel % 4 == 0) {\r\n //add green\r\n color = Color.GREEN;\r\n }\r\n else if(genLevel % 4 == 1) {\r\n //add grey\r\n color = Color.GRAY;\r\n }\r\n else if(genLevel % 4 == 2) {\r\n //add Yellow\r\n color = Color.YELLOW;\r\n }\r\n else {\r\n //add cyan\r\n color= Color.CYAN;\r\n }\r\n double lat = event.getLatitude();\r\n double longi = event.getLongitude();\r\n LatLng p1 = new LatLng(lat,longi);\r\n lat = parEvent.getLatitude();\r\n longi = parEvent.getLongitude();\r\n LatLng p2 = new LatLng(lat,longi);\r\n drawLine(p1,p2,color,markerWidth - 2*genLevel);\r\n addFamilyLines(parEvent,filteredEvents,genLevel +1);\r\n }\r\n }\r\n }", "public void drawLine(int x1, int y1, int x2, int y2 , Graphics g) {\r\n \tfloat dY, dX;\r\n \tfloat x,y;\r\n \tdX = x2-x1;\r\n \tdY = y2-y1;\r\n \tx = x1;\r\n \ty = y1;\r\n \t\t\t\r\n \tfloat range = Math.max(Math.abs(dX), Math.abs(dY));\r\n \tdY = dY/range;\r\n \tdX = dX/range;\r\n \t\r\n \tfor (int i =0 ; i < range ; i++ ) { \r\n \t\tg.drawRect(Math.round(x), Math.round(y),1,1);\r\n \t\tx = x + dX;\r\n \t\ty = y + dY;\r\n \t}\r\n\r\n \t\r\n }", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tint width = getWidth();\n\t\tint height = getHeight();\n\t\tint wSteps = width / 15;\n\t\tint hSteps = height / 15;\n\n\t\tint xDelta = wSteps;\n\t\tint yDelta = height;\n\n\t\t// draw a series of lines fanning from top corner\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tg.drawLine(0, 0, xDelta, yDelta);\n\n\t\t\txDelta += wSteps;\n\t\t\tyDelta -= hSteps;\n\n\t\t}\n\t}", "private void drawCurve(){\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Line);\n for (int i = 0; i<dragonCurve1.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve1[i], dragonCurve1[i+1], dragonCurve1[i+2], dragonCurve1[i+3]);\n }\n for (int i = 0; i<dragonCurve2.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve2[i], dragonCurve2[i+1], dragonCurve2[i+2], dragonCurve2[i+3]);\n }\n for (int i = 0; i<dragonCurve3.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve3[i], dragonCurve3[i+1], dragonCurve3[i+2], dragonCurve3[i+3]);\n }\n for (int i = 0; i<dragonCurve4.length-2; i+=2){\n renderer.setColor(new Color(1-(i/20000f),1-(i/20000f),1f,1f));\n renderer.line(dragonCurve4[i], dragonCurve4[i+1], dragonCurve4[i+2], dragonCurve4[i+3]);\n }\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.RED);\n renderer.end();\n if(MyCamera.renderSystems){ //Put red dots on the systems that are close enough to a certain point while zoomed in\n systems = GameScreen.database.getSystems(\"SELECT SystemX, SystemY, id FROM 'Systems' WHERE ABS(SystemX-\"+MyCamera.closeupCamera.position.x+\")<25\");\n for(int i = 0; i<systems.size(); i++){\n String[] parts = systems.get(i).split(\" \");\n float x = Float.parseFloat(parts[0]);\n float y = Float.parseFloat(parts[1]);\n String id = String.valueOf(Float.parseFloat(parts[2]));\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.circle(x, y, 0.5f);\n renderer.end();\n }\n }\n }", "void drawLine(int startx,int starty,int endx,int endy,ImageView imageView){\n imageView.setVisibility(View.VISIBLE);\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStrokeWidth(20);\n paint.setStyle(Paint.Style.STROKE);\n\n canvas.drawLine(startx,starty,endx,endy,paint);\n\n //animates the drawing to fade in\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(4000);\n imageView.startAnimation(animation);\n }", "private void drawChart() throws ParseException {\n Calendar cal = new GregorianCalendar();\n cal.setTime(new Date());\n cal.set(Calendar.DAY_OF_MONTH, -7);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n Date startTime = cal.getTime();\n Date dayEnd = new Date();\n\n historyChart.setBackgroundColor(Color.WHITE);\n historyChart.setDrawBorders(true);\n\n\n ArrayList<String> xAxis = new ArrayList<>();\n ArrayList<Float> calories = new ArrayList<>();\n ArrayList<Float> calcium = new ArrayList<>();\n ArrayList<Float> sodium = new ArrayList<>();\n ArrayList<Float> carbs = new ArrayList<>();\n ArrayList<Float> cholestrol = new ArrayList<>();\n ArrayList<Float> iron = new ArrayList<>();\n ArrayList<Float> protien = new ArrayList<>();\n ArrayList<Float> sugar = new ArrayList<>();\n ArrayList<Float> totalfat = new ArrayList<>();\n\n NutritionHistory instance = NutritionHistory.getInstance();\n NutritionHistory.getInstance().getNutritionInformation(startTime, dayEnd, nutritionInformation -> {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();\n mDatabase.child(\"account\").child(mCurrentUser.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n double caloriesNeeded = 2000L;\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n switch (data.getKey()) {\n case \"calories\":\n caloriesNeeded = Double.parseDouble(String.valueOf(data.getValue()));\n }\n }\n\n NutrientConverter converter = new NutrientConverter(caloriesNeeded);\n\n NutritionInformation.NutritionInformationBuilder builder = new NutritionInformation.NutritionInformationBuilder();\n NutritionInformation current = builder.build();\n\n Long[] days = nutritionInformation.keySet().stream().toArray(Long[]::new);\n Arrays.sort(days);\n\n for(Long day: days) {\n xAxis.add(sdf2.format(new Date(day)).toString());\n calories.add(converter.convert(\"Calories\", (float) nutritionInformation.get(day).getCalories()));\n calcium.add(converter.convert(\"Calcium\", (float) nutritionInformation.get(day).getCalcium()));\n sodium.add(converter.convert(\"Sodium\", (float)nutritionInformation.get(day).getSodium()));\n carbs.add(converter.convert(\"Carbohydrates\", (float) nutritionInformation.get(day).getCarbohydrates()));\n cholestrol.add(converter.convert(\"Cholesterol\", (float)nutritionInformation.get(day).getCholesterol()));\n iron.add(converter.convert(\"Iron\", (float)nutritionInformation.get(day).getIron()));\n protien.add(converter.convert(\"Protein\", (float)nutritionInformation.get(day).getProtein()));\n sugar.add(converter.convert(\"Sugar\", (float)nutritionInformation.get(day).getSugar()));\n totalfat.add(converter.convert(\"Total Fat\", (float)nutritionInformation.get(day).getTotalFat()));\n }\n Log.i(\"HERE\", xAxis.toString());\n LineDataSet dataCalories = addValues(\"Calories\", calories);\n dataCalories.setColor(Color.RED);\n dataCalories.setLineWidth(2f);\n\n LineDataSet dataCalcium = addValues(\"Calcium\",calcium);\n dataCalcium.setColor(Color.rgb(181, 126\t, 220));\n dataCalcium.setLineWidth(2f);\n\n LineDataSet dataSodium = addValues(\"Sodium\", sodium);\n dataSodium.setColor(Color.BLUE);\n dataSodium.setLineWidth(2f);\n\n LineDataSet dataCarbs = addValues(\"Carbohydrates\",carbs);\n dataCarbs.setColor(Color.GREEN);\n dataCarbs.setLineWidth(2f);\n\n LineDataSet dataCholesterol = addValues(\"Cholesterol\", cholestrol);\n dataCholesterol.setColor(Color.YELLOW);\n dataCholesterol.setLineWidth(2f);\n\n LineDataSet dataIron = addValues(\"Iron\",iron);\n dataIron.setColor(Color.BLACK);\n dataIron.setLineWidth(2f);\n\n LineDataSet dataProtein = addValues(\"Protein\", protien);\n dataProtein.setColor(Color.CYAN);\n dataProtein.setLineWidth(2f);\n\n LineDataSet dataSugar = addValues(\"Sugar\",sugar);\n dataSugar.setColor(Color.MAGENTA);\n dataSugar.setLineWidth(2f);\n\n LineDataSet dataTotalFat = addValues(\"Total Fat\", totalfat);\n dataTotalFat.setColor(Color.rgb(248\t,131, 121));\n dataTotalFat.setLineWidth(2f);\n\n LineData lineData = new LineData(dataCalories, dataCalcium ,dataSodium, dataCarbs, dataIron, dataSugar, dataProtein, dataTotalFat, dataCholesterol);\n historyChart.setData(lineData);\n historyChart.getXAxis().setDrawAxisLine(true);\n historyChart.setVisibleXRange(0, xAxis.size() - 1);\n historyChart.getXAxis().setValueFormatter(new MyXAxisValueFormatter(xAxis));\n historyChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n historyChart.enableScroll();\n historyChart.getDescription().setEnabled(false);\n historyChart.getXAxis().setLabelCount(7, true);\n historyChart.setExtraBottomOffset(20f);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n });\n\n designChart(xAxis);\n historyChart.invalidate();\n }", "protected void paintClock(){\n\t\tdouble clockRadius = Math.min(width, height) * 0.8 * 0.5;\n\t\tdouble centerX = width / 2;\n\t\tdouble centerY = height / 2;\n\t\t//Draw circle \n\t\tCircle circle = new Circle(centerX, centerY, clockRadius);\n\t\tcircle.setFill(Color.WHITE);\n\t\tcircle.setStroke(Color.BLACK);\n\t\t\n\t\tText t1 = new Text(centerX - 5, centerY - clockRadius + 12, \"12\");\n\t\t\n\t}", "private void lineColor() {\n\n\t}", "private void makeChart() {\n\n Log.d(\"Chart\",\"Start Chart\");\n\n ArrayList<Entry> speedList = new ArrayList<>();\n ArrayList<Entry> avgSpeedList = new ArrayList<>();\n ArrayList<Entry> avgAltList = new ArrayList<>();\n\n int numberOfValues = trackingList.size();\n\n //Fills the data in the Arrays Entry (xValue,yValue)\n for(int i = 0; i < numberOfValues;i++){\n float avgSpeed = (float)averageSpeed;\n float avgAlt = (float)averageAlt;\n float curSpeed = (float)trackingList.get(i).getSpeed();\n\n Log.d(\"Chart\",\"CurSpeed: \" +curSpeed);\n\n avgSpeedList.add(new Entry(i*3,avgSpeed));\n speedList.add(new Entry(i*3,curSpeed));\n avgAltList.add(new Entry(i*3,avgAlt));\n }\n\n ArrayList<String> xAXES = new ArrayList<>();\n\n\n String[] xaxes = new String[xAXES.size()];\n for(int i=0; i<xAXES.size();i++){\n xaxes[i] = xAXES.get(i);\n }\n\n // More than one Array (Line in the Graph)\n ArrayList<ILineDataSet> lineDataSets = new ArrayList<>();\n\n //Speed Graph setup\n LineDataSet lineDataSet1 = new LineDataSet(speedList,\"Speed\");\n lineDataSet1.setDrawCircles(false);\n lineDataSet1.setColor(Color.BLUE);\n lineDataSet1.setLineWidth(2);\n\n //AvgSpeed setup\n LineDataSet lineDataSet2 = new LineDataSet(avgSpeedList,\"AvgSpeedLine\");\n lineDataSet2.setDrawCircles(false);\n lineDataSet2.setColor(Color.RED);\n lineDataSet2.setLineWidth(3);\n\n //AvgAlt setup\n LineDataSet lineDataSet3 = new LineDataSet(avgAltList,\"AvgAltLine\");\n lineDataSet3.setDrawCircles(false);\n lineDataSet3.setColor(Color.MAGENTA);\n lineDataSet3.setLineWidth(3);\n\n //Add them to the List\n lineDataSets.add(lineDataSet1);\n lineDataSets.add(lineDataSet2);\n lineDataSets.add(lineDataSet3);\n\n //setup for the xAxis\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n //Puts the data in the Graph\n lineChart.setData(new LineData(lineDataSets));\n lineChart.setVisibleXRangeMaximum(65f);\n\n //Chart description\n lineChart.getDescription().setText(\"All Speed\");\n\n //Shows timer information when clicked\n lineChart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(), \"Its measured every 3 seconds\",Toast.LENGTH_LONG).show();\n }\n });\n }", "public void paintRoute(Graphics g, String[] ruteData, int begin, int end, int color) {\n //System.out.println(\"painting rute\");\n end += RUTE_FLOOR + 1;\n begin += RUTE_FLOOR + 1;\n if (begin > end || end > ruteData.length || begin < 0 || g == null || ruteData == null) {\n return;\n }\n g.setColor(color);\n //paint the rute\n int x = 0, y = 0, lastx = 0, lasty = 0, i = begin;\n int floor = Integer.parseInt(ruteData[RUTE_FLOOR]);\n for (; i < end; i++) {\n //System.out.println(ruteData[i]);\n point = getPoint(ruteData[i]);\n x = point[0] + currMatrixX + transformCoordenate(floor, X_COORD);\n y = point[1] + currMatrixY + transformCoordenate(floor, Y_COORD);\n //dot\n g.fillRoundRect(x - 5, y - 5, 10, 10, 5, 5);\n //line\n if (!(lastx == 0 && lasty == 0)) {\n g.drawLine(x - 1, y - 1, lastx - 1, lasty - 1);\n g.drawLine(x, y - 1, lastx, lasty - 1);\n g.drawLine(x - 1, y, lastx - 1, lasty);\n g.drawLine(x, y, lastx, lasty);\n g.drawLine(x, y + 1, lastx, lasty + 1);\n g.drawLine(x + 1, y, lastx + 1, lasty);\n g.drawLine(x + 1, y + 1, lastx + 1, lasty + 1);\n }\n lastx = x;\n lasty = y;\n //System.out.println(\"point \" + (i-begin) + \": \" + x + \",\" + y + \" floor \" + floor);\n }\n }", "private void drawSleepTimes(Canvas canvas) {\n if (mSleepTimePairs == null) {\n return;\n }\n\n for (Pair<Date, Date> pair : mSleepTimePairs) {\n float beginPos = calculateTimePosition(pair.first);\n float endPos = calculateTimePosition(pair.second);\n canvas.drawRect(beginPos, 0, endPos, scaleLinePosition, sleepTimePaint);\n }\n }", "public void paint(Graphics graphics) {\n setBackground(Color. gray);\n super. paint(graphics);\n graphics. setColor(Color.red);\n graphics. drawLine(highthresh, 1, highthresh, 256);\n graphics. setColor(Color. green);\n graphics. drawLine(lowthresh, 1, lowthresh , 256);\n graphics.setColor(Color.white);\n\n // Vertical line\n graphics.setColor(Color.red);\n graphics.drawLine(0,0,0,255);\n graphics.drawLine(0,0,10,0);\n graphics.drawLine(0,64,5,64);\n graphics.drawLine(0,128,10,128);\n graphics.drawLine(0,192,5,192);\n graphics.drawLine(0,256,10,256);\n int a = 0;\n int b = hvalue/4;\n int c = b+b;\n int d = b+c;\n int e = hvalue;\n graphics.drawString(Integer.toString(e),0,15);\n //graphics.drawString(Integer.toString(d),0,74);\n graphics.drawString(Integer.toString(c),10,140);\n //graphics.drawString(Integer.toString(b),0,202);\n graphics.drawString(Integer.toString(a),5,250);\n\n // Horizontal line \n graphics.setColor(Color.red);\n graphics.drawLine(0,255,255,255);\n graphics.drawLine(0,255,0,245);\n graphics.drawLine(64,255,64,250);\n graphics.drawLine(128,255,128,245);\n graphics.drawLine(192,255,192,250);\n graphics.drawLine(256,255,256,245);\n int aa = 0;\n int bb = wvalue/4;\n int cc = bb+bb;\n int dd = bb+cc;\n int ee = wvalue;\n graphics.drawString(Integer.toString(aa),5,240);\n //graphics.drawString(Integer.toString(bb),58,240);\n graphics.drawString(Integer.toString(cc),123,240);\n //graphics.drawString(Integer.toString(dd),180,240);\n graphics.drawString(Integer.toString(ee),230,240);\n }", "private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }", "public void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\t\n\t\t\t// First 2 arguments (X, Y) -> start, Last 2 arguments (X, Y) -> end\n\t\t\tg.drawLine(0, 3, 200, 200);\n\t\t\tg.drawLine(200, 200, 0, 400);\n\t\t\t\n\t\t}", "public void displayTasks(){\r\n\t\ttextSize(12);\r\n\t\ttextAlign(CENTER, CENTER);\r\n\t\t\r\n\t\t//draws day numbers and the grid lines from 1 to 30\r\n\t\tfor(int i = 0; i < 30; i++){\r\n\t\t\tfill(0,0,100);\r\n\t\t\t\r\n\t\t\t//writes day numbers\r\n\t\t\ttext((i+1), ((9 + i) * col_width), row_height);\r\n\t\t\t\r\n\t\t\t//changes the line color to varying white and grey\r\n\t\t\tif(i % 2 == 0 || i == 29){\r\n\t\t\t\tstroke(0,0,100);\r\n\t\t\t}else{\r\n\t\t\t\tstroke(0,0,70);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//draws 30 lines below corresponding day numbers\r\n\t\t\tline(((9 + i) * col_width), (2 * row_height), ((9 + i) * col_width), (height - (2 * row_height)));\r\n\t\t}\r\n\t\t\r\n\t\ttextAlign(LEFT, CENTER);\r\n\t\t\r\n\t\t//writes the task names and draws the corresponding rectangles\r\n\t\tfor(int i = 0; i < row_count; i++){\r\n\t\t\tfill(0,0,100);\r\n\t\t\t\r\n\t\t\t//writes taks names\r\n\t\t\ttext(tasks.get(i).get_name(), row_height, ((3 + i) * row_height));\r\n\t\t\t\r\n\t\t\tfill((i * (100 / row_count)),100,100);\r\n\t\t\tnoStroke();\r\n\t\t\t\r\n\t\t\t//draws corresponding task rectangles without using map function\r\n\t\t\t//(8 + start) for starting left most x coordinate because day values starts at 1 not 0\r\n\t\t\t//(2.5 + index) for starting top most y coordinate because grid starts at 2.5 * row_height\r\n\t\t\t//rect(((8 + tasks.get(i).get_start()) * col_width), ((float)((2.5 + i) * row_height)), ((tasks.get(i).get_end() - tasks.get(i).get_start()) * col_width), ((float)(0.8 * row_height)), 10);\r\n\t\t\t\r\n\t\t\t//using map function\r\n\t\t\t//calculates the mapped x, y coordinates of each rectangle and their corresponding width and height\r\n\t\t\t//maps the start day value from 1 to 30 onto x coordinates based on col_width\r\n\t\t\tx = map(tasks.get(i).get_start(), 1, 30, (9 * col_width), (38 * col_width));\r\n\t\t\t//maps each data row's index onto y coordinate based on row_height\r\n\t\t\ty = map(i, 0, (row_count - 1), (float)(2.5 * row_height), (float)((1.5 + row_count) * row_height));\r\n\t\t\t//maps the width of the box (length is end day - start day) from 1 to 30 onto (1 to 30) * col_width\r\n\t\t\tw = map((tasks.get(i).get_end() - tasks.get(i).get_start()), 1, 30, col_width, (30 * col_width));\r\n\t\t\t//makes each box's height 80% of row_height to show separation\r\n\t\t\th = map(row_height, 0, 100, 0, 80);\r\n\t\t\t\r\n\t\t\trect(x, y, w, h, 10);\r\n\t\t\r\n\t\t}\r\n\t}", "public void paint(Graphics g) {\n g.drawLine(120, 10, 120, 140);\n g.drawLine(120,140, 240, 140);\n g.drawString(\"120\",90,35 );\n g.drawString(\"100\",90,55 );\n g.drawString(\"80\",90,75 );\n g.drawString(\"60\",90,92 );\n g.drawString(\"40\",90,105 );\n g.drawString(\"20\",90,120 );\n g.drawString(\"0\",90,140 );\n g.drawString(\"Valerie\", 120,160);\n g.drawString(\"Hans\", 170,160);\n g.drawString(\"Jeroen\", 210,160);\n g.setColor(Color.red);\n g.fillRect(120, yvalerie, 40, hvalerie);\n g.drawRect(120, 100, 40, 40);\n g.setColor(Color.magenta);\n g.fillRect(160, yhans, 40, hhans);\n g.drawRect(160, 65, 40, 75);\n g.setColor(Color.orange);\n g.fillRect(200, yjeroen, 40, hjeroen);\n g.drawRect(200, 45, 40, 95);\n\n\n }", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "public void notifyShutdown(ShutdownEvent event) {\n\t\tXYLineChart chart = new XYLineChart(\"Average travel times per iteration\",\r\n\t\t\t\t\"Iterations\", \"ttimes\");\r\n\t\tchart.addMatsimLogo();\r\n\t\t//create the arrays needed for chart creation\r\n\t\tdouble[] iters = new double[this.timePerIterationMap.size()];\r\n\t\tdouble[] times = new double[this.timePerIterationMap.size()];\r\n\t\tint decrement = 1;\r\n\t\tif (this.timePerIterationMap.containsKey(Integer.valueOf(0))) {\r\n\t\t\tdecrement = 0;\r\n\t\t}\r\n\t\t//unfortunately we have to do this as...\r\n\t\tfor (Integer k : this.timePerIterationMap.keySet()) {\r\n\t\t\titers[k - decrement] = k;\r\n\t\t\ttimes[k - decrement] = this.timePerIterationMap.get(k);\r\n\t\t}\r\n\t\t//write to file doing this not in the loop above is cause we\r\n\t\t//would like to have a sorted output.\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\tfor (int i = 0; i < iters.length; i++) {\r\n\t\t\tbuffer.append(iters[i]);\r\n\t\t\tbuffer.append(\"\\t\");\r\n\t\t\tbuffer.append(times[i]);\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t}\r\n\t\t//write the chart\r\n\t\tchart.addSeries(\"tt\", iters, times);\r\n\t\tchart.saveAsPng(\"./output/travelTimes.png\", 800, 600);\r\n\t\ttry {\r\n\t\t\tBufferedWriter writer = IOUtils.getBufferedWriter(\"./output/travelTimes.txt\");\r\n\t\t\twriter.write(buffer.toString());\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void updateLineChart()\r\n {\r\n hoursLoggedSeries = new XYChart.Series<>();\r\n hoursLoggedSeries.setName(Integer.toString(LocalDate.now().getYear()));\r\n lineChart.getData().clear();\r\n \r\n try{\r\n populateSeriesFromDB();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n lineChart.getData().addAll(hoursLoggedSeries);\r\n }", "public void setLineData(ArrayList<Integer> allDay) {\r\n\r\n ArrayList<String> xVals = new ArrayList<String>();\r\n for (int i = 1; i <= 24; i++) {\r\n xVals.add((i) + \"\");\r\n }\r\n\r\n ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n\r\n for (int i = 1; i <= 24; i++) {\r\n vals1.add(new Entry(allDay.get(i-1), i));\r\n }\r\n Log.v(\"vals1\",vals1.toString());\r\n \t\r\n \t\r\n// \tint count = 45;\r\n// \tint range = 100; \r\n// \tArrayList<String> xVals = new ArrayList<String>();\r\n// for (int i = 0; i < count; i++) {\r\n// xVals.add((1990 +i) + \"\");\r\n// }\r\n//\r\n// ArrayList<Entry> vals1 = new ArrayList<Entry>();\r\n//\r\n// for (int i = 0; i < count; i++) {\r\n// float mult = (range + 1);\r\n// float val = (float) (Math.random() * mult) + 20;// + (float)\r\n// // ((mult *\r\n// // 0.1) / 10);\r\n// vals1.add(new Entry(val, i));\r\n// }\r\n// \r\n \t\r\n // create a dataset and give it a type\r\n LineDataSet set1 = new LineDataSet(vals1, \"DataSet 1\");\r\n set1.setDrawCubic(true);\r\n set1.setCubicIntensity(0.2f);\r\n set1.setDrawFilled(true);\r\n set1.setDrawCircles(false); \r\n set1.setLineWidth(2f);\r\n set1.setCircleSize(5f);\r\n set1.setHighLightColor(Color.rgb(244, 117, 117));\r\n set1.setColor(Color.rgb(104, 241, 175));\r\n\r\n ArrayList<LineDataSet> dataSets = new ArrayList<LineDataSet>();\r\n dataSets.add(set1);\r\n\r\n // create a data object with the datasets\r\n LineData data = new LineData(xVals, dataSets);\r\n\r\n // set data\r\n nChart.setData(data);\r\n }", "private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}", "@Override\n\tpublic void drow(int w, int h, Color color) {\n\t\tSystem.out.println(\"drow Line : \" + w + \" \" + h + \" \" + color );\n\t}", "private void drawLine(int x1, int y1, int x2, int y2)\n {\n System.out.println(\"Draw a line from x of \" + x1 + \" and y of \" + y1);\n System.out.println(\"to x of \" + x2 + \" and y of \" + y2);\n System.out.println(\"The line color is \" + lineColor);\n System.out.println(\"The width of the line is \" + lineWidth);\n System.out.println(\"Then length of the line is \" + df.format(getLength()) + \"\\n\" );\n }", "private void createChart() {\n LineChart lineChart = (LineChart) findViewById(R.id.line_chart);\n\n // LineChart DataSet\n ArrayList<LineDataSet> dataSets = new ArrayList<>();\n\n // x-coordinate format value\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularity(1f); // only intervals of 1 day\n// xAxis.setValueFormatter(new DayAxisValueFormatter(lineChart));\n\n\n // x-coordinate value\n ArrayList<String> xValues = new ArrayList<>();\n xValues.add(\"No.1\");\n xValues.add(\"No.2\");\n xValues.add(\"No.3\");\n xValues.add(\"No.4\");\n xValues.add(\"No.5\");\n\n // value\n ArrayList<Entry> value = new ArrayList<>();\n String measureItemName = \"\";\n value.add(new Entry(100, 0));\n value.add(new Entry(120, 1));\n value.add(new Entry(150, 2));\n value.add(new Entry(250, 3));\n value.add(new Entry(500, 4));\n\n\n // add value to LineChart's DataSet\n LineDataSet valueDataSet = new LineDataSet(value, measureItemName);\n dataSets.add(valueDataSet);\n\n // set LineChart's DataSet to LineChart\n// lineChart.setData(new LineData(xValues, dataSets));\n lineChart.setData(new LineData(valueDataSet));\n }", "private void initChart() {\n Cartesian cartesian = AnyChart.line();\n\n cartesian.animation(true);\n\n cartesian.padding(10d, 20d, 5d, 20d);\n\n cartesian.crosshair().enabled(true);\n cartesian.crosshair()\n .yLabel(true)\n // TODO ystroke\n .yStroke((Stroke) null, null, null, (String) null, (String) null);\n\n cartesian.tooltip().positionMode(TooltipPositionMode.POINT);\n\n cartesian.title(\"Steps taken in this week and last week\");\n\n cartesian.yAxis(0).title(\"Steps\");\n cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);\n\n List<DataEntry> seriesData = new ArrayList<>();\n Log.d(\"Size This Week\",stepsTakenModelsThisWeek.size()+\"\");\n for(int i = 0 ; i<7 ; i++){\n CustomDataEntry c = new CustomDataEntry(days[i],stepsTakenModelsLastWeek.get(i).getSteps());\n if(i<stepsTakenModelsThisWeek.size()){\n c.setValue(\"value2\",stepsTakenModelsThisWeek.get(i).getSteps());\n }else{\n if(DateUtilities.getDayInAbbBySelectedDate(stepsTakenModelsLastWeek.get(i).getDate()).equals(\n DateUtilities.getCurrentDayInAbb()))\n {\n c.setValue(\"value2\",stepsToday);\n }else{\n c.setValue(\"value2\",0);\n }\n }\n seriesData.add(c);\n }\n\n Set set = Set.instantiate();\n set.data(seriesData);\n Mapping series1Mapping = set.mapAs(\"{ x: 'x', value: 'value' }\");\n Mapping series2Mapping = set.mapAs(\"{ x: 'x', value: 'value2' }\");\n\n Line series1 = cartesian.line(series1Mapping);\n series1.name(\"Last Week\");\n series1.hovered().markers().enabled(true);\n series1.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series1.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n Line series2 = cartesian.line(series2Mapping);\n series2.name(\"This Week\");\n series2.hovered().markers().enabled(true);\n series2.hovered().markers()\n .type(MarkerType.CIRCLE)\n .size(4d);\n series2.tooltip()\n .position(\"right\")\n .anchor(Anchor.LEFT_CENTER)\n .offsetX(5d)\n .offsetY(5d);\n\n\n cartesian.legend().enabled(true);\n cartesian.legend().fontSize(13d);\n cartesian.legend().padding(0d, 0d, 10d, 0d);\n\n chart.setChart(cartesian);\n }", "public void drawLineHoriz(int var1, int var2, int var3, int var4) {\n if(var2 >= this.field_743 && var2 < this.field_744) {\n if(var1 < this.field_745) {\n var3 -= this.field_745 - var1;\n var1 = this.field_745;\n }\n\n if(var1 + var3 > this.field_746) {\n var3 = this.field_746 - var1;\n }\n\n int var5 = var1 + var2 * this.field_723;\n int var6 = 0;\n if(field_759 || var6 < var3) {\n do {\n this.pixels[var5 + var6] = var4;\n ++var6;\n } while(var6 < var3);\n\n }\n }\n }", "Line createLine();", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "@Override\n public void draw(Canvas canvas) {\n DateFormat df = new SimpleDateFormat(\"HH:mm\");\n String date = df.format(Calendar.getInstance().getTime());\n Bitmap cc = drawTextBitmap(date, Color.WHITE,100,150,false,500,500);\n canvas.drawBitmap(cc, 0, 10, new Paint());\n }", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public void drawLine(Graphics2D g, int width, int height) {\n GetMaximas();\n drawLine(g, width, height, lowerX, lowerY, upperX, upperY);\n }", "void showLine(int[] xy1, int[] xy2, int width, char col) {\r\n\t\tgc.setStroke(colFromChar(col)); // set the stroke colour\r\n\t\tgc.setLineWidth(width);\r\n\t\tgc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line\r\n\t}", "private void drawLine(Vector2 vt1, Vector2 vt2, GLayerGroup pGroup){\n DrawLineLaser.DrawLine(vt1,vt2);\n\n }", "public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }", "void draw (ObservableList<Node> objects, ObservableList<Node> persistentObjects) {\n\n// defines the start and end of the Line based on the first and last Event\n// of the Timeline, the zoom (stretch) and global edge of all Nodes (shift)\n start = (timeline.events.peekFirst().startDate[2] * stretch) - shift;\n end = (timeline.events.peekLast().startDate[2] * stretch) - shift;\n\n// defines the X coordinates of the Label before the first Event\n this.setLayoutX(start - this.width() - 10);\n\n// places and styles the accompanying Line\n line = new Line(start, y, end, y);\n line.setStyle(stylesheet.toString());\n line.getStyleClass().add(\"axisLine\");\n\n// sets right click on the Line to expand Timeline as well\n line.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(timeline);\n });\n\n// draws the Label and Line on mainPane\n objects.addAll(this, line);\n\n// cycles through all Timeline Events\n// creates Marker and draws it on mainPane\n for (Event event : timeline.events) {\n if (event.visible) {\n Marker marker = new Marker(event, y);\n objects.addAll(marker, marker.line);\n }\n }\n\n// draws persistentLabel on persistentPane\n persistentObjects.add(persistentLabel);\n }", "private void plotEntries() {\n\t\tfor (int i = 0; i < entries.size(); i++) {\n\t\t\tdrawLine(i);\n\t\t}\n\t}", "public void update() {\n if(this.getLine(0) != \"\") this.setLine(0, \"\");\n if(this.getLine(0) != plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\") this.setLine(1, plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\");\n if(this.getLine(0) != Team.getTeams().size() + \" §7Equipes\") this.setLine(2, Team.getTeams().size() + \" §7Equipes\");\n if(this.getLine(0) != \" \") this.setLine(3, \" \");\n\n /* Timer part */\n if(plugin.getGameManager().hasStarted()) {\n this.setLine(4, \"§eTimer: §r\" + getFormattedTimer(plugin.getTimerManager().getMinutesLeft(), plugin.getTimerManager().getSecondsLeft()) + \" [§bE\" + getFormattedEpisode(plugin.getTimerManager().getEpisode()) + \"§r]\");\n\n String text = \"\";\n List<Integer> timers = new ArrayList<>();\n if(!plugin.getGameManager().isPvpActivated())\n timers.add(plugin.getTimerManager().getMinutesPvpLeft());\n if(!plugin.getGameManager().isRolesActivated())\n timers.add(plugin.getTimerManager().getMinutesRolesLeft());\n if(!plugin.getGameManager().isKitsActivated())\n timers.add(plugin.getTimerManager().getMinutesKitsLeft());\n if(!plugin.getBorderManager().isShrinking())\n timers.add(plugin.getTimerManager().getMinutesBorderLeft());\n\n try {\n int min = timers\n .stream()\n .filter(v -> v != -1)\n .mapToInt(v -> v)\n .min()\n .orElseThrow(NoSuchElementException::new);\n\n if(min == plugin.getTimerManager().getMinutesPvpLeft() && !plugin.getGameManager().isPvpActivated())\n text = \"Pvp\";\n else if(min == plugin.getTimerManager().getMinutesRolesLeft() && !plugin.getGameManager().isRolesActivated())\n text = \"Equipes\";\n else if(min == plugin.getTimerManager().getMinutesKitsLeft() && !plugin.getGameManager().isKitsActivated())\n text = \"Kits\";\n else if(min == plugin.getTimerManager().getMinutesBorderLeft() && !plugin.getBorderManager().isShrinking())\n text = \"Bordure\";\n\n if(!text.equals(\"\")) {\n this.setLine(5, \"§c\" + text + \": §r< \" + (min + 1) + \"min\");\n }\n } catch (NoSuchElementException e) {\n this.removeLine(5);\n }\n }\n }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}", "public void paint(Graphics g) {\n\t\t\n\t\t//find slope - use to calculate position \n\t\tArrayList <Integer> Xpos = new ArrayList<Integer>();\n\t\tArrayList <Integer> Ypos = new ArrayList<Integer>();\n\n\t\t//contain all the x and y coordinates for horizontal lines\n\t\tArrayList <Integer> HorizXOutline = new ArrayList<Integer>();\n\t\tArrayList <Integer> HorizYOutline = new ArrayList<Integer>();\n\t\t//contain all x any y points for veritical lines\n\t\tArrayList <Integer> VertOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> VertOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and pos diag lines\n\t\tArrayList <Integer> PosDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> PosDiagOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and neg diag lines\n\t\tArrayList <Integer> NegDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> NegDiagOutlineY = new ArrayList<Integer>();\n\n\t\tg.setColor(Color.green);\n\t\t//adding outer shape x coord\n\t\tXpos.add(100);Xpos.add(100);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(200);Xpos.add(300);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(300);Xpos.add(400);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(200);Xpos.add(300);//Xpos.add(120);Xpos.add(120);\n\t\tSystem.out.println(Xpos.size());\n\t\t//g.drawArc(100, 10, 200, 200, 0, 360);\n\t\t//adding outer shape y coord\n\t\tYpos.add(100);Ypos.add(10);Ypos.add(10);Ypos.add(10);\n\t\tYpos.add(10);Ypos.add(110);Ypos.add(100);Ypos.add(200);\n\t\tYpos.add(300);Ypos.add(300);Ypos.add(300);Ypos.add(180);\n\t\tYpos.add(300);Ypos.add(180);Ypos.add(300);Ypos.add(420);\n\t\tYpos.add(300);Ypos.add(420);Ypos.add(200);Ypos.add(110);//Ypos.add(100);Ypos.add(10);\n\t\tfor(int x =0;x<Xpos.size();x+=2){\n\t\t\tg.drawLine(Xpos.get(x), Ypos.get(x), Xpos.get(x+1), Ypos.get(x+1));\n\t\t\tif(Ypos.get(x)==Ypos.get(x+1)){\n\t\t\t\tHorizXOutline.add(x);HorizXOutline.add(x+1);\n\t\t\t\tHorizYOutline.add(x);HorizYOutline.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1),Ypos.get(x+1)+20);\n\t\t\t}\n\t\t\telse if(Xpos.get(x)==Xpos.get(x+1)){\n\t\t\t\tVertOutlineX.add(x);VertOutlineX.add(x+1);\n\t\t\t\tVertOutlineY.add(x);VertOutlineY.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x)+20,Ypos.get(x),Xpos.get(x+1)+20,Ypos.get(x+1));\n\t\t\t}\n\t\t\tif((Ypos.get(x+1)-Ypos.get(x))!=0)\n\t\t\t{\n\t\t\t\tint slope = (Xpos.get(x)-Xpos.get(x+1))/(Ypos.get(x+1)-Ypos.get(x));\n\t\t\t\tif(slope<0){\n\t\t\t\t\tNegDiagOutlineX.add(x);NegDiagOutlineX.add(x+1);\n\t\t\t\t\tNegDiagOutlineY.add(x);NegDiagOutlineY.add(x+1);\n\t\t\t\t\tif(Xpos.get(x)<=100){\n\t\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)-20,Xpos.get(x+1)+10,Ypos.get(x+1)-10);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1)-10,Ypos.get(x+1)+10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(slope>0){\n\t\t\t\t\tPosDiagOutlineX.add(x);PosDiagOutlineX.add(x+1);\n\t\t\t\t\tPosDiagOutlineY.add(x);PosDiagOutlineY.add(x+1);\n\t\t\t\t\tg.drawLine(Xpos.get(x)-10,Ypos.get(x)-10,Xpos.get(x+1)-10,Ypos.get(x+1)-10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t for(int x = 0;x<=120;x+=10){\n//\t \t//change in x-3900/-13 = Xpos\n//\t \tint xpos1 = (int)(350 +(x/10)*(-50/11));\n//\t \tint xpos2 = (int)(350+(x/10)*(50/11));\n//\t \tint ypos = 180+x;\n//\t \tg.setColor(Color.red);\n//\t \tg.drawLine(xpos1, ypos, xpos2, ypos);\n//\t \tXpos.add(xpos1);Ypos.add(ypos);Xpos.add(xpos2);Ypos.add(ypos);\n//\t }\n//\t // g.setColor(Color.blue);\n//\t ////.drawRect(200, 100, 100, 100);\n//\t // g.setColor(Color.red);\n//\t double slope = (300-200)/(110-10);\n//\t int y = (int) (100-slope*20);\n//\t // g.drawRect(220, 130-y, 100, 100);\n//\t for(int x = 20;x<=100;x+=10){\n//\t \t//Y=slope*x+0 : (Y)/slope = X where Y = interval of 20\n//\t \tint ypos = (int)(x/slope)+190;\n//\t \tg.drawLine(100, x, ypos, x);\n//\t \tXpos.add(100);Ypos.add(x);Xpos.add(ypos);Ypos.add(x);\n//\t }\n\t // g.drawLine(300, 100, 200, 200);\n//\t for(int x = 100;x<=200;x+=10){\n//\t \tdouble circleypos = 200+ Math.sqrt((200-x)*100);\n//\t \tg.drawLine(x, x, (int)(circleypos), x);\n//\t \t\n//\t }\n\t double totalDist=0;\n\t for(int x=0; x<Xpos.size();x+=2){\n\t int xd = Xpos.get(x+1)-Xpos.get(x); xd = xd*xd;\n\t int yd = Ypos.get(x+1)-Ypos.get(x); yd = yd*yd;\n\t int distance = (int) (Math.sqrt(xd+yd));\n\t totalDist +=distance;\n\t System.out.println(\"The length of this line is\" + distance + \" and the total distance as of now is \" + totalDist);\n\t }\n\t}", "@Override\n public void draw(Graphics g, Dimension drawArea) {\n int widthUnit = drawArea.width / 6;\n int heightUnit = drawArea.height / 6;\n\n // Makes the lines thicker\n Graphics2D g2d = (Graphics2D)g;\n g2d.setStroke(new BasicStroke(3));\n\n // draws a circle and two lines\n g2d.drawOval(widthUnit, heightUnit, widthUnit * 4, heightUnit * 4);\n g2d.drawLine(widthUnit, heightUnit, 5 * widthUnit, 5 * heightUnit);\n g2d.drawLine(5 * widthUnit, heightUnit, widthUnit, 5 * heightUnit);\n }", "private void getChartPoints(ArrayList<Map<String,Object>> result) {\n lineChart = (LineChart) findViewById(R.id.temperature_chart);\n\n chartPoints = new ArrayList<>();\n chartXLabels = new ArrayList<>();\n\n for (int i = result.size()-1; i >=0; i--) {\n chartPoints.add(new Entry((float) ((double)result.get(i).get(\"CurrentTemp\")), result.size()-1-i));\n chartXLabels.add(result.get(i).get(\"Time\").toString());\n }\n\n LineDataSet dataSet = new LineDataSet(chartPoints, getResources().getString(R.string.temperature_screen_chartLineLabel));\n dataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n dataSet.setColor(R.color.temperature_chart_line_color);\n dataSet.setCircleColor(R.color.temperature_chart_circle_color);\n\n LineData data = new LineData(chartXLabels, dataSet);\n lineChart.setData(data);\n\n //Chart interaction settings\n lineChart.setTouchEnabled(true);\n\n //Chart layout settings\n lineChart.setDrawGridBackground(false);\n lineChart.setBackgroundColor(getResources().getColor(R.color.temperature_chart_background_color));\n\n lineChart.getXAxis().setEnabled(true);\n lineChart.getXAxis().setDrawGridLines(true);\n lineChart.getXAxis().setTextColor(getResources().getColor(R.color.temperature_chart_XLabels_color));\n lineChart.getXAxis().setGridColor(getResources().getColor(R.color.temperature_chart_XGrid_color));\n lineChart.getXAxis().setAxisLineColor(getResources().getColor(R.color.temperature_chart_XAxis_color));\n lineChart.getXAxis().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_XAxis_labels_dimension));\n lineChart.getXAxis().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_GridWidth_dimension));\n lineChart.getXAxis().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_AxisWidth_dimension));\n lineChart.getAxisLeft().setEnabled(true);\n lineChart.getAxisLeft().setDrawGridLines(true);\n lineChart.getAxisLeft().setTextColor(getResources().getColor(R.color.temperature_chart_YLabels_color));\n lineChart.getAxisLeft().setGridColor(getResources().getColor(R.color.temperature_chart_YGrid_color));\n lineChart.getAxisLeft().setAxisLineColor(getResources().getColor(R.color.temperature_chart_YAxis_color));\n lineChart.getAxisLeft().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_YAxis_labels_dimension));\n lineChart.getAxisLeft().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_GridWidth_dimension));\n lineChart.getAxisLeft().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_AxisWidth_dimension));\n lineChart.getAxisRight().setEnabled(false);\n\n LimitLine minLimit = new LimitLine((float) minTemp, getResources().getString(R.string.temperature_screen_chartMinLimit));\n minLimit.setLineColor(getResources().getColor(R.color.temperature_chart_minLimit_color));\n minLimit.setTextColor(getResources().getColor(R.color.temperature_chart_minLimit_label_color));\n minLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_width_dimension));\n minLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_label_dimension));\n LimitLine maxLimit=new LimitLine((float) maxTemp,getResources().getString(R.string.temperature_screen_chartMaxLimit));\n maxLimit.setLineColor(getResources().getColor(R.color.temperature_chart_maxLimit_color));\n maxLimit.setTextColor(getResources().getColor(R.color.temperature_chart_maxLimit_label_color));\n maxLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_width_dimension));\n maxLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_label_dimension));\n lineChart.getAxisLeft().addLimitLine(minLimit);\n lineChart.getAxisLeft().addLimitLine(maxLimit);\n\n //Refreshes chart\n lineChart.invalidate();\n\n //Gets the most recent temperature registered\n TextView currentTempTextView = (TextView)findViewById(R.id.temperature_currentTemp_TextView);\n currentTemp=chartPoints.get(chartPoints.size()-1).getVal();\n currentTempTextView.setText(Float.toString(currentTemp)+\"ºC\");\n\n //Gets the higher and lower temperatures registered\n float higherTemp=-900;\n float lowerTemp=900;\n for (Entry entry:chartPoints)\n {\n if(entry.getVal()>higherTemp)\n higherTemp=entry.getVal();\n if(entry.getVal()<lowerTemp)\n lowerTemp=entry.getVal();\n }\n TextView lowerTempTextView = (TextView)findViewById(R.id.temperature_minTemp2_TextView);\n lowerTempTextView.setText(Float.toString(lowerTemp)+\"ºC\");\n TextView higherTempTextView = (TextView)findViewById(R.id.temperature_maxTemp2_TextView);\n higherTempTextView.setText(Float.toString(higherTemp)+\"ºC\");\n }", "public void paint( java.awt.Graphics g )\n {\n super.paint( g ); // Ord gave us this\n\n canvasWidth = canvas.getWidth(); // Update original\n canvasHeight = canvas.getHeight(); // canvas dimensions\n\n double newHLineY = hLineProportion * canvas.getHeight();\n double newVLineX = vLineProportion * canvas.getWidth();\n\n hLine.setEndPoints(0, newHLineY, canvasWidth, newHLineY);\n vLine.setEndPoints(newVLineX, 0, newVLineX, canvasHeight);\n\n hLineMoved = vLineMoved = true;\n }", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "@Override\n public void drawFigure(Graphics2D g) {\n\n g.setPaint(figurePaint);\n g.fillRect(X, Y, width, height);\n g.setColor(lineColor);\n g.setStroke(new BasicStroke(2));\n g.drawRect(X,Y,width,height);\n }", "public void Dasherline(long x0, long y0, long x1, long y1, int iWidth, int iColour) {\r\n\t\ttemp1.init(x0,y0);\r\n\t\tDasher2Screen(temp1);\r\n\t\t\r\n\t\ttemp2.init(x1,y1);\r\n\t\tDasher2Screen(temp2);\r\n\t\tScreen().drawLine((int)temp1.x, (int)temp1.y, (int)temp2.x, (int)temp2.y, iWidth, iColour);\r\n\t}", "@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }", "void drawX(int startx1,int starty1,int endx1,int endy1,int startx2,int starty2,int endx2,int endy2,ImageView imageView){\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setStrokeWidth(10);\n canvas.drawLine(startx1,starty1,endx1,endy1,paint);\n canvas.drawLine(startx2,starty2,endx2,endy2,paint);\n imageView.setVisibility(View.VISIBLE);\n\n //animates the drawing to fadein\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(2000);\n imageView.startAnimation(animation);\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tGraphics2D g2d= (Graphics2D)g;//Cast the Graphics received in the paint method to Graphics2D\r\n\t\tg2d.setColor(Color.RED);//Set the color to red\r\n\t\tg2d.setStroke(new BasicStroke(5));//Set the width of the line to 5px \r\n\t\t//g2d.drawLine(0, 0, 500, 500);//Draw a line starting at point (0,0) and ending at point (500,500)\r\n\t\t//g2d.drawRect(100, 100, 300, 300);//Draw a rectangle with upper left corner at (100,100) and with width and height of 300px\r\n\t\tg2d.setColor(Color.GREEN);//Set the color to green\r\n\t\t//g2d.fillRect(100, 100, 300, 300);//Fill the rectangle\r\n\t\t\r\n\t\t//If we will draw the line first and then the rectangle, the rectangle will be on top of the line and hide part of it\r\n\t\t//g2d.drawOval(100, 100, 300, 300);//Draw circle\r\n\t\t//g2d.fillOval(100, 100, 300, 300);//Fill the circle\r\n\t\t\r\n\t\t//g2d.drawArc(100,100,200,200,0,180);//Draw half circle\r\n\t\r\n\t\t//g2d.drawArc(100,100,200,200,180,180);//Flip it\r\n\t\t//g2d.drawArc(100,100,200,200,0,270);//Draw 3/4 of a circle\r\n\t\t\r\n\t\t//int[] xPoints= {150,250,350};\r\n\t\t//int[] yPoints= {300,150,300};\r\n\t\t//g2d.drawPolygon(xPoints,yPoints,3);//Draw rectangle using polygon, specify x points and y points of the corners and number of corners,\r\n\t\t\t\t\t\t\t\t\t\t //we can specify more than 3 corners and create different shapes.\r\n\t\t\t\t\r\n\t\t//g2d.fillPolygon(xPoints,yPoints,3);//Fill the rectangle using polygon\r\n\t\tg2d.setColor(Color.BLACK);//Set the color to black\r\n\t\tg2d.setFont(new Font(\"Ink Free\", Font.BOLD,40));\r\n\t\tg2d.drawString(\"Hello world\", 100, 100);\r\n\t}", "public void drawLines(float[] sDebugLines, Paint paint) {\n\t\t\n\t}", "Marker (Event event, double y) {\n\n// assigns an Event to the Marker\n this.event = event;\n\n// defines the start and end of the Line and Label\n// based on the beginning and end of the Event, the zoom (stretch) and global edge of all Nodes (shift)\n start = (event.startDate[2] * stretch) - shift;\n end = (event.endDate[2] * stretch) - shift;\n width = end - start;\n\n// creates the label\n this.setLayoutX(start + width/2 - width()/2);\n this.setLayoutY(y + 16);\n this.setWidth(width);\n this.setTextAlignment(TextAlignment.CENTER);\n\n// first line contains Event name\n// second line is either 1 (if start year and end year are the same) or 2 dates\n if (event.startDate[2] == event.endDate[2])\n this.setText(event.name + \"\\n\" + event.startDate[2]);\n else\n this.setText(event.name + \"\\n\" + event.startDate[2] + \"–\" + event.endDate[2]);\n\n// creates the Line\n line = new Line(start, y, end, y);\n\n// applies CSS to the Label and Line\n this.setStyle(stylesheet.toString());\n this.getStyleClass().add(\"markerLabel\");\n line.setStyle(stylesheet.toString());\n line.getStyleClass().add(\"markerLine\");\n\n// sets right click on Label or Line to expand the Event\n this.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(event);\n });\n line.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(event);\n });\n }", "private void plotGPS(LineChart lineChart, GPS gps)\n {\n Description desc = new Description();\n\n if(gps.getTime() != null && gps.getElevation() != null)\n {\n final long refTimestamp = gps.getTime().get(0).toDate().getTime();\n\n // X-Axis //\n XAxis xAxis = lineChart.getXAxis();\n xAxis.setValueFormatter(new IAxisValueFormatter()\n {\n @Override\n public String getFormattedValue(float value, AxisBase axis)\n {\n SimpleDateFormat sdf_mmss = new SimpleDateFormat(getString(R.string.sdf_hhmmss));\n sdf_mmss.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n return sdf_mmss.format(new Date((long) (value + refTimestamp)));\n }\n });\n\n lineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n\n desc.setText(getString(R.string.axisTime));\n\n // Y-Axis //\n lineChart.getAxisLeft().setEnabled(true);\n lineChart.getAxisRight().setEnabled(true);\n\n // Data //\n // Elevation //\n ArrayList<Entry> xy1Vals = new ArrayList<Entry>();\n for (int i = 0; i < gps.getElevation().size(); i++)\n {\n xy1Vals.add(new Entry(new Long(gps.getTime().get(i).toDate().getTime()-refTimestamp).floatValue(), new Double(gps.getElevation().get(i)).floatValue()));\n }\n\n LineDataSet dataSet1 = new LineDataSet(xy1Vals, getString(R.string.axisElevation));\n dataSet1.setLineWidth(2f);\n dataSet1.setDrawCircleHole(false);\n dataSet1.setCircleRadius(3f);\n dataSet1.setColor(Color.BLUE);\n dataSet1.setCircleColor(Color.BLUE);\n dataSet1.setDrawVerticalHighlightIndicator(true);\n dataSet1.setAxisDependency(lineChart.getAxisLeft().getAxisDependency());\n\n // HeartRate //\n ArrayList<Entry> xy2Vals = new ArrayList<Entry>();\n for (int i = 0; i < gps.getHeartRate().size(); i++)\n {\n xy2Vals.add(new Entry(new Long(gps.getTime().get(i).toDate().getTime()-refTimestamp).floatValue(), new Double(gps.getHeartRate().get(i)).floatValue()));\n }\n\n LineDataSet dataSet2 = new LineDataSet(xy2Vals, getString(R.string.axisHeartRate));\n dataSet2.setLineWidth(2f);\n dataSet2.setDrawCircleHole(false);\n dataSet2.setCircleRadius(3f);\n dataSet2.setColor(Color.GREEN);\n dataSet2.setCircleColor(Color.GREEN);\n dataSet2.setDrawVerticalHighlightIndicator(true);\n dataSet2.setAxisDependency(lineChart.getAxisRight().getAxisDependency());\n\n ArrayList<ILineDataSet> dataSets = new ArrayList<ILineDataSet>();\n dataSets.add(dataSet1);\n dataSets.add(dataSet2);\n\n LineData data = new LineData(dataSets);\n\n // Loading of data //\n lineChart.setData(data);\n lineChart.invalidate();\n }\n else\n {\n lineChart.setNoDataText(getString(R.string.noDataGPS));\n desc.setText(\"\");\n }\n\n lineChart.setDescription(desc);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }", "public TimeView() {\r\n label = new JLabel(\" \");\r\n kAvondLabel = new JLabel(\" - Koopavond\");\r\n weekendLabel = new JLabel(\" - Weekend\");\r\n eventLabel = new JLabel(\"Evenement: Theater\");\r\n time = time.getInstance();\r\n setPreferredSize(new Dimension(200,50));\r\n add(label);\r\n }" ]
[ "0.6979664", "0.6307929", "0.6276442", "0.5779758", "0.57178503", "0.5693636", "0.5672549", "0.5672061", "0.5668827", "0.5664867", "0.56507814", "0.5576853", "0.55665046", "0.55638444", "0.5550244", "0.54794765", "0.5475542", "0.54671943", "0.5466103", "0.54460496", "0.54222226", "0.54024523", "0.53924626", "0.5384731", "0.5384671", "0.5378689", "0.53778315", "0.53772783", "0.537176", "0.536374", "0.5359593", "0.5356995", "0.53483665", "0.5343181", "0.533577", "0.53328794", "0.53247505", "0.5322549", "0.5319347", "0.53120136", "0.5306789", "0.530572", "0.5295469", "0.52924263", "0.5280021", "0.52681166", "0.526221", "0.5259223", "0.5258292", "0.52560115", "0.5255196", "0.52534455", "0.5245793", "0.5240154", "0.52299756", "0.5223", "0.52220803", "0.52141535", "0.52082276", "0.5200511", "0.51651293", "0.51617056", "0.51587737", "0.51552075", "0.51543844", "0.5153231", "0.5142436", "0.5142356", "0.51317275", "0.51312476", "0.51282275", "0.5125268", "0.5122884", "0.5118008", "0.51136655", "0.51109433", "0.5107349", "0.5104606", "0.5099557", "0.5097164", "0.5093215", "0.50905204", "0.5090514", "0.5077474", "0.5076003", "0.5075893", "0.5073435", "0.50662386", "0.50564605", "0.50556993", "0.50517404", "0.5050614", "0.5049441", "0.50433815", "0.50417554", "0.50369704", "0.50213355", "0.50197303", "0.50188166", "0.50182146" ]
0.6835905
1
need to remove this json construction using a library call
public String toJsonMetric() { StringBuilder builder = new StringBuilder("{\"messageType\" : \"view\""); builder.append(",\"nodes\" : ["); int i = 0; for (Node node : getAllNodes().values()) { if (++i != 1) builder.append(","); builder.append("{"); builder.append("\"nodeName\" :" + "\"" + node.getName() + "\""); builder.append(",\"state\" :" + "\"" + node.getState() + "\""); builder.append(",\"ip\" :" + "\"" + node.getIpAddress() + "\""); if (node.getMetrics() != null) { JvmMetrics jvmMetrics = node.getMetrics().getJvmMetrics(); builder.append(",\"metric\" :"); builder.append("{"); builder.append("\"node\" :" + "\"" + node.getName() + "\"") .append(",\"maxMemory\" :" + "\"" + Formatters.formatWithoutFractions(jvmMetrics.getMaxMemory()) + "\"") .append(",\"usedMemory\" :" + "\"" + Formatters.formatWithoutFractions(jvmMetrics.getUsedMemory()) + "\"") .append(",\"freeMemory\" :" + "\"" + Formatters.formatWithoutFractions(jvmMetrics.getFreeMemory()) + "\"") .append(",\"threadCount\" :" + jvmMetrics.getThreadCount()) .append(",\"processCpuUsage\" :" + "\"" + Formatters.format(jvmMetrics.getProcessCpuUsage()) + "\"") .append(",\"systemCpuUsage\" :" + "\"" + Formatters.format(jvmMetrics.getSystemCpuUsage()) + "\"") .append(",\"lastUpdateTime\" :" + "\"" + Formatters.format(jvmMetrics.getLastUpdateTime()) + "\""); builder.append("}"); } builder.append("}"); } builder.append("]"); return builder.append("}").toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JSON() {\n\t}", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "private JsonUtils() {}", "public JsonUtil() {\r\n this.jsonSerializer = new JSONSerializer().transform(new ExcludeTransformer(), void.class).exclude(\"*.class\");\r\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "private DatasetJsonConversion() {}", "protected abstract JSONObject build();", "private JsonUtils() { }", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "public void lite() {\n\t\t\r\n\t\tthis.setJson(\"[]\");\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}", "protected abstract Object buildJsonObject(R response);", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "public JSONUtils() {\n\t\tsuper();\n\t}", "private JsonUtil() {\n this.parser = new JSONParser();\n get_text();\n }", "public final void mo18962a(JSONObject jSONObject) {\n }", "@Override\n public PubSaveData buildPubSaveDataByJson(String json) {\n return null;\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public ClaseJson() {\n }", "JsonObject raw();", "protected Object readResolve()\n/* */ {\n/* 353 */ return new JsonFactory(this, this._objectCodec);\n/* */ }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }", "public JsonFactory() { this(null); }", "public final void mo18966c(JSONObject jSONObject) {\n }", "@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}", "public MinecraftJson() {\n }", "@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }", "private String removeJasonPAnnotation(String response) {\n System.out.println(response);\r\n StringBuilder builder = new StringBuilder(response);\r\n System.out.println(builder.length());\r\n builder.setLength(builder.length() - 5);\r\n builder.delete(0, 24);\r\n\r\n return builder.toString();\r\n }", "public void mo15090a(JSONObject jSONObject) {\n }", "public final void mo18964b(JSONObject jSONObject) {\n }", "public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public final void mo18968d(JSONObject jSONObject) {\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}", "String getJson();", "String getJson();", "String getJson();", "@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }", "public void undoJsonShenanigans() {\n if (name == null) {\n name = \"\";\n }\n if (tournamentID == null) {\n tournamentID = \"\";\n }\n if (finalRank == null) {\n finalRank = \"\";\n }\n if (challongeUserName == null) {\n challongeUserName = \"\";\n }\n }", "public ParamJson() {\n\t\n\t}", "public abstract Object toJson();", "public JsonArray() {\n }", "public JSONModel() {\n jo = new JSONObject();\n }", "protected static JSONObject m3355f() {\n JSONObject jSONObject = new JSONObject();\n m3351a(jSONObject, true);\n return jSONObject;\n }", "private static void renderJSONExclusion(Object o) {\n\t\tthrow new RenderJsonExclusion(o);\n\t}", "public String getJson();", "void mo59932a(String str, JSONObject jSONObject);", "public abstract String toJson();", "public static String reParseJson(String old){\n int start = old.indexOf(\"{\");\n int end = old.lastIndexOf(\"}\");\n return old.substring(start,end+1);\n\n }", "private static JsonItem toBasicJson(Item item) {\r\n\t\tJsonItem jsonItem = new JsonItem();\r\n\t\tapplyBasicJsonValues(jsonItem, item);\r\n\t\treturn jsonItem;\r\n\t}", "public JSONBuilder() {\n\t\tthis(null, null);\n\t}", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONArray jSONArray0 = jSONObject0.optJSONArray(\"[]\");\n assertNull(jSONArray0);\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertNull(jSONArray1);\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "private static JsonClient toBasicJson(Client client) {\r\n\t\tJsonClient jsonClient = new JsonClient();\r\n\t\tapplyBasicJsonValues(jsonClient, client);\r\n\t\treturn jsonClient;\r\n\t}", "public JsonField() {\n }", "private static JsonBairro toBasicJson(Bairro bairro) {\r\n\t\tJsonBairro jsonBairro = new JsonBairro();\r\n\t\tapplyBasicJsonValues(jsonBairro, bairro);\r\n\t\treturn jsonBairro;\r\n\t}", "public abstract T zzb(JSONObject jSONObject);", "void mo16412a(String str, JSONObject jSONObject);", "String getJSON();", "public JSONLoader() {}", "@Override\n\tpublic JSONObject toJSONObject() {\n\t\treturn null;\n\t}", "@Override\n\tpublic JSONObject toJSONObject() {\n\t\treturn null;\n\t}", "private static JsonDisciplina toBasicJson(Disciplina disciplina) {\r\n\t\tJsonDisciplina jsonDisciplina = new JsonDisciplina();\r\n\t\tapplyBasicJsonValues(jsonDisciplina, disciplina);\r\n\t\treturn jsonDisciplina;\r\n\t}", "public final void mo18970e(JSONObject jSONObject) {\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 JsonElement serialize(hv paramhv, Type paramType, JsonSerializationContext paramJsonSerializationContext)\r\n/* 82: */ {\r\n/* 83:344 */ if (paramhv.g()) {\r\n/* 84:345 */ return null;\r\n/* 85: */ }\r\n/* 86:347 */ JsonObject localJsonObject1 = new JsonObject();\r\n/* 87:349 */ if (hv.b(paramhv) != null) {\r\n/* 88:350 */ localJsonObject1.addProperty(\"bold\", hv.b(paramhv));\r\n/* 89: */ }\r\n/* 90:352 */ if (hv.c(paramhv) != null) {\r\n/* 91:353 */ localJsonObject1.addProperty(\"italic\", hv.c(paramhv));\r\n/* 92: */ }\r\n/* 93:355 */ if (hv.d(paramhv) != null) {\r\n/* 94:356 */ localJsonObject1.addProperty(\"underlined\", hv.d(paramhv));\r\n/* 95: */ }\r\n/* 96:358 */ if (hv.e(paramhv) != null) {\r\n/* 97:359 */ localJsonObject1.addProperty(\"strikethrough\", hv.e(paramhv));\r\n/* 98: */ }\r\n/* 99:361 */ if (hv.f(paramhv) != null) {\r\n/* 100:362 */ localJsonObject1.addProperty(\"obfuscated\", hv.f(paramhv));\r\n/* 101: */ }\r\n/* 102:364 */ if (hv.g(paramhv) != null) {\r\n/* 103:365 */ localJsonObject1.add(\"color\", paramJsonSerializationContext.serialize(hv.g(paramhv)));\r\n/* 104: */ }\r\n/* 105:367 */ if (hv.h(paramhv) != null) {\r\n/* 106:368 */ localJsonObject1.add(\"insertion\", paramJsonSerializationContext.serialize(hv.h(paramhv)));\r\n/* 107: */ }\r\n/* 108: */ JsonObject localJsonObject2;\r\n/* 109:371 */ if (hv.i(paramhv) != null)\r\n/* 110: */ {\r\n/* 111:372 */ localJsonObject2 = new JsonObject();\r\n/* 112:373 */ localJsonObject2.addProperty(\"action\", hv.i(paramhv).a().b());\r\n/* 113:374 */ localJsonObject2.addProperty(\"value\", hv.i(paramhv).b());\r\n/* 114:375 */ localJsonObject1.add(\"clickEvent\", localJsonObject2);\r\n/* 115: */ }\r\n/* 116:378 */ if (hv.j(paramhv) != null)\r\n/* 117: */ {\r\n/* 118:379 */ localJsonObject2 = new JsonObject();\r\n/* 119:380 */ localJsonObject2.addProperty(\"action\", hv.j(paramhv).a().b());\r\n/* 120:381 */ localJsonObject2.add(\"value\", paramJsonSerializationContext.serialize(hv.j(paramhv).b()));\r\n/* 121:382 */ localJsonObject1.add(\"hoverEvent\", localJsonObject2);\r\n/* 122: */ }\r\n/* 123:385 */ return localJsonObject1;\r\n/* 124: */ }", "@Override\n\tpublic String getJsonParams() {\n\t\treturn null;\n\t}", "protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n linkedList0.offerFirst(jSONObject0);\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertEquals(1, jSONArray1.length());\n assertNotNull(jSONArray1);\n assertNotSame(jSONArray1, jSONArray0);\n }", "private static JsonCep toBasicJson(Cep cep) {\r\n\t\tJsonCep jsonCep = new JsonCep();\r\n\t\tapplyBasicJsonValues(jsonCep, cep);\r\n\t\treturn jsonCep;\r\n\t}", "public String convertToJSON()\n\t{\n\t\tString json = \"\";\n\n\t\t//Engine and Rule info\n\t\tjson = \t\" \\\"infEngine\\\" : \\\"\"+ inferenceEngine +\"\\\", \" +\n\t\t\t\t\" \\\"infEngURI\\\" : \\\"\"+ infEngURI +\"\\\", \" +\n\t\t\t\t\" \\\"declRule\\\" : \\\"\"+ declarativeRule +\"\\\", \" +\n\t\t\t\t\" \\\"declRuleURI\\\" : \\\"\"+ decRuleURI +\"\\\" \";\n\n\t\t//Antecedent info\n\t\tif(antecedentRawStrings != null)\n\t\t{\n\n\t\t\tString jsonArray = \" [ \";\n\n\t\t\tint i;\n\t\t\tfor(i=0; i < antecedentRawStrings.length -1 ; i++)\n\t\t\t{\n\t\t\t\tString currAntecedentRawString = JSONUtils.toValidJSONString(antecedentRawStrings[i]);\n\t\t\t\tjsonArray += \"{ \\\"antecedentRawString\\\" : \\\"\"+ currAntecedentRawString +\"\\\" , \\\"antecedentURI\\\" : \\\"\"+ antecedentURIs[i] +\"\\\" \";\n\t\t\t\tif(antecedentCachedThumbURL[i] != null)\n\t\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : \\\"\"+antecedentCachedThumbURL[i]+\"\\\" , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" }, \";\n\t\t\t\telse\n\t\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : null , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" }, \";\n\t\t\t}\n\n\t\t\tString currAntecedentRawString = JSONUtils.toValidJSONString(antecedentRawStrings[i]);\n\t\t\t//insert last element and close the array.\n\t\t\tjsonArray += \"{ \\\"antecedentRawString\\\" : \\\"\"+ currAntecedentRawString +\"\\\" , \\\"antecedentURI\\\" : \\\"\"+ antecedentURIs[i] +\"\\\" \";\n\t\t\tif(antecedentCachedThumbURL[i] != null)\n\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : \\\"\"+antecedentCachedThumbURL[i]+\"\\\" , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" } ]\";\n\t\t\telse\n\t\t\t\tjsonArray +=\", \\\"antecedentCachedThumbURL\\\" : null , \\\"antecedentConclusionURL\\\" : \\\"\"+antecedentConclusionURL[i]+\"\\\" } ]\";\n\n\n\t\t\tjson += \", \\\"antecedents\\\" : \"+ jsonArray;//+\", \";\n\n\t\t}\n\t\telse \n\t\t\tjson += \", \\\"antecedents\\\" : null\";//+\", \";\n\n\t\t//Metadata\n\t\t//json += \", \\\"metadata\\\" : \"+ ;\n\n\t\t//Assertions\n\t\t//json += \", \\\"assertions\\\" : \"+ ;\n\n\t\treturn \"{ \"+ json +\" }\";\n\t}", "public abstract String toJsonString();", "public JsonObject()\n\t{\n\t\tsuper(ParserUtil.OBJECT_OPEN, ParserUtil.OBJECT_CLOSE);\n\t\tsetup();\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n HashMap<Boolean, Integer> hashMap0 = new HashMap<Boolean, Integer>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONArray jSONArray0 = jSONObject1.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "JSONObject toJson();", "JSONObject toJson();", "public Builder clearJson() {\n\n json_ = getDefaultInstance().getJson();\n onChanged();\n return this;\n }", "public Builder clearJson() {\n\n json_ = getDefaultInstance().getJson();\n onChanged();\n return this;\n }", "public Builder clearJson() {\n\n json_ = getDefaultInstance().getJson();\n onChanged();\n return this;\n }", "@Override\n public JsonElement serialize(FrontPageContentResponse src, Type typeOfSrc, JsonSerializationContext context) {\n\treturn null;\n }", "@Override\r\n\tpublic void translateToJSON(ParsedJSONContainer jsonContainer) {\t\tjsonContainer.put(\"id\",getId());\r\n\t\tjsonContainer.put(\"labels\",getLabels());\r\n\t\tjsonContainer.put(\"version\",getVersion());\r\n\t}", "private static JsonQuestao toBasicJson(Questao questao) {\r\n\t\tJsonQuestao jsonQuestao = new JsonQuestao();\r\n\t\tapplyBasicJsonValues(jsonQuestao, questao);\r\n\t\treturn jsonQuestao;\r\n\t}", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.putOpt(\"\", jSONObject0);\n jSONObject1.getJSONObject(\"\");\n Object object0 = JSONObject.NULL;\n JSONObject jSONObject2 = new JSONObject();\n assertEquals(0, jSONObject2.length());\n }", "private static JsonLista toBasicJson(Lista lista) {\r\n\t\tJsonLista jsonLista = new JsonLista();\r\n\t\tapplyBasicJsonValues(jsonLista, lista);\r\n\t\treturn jsonLista;\r\n\t}", "@Override\n\tprotected JSONObject initialiseLatestResult() {\n\t\treturn null;\n\t}", "public boolean supportsJsonType() {\n return false;\n }", "private static JsonQuestaoDesafio toBasicJson(QuestaoDesafio questaoDesafio) {\r\n\t\tJsonQuestaoDesafio jsonQuestaoDesafio = new JsonQuestaoDesafio();\r\n\t\tapplyBasicJsonValues(jsonQuestaoDesafio, questaoDesafio);\r\n\t\treturn jsonQuestaoDesafio;\r\n\t}", "protected void init(JSONObject json) throws EInvalidData {\n\t\ttry {\n\t\t\t_id = json.getString(\"id\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No id found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_name = json.getString(\"name\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No name found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_created_at = new Date(json.getLong(\"created_at\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No created_at found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_status = json.getString(\"status\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No status found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_hash_type = json.getString(\"hash_type\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No hash_type found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_hash = json.getString(\"hash\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No hash found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_last_request = new Date(json.getLong(\"last_request\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\t_last_request = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_last_success = new Date(json.getLong(\"last_success\") * 1000);\n\t\t} catch (JSONException e) {\n\t\t\t_last_success = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_output_type = json.getString(\"output_type\");\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No output_type found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t_output_params.clear();\n\t\t\t_output_params.parse(json.getJSONObject(\"output_params\"));\n\t\t} catch (JSONException e) {\n\t\t\tthrow new EInvalidData(\"No valid output_params found\");\n\t\t}\n\t}", "public native Object parse( Object json );", "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}", "private StringBuilder getJSONHelper()\n\t{\n\t\tStringBuilder json = new StringBuilder();\n\t\tint n = 0;\n\t\tfor(String key : values.keySet())\n\t\t\tappendValue(json, key, n++);\n\t\treturn json;\n\t}", "@Override\n\tprotected JSONArray generateJsonData(Element responseElement,\n\t\t\tMap<String, String> reqMap) throws Exception {\n\t\treturn null;\n\t}", "private static Gson gson() {\n return JsonUtils.buildGson(gb -> gb.registerTypeAdapter(Json.class, (JsonSerializer<Json>) (json, type, jsonSerializationContext) ->\n jsonParser.parse(json.value())\n ));\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 }", "private static org.json.JSONObject a(org.json.JSONObject r7, java.lang.String r8) {\n /*\n if (r7 != 0) goto L_0x0007\n org.json.JSONObject r7 = new org.json.JSONObject\n r7.<init>()\n L_0x0007:\n if (r8 == 0) goto L_0x0056\n java.lang.String r0 = \"&\"\n java.lang.String[] r8 = r8.split(r0)\n int r0 = r8.length\n r1 = 0\n r2 = 0\n L_0x0012:\n if (r2 >= r0) goto L_0x0056\n r3 = r8[r2]\n java.lang.String r4 = \"=\"\n java.lang.String[] r3 = r3.split(r4)\n int r4 = r3.length\n r5 = 2\n if (r4 != r5) goto L_0x0053\n r4 = 1\n r5 = r3[r1] // Catch:{ Exception -> 0x0034 }\n java.lang.String r5 = java.net.URLDecoder.decode(r5) // Catch:{ Exception -> 0x0034 }\n r3[r1] = r5 // Catch:{ Exception -> 0x0034 }\n r5 = r3[r4] // Catch:{ Exception -> 0x0034 }\n java.lang.String r5 = java.net.URLDecoder.decode(r5) // Catch:{ Exception -> 0x0034 }\n r3[r4] = r5 // Catch:{ Exception -> 0x0034 }\n goto L_0x0034\n L_0x0032:\n r3 = move-exception\n goto L_0x003c\n L_0x0034:\n r5 = r3[r1] // Catch:{ JSONException -> 0x0032 }\n r3 = r3[r4] // Catch:{ JSONException -> 0x0032 }\n r7.put(r5, r3) // Catch:{ JSONException -> 0x0032 }\n goto L_0x0053\n L_0x003c:\n java.lang.String r4 = \"openSDK_LOG.Util\"\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n java.lang.String r6 = \"decodeUrlToJson has exception: \"\n r5.<init>(r6)\n java.lang.String r3 = r3.getMessage()\n r5.append(r3)\n java.lang.String r3 = r5.toString()\n com.tencent.open.a.f.e(r4, r3)\n L_0x0053:\n int r2 = r2 + 1\n goto L_0x0012\n L_0x0056:\n return r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.open.d.h.a(org.json.JSONObject, java.lang.String):org.json.JSONObject\");\n }", "private static JsonOperation toBasicJson(Operation operation) {\r\n\t\tJsonOperation jsonOperation = new JsonOperation();\r\n\t\tapplyBasicJsonValues(jsonOperation, operation);\r\n\t\treturn jsonOperation;\r\n\t}" ]
[ "0.7268276", "0.698319", "0.65493786", "0.6544682", "0.65202993", "0.6460752", "0.642156", "0.63963974", "0.63815343", "0.6352294", "0.6315245", "0.6260852", "0.623344", "0.62270516", "0.61158055", "0.6062165", "0.604908", "0.60352254", "0.6025627", "0.60104865", "0.5993215", "0.59931886", "0.5968315", "0.59630173", "0.5959576", "0.5949049", "0.59474254", "0.59345627", "0.5904769", "0.5896199", "0.5894", "0.58889836", "0.58823246", "0.5880981", "0.585547", "0.58331686", "0.582144", "0.582144", "0.582144", "0.5818515", "0.58014846", "0.57987994", "0.5796808", "0.5790573", "0.5786503", "0.5773026", "0.574842", "0.57186556", "0.5714514", "0.5711987", "0.57073563", "0.5698019", "0.5697611", "0.56897473", "0.5689016", "0.5687248", "0.5683369", "0.5677256", "0.56698936", "0.56609577", "0.5655502", "0.5642116", "0.5641287", "0.56365335", "0.56365335", "0.5628451", "0.56220263", "0.56218433", "0.5621235", "0.5619903", "0.56172204", "0.5615073", "0.5612203", "0.5602652", "0.5600678", "0.55993867", "0.5597246", "0.5597239", "0.5587779", "0.55786234", "0.55786234", "0.5570894", "0.5570894", "0.5570894", "0.556282", "0.55566615", "0.5544501", "0.5534512", "0.5525485", "0.5523395", "0.5523266", "0.55231583", "0.5505779", "0.55049294", "0.5499946", "0.5497539", "0.54965115", "0.54962814", "0.5493337", "0.5492907", "0.5489909" ]
0.0
-1
Created by IT5 on 2016/7/18.
public interface PageService { @GET("GetHotDownload.xml") Call<ScreenBean> get(@Query("pageNum") String pageNum1, @Query("packNumForOnePage") String packNumForOnePage, @Query("userId") String userId, @Query("codeVersion") String version, @Query("classId") String classId); }
{ "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\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}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {}", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public void 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 public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo55254a() {\n }" ]
[ "0.60973316", "0.5919157", "0.58695513", "0.5858756", "0.5858569", "0.5858569", "0.58460784", "0.5767306", "0.5733567", "0.5696642", "0.5681928", "0.5678483", "0.5670614", "0.5648026", "0.5636918", "0.56359696", "0.56359696", "0.56359696", "0.56359696", "0.56359696", "0.5627454", "0.56243175", "0.56242615", "0.5610904", "0.5610372", "0.5595953", "0.5595953", "0.5595953", "0.5595953", "0.5595953", "0.5595953", "0.55952686", "0.5592732", "0.5591447", "0.5574162", "0.5568249", "0.5564784", "0.55626935", "0.55584526", "0.55584526", "0.5541292", "0.5537101", "0.552872", "0.552872", "0.552872", "0.5525093", "0.5525093", "0.5522274", "0.55216146", "0.55163616", "0.5513376", "0.5513227", "0.5504031", "0.5504031", "0.5504031", "0.5501988", "0.5501988", "0.5500438", "0.54987717", "0.5492794", "0.5492794", "0.5492794", "0.54893714", "0.54893714", "0.54893714", "0.54893714", "0.54893714", "0.54893714", "0.54893714", "0.5480697", "0.54778457", "0.54643", "0.5464175", "0.5460855", "0.5445163", "0.54438853", "0.54362595", "0.5435932", "0.54297656", "0.54279333", "0.5423773", "0.54158133", "0.54139006", "0.5408696", "0.5385901", "0.5381518", "0.5378718", "0.5378402", "0.5372985", "0.53703225", "0.53659123", "0.53659123", "0.5364602", "0.53602535", "0.5359411", "0.5356384", "0.5356384", "0.5356384", "0.5354248", "0.53531146", "0.5338389" ]
0.0
-1
areBothFieldsSet Switches LOGIN button image if both fields are set
public boolean areBothFieldsSet() { if ((!(isEditText1Empty)) && (!(isEditText2Empty))) { this.button1.setImageResource(R.drawable.login); // THIS NEEDS DIFFERENT SRC return true; } else { this.button1.setImageResource(R.drawable.login); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateButtonLogin() {\n\t\tthis.mButtonLogin.setEnabled(this.mAuthUsername.getText().length() > 0\n\t\t\t\t&& this.mAuthPassword.getText().length() > 0);\n\t}", "private void updateButtonImage() {\n\t\tif(fb.isSessionValid())\n\t\t{\n\t\t\tbutton.setImageResource(R.drawable.logout_button);\n\t\t}\n\t\telse\n\t\t\t\n\t\t{\n\t\t\tbutton.setImageResource(R.drawable.login_button);\n\t\t}\n\t}", "private void resetDisableButton(boolean isSetBoth) {\n\t\tif(isSetBoth) {\n\t\t\tBoxBlur boxblur = new BoxBlur();\n\t\t\tvalue2.setEffect(boxblur);\n\t\t\tvalue1.setEffect(boxblur);\n\t\t\tvalue1.setDisable(true);\n\t\t\tvalue2.setDisable(true);\n\t\t\tchooseBoth.setDisable(true);\n\t\t\trolldice.setDisable(false);\n\t\t}\n\t\telse {\n\t\t\tColorAdjust colorAdjust = new ColorAdjust();\n\t\t\tvalue2.setEffect(colorAdjust);\n\t\t\tvalue1.setEffect(colorAdjust);\n\t\t\tvalue1.setDisable(false);\n\t\t\tvalue2.setDisable(false);\n\t\t\tchooseBoth.setDisable(false);\n\t\t\trolldice.setDisable(true);\n\t\t}\n\t}", "public void setReviewButton() {\n if(dbMgr.checkReviewUser(username)) \n btnReviewGame.setVisible(true);\n else\n btnReviewGame.setVisible(false);\n }", "public void updateFieldLabels(Player p1, Player p2)\n\t{\n\t\tif(p1.isFieldEmpty())\n\t\t{\n\t\t\tplayer1Field.setIcon(new ImageIcon(\"blank.jpg\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer1Field.setIcon(new ImageIcon(p1.peekCurrent().getFaceIcon()));\n\t\t\t//System.out.println(p1.peekCurrent().getFaceIcon());\n\t\t}\n\t\tif(p2.isFieldEmpty())\n\t\t{\n\t\t\tplayer2Field.setIcon(new ImageIcon(\"blank.jpg\"));\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tplayer2Field.setIcon(new ImageIcon(p2.peekCurrent().getFaceIcon()));\n\t\t\t//System.out.println(p2.peekCurrent().getFaceIcon());\n\t\t}\n\t\t// Set Visible forces imageicons to update\n\t\tplayer1Field.setVisible(true);\n\t\tplayer2Field.setVisible(true);\n\t}", "private void setButtons(boolean iVal)\n {\n buttonLogin.setEnabled(iVal);\n buttonLogin.setClickable(iVal);\n buttonSignup.setEnabled(iVal);\n buttonSignup.setClickable(iVal);\n }", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "private void setLoginMarker() {\n\t\tif (pass.getText().toString().equals(Config.RESET_PASSWORD)) {\n\t\t\tupdateStatusText();\n\t\t\tscrollView.setVisibility(View.VISIBLE);\n\t\t\tsendScroll();\n\t\t} else\n\t\t\tscrollView.setVisibility(View.GONE);\n\n\t\tif (((pass.getText().length() == 4) && ((inTruckMode && (vehicle != null)) || (!inTruckMode && (site != null))))\n\t\t\t\t|| (pass.getText().toString().equals(Config.RESET_PASSWORD))) {\n\t\t\tbtn_connect.setImageResource(R.drawable.green_mark);\n\t\t\tbtn_connect.setClickable(true);\n\t\t} else {\n\t\t\tbtn_connect.setImageResource(R.drawable.white_mark);\n\t\t\tbtn_connect.setClickable(false);\n\t\t}\n\t}", "public void changed() \n\t{\n\t\ttry\n\t\t{ \n\t\t\tif ( textField.getText().equals(\"\")|| passwordField.getPassword().equals(\"\") )\n\t\t\t{\n\t\t\t\tbtnSet.setEnabled(false);\t \n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t \t btnSet.setEnabled(true);\n\t\t\t}\n\t\t}catch(NullPointerException e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void LoginButton() {\n\t\t\r\n\t}", "private void checkStatus() {\n\t\tif(mApp.isTwitterAuthorized()){\n\t\t\t((ImageButton)findViewById(R.id.fs_share_twitter))\n\t\t\t\t\t.setImageResource(R.drawable.ic_twitter);\n\t\t}else{\n\t\t\t((ImageButton)findViewById(R.id.fs_share_twitter))\n\t\t\t\t\t.setImageResource(R.drawable.ic_twitter_disabled);\n\t\t}\n\t\t// Lo mismo para Facebook\n\t\tif(mApp.isFacebookAuthorized()){\n\t\t\t((ImageButton)findViewById(R.id.fs_share_facebook))\n\t\t\t\t\t.setImageResource(R.drawable.ic_facebook);\n\t\t}else{\n\t\t\t((ImageButton)findViewById(R.id.fs_share_facebook))\n\t\t\t\t\t.setImageResource(R.drawable.ic_facebook_disabled);\n\t\t}\n\t}", "private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }", "private void checkInputData(){\n if(!TextUtils.isEmpty(email.getText())){\n if(!TextUtils.isEmpty(password.getText())){\n //Below code is only for testing purposes.\n //signInprogressBar.setVisibility(View.VISIBLE);\n mainSignInBtn.setEnabled(true);\n mainSignInBtn.setTextColor(Color.rgb(255,255,255));\n\n }else {\n mainSignInBtn.setEnabled(false);\n mainSignInBtn.setTextColor(Color.argb(50,255,255,255));\n }\n }else {\n mainSignInBtn.setEnabled(false);\n mainSignInBtn.setTextColor(Color.argb(50,255,255,255));\n }\n }", "private void setButtonVisibilities(){\n\n if(eventType.equals(EventType.ORGANISE)){\n btnUpdateOrSignIn.setVisibility(View.VISIBLE);\n btnUpdateOrSignIn.setText(R.string.update);\n }\n else if(timeType.equals(TimeType.ONGOING) && eventType.equals(EventType.ATTEND)){\n btnUpdateOrSignIn.setVisibility(View.VISIBLE);\n btnUpdateOrSignIn.setText(R.string.sign_in);\n }\n else{\n btnUpdateOrSignIn.setVisibility(View.GONE);\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n if (!isChecked) {\n //show password of door\n type3.setTransformationMethod(PasswordTransformationMethod.getInstance());\n new1.setTransformationMethod(PasswordTransformationMethod.getInstance());\n } else {\n //hide password of door\n type3.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n new1.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n }\n }", "public abstract boolean showLogin();", "public void toggleButtonImageCamera() {\n if (isCameraOn) {\n btnCamera.setImageResource(R.drawable.cam_on);\n } else {\n btnCamera.setImageResource(R.drawable.cam_off);\n }\n }", "public void VerifyButtons(){\n if (currentTurn.getSiguiente() == null){\n next_turn.setEnabled(false);\n } else{\n next_turn.setEnabled(true);\n }\n if (currentTurn.getAnterior() == null){\n prev_turn.setEnabled(false);\n } else{\n prev_turn.setEnabled(true);\n }\n if (current.getSiguiente() == null){\n next_game.setEnabled(false);\n } else{\n next_game.setEnabled(true);\n }\n if (current.getAnterior() == null){\n prev_game.setEnabled(false);\n } else{\n prev_game.setEnabled(true);\n }\n }", "@Test(priority = 5)\n public void incorrectLoginWithBothLabels() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, incorrectPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "void setFragmentInteraction(Boolean value) {\n\t\tetEmail.setEnabled(value);\n\t\tetPassword.setEnabled(value);\n\t\tloginButton.setEnabled(value);\n\n\n\t\ttvEmail.setEnabled(value);\n\t\ttvPassword.setEnabled(value);\n\n\t\tetPassword.setText(\"\");\n\t}", "private void setLoginInformation()\n {\n // Set up the login form.\n mIPView_ = (EditText) findViewById( R.id.IP );\n mPortView_ = (EditText) findViewById( R.id.password );\n\n // Set the intial display\n if ( rememberLoginIsSet_ )\n {\n if ( properties_.containsKey( getString( R.string.saved_IP ) ) )\n {\n mIP_ =\n properties_\n .getProperty( getString( R.string.saved_IP ) );\n }\n\n if ( properties_.containsKey( getString( R.string.saved_Port ) ) )\n {\n mPort_ =\n properties_\n .getProperty( getString( R.string.saved_Port ) );\n }\n }\n\n // Set the values to whatever the load settings or default are\n mIPView_.setText( mIP_ );\n mPortView_.setText( mPort_ );\n\n mPortView_\n .setOnEditorActionListener( new TextView.OnEditorActionListener()\n {\n @Override\n public boolean onEditorAction( TextView textView, int id,\n KeyEvent keyEvent )\n {\n if ( id == R.id.login || id == EditorInfo.IME_NULL )\n {\n attemptLogin();\n return true;\n }\n return false;\n }\n } );\n\n mLoginFormView = findViewById( R.id.login_form );\n mLoginStatusView = findViewById( R.id.login_status );\n mLoginStatusMessageView =\n (TextView) findViewById( R.id.login_status_message );\n }", "@FXML private void buttonLoginClick() {\n if(passwordField.getText().isEmpty() && mailField.getText().isEmpty() ){\n passwordField.setStyle(\"-fx-background-color: #ff471a\");\n mailField.setStyle(\"-fx-background-color: #ff471a\");\n\n showError(\"All fields are not filled\");\n\n\n }else if(passwordField.getText().isEmpty()){\n passwordField.setStyle(\"-fx-background-color: #ff471a\");\n showError(\"All fields are not filled\");\n clearField();\n\n }else if(mailField.getText().isEmpty()){\n mailField.setStyle(\"-fx-background-color: #ff471a\");\n showError(\"All fields are not filled\");\n clearField();\n }else{\n String resultat = loginManager.login(mailField.getText(),passwordField.getText());\n clearField();\n switch (resultat){\n case \"Success\":\n // connection with success\n System.out.println(\"Connection success\");\n connected();\n\n break;\n case \"Error\":\n this.showError(\"An error has occured please contact the administrator\");\n break;\n case \"Failed\":\n this.showError(\"Wrong password and/or email please check it out and retry\");\n break;\n }\n\n }\n }", "private void LoginButtonActionPerformed(java.awt.event.ActionEvent evt) {\n String id = jTextField2.getText().toString();\n String password = jPasswordField1.getText();\n \n \n \n String getusername = jTextField2.getText().toString();\n String display=lms.DisplayName(getusername);\n System.out.println(display);\n switch (selected) {\n case 1:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n break;\n }\n case 2:\n {\n boolean logincheck=lms.checkClerkLogin(id,password);\n if(logincheck){\n ClerkHome c = new ClerkHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n case 3:\n { \n boolean logincheck=lms.checkLibrarianLogin(id,password);\n if(logincheck){\n LibrarianHome c = new LibrarianHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n default:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n }\n \n// else\n// {\n// JOptionPane.showMessageDialog(null,\"Invalid login\");\n// } \n\n \n }", "private void setLeadPlayerImage() {\n Player leadPlayer = game.getLeadingPlayer();\n if (leadPlayer == null) {\n // no lead so set images to default\n playerLeadImage.setImage(null);\n computerLeadImage.setImage(null);\n return;\n }\n if (leadPlayer.getName().equals(\"Computer\")) {\n computerLeadImage.setImage(new Image(\"Images/trophy.png\"));\n playerLeadImage.setImage(null);\n return;\n }\n playerLeadImage.setImage(new Image(\"Images/trophy.png\"));\n computerLeadImage.setImage(null);\n }", "public pageLogin() {\n initComponents();\n labelimage.setBorder(new EmptyBorder(0,0,0,0));\n enterButton.setBorder(null);\n enterButton.setContentAreaFilled(false);\n enterButton.setVisible(true);\n usernameTextField.setText(\"Username\");\n usernameTextField.setForeground(new Color(153,153,153));\n passwordTextField.setText(\"Password\");\n passwordTextField.setForeground(new Color(153,153,153));\n usernameAlert.setText(\" \");\n passwordAlert.setText(\" \");\n \n }", "private void updateSetupGUI() {\n\t\tif (isLoggedIn == false) {\n\t\t\trestoreGameLabel.setVisible(false);\n\t\t\trestoreGameButton.setVisible(false);\n\t\t\tcreateAccountButton.setVisible(true);\n\t\t\tcreateAccountLabel.setVisible(true);\n\t\t\tseparator_1.setVisible(true);\n\t\t} else {\n\t\t\tcreateAccountButton.setVisible(false);\n\t\t\tcreateAccountLabel.setVisible(false);\n\t\t\tseparator_1.setVisible(false);\n\t\t\trestoreGameLabel.setVisible(true);\n\t\t\trestoreGameButton.setVisible(true);\n\t\t}\n\t}", "private void toogleOne(JTextField a, JLabel b, boolean c) {\n\t\tsetEnabled(a, get(c));\r\n\t\tsetVisible(a, get(c));\r\n\t\tsetEnabled(b, get(c));\r\n\t\tsetVisible(b, get(c));\r\n\t}", "public boolean isBothPasswordCorrect() { \n String pass1 = new String(newPasswordTextField.getPassword());\n String pass2 = new String(repeatPasswordTextField.getPassword()); \n \n return (pass1.equals(pass2) && isPasswordCorrect());\n }", "private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed\n uL.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n uL.dispose();\n }\n }", "private void setUpToggleButton()\n {\n rememberLoginToggle_ =\n (ToggleButton) findViewById( R.id.rememberLoginToggleButton );\n try\n {\n if ( properties_.containsKey( getString( R.string.saveInfo ) ) )\n {\n rememberLoginIsSet_ =\n Boolean.parseBoolean( (properties_\n .get( getString( R.string.saveInfo ) ))\n .toString() );\n }\n else\n {\n rememberLoginIsSet_ = true;\n }\n }\n catch ( Exception ex )\n {\n System.err.print( \"Error converting to boolean: \" + ex );\n }\n\n rememberLoginToggle_.setChecked( rememberLoginIsSet_ );\n\n rememberLoginToggle_.setOnClickListener( new View.OnClickListener()\n {\n // Toggle the button on click\n @Override\n public void onClick( View v )\n {\n rememberLoginIsSet_ = !rememberLoginIsSet_;\n }\n } );\n }", "private void showPassword(){\n\t\tpasswordLabel.setVisible(true);\n\t\tconfirmPasswordLabel.setVisible(true);\n\t\tuserPasswordField.setVisible(true);\n\t\tuserConfirmPasswordField.setVisible(true);\n\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.pwd_status_login:\n if (!pwd_visible){\n pwd_status_login.setSelected(true);\n pwd_visible = true;\n pwd_status_login.setImageResource(R.drawable.pwd_visible);\n //设置密码可见\n pwd_login.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n }else {\n pwd_status_login.setSelected(false);\n pwd_visible = false;\n pwd_status_login.setImageResource(R.drawable.pwd_invisible);\n //设置密码不可见\n pwd_login.setTransformationMethod(PasswordTransformationMethod.getInstance());\n }\n break;\n case R.id.clear_text_login:\n username_login.setText(\"\");\n Log.e(\"状态(用户名)\",\"清空完毕\");\n break;\n case R.id.clear_pwd_login:\n pwd_login.setText(\"\");\n Log.e(\"状态(密码)\",\"清空完毕\");\n break;\n }\n }", "@Override\n\tpublic boolean isLogin() {\n\t\treturn false;\n\t}", "@Override\n protected void updateConnectButtonState() {\n boolean connected = getPlusClient().isConnected();\n\n //mSignOutButtons.setVisibility(connected ? View.VISIBLE : View.GONE);\n //mPlusSignInButton.setVisibility(connected ? View.GONE : View.VISIBLE);\n //mEmailLoginFormView.setVisibility(connected ? View.GONE : View.VISIBLE);\n }", "public void switchToLogin() {\r\n\t\tlayout.show(this, \"loginPane\");\r\n\t\tloginPane.resetPassFields();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public boolean isLogin() {\n // Mengembalikan nilai boolean degan mengambil data dari pref KEY_IS_LOGIN\n return preference.getBoolean(Constants.KEY_IS_LOGIN, false);\n }", "private static void handleLogin(Operations o) {\n\t\tswitch(o)\n\t\t{\n\t\tcase ERROR:\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User and/or Password is incorrect!\");\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\tcase ALLOW_LOG:\n\t\t\tloginGUI.btnLogin.setEnabled(false);\n\t\t\tloginGUI.btnLogout.setEnabled(true);\n\t\t\tloginGUI.setVisible(false);\t\n\t\t\tMenuGUI mh1=new MenuGUI(loginGUI);\n\t\t\tString buttonNames[];\n\t\t\tbuttonNames = new String[]{\"Station Control\",\"Purchase Plan\",\"Modify Customer\",\"Manage Sales\", \"NFC Module\",\"Manage Fuel\",\"Messages\",\"Invoices\",\"Reports\", \"House Fuel Orders\"};\n\t\t\tmh1.setButtonNames(buttonNames);\n\t\t\t//get the user_type and user the string privilegeLevel to allow certain functions\n\t\t\tSystem.out.println(currUser.getUserType().toString()); // getting the usertype and user correctly\n\t\t\tboolean[] allowedButtons = currUser.getUserType().getPrivilegeLevels();\n\t\t\tfor(int i=0;i<allowedButtons.length;i++)\n\t\t\t{\n\t\t\t\tmh1.functionButton[i].setEnabled(allowedButtons[i]);\n\t\t\t\tmh1.functionButton[i].setVisible(allowedButtons[i]);\n\t\t\t}\n\t\t\tbreak; \n\t\tcase USER_ALREADY_LOGGED:\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User Already Logged In!\");//do something else after wards like - get the full User Details and display a corresponding GUI\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\t}\t\n\t}", "private void twoJButtonActionPerformed(ActionEvent event) {\n securityCodeJPasswordField.setText(String.valueOf(\n securityCodeJPasswordField.getPassword()) + \"2\");\n\n }", "private void conmuteFields() {\r\n\t\ttxPassword.setEditable(!txPassword.isEditable());\r\n\t\ttxUsuario.setEditable(!txUsuario.isEditable());\r\n\t\tcheckAdmin.setDisable(!checkAdmin.isDisable());\r\n\t\tcheckTPV.setDisable(!checkTPV.isDisable());\r\n\t}", "public abstract boolean isLoginRequired();", "private void initButtonStates() {\n//\t\tString provMethod = ProvisioningActivator.getProvisioningService().getProvisioningMethod();\n//\t\tboolean isProvEnabled = (provMethod != null && provMethod.length() > 0 && !provMethod.equals(\"NONE\"));\n//\n//\t\tenableCheckBox.setSelected(isProvEnabled);\n//\n//\t\tif (isProvEnabled) {\n//\t\t\tif (provMethod.equals(\"DHCP\"))\n//\t\t\t\tdhcpButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"DNS\"))\n//\t\t\t\tdnsButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"Bonjour\"))\n//\t\t\t\tbonjourButton.setSelected(true);\n//\t\t\telse if (provMethod.equals(\"Manual\")) {\n//\t\t\t\tmanualButton.setSelected(true);\n//\n//\t\t\t\tString uri = ProvisioningActivator.getProvisioningService().getProvisioningUri();\n//\t\t\t\tif (uri != null)\n//\t\t\t\t\turiField.setText(uri);\n//\t\t\t}\n//\t\t}\n//\n//\t\tdhcpButton.setEnabled(isProvEnabled);\n//\t\tmanualButton.setEnabled(isProvEnabled);\n//\t\turiField.setEnabled(manualButton.isSelected());\n//\t\tbonjourButton.setEnabled(isProvEnabled);\n//\t\tdnsButton.setEnabled(false);\n//\n//\t\t// creadentials\n//\t\tforgetPasswordButton.setEnabled(isProvEnabled);\n//\t\tusernameField.setText(ProvisioningActivator.getConfigurationService().getString(ProvisioningServiceImpl.PROPERTY_PROVISIONING_USERNAME));\n//\n//\t\tif (ProvisioningActivator.getCredentialsStorageService().isStoredEncrypted(ProvisioningServiceImpl.PROPERTY_PROVISIONING_PASSWORD)) {\n//\t\t\tpasswordField.setText(ProvisioningActivator.getCredentialsStorageService().loadPassword(ProvisioningServiceImpl.PROPERTY_PROVISIONING_PASSWORD));\n//\t\t}\n\t}", "private boolean isTheSamePassword(){\n\t\tif (!userPasswordField.getText().equals(userConfirmPasswordField.getText())) {\n\t\t\tlackUserConfirmPasswordLabel.setText(\"hasło i powtórzone hasło muszą być takie same\");\n\t\t\tlackUserConfirmPasswordLabel.setVisible(true);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void changeFieldsState(boolean state){\t\n\t\tmarcaText.setEnabled(state);\n\t\tmodeloText.setEnabled(state);\n\t\titvText.setEnabled(state);\n\t\testadoBox.setEnabled(state);\n\t\ttipoBox.setEnabled(state);\n\t\tanioText.setEnabled(state);\n\t}", "private void updateUI() {\n if (mAccount != null) {\n signInButton.setEnabled(false);\n signOutButton.setEnabled(true);\n callGraphApiInteractiveButton.setEnabled(true);\n callGraphApiSilentButton.setEnabled(true);\n currentUserTextView.setText(mAccount.getUsername());\n } else {\n signInButton.setEnabled(true);\n signOutButton.setEnabled(false);\n callGraphApiInteractiveButton.setEnabled(false);\n callGraphApiSilentButton.setEnabled(false);\n currentUserTextView.setText(\"None\");\n }\n\n deviceModeTextView.setText(mSingleAccountApp.isSharedDevice() ? \"Shared\" : \"Non-shared\");\n }", "private void logInBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logInBtnActionPerformed\n User theUser = null;\n String[] options = {\"OK\"};\n String userName = userNameTF.getText();\n String password = passwordTF.getText();\n\n theUser = HF.findUser(userName);\n\n if (userNameTF.getText().equals(\"\") || passwordTF.getText().equals(\"\")){\n JOptionPane.showOptionDialog(this, \"Please fill in your username \"\n + \"and password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (theUser == null) {\n JOptionPane.showOptionDialog(this, \"No such username!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (!theUser.getPassword().equals(password)) {\n JOptionPane.showOptionDialog(this, \"Invalid password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else {\n if (theUser instanceof Trainer){\n TrainerMenu tm = new TrainerMenu(this, (Trainer)theUser);\n tm.setVisible(true);\n this.setVisible(false);\n }\n else if (theUser instanceof Member){\n MemberMenu mm = new MemberMenu(this, (Member)theUser);\n mm.setVisible(true);\n this.setVisible(false);\n }\n userNameTF.setText(\"\");\n passwordTF.setText(\"\");\n }\n }", "@Override\n\t\t\t\t\t\tpublic void loginStatua(boolean isLogin) {\n\t\t\t\t\t\t\tif (isLogin) {\n\t\t\t\t\t\t\t\tanalyzingConditions();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void loginStatua(boolean isLogin) {\n\t\t\t\t\t\t\tif (isLogin) {\n\t\t\t\t\t\t\t\tanalyzingConditions();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void loginStatua(boolean isLogin) {\n\t\t\t\t\t\t\tif (isLogin) {\n\t\t\t\t\t\t\t\tanalyzingConditions();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "protected void UpdateButtons()\n {\n btnIn.setEnabled(usr.getPostType() == Util.ATTENDANCE_DAY_OUT);\n btnOut.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n btnScan.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n\n }", "public void toggleButtonImageSwitch() {\n if (isFlashOn) {\n btnSwitch.setImageResource(R.drawable.btn_on);\n } else {\n btnSwitch.setImageResource(R.drawable.btn_off);\n }\n }", "@ApiModelProperty(value = \"NOTE: Only available in the \\\"export\\\" view\")\n\n\n public Boolean isPwLogin() {\n return pwLogin;\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 jTextField1 = new javax.swing.JTextField();\n jPasswordField1 = new javax.swing.JPasswordField();\n jCheckBox1 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Login Page\");\n\n jPanel1.setBackground(new java.awt.Color(0, 0, 0));\n jPanel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jLabel1.setBackground(new java.awt.Color(0, 0, 0));\n jLabel1.setFont(new java.awt.Font(\"Segoe UI Historic\", 0, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(204, 204, 204));\n jLabel1.setText(\"Username\");\n\n jLabel2.setBackground(new java.awt.Color(0, 0, 0));\n jLabel2.setFont(new java.awt.Font(\"Segoe UI Historic\", 0, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(204, 204, 204));\n jLabel2.setText(\"Password\");\n\n jPasswordField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jPasswordField1ActionPerformed(evt);\n }\n });\n\n jCheckBox1.setBackground(new java.awt.Color(0, 0, 0));\n jCheckBox1.setForeground(new java.awt.Color(204, 204, 204));\n jCheckBox1.setText(\"Show Password\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n jButton1.setBackground(new java.awt.Color(0, 0, 0));\n jButton1.setFont(new java.awt.Font(\"Segoe UI Black\", 0, 18)); // NOI18N\n jButton1.setForeground(new java.awt.Color(204, 204, 204));\n jButton1.setText(\"LOGIN\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setBackground(new java.awt.Color(0, 0, 0));\n jButton2.setFont(new java.awt.Font(\"Segoe UI Black\", 0, 12)); // NOI18N\n jButton2.setForeground(new java.awt.Color(204, 204, 204));\n jButton2.setText(\"Register\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(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 .addGap(74, 74, 74)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(67, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32))\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 }", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "public void loginUI(Stage stage)\n{\n Text text1 = new Text(\"User Name\");\n //creating label password\n Text text2 = new Text(\"Password\");\n\n //Check Box for Admin\n CheckBox admin = new CheckBox(\"Admin\");\n admin.setIndeterminate(false);\n\n\n //Creating Text Filed for email\n TextField textField1 = new TextField();\n //Creating Text Filed for password\n PasswordField textField2 = new PasswordField();\n //Creating Buttons\n Button button2 = new Button(\"Login\");\n //Creating a Grid Pane\n GridPane Login_Pane = new GridPane();\n //Setting size for the pane\n Login_Pane.setMinSize(400, 200);\n //Setting the padding\n Login_Pane.setPadding(new Insets(10, 10, 10, 10));\n //Setting the vertical and horizontal gaps between the columns\n Login_Pane.setVgap(5);\n Login_Pane.setHgap(5);\n //Setting the Grid alignment\n Login_Pane.setAlignment(Pos.CENTER);\n //Arranging all the nodes in the grid\n Login_Pane.add(text1, 0, 0);\n Login_Pane.add(textField1, 1, 0);\n Login_Pane.add(text2, 0, 1);\n Login_Pane.add(textField2, 1, 1);\n // gridPane.add(button1, 0, 2);\n Login_Pane.add(button2, 1, 2);\n Login_Pane.add(admin, 0, 2);\n //Styling nodes\n button2.setStyle(\"-fx-background-color: darkslateblue; -fx-text-fill: white;\");\n text1.setStyle(\"-fx-font: normal bold 20px 'serif' \");\n text2.setStyle(\"-fx-font: normal bold 20px 'serif' \");\n Login_Pane.setStyle(\"-fx-background-color: WHITE;\");\n Scene sc=new Scene(Login_Pane);\n stage.setScene(sc);\n stage.show();\n button2.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\n String name=textField1.getText();\n\n String tableName1=\"Student\";\n String tableName2=\"Admin\";\n\n\n boolean trg=admin.isSelected();\n String password= textField2.getText();\n if(trg)\n {\n\n System.out.println(\"test \");\n try {\n System.out.println(\"Test 2\");\n if(db.getDeta( name,password,tableName2))\n {\n AdminUI(stage);\n }\n else\n {\n messagebox(\"Admin : You are enter wrong username or password\");\n }\n } catch (SQLException e) {\n String s=e.getMessage();\n messagebox(s);\n }\n }\n else\n {\n try {\n System.out.println(db.getDeta(name,password,tableName1));\n if(db.getDeta(name,password,tableName1))\n {\n StudentUI(stage);\n }\n else\n {\n messagebox(\"Student : You are enter wrong username or password\");\n }\n } catch (SQLException e) {\n String s=e.getMessage();\n messagebox(s);\n }\n }\n }\n });\n\n}", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (!isChecked) {\n // show password\n edtxt_password.setTransformationMethod(PasswordTransformationMethod.getInstance());\n } else {\n // hide password\n edtxt_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n }\n }", "public FrmLogin() {\n initComponents();\n //lbl_cadeado.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sigma/imagens/security.png\")))\n this.setIconImage(new ImageIcon(getClass().getResource(\"/clinica/imagens/cadeado.png\")).getImage());\n }", "public void showPassword() {\n\t\thideIM.setVisible(true);\n\t\tseeIM.setVisible(false);\n\t\tcurPasswordField.setVisible(false);\n\t\tnewPasswordField.setVisible(false);\n\t\tseeCurPasswordField.setVisible(true);\n\t\tseeNewPasswordField.setVisible(true);\n\t\tseeCurPasswordField.setText(curPasswordField.getText());\n\t\tseeNewPasswordField.setText(newPasswordField.getText());\n\t\t\n\t}", "public void initUI() {\n userEdit = (EditText) findViewById(R.id.et_login_username);\n tv_relasing_date = (TextView) findViewById(R.id.tv_relasing_date);\n tv_version = (TextView) findViewById(R.id.tv_version);\n iv_cust_care = (ImageButton) findViewById(R.id.iv_cust_care);\n userEdit.setFilters(new InputFilter[]{new InputFilter.AllCaps()});\n passEdit = (EditText) findViewById(R.id.et_login_password);\n userEdit.setText(userName);\n userEdit.setFocusable(true);\n passEdit.setInputType(InputType.TYPE_CLASS_TEXT\n | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n// showPass = (CheckBox) findViewById(R.id.ch_login_show_pass);\n savePass = (CheckBox) findViewById(R.id.ch_login_save_pass);\n// showPass.setOnClickListener(this);\n savePass.setOnClickListener(this);\n\n bt_login = (Button) findViewById(R.id.bt_login);\n\n bt_login.setOnClickListener(this);\n bt_login_clear = (Button) findViewById(R.id.bt_login_clear);\n\n bt_login_clear.setOnClickListener(this);\n\n// bt_login_exit = (Button) findViewById(R.id.bt_login_exit);\n\n// bt_login_exit.setOnClickListener(this);\n\n bt_login_forget_pass = (TextView) findViewById(R.id.bt_login_forget_pass);\n\n bt_login_forget_pass.setOnClickListener(this);\n\n iv_cust_care.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!Constants.TOLLFREE_NO.equalsIgnoreCase(\"\")) {\n Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse(Constants.tel_txt + (Constants.TOLLFREE_NO)));\n startActivity(dialIntent);\n }\n }\n });\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n if(isChecked){\n //选中\n jumpFlag = 0;\n iv_choose_type.setImageDrawable(getResources().getDrawable(R.mipmap.login_switch_on));\n }else{\n //未选中\n jumpFlag = 1;\n iv_choose_type.setImageDrawable(getResources().getDrawable(R.mipmap.login_switch_off));\n }\n }", "public void setSignUpStatus() {\n // true = open && false = closed\n\n int choice = 0;\n signUpStatus = true;\n System.out.println(\"Set Sign Up Status\" + \"\\n1. Open\" + \"\\n2.Closed\");\n choice = InputTools.intChecker(1, 2);\n\n switch (choice) {\n case 1:\n signUpStatus = true;\n System.out.println(\"Sign Up Status : Open\");\n break;\n case 2:\n signUpStatus = false;\n System.out.println(\"Sign Up Status : Closed\");\n break;\n }\n }", "public Login() {\n initComponents();\n lblstar.setVisible(false); // hide the red star that indicates that the user didnt fill in a form\n lblstar1.setVisible(false);\n }", "public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }", "public boolean isSetLogin() {\n return this.login != null;\n }", "public boolean isSetLogin() {\n return this.login != null;\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 }", "public void setIsLogin(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isLogin\", value);\n\t\teditor.commit();\n\t}", "public void setLogin(boolean isLoggedIn)\n {\n editor.putBoolean(KEY_IS_LOGGEDIN, isLoggedIn);\n // commit changes\n editor.commit();\n Log.d(TAG,\"user login modified in pref\");\n }", "public void setLoggedIn(boolean loggedIn) {\n \tmLoggedIn = loggedIn;\n \tmLoginEmail.setEnabled(!loggedIn);\n \tmLoginPassword.setEnabled(!loggedIn);\n \tif (loggedIn) {\n \t\tmSubmit.setText(\"Log Out of Dropbox\");\n \t} else {\n \t\tmSubmit.setText(\"Log In to Dropbox\");\n \t}\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jbtnUserName = new javax.swing.JLabel();\n jbtnPassword = new javax.swing.JLabel();\n jbtnTextField = new javax.swing.JTextField();\n jbtnPassField = new javax.swing.JPasswordField();\n loginbtn = new javax.swing.JButton();\n resetbtn = new javax.swing.JButton();\n jbtnBack = new javax.swing.JButton();\n bStudent = new javax.swing.JRadioButton();\n bProfessor = new javax.swing.JRadioButton();\n bEmployee = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setBackground(new java.awt.Color(0, 0, 0));\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 0, 51));\n jLabel1.setText(\" Login System\");\n jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255), 4));\n\n jbtnUserName.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jbtnUserName.setText(\"ID\");\n\n jbtnPassword.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jbtnPassword.setText(\"Password\");\n\n jbtnTextField.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n jbtnTextField.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255), 2));\n jbtnTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtnTextFieldActionPerformed(evt);\n }\n });\n\n jbtnPassField.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n jbtnPassField.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255), 2));\n jbtnPassField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtnPassFieldActionPerformed(evt);\n }\n });\n\n loginbtn.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n loginbtn.setText(\"Login\");\n loginbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n loginbtnActionPerformed(evt);\n }\n });\n\n resetbtn.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n resetbtn.setText(\"Reset\");\n resetbtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetbtnActionPerformed(evt);\n }\n });\n\n jbtnBack.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n jbtnBack.setText(\"BACK\");\n jbtnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtnBackActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(bStudent);\n bStudent.setText(\"Student\");\n\n buttonGroup1.add(bProfessor);\n bProfessor.setText(\"Professor\");\n\n buttonGroup1.add(bEmployee);\n bEmployee.setText(\"Employee\");\n bEmployee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bEmployeeActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jbtnBack)\n .addGap(16, 16, 16))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(200, 200, 200)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(112, 112, 112)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(bStudent)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jbtnUserName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jbtnPassword)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(148, 148, 148)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jbtnPassField)\n .addComponent(jbtnTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(bProfessor)\n .addGap(43, 43, 43)\n .addComponent(bEmployee)))))\n .addContainerGap(127, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(111, 111, 111)\n .addComponent(loginbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(resetbtn, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(135, 135, 135))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbtnUserName)\n .addComponent(jbtnTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(63, 63, 63)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbtnPassword)\n .addComponent(jbtnPassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(bStudent)\n .addComponent(bProfessor)\n .addComponent(bEmployee))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(loginbtn)\n .addComponent(resetbtn))\n .addGap(33, 33, 33)\n .addComponent(jbtnBack)\n .addContainerGap())\n );\n\n pack();\n }", "public void checkIfFieldReady() {\n boolean redReady = isRedReady();\n boolean blueReady = isBlueReady();\n if (redReady && blueReady) {\n fullFieldReady.setBackground(READY);\n GovernThread game = GovernThread.getInstance();\n if (game != null) {\n beginMatchButton.setEnabled(game.isNewMatch());\n } else {\n fullFieldReady.setBackground(NOT_READY);\n beginMatchButton.setEnabled(false);\n }\n } else {\n fullFieldReady.setBackground(NOT_READY);\n beginMatchButton.setEnabled(false);\n }\n if (!Main.isSimpleMode()) {\n if (redReady != prevRedReady || blueReady != prevBlueReady) {\n PLC_Sender.getInstance().updatePLC_Lights(true);\n }\n }\n prevRedReady = redReady;\n prevBlueReady = blueReady;\n }", "@Override\n\tpublic void setStudentPassword() {\n\t\tnew AbstractStudentPasswordSetDialgoTest().setVisible(true);\n\t\t\n\t}", "private void swhFieldConditions() {\n\n gameScreenBackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n swhImageView.setSelected(false);\n baseHitImageView.setSelected(false);\n\n lfTextView.setSelected(false);\n rfTextView.setSelected(false);\n cfTextView.setSelected(false);\n cTextView.setSelected(false);\n pTextView.setSelected(false);\n oneBTextView.setSelected(false);\n twoBTextView.setSelected(false);\n threeBTextView.setSelected(false);\n ssTextView.setSelected(false);\n\n leftFieldPoints.setVisibility(View.GONE);\n rightFieldpoints.setVisibility(View.GONE);\n centerFieldPoints.setVisibility(View.GONE);\n\n hideAllFieldPosBadges();\n swhLabel.setVisibility(View.GONE);\n\n homeRunImageView.setEnabled(true);\n runScore.setEnabled(true);\n possiblePoints.setText(\"0 / 0\");\n baseHitImageView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.base_hit);\n\n positionsEnable();\n\n //disable basehit\n baseHitImageView.setEnabled(false);\n baseHitImageView.setAlpha((float) 0.6);\n\n //enable swh\n swhImageView.setEnabled(true);\n swhImageView.setAlpha((float) 1.0);\n\n\n }", "public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentication(database);\n if (auth.signIn(username, password)) {\n Player player = new Player(username, database.getPersonalTopScore(username));\n game.setScreen(new PreGameScreen(game,\"music/bensound-funkyelement.mp3\", player));\n } else {\n txfUsername.setColor(Color.RED);\n txfPassword.setColor(Color.RED);\n }\n }", "private boolean isAllFieldsAreFull(){\n\t\tboolean lack = true;\n\t\tif (userNameField.getText().equals(\"\")) {\n\t\t\tlackUserNameLabel.setVisible(true);\t\t\t\t\n\t\t\tlack = false;\n\t\t}\n\t\tif (userLastNameField.getText().equals(\"\")) {\n\t\t\tlackUserLastNameLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\tif (userLoginField.getText().equals(\"\")) {\n\t\t\tlackUserLoginLabel.setText(\"to pole nie może być puste\");\n\t\t\tlackUserLoginLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\t\n\t\tif (userPermissionsBox.getSelectionModel().getSelectedIndex() <= -1) {\n\t\t\tlackUserPermissionsLabel.setVisible(true);\n\t\t\tlack = false;\n\t\t}\n\t\t\n\t\tif ((newUser) || (changePassword)){\n\t\t\tif (userPasswordField.getText().equals(\"\")) {\n\t\t\t\tlackUserPasswordLabel.setVisible(true);\n\t\t\t\tlack = false;\n\t\t\t}\n\t\t\tif (userConfirmPasswordField.getText().equals(\"\")) {\n\t\t\t\tlackUserConfirmPasswordLabel.setText(\"to pole nie może być puste\");\n\t\t\t\tlackUserConfirmPasswordLabel.setVisible(true);\n\t\t\t\tlack = false;\n\t\t\t}\n\t\t}\n\t\treturn lack;\n\t}", "private void showLoginScreen()\n {\n logIngEditText.setVisibility(View.VISIBLE);\n passwordEditText.setVisibility(View.VISIBLE);\n loginButton.setVisibility(View.VISIBLE);\n textViewLabel.setVisibility(View.VISIBLE);\n }", "private void loginbtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginbtnActionPerformed\n int id = Integer.parseInt(jbtnTextField.getText());\n \n if (bEmployee.isSelected())\n {\n int index = Library.login(id, String.valueOf(jbtnPassField.getPassword()), \"EMPLOYEE\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no employee with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n // Get the object\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"EMPLOYEE\");\n EmployeeUI eUI = new EmployeeUI(Library.employees.get(i));\n eUI.setVisible(true);\n this.dispose();\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else if (bProfessor.isSelected())\n {\n int index = Library.login(Integer.parseInt(jbtnTextField.getText()), String.valueOf(jbtnPassField.getPassword()), \"PROFESSOR\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no professor with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n // Get the object\n try\n {\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"PROFESSOR\");\n ProfessorUI pUI = new ProfessorUI(Library.professors.get(i));\n pUI.setVisible(true);\n this.dispose();\n } catch (IndexOutOfBoundsException e)\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Not found\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else if (bStudent.isSelected())\n {\n int index = Library.login(Integer.parseInt(jbtnTextField.getText()), String.valueOf(jbtnPassField.getPassword()), \"STUDENT\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no student with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n try\n {\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"PROFESSOR\");\n StudentUI sUI = new StudentUI(Library.students.get(i));\n sUI.setVisible(true);\n this.dispose();\n } catch (IndexOutOfBoundsException e)\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Not found\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n } \n }\n else\n {\n JOptionPane.showMessageDialog(this, \"You have to choose one option!\", \"Choose\", JOptionPane.WARNING_MESSAGE);\n }\n \n }", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "private void changeScreenButtonImage(BaseFastViewFinder.HeadUpDisplaySetupState headUpDisplaySetupState, boolean bl) {\n if (this.getBaseLayout().getOnScreenButtonGroup() == null) {\n return;\n }\n switch (.$SwitchMap$com$sonyericsson$android$camera$fastcapturing$view$BaseFastViewFinder$HeadUpDisplaySetupState[headUpDisplaySetupState.ordinal()]) {\n default: {\n throw new IllegalStateException(\"ViewFinder.changeScreenButtonBackground():[Unexpected system bar status.] state = \" + (Object)headUpDisplaySetupState);\n }\n case 1: \n case 3: \n case 4: {\n if (bl) {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.CAPTURE, this.getOrientation(), true);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(super.getCaptureButtonTypeAccoringToSelfTimerSetting(), this.getOrientation(), true);\n }\n if (this.mActivity.isOneShotPhotoSecure()) {\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.NONE);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.START_RECORDING, this.getOrientation(), true);\n }\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n return;\n }\n case 2: {\n VideoSize videoSize = VideoSize.getValueFromFrameSize(this.mCameraDevice.getPreviewRect().width(), this.mCameraDevice.getPreviewRect().height());\n if (videoSize == null) return;\n if (ClassDefinitionChecker.isMediaRecorderPauseAndResumeSupported() && !videoSize.isConstraint()) {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.PAUSE_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(0);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.CAPTURE, this.mRecordingOrientation, true);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n }\n if (this.mCameraDevice.getVideoSize() != VideoSize.MMS) return;\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.STOP_RECORDING);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.NONE);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n return;\n }\n case 5: \n }\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.RESTART_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING_IN_PAUSE, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(0);\n }", "@FXML\r\n\tpublic void handleLoginButton() throws IOException{\r\n\t\tString username = tfUsernameLogin.getText();\r\n\t\tString password = pfPasswordLogin.getText();\r\n\t\tuserCred = theController.isValidUser(username, password);\r\n\t\tif(userCred.equals(\"manager\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(false);\r\n\t\t\tteamScreen.setDisable(false);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse if(userCred.equals(\"employee\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(true);\r\n\t\t\tteamScreen.setDisable(true);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tlbAlertLogin.setTextFill(Color.RED);\r\n\t\t\tlbAlertLogin.setText(userCred);\r\n\t\t}\r\n\t}", "public void toggleLoginError() {\n TextView loginErrorTextView = findViewById(R.id.login_error);\n if (loginErrorTextView.getText().toString().equals(\"\")) {\n loginErrorTextView.setText(R.string.incorrectUsernamePassword);\n }\n }", "public Optional<Pair<String,String>> showLogin( final Pair<String,String> initialUserInfo, final Callback<Pair<String,String>, Void> authenticator ) {\n \t\n \tfinal CustomTextField txUserName = (CustomTextField) TextFields.createClearableTextField();\n \ttxUserName.setLeft(new ImageView( DialogResources.getImage(\"login.user.icon\")) ); //$NON-NLS-1$\n \t\n \tfinal CustomPasswordField txPassword = (CustomPasswordField) TextFields.createClearablePasswordField();\n \ttxPassword.setLeft(new ImageView( DialogResources.getImage(\"login.password.icon\"))); //$NON-NLS-1$\n\t\t\n\t\tfinal Label lbMessage= new Label(\"\"); //$NON-NLS-1$\n\t\tlbMessage.getStyleClass().addAll(\"message-banner\"); //$NON-NLS-1$\n\t\tlbMessage.setVisible(false);\n\t\tlbMessage.setManaged(false);\n\t\t\n\t\tfinal VBox content = new VBox(10);\n\t\tcontent.getChildren().add(new Label(\"User name\"));\n\t\tcontent.getChildren().add(txUserName);\n\t\tcontent.getChildren().add(txPassword);\n\t\t\n\t\tfinal Action actionLogin = new DialogAction(\"Connect\", null, false, false, true) { //$NON-NLS-1$\n\t\t\t{\n\t\t\t\tButtonBar.setType(this, ButtonType.OK_DONE);\n\t\t\t\tsetEventHandler(this::handleAction);\n\t\t\t}\n\t\t\t\n\t\t\tprotected void handleAction(ActionEvent ae) {\n\t\t\t\tDialog dlg = (Dialog) ae.getSource();\n\t\t\t\ttry {\n\t\t\t\t\tif ( authenticator != null ) {\n\t\t\t\t\t\tauthenticator.call(new Pair<>(txUserName.getText(), txPassword.getText()));\n\t\t\t\t\t}\n\t\t\t\t\tlbMessage.setVisible(false);\n\t\t\t\t\tlbMessage.setManaged(false);\n\t\t\t\t\tdlg.hide();\n\t\t\t\t\tdlg.setResult(this);\n\t\t\t\t} catch( Throwable ex ) {\n\t\t\t\t\tlbMessage.setVisible(true);\n\t\t\t\t\tlbMessage.setManaged(true);\n\t\t\t\t\tlbMessage.setText(ex.getMessage());\n\t\t\t\t\tdlg.sizeToScene();\n\t\t\t\t\tdlg.shake();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override public String toString() {\n\t\t\t\treturn \"LOGIN\"; //$NON-NLS-1$\n\t\t\t};\n\t\t};\n\t\t\n\t\tfinal Dialog dlg = buildDialog(Type.LOGIN);\n dlg.setContent(content);\n \n dlg.setResizable(false);\n\t\tdlg.setIconifiable(false);\n\t\tif ( dlg.getGraphic() == null ) { \n\t\t\tdlg.setGraphic( new ImageView( DialogResources.getImage(\"login.icon\"))); //$NON-NLS-1$\n\t\t}\n\t\tdlg.getActions().setAll(actionLogin, ACTION_CANCEL);\n\t\tfinal String userNameCation = getString(\"login.dlg.user.caption\"); //$NON-NLS-1$\n\t\tfinal String passwordCaption = getString(\"login.dlg.pswd.caption\"); //$NON-NLS-1$\n\t\ttxUserName.setPromptText(userNameCation);\n\t\ttxUserName.setText( initialUserInfo.getKey());\n\t\ttxPassword.setPromptText(passwordCaption);\n\t\ttxPassword.setText(new String(initialUserInfo.getValue()));\n\n\t\tfinal ValidationSupport validationSupport = new ValidationSupport();\n\t\tPlatform.runLater(new Runnable()\n\t\t{\n\t\t@Override\n\t\tpublic void run()\n\t\t{\n\t\t\tString requiredFormat = \"'%s' is required\"; //$NON-NLS-1$\n\t\t\tvalidationSupport.registerValidator(txUserName, Validator.createEmptyValidator( String.format( requiredFormat, userNameCation )));\n\t\t\tactionLogin.disabledProperty().bind(validationSupport.invalidProperty());\n\t\t\ttxUserName.requestFocus();\t\t\t\n\t\t}});\n\n\t\tdlg.sizeToScene();\n \treturn Optional.ofNullable( \n \t\t\tdlg.show() == actionLogin? \n \t\t\t\t\tnew Pair<>(txUserName.getText(), txPassword.getText()): \n \t\t\t\t\tnull);\n }", "private void initialize() {\n\n frame = new JFrame();\n frame.setTitle(\"LOGIN - Traffic Simulation\");\n frame.setType(Type.UTILITY);\n frame.getContentPane().setBackground(new Color(45, 52, 71));\n frame.setBounds(300, 250, 650, 450);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n\n\n txtUserName = new JTextField();\n txtUserName.setToolTipText(\"\");\n txtUserName.setOpaque(false);\n txtUserName.setForeground(Color.WHITE);\n txtUserName.setFont(new Font(\"Verdana\", Font.PLAIN, 15));\n txtUserName.setColumns(15);\n txtUserName.setCaretColor(Color.WHITE);\n txtUserName.setBorder(new MatteBorder(0, 0, 2, 0, (Color) Color.GRAY));\n txtUserName.setBounds(202, 154, 304, 32);\n frame.getContentPane().add(txtUserName);\n\n txtPassword = new JTextField();\n txtPassword.setCaretColor(Color.WHITE);\n txtPassword.setFont(new Font(\"Verdana\", Font.PLAIN, 15));\n txtPassword.setForeground(Color.WHITE);\n txtPassword.setBorder(new MatteBorder(0, 0, 2, 0, (Color) Color.GRAY));\n txtPassword.setOpaque(false);\n txtPassword.setBounds(202, 218, 304, 32);\n frame.getContentPane().add(txtPassword);\n\n JLabel lblLogin = new JLabel(\"Login\");\n lblLogin.setFont(new Font(\"Forte\", Font.PLAIN, 65));\n lblLogin.setBounds(235, 39, 236, 79);\n lblLogin.setForeground(new Color(60,88,250));\n frame.getContentPane().add(lblLogin);\n\n JLabel lblUserName = new JLabel(\"\");\n lblUserName.setIcon(new ImageIcon(\"C:\\\\Users\\\\bario\\\\Desktop\\\\Staffs\\\\PROJECT_TS\\\\user.png\"));\n lblUserName.setBounds(139, 146, 46, 40);\n frame.getContentPane().add(lblUserName);\n\n JLabel lblPassword = new JLabel(\"\");\n lblPassword.setIcon(new ImageIcon(\"C:\\\\Users\\\\bario\\\\Desktop\\\\Staffs\\\\PROJECT_TS\\\\password.png\"));\n lblPassword.setBounds(139, 210, 46, 40);\n frame.getContentPane().add(lblPassword);\n\n JButton btnLogin = new JButton(\"Login\");\n btnLogin.setBorderPainted(false);\n btnLogin.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n btnLogin.setFocusPainted(false);\n btnLogin.setRolloverEnabled(false);\n btnLogin.setBackground(new Color(33,150,243));\n btnLogin.setForeground(new Color(255, 255, 255));\n btnLogin.setBounds(104, 332, 150, 32);\n btnLogin.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n btnLogin.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String user,password;\n user = txtUserName.getText().toLowerCase();\n password = txtPassword.getText().toLowerCase();\n\n try {\n if(verificaDate(user,password)){\n if( db.checkLogin(user, password)){\n frame.dispose();\n World.main();\n\n }else{\n JOptionPane.showMessageDialog(null,\"Contul nu exista!\");\n }\n }else{\n JOptionPane.showMessageDialog(null,\"Date tastate incorect.\",\"EROARE\",JOptionPane.ERROR_MESSAGE);\n }\n\n\n } catch (Exception e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n }\n });\n frame.getContentPane().add(btnLogin);\n\n\n JButton btnRegister = new JButton(\"Register\");\n btnRegister.setRolloverEnabled(false);\n btnRegister.setForeground(Color.WHITE);\n btnRegister.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n btnRegister.setFocusPainted(false);\n btnRegister.setBorderPainted(false);\n btnRegister.setBackground(new Color(33, 150, 243));\n btnRegister.setBounds(396, 332, 150, 32);\n\n btnRegister.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String user,password;\n user = txtUserName.getText().toLowerCase();\n password = txtPassword.getText().toLowerCase();\n\n try {\n\n if(verificaDate(user,password)){\n if(db.register(user, password)){\n JOptionPane.showMessageDialog(null,\"Conexiune reusita!\");\n }else{\n JOptionPane.showMessageDialog(null,\"Contul deja exista!\");\n }\n }else{\n JOptionPane.showMessageDialog(null,\"Date incorecte.\");\n }\n\n } catch (SQLException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n System.out.println(\"Eroare la register\");\n }\n }\n });\n frame.getContentPane().add(btnRegister);\n\n/*\n String sir2 = \"salutarea\";\n String sir [] = sir2.split(\"\");\n\n char p = 'a',m = 'a';\n int max = 0, min = 999;\n int contor = 0;\n for(char x = 'a'; x<='z'; x++){\n contor = 0;\n if(sir2.contains(String.valueOf(x))){\n for(int i=0; i<sir.length; i++){\n if(sir[i].charAt(0) == x){\n contor++;\n }\n }\n if(contor>max){\n max = contor;\n m = x;\n }\n\n if(contor<min){\n min = contor;\n p = x;\n }\n }\n\n }\n System.out.println(p + \" are \" + min);\n System.out.println(m + \" are \" + max);*/\n\n }", "public T01Login() {\n initComponents();\n btnMenu.setVisible(false);\n }", "public boolean validateSignOnShadeIsClosed(){\n return getBtnSignOn().isDisplayed();\n }", "private void startAndStopToggleButtonActionPerformed() {//GEN-FIRST:event_startAndStopToggleButtonActionPerformed\r\n int state = this.controller.ToggleSlideshow();\r\n if (state == 1) {\r\n startAndStopToggleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/assets/pause.png\")));\r\n } else if (state == 0) {\r\n startAndStopToggleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/assets/start.png\")));\r\n } else{\r\n startAndStopToggleButton.setSelected(!startAndStopToggleButton.isSelected());\r\n }\r\n }", "private void setConnected(final boolean isConnected)\n\t{\n\t\tserverIPTextField.setEnabled(!isConnected);\n\t\tserverPortTextField.setEnabled(!isConnected);\n\t\tuserNameTextField.setEnabled(!isConnected);\n\t\tloginButton.setEnabled(!isConnected);\n\t\tlogoutButton.setEnabled(isConnected);\t\n\t\tsendMessageButton.setEnabled(isConnected);\n\t\tmessageTextArea.setEnabled(isConnected);\n\t}", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "public void darkIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/white/copy_white.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/white/help_white.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/white/big_profile_white.png\")));\n }\n }", "private void button1ActionPerformed(ActionEvent e) {\n\t\t String value1=text1.getText();\r\n\t\t String value2=text2.getText();\r\n\t\t if (value1.equals(\"thiru\") && value2.equals(\"thiru\")) {\r\n\t\t NextPage page=new NextPage();\r\n\t\t page.setVisible(true);\r\n\t\t JLabel label = new JLabel(\"Welcome:\"+value1);\r\n\t\t page.getContentPane().add(label);\r\n\t\t }\r\n\t\t else{\r\n\t\t System.out.println(\"enter the valid username and password\");\r\n\t\t JOptionPane.showMessageDialog(this,\"Incorrect login or password\",\r\n\t\t \"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t }\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n fullscreen_panel = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\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 lname_txt = new javax.swing.JTextField();\n fname_txt = new javax.swing.JTextField();\n login_txt = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n customer_rbutton = new javax.swing.JRadioButton();\n manager_rbutton = new javax.swing.JRadioButton();\n managerpassword_label = new javax.swing.JLabel();\n register_button = new javax.swing.JButton();\n back_button = new javax.swing.JButton();\n password_passfield = new javax.swing.JPasswordField();\n repassword_passfield = new javax.swing.JPasswordField();\n managerpassword_passfield = new javax.swing.JPasswordField();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n BigImageLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n fullscreen_panel.setBackground(new java.awt.Color(255, 255, 255));\n fullscreen_panel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(153, 204, 255));\n jPanel1.setForeground(new java.awt.Color(204, 204, 204));\n jPanel1.setOpaque(false);\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel2.setBackground(new java.awt.Color(204, 204, 255));\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"First Name:\");\n jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel2.setOpaque(true);\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 13, 150, 30));\n\n jLabel3.setBackground(new java.awt.Color(204, 204, 255));\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Re-Enter Password:\");\n jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel3.setOpaque(true);\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 239, 150, 30));\n\n jLabel4.setBackground(new java.awt.Color(204, 204, 255));\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Last Name:\");\n jLabel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel4.setOpaque(true);\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 68, 150, 30));\n\n jLabel5.setBackground(new java.awt.Color(204, 204, 255));\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"Login ID:\");\n jLabel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel5.setOpaque(true);\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, 150, 30));\n\n jLabel6.setBackground(new java.awt.Color(204, 204, 255));\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"Password:\");\n jLabel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel6.setOpaque(true);\n jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 180, 150, 30));\n\n lname_txt.setForeground(new java.awt.Color(204, 204, 204));\n lname_txt.setText(\"Enter last name here\");\n lname_txt.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lname_txtMouseClicked(evt);\n }\n });\n jPanel1.add(lname_txt, new org.netbeans.lib.awtextra.AbsoluteConstraints(169, 68, 160, 30));\n\n fname_txt.setForeground(new java.awt.Color(204, 204, 204));\n fname_txt.setText(\"Enter first name here\");\n fname_txt.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n fname_txtMouseClicked(evt);\n }\n });\n fname_txt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fname_txtActionPerformed(evt);\n }\n });\n jPanel1.add(fname_txt, new org.netbeans.lib.awtextra.AbsoluteConstraints(169, 13, 160, 30));\n\n login_txt.setForeground(new java.awt.Color(204, 204, 204));\n login_txt.setText(\"Enter Login ID here\");\n login_txt.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n login_txtMouseClicked(evt);\n }\n });\n login_txt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n login_txtActionPerformed(evt);\n }\n });\n jPanel1.add(login_txt, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 120, 160, 30));\n\n jLabel7.setBackground(new java.awt.Color(204, 204, 255));\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setText(\"Choose Type of User\");\n jLabel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jLabel7.setOpaque(true);\n jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 20, 170, 30));\n\n customer_rbutton.setBackground(new java.awt.Color(204, 204, 255));\n buttonGroup1.add(customer_rbutton);\n customer_rbutton.setText(\"Customer\");\n customer_rbutton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n customer_rbuttonActionPerformed(evt);\n }\n });\n jPanel1.add(customer_rbutton, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 20, -1, 20));\n\n manager_rbutton.setBackground(new java.awt.Color(204, 204, 255));\n buttonGroup1.add(manager_rbutton);\n manager_rbutton.setText(\"Manager\");\n manager_rbutton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n manager_rbuttonActionPerformed(evt);\n }\n });\n jPanel1.add(manager_rbutton, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 60, -1, 20));\n\n managerpassword_label.setBackground(new java.awt.Color(204, 204, 255));\n managerpassword_label.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n managerpassword_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n managerpassword_label.setText(\"Enter Managerial Password:\");\n managerpassword_label.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n managerpassword_label.setOpaque(true);\n jPanel1.add(managerpassword_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 120, 200, 30));\n\n register_button.setBackground(new java.awt.Color(255, 51, 51));\n register_button.setText(\"REGISTER\");\n register_button.setBorder(null);\n register_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n register_buttonActionPerformed(evt);\n }\n });\n jPanel1.add(register_button, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 270, 170, 30));\n\n back_button.setBackground(new java.awt.Color(102, 153, 255));\n back_button.setText(\"Go back to Login Page\");\n back_button.setBorder(null);\n back_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n back_buttonActionPerformed(evt);\n }\n });\n jPanel1.add(back_button, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 320, 167, 30));\n\n password_passfield.setForeground(new java.awt.Color(204, 204, 204));\n password_passfield.setText(\"jPasswordField1\");\n password_passfield.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n password_passfieldMouseClicked(evt);\n }\n });\n jPanel1.add(password_passfield, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 180, 160, 30));\n\n repassword_passfield.setForeground(new java.awt.Color(204, 204, 204));\n repassword_passfield.setText(\"jPasswordField2\");\n repassword_passfield.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n repassword_passfieldMouseClicked(evt);\n }\n });\n jPanel1.add(repassword_passfield, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 240, 160, 30));\n\n managerpassword_passfield.setForeground(new java.awt.Color(204, 204, 204));\n managerpassword_passfield.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n managerpassword_passfieldMouseClicked(evt);\n }\n });\n jPanel1.add(managerpassword_passfield, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 180, 200, 30));\n\n fullscreen_panel.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 780, 400));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 3, 36)); // NOI18N\n jLabel8.setText(\" Registration\");\n fullscreen_panel.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, 800, 80));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel9.setText(\" Create an account by filling up these simple details.\");\n fullscreen_panel.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 110, 650, 40));\n\n BigImageLabel.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Jash\\\\Pictures\\\\plane.jpg\")); // NOI18N\n BigImageLabel.setText(\"jLabel1\");\n fullscreen_panel.add(BigImageLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 800, 580));\n\n getContentPane().add(fullscreen_panel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 800, 580));\n\n pack();\n setLocationRelativeTo(null);\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n texttoLogin = new javax.swing.JLabel();\n textoSenha = new javax.swing.JLabel();\n botaoSenha = new javax.swing.JButton();\n novaSenhaInvalidaMensagem = new javax.swing.JLabel();\n escudo = new javax.swing.JLabel();\n campoSenha1 = new javax.swing.JPasswordField();\n campoSenha2 = new javax.swing.JPasswordField();\n\n setBackground(new java.awt.Color(94, 109, 252));\n\n texttoLogin.setFont(new java.awt.Font(\"Calibri\", 0, 25)); // NOI18N\n texttoLogin.setForeground(new java.awt.Color(255, 255, 255));\n texttoLogin.setText(\"Nova senha:\");\n\n textoSenha.setFont(new java.awt.Font(\"Calibri\", 0, 25)); // NOI18N\n textoSenha.setForeground(new java.awt.Color(255, 255, 255));\n textoSenha.setText(\"Repita a senha:\");\n\n botaoSenha.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n botaoSenha.setText(\"Entrar\");\n botaoSenha.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botaoSenhaActionPerformed(evt);\n }\n });\n\n novaSenhaInvalidaMensagem.setFont(new java.awt.Font(\"Calibri\", 1, 16)); // NOI18N\n novaSenhaInvalidaMensagem.setForeground(new java.awt.Color(94, 109, 252));\n novaSenhaInvalidaMensagem.setText(\"Senhas não conferem. Digite novamente.\");\n\n escudo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/InterfacesGraficas/Escudo.png\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(167, 167, 167)\n .addComponent(escudo)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(47, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(texttoLogin, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(textoSenha, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(botaoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoSenha1, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoSenha2, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(204, 204, 204))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(novaSenhaInvalidaMensagem)\n .addGap(184, 184, 184))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(escudo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(texttoLogin)\n .addComponent(campoSenha1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(textoSenha)\n .addComponent(campoSenha2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(botaoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)\n .addComponent(novaSenhaInvalidaMensagem)\n .addGap(30, 30, 30))\n );\n }", "private void initView(){\n\t\t\n\t\tpreferences = getSharedPreferences(\"TEACH\", MODE_PRIVATE);\n\t\t\n\t\tuser_image = (CircleImageView) findViewById(R.id.login_userimage);\n\t\tif(preferences!=null){\n\t\t\tif(preferences.getString(\"imagebitmap\", null)!=null){\n\t\t\t\tbyte[] bitmapArray; \n\t bitmapArray = Base64.decode(preferences.getString(\"imagebitmap\", null), Base64.DEFAULT); \n\t\t\t\tuser_image.setImageBitmap(BitmapFactory.decodeByteArray(bitmapArray, 0, bitmapArray.length));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tclaer_but = (ImageButton)findViewById(R.id.claer_but);\n\t\tclaer_but.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tusername.setText(\"\");\n\t\t\t}\n\t\t});\n\t\ttoggleButton = (ImageButton)findViewById(R.id.claer_but_1);\n\t\ttoggleButton.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(toggleBut==false){\n\t\t\t\t\tpwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n\t\t\t\t\ttoggleBut=true;\n\t\t\t\t}else{\n\t\t\t\t\tpwd.setTransformationMethod(PasswordTransformationMethod.getInstance());\n\t\t\t\t\ttoggleBut=false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tusername = (EditText)findViewById(R.id.username);\n\t\tpwd = (EditText)findViewById(R.id.pwd);\n\t\tString str = getIntent().getStringExtra(\"phone\");\n\t\tif(StringUtil.isEmpty(str)){\n\t\t\tusername.setText(preferences!=null?preferences.getString(\"userName\", null):\"\");\n\t\t\tpwd.setText(preferences!=null?preferences.getString(\"userPwd\", null):\"\");\n\t\t}else{\n\t\t\tusername.setText(str);\n\t\t}\n\t\trePassword = (CheckBox)findViewById(R.id.rePassword);\n\t\trePassword.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tEditor edit = preferences.edit();\n\t\t\t\tif (!isChecked) {\n\t\t\t\t\tedit.putString(\"userName\", \"\");\n\t\t\t\t\tedit.putString(\"userPwd\", \"\");\n\t\t\t\t}\n\t\t\t\tedit.commit();\n\t\t\t}\n\t\t});\n\t\tsubBut = (Button)findViewById(R.id.subBut);\n\t\tusername.addTextChangedListener(new TextWatcher() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\tint after) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tif(s.toString().equals(\"\")){\n\t\t\t\t\tclaer_but.setVisibility(View.GONE);\n\t\t\t\t}else{\n\t\t\t\t\tclaer_but.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tpwd.addTextChangedListener(new TextWatcher() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\tint after) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tif(s.toString().equals(\"\")){\n\t\t\t\t\ttoggleButton.setVisibility(View.GONE);\n\t\t\t\t}else{\n\t\t\t\t\ttoggleButton.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n subBut.setOnClickListener(new OnClickListener() {\n\t\t\n\t\t@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif(StringUtil.isBlank(username.getText()+\"\") || StringUtil.isBlank(pwd.getText()+\"\")){\n\t\t\t\tToastUtil.showToast(LoginActivity.this, \"用户名或密码不能为空\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tEditor editor = preferences.edit();\n\t\t\tif(rePassword.isChecked()){\n\t\t\t\teditor.putString(\"userName\", username.getText()+\"\");\n\t\t\t\teditor.putString(\"userPwd\", pwd.getText()+\"\");\n\t\t\t}else{\n\t\t\t\teditor.putString(\"userName\", username.getText()+\"\");\n\t\t\t\teditor.putString(\"userPwd\", \"\");\n\t\t\t\t\n\t\t\t}\n\t\t\teditor.putBoolean(\"savePwd\", rePassword.isChecked());\n\t\t\t\n\t\t\teditor.commit();\n\t\t\tHashMap<String, Object> hashMap = new HashMap<String, Object>();\n\t\t\thashMap.put(\"USERNAME\", username.getText());\n\t\t\thashMap.put(\"PASSWORD\", pwd.getText());\n\t\t\thashMap.put(\"OPERATE_TYPE\", \"1\");\n\t\t\tintent = new Intent();\n\t\t\tintent.setClass(LoginActivity.this, MainActivity.class);\n\t\t\tqueryLogin(hashMap,intent);\n\t\t\t}\n });\n \n \n\t\tif(preferences.getBoolean(\"savePwd\", false)){\n\t\t\tusername.setText(preferences.getString(\"userName\", \"\"));\n\t\t\tpwd.setText(preferences.getString(\"userPwd\", \"\"));\n\t\t}else{\n\t\t\tusername.setText(preferences.getString(\"userName\", \"\"));\n\t\t}\n\t\trePassword.setChecked(preferences.getBoolean(\"savePwd\", false));\n\t\t\n\t\trePassword.setOnCheckedChangeListener(this);\n\t\tif(getIntent().getExtras()!=null&& getIntent().getExtras().getSerializable(\"data\")!=null){\n\t\t\tusername.setText(preferences.getString(\"userName\", \"\"));\n\t\t\tpwd.setText(preferences.getString(\"userPwd\", \"\"));\n\t\t\tsubBut.performClick();\n\t\t}\n\t\t\n\t\tforgetPassword = (TextView) findViewById(R.id.forgetPassword);\n\t\tforgetPassword.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); \n\t\tforgetPassword.setText(\"忘记密码\");\n\t\tforgetPassword.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// 修改密码\n\t\t\t\tstartActivity(new Intent(LoginActivity.this,FindPasswordActivity.class));\n\t\t\t\toverridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n//\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "private final static void onLogin(TextField username, PasswordField password)\n\t{\n\t\tif (ProfileManipulation.checkLogin(username.getText(), password.getText())) {\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public void lightIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/black/copy_black.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/black/help_black.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/black/big_profile_black.png\")));\n }\n }", "private void logoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutButtonActionPerformed\n boolean isLoggedIn = uL.isLoggedIn();\n boolean isLoggedInNew = na.isLoggedIn();\n //boolean found = uL.isFound();\n if (isLoggedIn || isLoggedInNew) {\n na.setIsLoggedIn(false);\n uL.setIsLoggedIn(false);\n uL.setIsFound(false);\n dm.messageUserLoggedOut();\n } else {\n dm.messageUserNotLoggedIn();\n }\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "boolean hasSecondField();", "public boolean isSetLoginType() {\n return this.loginType != null;\n }" ]
[ "0.58162004", "0.5611916", "0.54685843", "0.543044", "0.53700554", "0.53002495", "0.52810144", "0.5261662", "0.52585715", "0.5232723", "0.5203851", "0.51987714", "0.5158629", "0.51181364", "0.5107644", "0.5094892", "0.5051518", "0.50398093", "0.5038653", "0.50244623", "0.50193363", "0.5014315", "0.4977856", "0.49733835", "0.49685678", "0.4964101", "0.4951114", "0.4936748", "0.4931887", "0.4922328", "0.49206632", "0.49121168", "0.4900798", "0.48960584", "0.48754773", "0.48603454", "0.48598012", "0.48559675", "0.48516575", "0.48339695", "0.48315", "0.48285195", "0.4820556", "0.48101503", "0.4808255", "0.48075247", "0.48075247", "0.48075247", "0.48019484", "0.48008937", "0.480041", "0.47994086", "0.47884858", "0.47860178", "0.47806707", "0.47791758", "0.47787854", "0.47730592", "0.4758619", "0.47543374", "0.4752579", "0.4740173", "0.47387993", "0.4735028", "0.4735028", "0.47152823", "0.4713284", "0.47101167", "0.4708248", "0.470766", "0.4703259", "0.47008324", "0.46979043", "0.46972182", "0.46948943", "0.46945494", "0.46792462", "0.46713302", "0.46706083", "0.46702108", "0.4669457", "0.46625125", "0.4661602", "0.46582246", "0.4655366", "0.46552855", "0.46477237", "0.4645079", "0.46382317", "0.4616716", "0.46147537", "0.46147537", "0.46101582", "0.46045473", "0.46036956", "0.4601997", "0.46016034", "0.45979005", "0.45950028", "0.4592891" ]
0.81621975
0
Log.d(TAG, "signInWithEmail:onComplete:" + task.isSuccessful());
@Override public void onComplete(@NonNull Task<AuthResult> task) { if (!task.isSuccessful()) { Log.w("ContentValues", "signInWithEmail", task.getException()); Toast.makeText(loginActivity.this, "Authentication failed.", Toast.LENGTH_SHORT) .show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }", "@Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\n Toast.makeText(loginActivity.this, \"login successful\",\r\n Toast.LENGTH_SHORT).show();\r\n // If sign in fails, display a message to the user. If sign in succeeds\r\n // the auth state listener will be notified and logic to handle the\r\n // signed in user can be handled in the listener.\r\n if (!task.isSuccessful()) {\r\n //Log.w(TAG, \"signInWithEmail:failed\", task.getException());\r\n Toast.makeText(loginActivity.this, \"login failed\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n // ...\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(!task.isSuccessful())\r\n {\r\n Toast.makeText(MainActivity.this,\"Some Error Occured,Please try again later\",Toast.LENGTH_LONG).show();\r\n }\r\n if(task.isSuccessful())\r\n {\r\n Toast.makeText(MainActivity.this,\"Regristration Successful\",Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n\n Toast.makeText(RegistroActivity.this,\"Se ha registrado el usuario con el email: \"+ TextEmail.getText(),Toast.LENGTH_LONG).show();\n Intent intent = new Intent(RegistroActivity.this, LoginActivity.class);\n startActivity(intent);\n }\n else{\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisión\n Toast.makeText(RegistroActivity.this, \"Ese usuario ya existe \", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegistroActivity.this, \"No se pudo registrar el usuario \", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful())\n {\n addNewUserData(auth.getUid(), email, username);\n if (onCompleteListener != null) {\n onCompleteListener.onComplete(task);\n }\n }\n else\n {\n Toast.makeText(activity, \"faile to register ,Invalid email address Or the email is already registered\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n signUserIn(emailX);\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n progressBar.dismiss();\n setSnackBar(linearLayout,\"Check Your Email and Password\");\n // there was an error\n } else {\n progressBar.dismiss();\n session.createLoginSession(loginemail,loginpassword);\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n editor = settings.edit();\n editor.putString(\"password\", loginpassword);\n editor.putString(\"email\",loginemail);\n String key = loginemail.replace(\"@\",\"1\");\n String uniqkey = key.replace(\".\",\"2\");\n editor.putString(\"uid\", uniqkey);\n editor.commit();\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Add new Flag to start new Activity\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n Toasty.success(LoginActivity.this,\"Login Successfull\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(LoginActivity.this, \"Login Succesful\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(LoginActivity.this,HomeActivity.class));\n }\n else{\n Toast.makeText(LoginActivity.this, \"Error \" + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n //check password and username before proceeding to login page\n Intent intent = new Intent(MainActivity.this, LoginSuccessActivity.class);\n intent.putExtra(\"USERNAME\", inputUsername);\n intent.putExtra(\"PASSWORD\", inputPassword);\n startTrackerService();\n startActivityForResult(intent, 1);\n } else {\n // password does not match email\n Toast.makeText(MainActivity.this, \"Invalid Password\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user.isEmailVerified()) {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Intent intent = new Intent(LoginActivity.this, VerifyEmailScreen.class);\n startActivity(intent);\n }\n finish();\n }\n }", "public void callSignIn(String email, String password) {\n\n // progress bar\n\n\n\n progress = new ProgressDialog(LoginActivity.this);\n progress.setTitle(\"Sign In !!\");\n progress.setMessage(\"Please Wait !!\");\n progress.setCancelable(true);\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(\"TESTING\", \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n\n\n\n if (!task.isSuccessful()) {\n progress.dismiss();\n Log.w(\"TESTING\", \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, \"Signin Failed\",\n Toast.LENGTH_SHORT).show();\n } else {\n\n Intent signInIntent = new Intent(LoginActivity.this,AppoinmentBookingProfile.class);\n startActivity(signInIntent);\n finish();\n }\n\n // ...\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n\n if (!task.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Registration failed, Check your Network Connection!\", Toast.LENGTH_SHORT).show();\n } else {\n onAuthSuccess(task.getResult().getUser());\n //Toast.makeText(RegisterActivity.this, \"we will make pass of login here\", Toast.LENGTH_SHORT).show();\n //finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"Logado com sucesso!\", Toast.LENGTH_LONG).show();\n Intent i = new Intent(getApplicationContext(), ActivityPrincipal.class);\n startActivity(i);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Erro ao efetuar login!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"Cadastro concluido com sucesso!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Falha ao criar cadastro!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.INVISIBLE);\n if (!task.isSuccessful()) {\n // there was an error\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n } else {\n if(rememberMe.isChecked()){\n rememberMe(email,password);\n }else{\n deleteUser();\n }\n //Toast.makeText(getApplicationContext(), auth.getUid(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(LoginActivity.this, MainNavigationActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // make the progressBar invisible\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }\n });\n\n }", "private void signIn(String email, String password){\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n // ...\n }\n });\n }", "public void checkLogin() {\n String username = ((EditText) findViewById(R.id.Username)).getText().toString();\n String password = ((EditText) findViewById(R.id.Password)).getText().toString();\n final TextView feedback = (TextView) findViewById(R.id.feedback);\n mAuth.signInWithEmailAndPassword(username, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"LOG IN\", \"signInWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"LOGIN\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n feedback.setText(\"FAIL!\");\n }\n\n // ...\n }\n });\n\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(Signup.this,\"Signup Succcessful\",Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n userProfileChangeRequest = new UserProfileChangeRequest.Builder().setDisplayName(name).build();\n firebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n firebaseUser.updateProfile(userProfileChangeRequest);\n UsersInfo user = new UsersInfo(name, phone, mail, \"\");\n database.child(userAuth.getCurrentUser().getUid()).setValue(user);\n userRegister.onRegisterSuccess();\n } else {\n if (task.getException().getMessage().equals(\"The email address is already in use by another account.\")) {\n userRegister.onMailExistedError();\n }\n if (task.getException().getMessage().equals(\"The email address is badly formatted.\")) {\n userRegister.onMailFormatError();\n }\n }\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }", "public void createAccount (String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n //Sign in existing users\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n //if email and password are match it goes to other activity other wise show toast message\n startActivity(new Intent(getApplicationContext(), dashboard.class));\n\n } else {\n Toast.makeText(login_form.this,\"Invalid User\",Toast.LENGTH_LONG).show();\n\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n sentReset(finalInputUsername);\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(Resetpasswordpage.this, \"Email Sent\", Toast.LENGTH_SHORT).show();\n Intent resetpasswordintent = new Intent(Resetpasswordpage.this, Loginpage.class);\n startActivity(resetpasswordintent);\n //close activity when done\n finish();\n } else {\n //otherwise create new toast (error)\n Toast.makeText(Resetpasswordpage.this, \"Please enter correct details\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LogInActivity.this, \"Login success\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), SelectionActivity.class));\n finish();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n } else {\n Toast.makeText(LogInActivity.this, \"Your email or password is incorrect \"+task.getException(), Toast.LENGTH_SHORT).show();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup\n\n if (task.isSuccessful()) {\n // si el usuario se encontraba creado entonces la tarea es exitosa\n\n int pos = email.indexOf(\"@\");\n userstring = email.substring(0, pos); //consigue el nombre del usuario\n Toast.makeText(Login.this, \"Bienvenido: \" + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail\n Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad\n intencion.putExtra(\"user\", email); // le pasa como dato al usuario ingresado a la proxima actividad\n startActivity(intencion); //hay que hacer el get del usuario en la parte principal\n // userapasar = user;\n loged = true;\n\n } else {\n loged = false;\n\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn\n\n Toast.makeText(Login.this, \"Procesando\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"\", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {\n try {\n GoogleSignInAccount account = completedTask.getResult(ApiException.class);\n\n // Signed in successfully, show authenticated UI.\n accountEmail = account.getEmail();\n updateUI(account.toString());\n } catch (ApiException e) {\n // The ApiException status code indicates the detailed failure reason.\n updateUI(\"not Signed In\");\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //startActivity(new Intent(MainActivity.this, VentanaInicio.class));\n Intent intent = new Intent(getApplicationContext(), VentanaInicio.class);\n\n intent.putExtra(\"string_usuario\", email);\n\n startActivity(intent);\n //finish es para que no pueda volver a la pantalla anterior\n finish();\n }\n //Si no\n else {\n Toast.makeText(MainActivity.this, \"No se pudo iniciar la sesión, compruebe los datos\", Toast.LENGTH_SHORT).show();\n }\n }", "public void authenticateemail(final String email, final String pass){\n\n mAuth2.createUserWithEmailAndPassword(email, pass)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"MAIN\", \"createUserWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n linking(email,pass);\n //Log.d(\"MAIN\", \"yupyup\"+user.getUid());\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"MAIN\", \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(otherinfoActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private void signInUidPass(){\n mAuth.signInWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(Constants.TAG, \"signInwithEmail: onComplete:\" + task.isSuccessful());\n if(!task.isSuccessful()){\n Log.w(Constants.TAG, \"signInwithEmail: failed\", task.getException());\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful())\n {\n //verifier si l'utilisateur est etudiant ou volontaire pour le diriger\n startActivity(new Intent(getActivity(), profil_etd.class));\n }\n }", "private void userRegister(String email, String password)\n {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n // if successful, send email verification\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void attemptLogin() {\n\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n if (email.isEmpty())\n if (email.equals(\"\") || password.equals(\"\")) return;\n Toast.makeText(this, \"Login in progress...\", Toast.LENGTH_SHORT).show();\n\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n //Log.d(\"Memorization Game\", \"signInWithEmail() onComplete: \" + task.isSuccessful());\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }\n });\n\n\n }", "private void sendEmailVerification(){\n FirebaseUser firebaseUser = mfirebaseAuth.getCurrentUser();\n if(firebaseUser!=null){\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(SignUpActivity.this, \"Successfully Registered, Verification E-mail sent!\", Toast.LENGTH_SHORT).show();\n mfirebaseAuth.signOut();\n finish();\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\n }else {\n Toast.makeText(SignUpActivity.this, \"Verification email could not be sent, please try again later\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n }", "void signInComplete();", "@Override\n\tpublic void onSignInSucceeded() {\n\n\t}", "@Override\n public void onComplete(@NonNull Task<String> task) {\n if (!task.isSuccessful()) {\n Log.w(TAG, \"Fetching FCM registration token failed\", task.getException());\n return;\n } else {\n Log.i(TAG, \"onComplete: firbaSE GOT A TOKEN\");\n }\n\n // Get new FCM registration token\n String token = task.getResult();\n\n\n }", "@Override\n public void onClick(View v) {\n\n mAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n messageDisplay.setText(\"Reset Email Sent Successfully!\");\n Toast.makeText(ForgotPasswordActivity.this, \"Reset Email Sent Successfully!\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n //display some message here\n messageDisplay.setText(\"User Does Not Exist\");\n Toast.makeText(ForgotPasswordActivity.this, \"User Does Not Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void authUser(String email, String password){\n firebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: user logged in successfully\");\n Snackbar.make(view, \"User has logged in\", Snackbar.LENGTH_LONG).show();\n goToMainActivity();\n }\n if(!task.isSuccessful()){\n Log.d(TAG, \"onComplete: user's credentials're incorrect\");\n Snackbar.make(view, \"Login or password is incorrect\", Snackbar.LENGTH_LONG).show();\n }\n }\n });\n }", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "@Override\n public void onClick(View v) {\n if (!validate(\"\" + username.getText())) {\n// Toast.makeText(activity, \"Email nn valid\", Toast.LENGTH_LONG).show();\n Log.w(\"EMAIL_PASS\", \"Email nn valid\");\n }\n else if (password.getText().length() < 6){\n Log.w(\"ERROR_PASS\", \"password must be > 6\");\n } else{\n mFirebaseAuth.signInWithEmailAndPassword(\"\" + username.getText(), \"\" + password.getText())\n .addOnCompleteListener(activity, task -> {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"signInWithEmail\", \"signInWithEmail:success\");\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n startActivity(new Intent(activity, home.class));\n finish();\n// updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"FAILER AUTH\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n// updateUI(null);\n // ...\n }\n//\n });\n // Log.w(\"FIREBASE\", String.valueOf(mFirebaseAuth.getCurrentUser()));\n // Toast.makeText(getApplicationContext(), \"\" + mFirebaseAuth.getUid(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //caso sucesso ao fazer login usuario\n if (task.isSuccessful()){\n progressBarLogin.setVisibility(View.GONE);\n //instancio a activity de destino\n startActivity(new Intent(getApplicationContext(),SolicitacaoAreaActivity.class));\n finish();//fecha a activity atual\n }else{\n Toast.makeText(AutentinticacaoActivity.this,\n \"Erro ao fazer login\",\n Toast.LENGTH_SHORT).show();\n progressBarLogin.setVisibility(View.GONE);\n }\n\n\n }", "@Override\n public void onComplete(@NonNull Task<Void> task2) {\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n } else {\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "public void SignUp2(View view){\n\n mFirebaseAuth.createUserWithEmailAndPassword(EditEmail.getText().toString(),EditPass.getText().toString())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n saveUser(EditFirstName.getText().toString(),EditLastName.getText().toString(),EditEmail.getText().toString(),SelectSpinner.getSelectedItem().toString());\n mUserDatabaseReference.push().setValue(mClassUser);\n EditFirstName.setText(\"\");\n EditLastName.setText(\"\");\n EditEmail.setText(\"\");\n EditPass.setText(\"\");\n\n if (!task.isSuccessful()) {\n// Toast.makeText(ActivitySignup.this, \"failed to sign up\",\n// Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n userModel.setIdUrl(uri.toString());\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(userModel.getEmail(), userModel.getPassword())\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseFirestore.getInstance().collection(\"USERS\").add(userModel)\n .addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Registered Successfully\", Toast.LENGTH_SHORT).show();\n\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n startActivity(intent);\n } else\n Toast.makeText(RegisterActivity.this, \"\" + task1.getException(), Toast.LENGTH_SHORT).show();\n\n });\n\n } else\n Toast.makeText(RegisterActivity.this, \"\" + task.getException(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n }", "public void registerUser(String email, String password){\n fbAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n updateUI(user);\n Toast.makeText(Signup.this, \"Registration success.\",\n Toast.LENGTH_SHORT).show();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(Signup.this, \"Registration failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private Boolean loginUserToAccount() {\n String email = userEmail.getText().toString();\n String password = userPassword.getText().toString();\n // perform validations\n if(email.isEmpty()){\n Toast.makeText(this,\"Please Enter Email\",Toast.LENGTH_SHORT).show();\n }\n else if(password.isEmpty()){\n Toast.makeText(this,\"Please Enter Password\",Toast.LENGTH_SHORT).show();\n }\n else{\n\n loadingBar.setTitle(\"Login\");\n loadingBar.setMessage(\"Please wait, while we log into your account\");\n loadingBar.show();\n loadingBar.setCanceledOnTouchOutside(true);\n\n // Create user at firebase using email\n mAuth.signInWithEmailAndPassword(email,password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n loadingBar.dismiss();\n if(task.isSuccessful()){\n sendUserToMainActivity();\n Toast.makeText(LoginActivity.this, \"Login succesfully\", Toast.LENGTH_SHORT).show();\n }\n else{\n String errMessage = task.getException().getMessage();\n Toast.makeText(LoginActivity.this, \"Error in login: \"+errMessage, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n return true;\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n startActivity(new Intent(LoginPage.this, HomePage.class));\n\n } else {\n //if user failed to login, toast message is displayed\n Toast.makeText(LoginPage.this, \"User not found or Incorrect password\", Toast.LENGTH_LONG).show();\n userEmail.setText(\"\");\n userPassword.setText(\"\");\n }\n }", "public void onComplete(@NonNull Task<Void> task) {\n firebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n Intent intent = new Intent(Profile.this, Login.class);\n Pair[] pairs = new Pair[3];\n pairs[0] = new Pair<View, String>(welcomeTV, \"logo_text\");\n pairs[1] = new Pair<View, String>(usernameTV, \"slogan_text\");\n pairs[2] = new Pair<View, String>(signOutButton, \"sign_in_tran\");\n ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Profile.this, pairs);\n //startActivity(intent, options.toBundle());\n startActivity(intent);\n overridePendingTransition(0, 0);\n finish();\n }", "private void callRegisterByEmailToGoogleFirebase(){\n mFirebaseAuth = FirebaseAuth.getInstance();\n\n String userEmail = mEmailAddress.getText().toString();\n String userPassword = mPassword.getText().toString();\n\n // create the user with email and password\n mFirebaseAuth.createUserWithEmailAndPassword(userEmail,userPassword).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n showBottomSnackBar(\"Corresponding Firebase User Created\");\n }else{\n showBottomSnackBar(\"Firebase User Creation Fails\");\n }\n\n replaceActivity(MainActivity.class, null);\n }\n });\n\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n // showProgressDialog();\n\n // [START create_user_with_email]\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"createUserWithEmail:success\");\n //Toast.makeText(RegistrarActivity.this, \"Usuario creado correctamente, acepte su email de verificación para continuar\", Toast.LENGTH_SHORT).show();\n FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser();\n user.sendEmailVerification();\n ConstraintLayout constraintLayout=(ConstraintLayout)findViewById(R.id.layoutRegistrar);\n Snackbar snackbar=Snackbar.make(constraintLayout,\"Usuario creado correctamente, acepte su email de verificación\",Snackbar.LENGTH_LONG);\n snackbar.setAction(\"Ir a Login\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent=new Intent(getApplicationContext(),LoginActivity.class);\n startActivity(intent);\n }\n });\n snackbar.show();\n //updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegistrarActivity.this, \"Autenticación fallida.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // [START_EXCLUDE]\n //hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END create_user_with_email]\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Util.Log.i(TAG, \"onActivityResult: requestCode: %b resultCode: %b\", requestCode == RC_SIGN_IN,\n resultCode==Activity.RESULT_OK);\n if (requestCode == RC_SIGN_IN) {\n// IdpResponse response = IdpResponse.fromResultIntent(data);\n GoogleSignInResult response = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n // Successfully signed in\n if (resultCode == Activity.RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n account = task.getResult(ApiException.class);\n AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken()\n , null);\n mAuth.signInWithCredential(credential).addOnCompleteListener(this);\n\n } catch (ApiException e) {\n Util.Log.d(TAG, \"sign in attempt failed\");\n progressMsg.setText(getString(R.string.progress_failed_signin));\n }\n } else {\n // Sign in failed\n\n progressBar.setVisibility(View.GONE);\n if (response == null) {\n Log.d(TAG, \"null response object\");\n progressMsg.setText(getString(R.string.progress_null_response));\n return;\n }\n int gStatusCode = response.getStatus().getStatusCode();\n Log.d(TAG, String.format(\"failed sign-in in response:(%d) %s\",gStatusCode, response.toString()));\n switch (gStatusCode) {\n case CommonStatusCodes.NETWORK_ERROR:\n case CommonStatusCodes.TIMEOUT:\n progressMsg.setText(getString(R.string.progress_no_internet));\n break;\n default:\n progressMsg.setText(GoogleSignInStatusCodes\n .getStatusCodeString(gStatusCode));\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void authSignInResult() {\n userEmail = sharedPreferences.getString(getString(R.string.shared_prefs_key_email), \"\");\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(userEmail).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot appleSnapshot : dataSnapshot.getChildren()) {\n\n member = appleSnapshot.getValue(Member.class);\n String loginType = member.getLoginType().trim();\n if (loginType.equals(getString(R.string.login_type_auth))) {\n String key = appleSnapshot.getKey();\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n firebaseKey = key;\n getUserDetailsFromFirebase();\n userName = member.getUsername();\n String userPhotoUrlString = member.getPhotoUrl();\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrlString);\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.apply();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if(task.isSuccessful()){\n Toast.makeText(RegistrationActivity.this, \"User has been registered successfully!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n\n //Then redirect to login layout\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n\n }", "private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {\n IdpResponse response = result.getIdpResponse();\n if (result.getResultCode() == RESULT_OK) {\n // Successfully signed in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n // ...\n } else {\n // Sign in failed. If response is null the user canceled the\n // sign-in flow using the back button. Otherwise check\n // response.getError().getErrorCode() and handle the error.\n // ...\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n mCallbackManager.onActivityResult(requestCode, resultCode, data); // DATA CALLBACK FOR FACEBOOK\n if (data != null) {\n progressDialog.show();\n progressDialog.setMessage(\"Logging you in...\");\n if (requestCode == 9001 && resultCode == RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n assert account != null;\n firebaseAuthWithGoogle(account.getIdToken());\n } catch (ApiException e) {\n e.printStackTrace();\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }else {\n progressDialog.dismiss();\n }\n }", "private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {\n try {\n GoogleSignInAccount account = completedTask.getResult(ApiException.class);\n // Signed in successfully, show authenticated UI.\n// LoggerHelper.showDebugLog(\"Account: \" + account.toJson());\n\n FormSocialUser formSocialUser = new FormSocialUser();\n formSocialUser.setSocialID(account.getId());\n formSocialUser.setFirstName(account.getFamilyName() == null || account.getFamilyName().isEmpty() ? account.getGivenName() : account.getFamilyName());\n formSocialUser.setLastName(account.getGivenName());\n formSocialUser.setEmail(account.getEmail());\n formSocialUser.setSocialType(SocialType.GOOGLE.getValue());\n\n loginWithSocialAccount(prepareSocialLoginForm(formSocialUser));\n\n } catch (ApiException e) {\n Toast.makeText(this, \"Unable to login with google account. Please try another way.\", Toast.LENGTH_SHORT).show();\n LoggerHelper.showErrorLog(\"signInResult:failed code=\", e);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBarlogin.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = mAuth.getCurrentUser();\n String email = user.getEmail();\n String uid = user.getUid();\n HashMap<Object,String> hashMap = new HashMap<>();\n hashMap.put(\"email\", email);\n hashMap.put(\"uid\", uid);\n hashMap.put(\"onlineStatus\", \"online\");\n hashMap.put(\"typingTo\",\"noOne\");\n hashMap.put(\"username\", \"\");\n hashMap.put(\"phone\", \"\");\n hashMap.put(\"image\",\"\");\n hashMap.put(\"cover\",\"\");\n // path to store data\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference reference = database.getReference(\"Users\");\n reference.child(uid).setValue(hashMap);\n Intent intent = new Intent(MainActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n if(!mAuth.getCurrentUser().isEmailVerified()){\n PopupEmailVerification popupEmailVerification = new PopupEmailVerification(StartPage.this);\n popupEmailVerification.show();\n }\n else{\n //User found & ready for next page\n Toast.makeText(StartPage.this, \"Sign in successful\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(StartPage.this, CenterPage.class));\n finish();\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n tvOopsWrongPassword.setVisibility(View.VISIBLE);\n }\n }", "public void callLogin(View view) {\n /*\n if (email.isEmpty() || password.isEmpty()) {\n Toast.makeText(this, \"Ingrese campos\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n loginPanel.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isSuccessful());\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isComplete());\n\n if (!task.isSuccessful()) {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.d(TAG, \"Inicio sesion malo: \" + task.getException());\n Log.d(TAG, \"Inicio sesion malo: \" + task.getResult());\n Toast.makeText(LoginActivity.this, \"Email o Contraseña Incorrectos\", Toast.LENGTH_SHORT).show();\n }\n }\n });*/\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.password_requirement));\n } else {\n Toast.makeText(getActivity(), \"Masukkan Data dengan Benar\", Toast.LENGTH_LONG).show();\n }\n } else {\n if (auth.getCurrentUser() != null) {\n Toast.makeText(getActivity(), \"Login Berhasi\", Toast.LENGTH_SHORT).show();\n }\n else{\n System.out.println(\"NO LOGGED\");\n }\n }\n }", "@Override\n protected void onPostExecute(String result) {\n Toast.makeText(context, \"Email Delivery: \"+result, Toast.LENGTH_SHORT).show();\n setResult(RESULT_OK);\n finish();\n }", "private void signIn(String email, String password) {\n Log.d(TAG, \"signIn:\" + email);\n if (!validateForm()) {\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n Log.d(TAG, \"signInWithEmail:success\");\n\n startActivity(new Intent(LoginActivity.this , MainActivity.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n if (!task.isSuccessful()) {\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n if(task.isSuccessful())\n {\n //write an activity here you want to go but for the time being let us use toast message\n\n// sendToMain();\n\n// Toast.makeText(LoginActivity.this,\"successfull\",Toast.LENGTH_LONG).show();\n\n //i added this see it\n Intent intent=new Intent(LoginActivity.this,IntentToOperations.class);\n startActivity(intent);\n }else{\n String errorMessage=task.getException().getMessage();\n Toast.makeText(LoginActivity.this,\"error :\"+errorMessage,Toast.LENGTH_LONG).show();\n }\n\n// loginProgress.setVisibility(View.VISIBLE);//after successfull login\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Log.d(\"check\", \"in onActivityResult\");\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Log.d(\"sign in\", \"1\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n if (result.isSuccess()) {\n // session.setLogin(true);\n\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = result.getSignInAccount();\n firebaseAuthWithGoogle(account);\n } else {\n Log.d(\"failed to google signin\", \"10\");\n // Google Sign In failed, update UI appropriately\n // [START_EXCLUDE]\n // updateUI(null);\n // [END_EXCLUDE]\n }\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (task.isSuccessful()) {\n ((MainActivity)getContext()).setFirebaseAuth(FirebaseAuth.getInstance());\n ((MainActivity)getContext()).setFirebaseUser(FirebaseAuth.getInstance().getCurrentUser());\n if (profileFragment == null)\n profileFragment = new ProfileFragment();\n outerTransaction(profileFragment);\n } else {\n Toast.makeText(getContext(), task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "public void onClick_AGSU_signUp(View view) {\n AnimationTools.startLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING, this, signUpButton_rootLayout, R.style.AGSU_loading_progress_bar);\n\n FirestoreManager.saveUserData(SecondarySignUpManager.getDatabaseUser());\n\n //add a password-email auth method\n AuthCredential credential = EmailAuthProvider.getCredential(SecondarySignUpManager.getDatabaseUser().getEmail(), SecondarySignUpManager.getDatabaseUser().getPassword());\n AuthenticationManager.getCurrentUser().linkWithCredential(credential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n System.out.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: link with email credential SUCCESSFUL! User uid = \" + task.getResult().getUser().getDisplayName());\n Constants.isSignUpInProcess = false; //sign up is now finished\n\n //in AGSU user is always new --> send verification email\n EmailVerification.sendVerificationEmail();\n\n Constants.isSecondarySignUpInProcess = false; //end of secondary sign up process\n\n ActivityTools.startNewActivity(activityContext, MainActivity.class);\n } else {\n System.err.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: ERROR: link with email credential FAILED! \" + task.getException().getMessage());\n }\n\n AnimationTools.stopLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING);\n }\n });\n\n }", "@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}", "public void resendVerificationEmail(){\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n mAuth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n alertDialogBuilderSentSuccessMessage(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Sent email successfully.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n\n progressDialog.dismiss();\n }\n });\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n firebaseAuthWithGoogle(account);\n\n } catch (ApiException e) {\n // Google Sign In failed, update UI appropriately\n Log.w(TAG, \"Google sign in failed\", e);\n // [START_EXCLUDE]\n updateUI(null);\n // [END_EXCLUDE]\n }\n }else {\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n tPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(TeacherLoginActivity.this,getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n }\n else {\n task.isSuccessful();\n startActivity(new Intent(TeacherLoginActivity.this, TeaMainScreen.class));\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "private void userLogin() {\n String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n if(email.isEmpty()) {\n editTextEmail.setError(\"Email is required!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n editTextEmail.setError(\"Please enter a valid email!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(password.isEmpty()){\n editTextPassword.setError(\"Password is required!\");\n editTextPassword.requestFocus();\n return;\n }\n\n if(password.length() < 6) {\n editTextPassword.setError(\"Min password length is 6 characters!\");\n editTextPassword.requestFocus();\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if(user.isEmailVerified()) {\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else{\n user.sendEmailVerification();\n Toast.makeText(LoginActivity.this, \"Check your email to verify your account!\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login! Please check your credentials\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n\n\n }", "@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }", "@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }", "public void signIn(String email, String password) {\n\n // Validate the form, make sure that fields are filled in\n if (!validateForm()) {\n return;\n }\n\n loginBtn.setEnabled(false);\n startLoadAnim(getString(R.string.logging_in));\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Log.w(TAG, \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, R.string.auth_failed, Toast.LENGTH_SHORT).show();\n stopLoadAnim();\n loginBtn.setEnabled(true);\n }\n\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n passwordW.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(SignUpActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n\n FirebaseUser user = auth.getCurrentUser();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setDisplayName(dpName)\n .build();\n\n user.updateProfile(profileUpdates)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignUpActivity.this, \"User Created! Welcome to Udghosh.\", Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(SignUpActivity.this, \"Cannot connect to servers right now.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n mDatabase.child(\"app\").child(\"users\").child(user.getUid()).setValue(phoneNumber);\n\n Intent intent = new Intent(SignUpActivity.this, HomeActivity.class);\n startActivity(intent);\n finish();\n }\n }", "private void signIn() {\n final String email = ((EditText)findViewById(R.id.etSignInEmail)).getText().toString();\n final String password = ((EditText)findViewById(R.id.etSignInPassword)).getText().toString();\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success\n updateUI();\n } else {\n // Sign in failure\n Toast.makeText(LoginActivity.this, \"Incorrect email and/or password.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n //inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login failed\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login successful!\", Toast.LENGTH_LONG).show();\n //finish();\n }\n }", "private void handleSignInResult(GoogleSignInResult result) {\n Log.v(\"SIGNIN STATUS\", \"SIGNIN RESULT: \" + result.getStatus().getStatusMessage());\n Log.v(\"SIGNIN STATUS\", \"SIGNIN CODE: \" + result.getStatus().getStatusCode());\n if (result.isSuccess()) {\n // Signed in successfully\n GoogleSignInAccount acct = result.getSignInAccount();\n IlliniBusApplication myApplication = (IlliniBusApplication) getApplication();\n myApplication.signIn(acct);\n Intent intent = new Intent(StartActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Toast.makeText(getApplicationContext(), \"Failed to Login!\",\n Toast.LENGTH_LONG).show();\n }\n }", "public void onComplete(@NonNull Task<Void> task) {\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }", "public void signInWithCredential(PhoneAuthCredential credential) {\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult> () {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\nemailVerificationProgressBar.setVisibility (View.GONE);\n new CallUtils ().uidSignUp (phoneNo, address, address, address, username, address, actionProfileVerificationInstance, getContext (), email, password);\n\n\n } else {\n emailVerificationProgressBar.setVisibility (View.GONE);\n Toast.makeText(getContext (), task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n String userToken = fetchUserToken(mEmail, mPassword);\n mTanker.open(mEmail, userToken).then((openFuture) -> {\n if (openFuture.getError() != null) {\n return null;\n }\n\n if (mSignUp) {\n mTanker.generateAndRegisterUnlockKey().then((unlockKeyFuture) -> {\n if (unlockKeyFuture.getError() != null) {\n mError = 1;\n return null;\n }\n runOnUiThread(() -> {\n Intent intent = new Intent(LoginActivity.this, SaveUnlockKeyActivity.class);\n intent.putExtra(\"EXTRA_UNLOCK_KEY\", unlockKeyFuture.get());\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n return null;\n });\n }\n else {\n runOnUiThread(() -> {\n // Redirect to the MainActivity\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n }\n return null;\n });\n } catch (ConnectException e) {\n Log.i(\"TheTankerShow\", \"Server Connection error\", e);\n mError = 503;\n } catch (IOException e) {\n Log.i(\"TheTankerShow\", \"Login error\", e);\n return false;\n } catch (Throwable e) {\n Log.e(\"TheTankerShow\", \"Other error\", e);\n return false;\n }\n\n return true;\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n\n saveUser save = new saveUser(registerEmailString, registerPassword);\n FirebaseDatabase.getInstance().getReference(\"Register\").child(FirebaseAuth.\n getInstance().getCurrentUser().getUid()).setValue(save).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Sign up successful\", Toast.LENGTH_SHORT).show();\n\n pleaseWait.setVisibility(View.GONE);//\n Intent bac = new Intent(Sign_Up.this, Sign_In.class);\n startActivity(bac);\n\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Email already exist error\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n\n }\n }\n });\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Error try again\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n }\n }", "Task<Void> signUp(String email, String password);", "private void signIn(String email, String password){\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user.toString());\n accountEmail = user.getEmail();\n } else {\n // If sign in fails, display a message to the user.\n updateUI(\"Authentication failed\");\n }\n\n }\n });\n\n }", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "void onSignUpEmailRegistered();" ]
[ "0.86228204", "0.84089273", "0.77560735", "0.76394325", "0.76308966", "0.7592324", "0.7538918", "0.7530005", "0.74885976", "0.7445116", "0.7436002", "0.73585945", "0.7294236", "0.72671425", "0.7244479", "0.7194257", "0.7167886", "0.7114279", "0.7113086", "0.7110531", "0.71093065", "0.7069942", "0.70473975", "0.70473546", "0.70187306", "0.7002074", "0.69955134", "0.6985896", "0.6985802", "0.69611144", "0.69565076", "0.6940728", "0.6934392", "0.69283473", "0.6917633", "0.69069415", "0.6856995", "0.68444896", "0.68008167", "0.6794902", "0.67753345", "0.67629606", "0.671603", "0.6704206", "0.66744435", "0.6668772", "0.6653355", "0.66508025", "0.6641883", "0.6635256", "0.6601244", "0.65994525", "0.65914637", "0.6591394", "0.65710086", "0.65670574", "0.6565911", "0.6560663", "0.6552264", "0.6544921", "0.65434515", "0.6541939", "0.6540156", "0.6505916", "0.64923996", "0.6482738", "0.64791983", "0.647752", "0.64739656", "0.647264", "0.64718986", "0.64689565", "0.64378464", "0.64320683", "0.64314246", "0.6412396", "0.64088035", "0.64051664", "0.63808155", "0.63765454", "0.63724315", "0.63724315", "0.63560313", "0.63517404", "0.6345265", "0.6344955", "0.6344955", "0.6336778", "0.63306946", "0.63230884", "0.63205844", "0.63131326", "0.6299299", "0.62929463", "0.6289815", "0.6287745", "0.62871504", "0.62852633", "0.6270799", "0.6262519" ]
0.84727794
1
addListenerOnButton Listens to the buttons of this activity
public void addListenerOnButton() { //undoButton1 is the undo text for email text field undoButton1.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { mEmailView.setText(""); //clear text in text field } }); //undoButton2 is the undo text for password text field undoButton2.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { mPasswordView.setText(""); //clear text in text field } }); //button1 is the LOGIN button on this activity button1.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { //we need to check that both fields are NOT empty before we call attemptLogin() //get text from values entered and trim whitespace email = mEmailView.getText().toString().trim(); password = mPasswordView.getText().toString().trim(); //Detect empty fields before allowing user to continue to next activity if(TextUtils.isEmpty(email)){ //firstName is empty Toast.makeText(getApplicationContext(), "Please enter EMAIL", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } if(TextUtils.isEmpty(password)){ //lastName is empty Toast.makeText(getApplicationContext(), "Please enter PASSWORD", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } //User entered an text, but we need to check if text is valid email pattern wasEmailValid = isValidEmail(email); if (!(wasEmailValid)){ //email text is INVALID email pattern Toast.makeText(getApplicationContext(), "Please enter a valid EMAIL", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } //email text was valid email pattern //Both text fields were filled, so we allow user to continue //place logic here to do login action attemptLogin2(email,password); } }); //button2 is the BACK ARROW button button2 = ((ImageButton)findViewById(R.id.backtToStartButton)); button2.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { finish(); } }); //passwordreset is the text 'Password help?' passwordreset = ((Button)findViewById(R.id.passwordHelp)); passwordreset.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { //declare where you intend to go Intent intent = new Intent(loginActivity.this, resetPasswordActivity.class); //now make it happen startActivity(intent); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "public void listenButtons() {\n\n playGameButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mActivities = MyActivities.PLAY_GAME;\n startActivity();\n }\n });\n\n freePlayButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mActivities = MyActivities.FREE_PLAY;\n startActivity();\n }\n });\n\n informationIcon.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mActivities = MyActivities.POP_UP;\n startActivity();\n }\n });\n }", "void enablButtonListener();", "private void setButtonListener(Button button){\n \tfinal Context ctx = this.getActivity();\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent intent = new Intent(ctx, Questions_Tab_Activity.class);\n \t\t\t\tintent.putExtra(\"tagPressed\", tag);\n \t\t\t\tintent.putExtra(\"UserID\", userId);\n// \t\t\t\tif(multiTag)\n \t\t\t\t\tintent.putExtra(\"typeSearch\", 3);\n// \t\t\t\telse\n// \t\t\t\t\tintent.putExtra(\"typeSearch\", 1);\n \t\t\t\tstartActivity(intent);\n \t\t\t\t\n \t\t\t}\n \t\t});\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmButtonListener.onButtonListener();\n\t\t\t}", "void configureButtonListener();", "private void addButtonListener() {\n\t\trock.addActionListener(buttonListener);\n\t\tpaper.addActionListener(buttonListener);\n\t\tscissors.addActionListener(buttonListener);\n\t}", "private void registerListeners() {\r\n View.OnClickListener clickListener = new ButtonListener();\r\n btnStart.setOnClickListener(clickListener);\r\n btnStop.setOnClickListener(clickListener);\r\n }", "public void addListenerOnButton() {\n\n\t\telectionSpinner = (Spinner) findViewById(R.id.electionSpinner);\n\t\tvoterSpinner = (Spinner) findViewById(R.id.voterSpinner);\n\t\t\n\t\tbtnConfig = (Button) findViewById(R.id.btnConfig);\n\t\tbtnConfig.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\"OnClickListener : \" + \n\t\t\t\t\t\t\"\\nElectionSpinner 1 : \" + String.valueOf(electionSpinner.getSelectedItem()) +\n\t\t\t\t\t\t\"\\nVoterSpinner 2 : \" + String.valueOf(voterSpinner.getSelectedItem()),\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t});\n\n\t}", "private void setButtonListener() {\n for(CellButton[] buttonsRow : mainFrame.getButtons()) {\n for(CellButton button :buttonsRow) {\n button.addButtonListener(this);\n }\n }\n }", "public interface OnButtonClickedListener {\n public void onButtonClicked(View v);\n }", "private void setButtonOnClickListeners() {\n aboutUsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new AboutUsFragment());\n }\n });\n\n contactUsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new ContactUsFragment());\n }\n });\n\n upcomingEventsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new UpcomingEventsFragment());\n }\n });\n\n makeADonationButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new MakeADonationFragment());\n }\n });\n }", "public interface customButtonListener {\n public void onNavigateButtonClickListener(int position,String value);\n\n public void onFeedbackButtonClickListener(int position,String value);\n }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "void addScoreButtonListener() {\n Button leadButton = findViewById(R.id.leaderBoard);\n leadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n switchToActivity(ScoreBoardActivity.class);\n }\n });\n }", "@Override\n protected void onAfterSetContentView() {\n super.onAfterSetContentView();\n View.OnClickListener onClickListener = new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n switch (v.getId()) {\n case R.id.btn_scan:\n btnSignalScan();\n break;\n default:\n break;\n }\n }\n };\n btn_scan.setOnClickListener(onClickListener);\n }", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "private void onClickButtonListener(){\n\n button = (Button) findViewById(R.id.button);\n button2 = (Button) findViewById(R.id.button2);\n button3 = (Button) findViewById(R.id.button3);\n button5 = (Button) findViewById(R.id.button5);\n button6 = (Button) findViewById(R.id.button6);\n button7 = (Button) findViewById(R.id.button7);\n button8 = (Button) findViewById(R.id.button8);\n button9 = (Button) findViewById(R.id.button9);\n button10 = (Button) findViewById(R.id.button10);\n\n button.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,wellness_second_floor.class);\n startActivity(intent);\n }\n }\n );\n\n button2.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,wellness_first_floor.class);\n startActivity(intent);\n }\n }\n );\n\n button3.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,east_gym.class);\n startActivity(intent);\n }\n }\n );\n\n button5.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,multi_purpose_room.class);\n startActivity(intent);\n }\n }\n );\n\n button6.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,danceStudio.class);\n startActivity(intent);\n }\n }\n );\n\n button7.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,martial_arts_room.class);\n startActivity(intent);\n }\n }\n );\n\n button8.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,racquetball_courts.class);\n startActivity(intent);\n }\n }\n );\n\n button9.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this, pool.class);\n startActivity(intent);\n }\n }\n );\n\n button10.setOnClickListener(\n new View.OnClickListener(){\n public void onClick(View v){\n Intent intent = new Intent(MainActivity.this,activities_room.class);\n startActivity(intent);\n }\n }\n );\n\n }", "public interface customButtonListener {\n void onCommentButtonClickListener(int position);\n\n void onLikeButtonClickListener(int position);\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }", "public void onButtonAPressed();", "void addPersonalScoreButtonListener() {\n Button leadButton = findViewById(R.id.personalLeader);\n leadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n switchToActivity(PersonalScoreBoardActivity.class);\n }\n });\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnPlus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickPlus();\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnMinus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickMinus();\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t}", "private void setOnClickListeners() {\n now_playing_previous_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_play_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_next_button.setOnClickListener(this::handleTransportControls);\n }", "public void setListeners() {\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n settingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showEditDialog();\n }\n });\n\n cameraButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showChoosePictureDialog();\n }\n });\n }", "private void boundButtons() {\r\n \tsingleplayer = (Button) findViewById(R.id.single);\r\n \tsingleplayer.setTypeface(tf);\r\n \tsingleplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start a drawing surface for one player*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, DrawingActivitySingle.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n \t\r\n \tmultiplayer = (Button) findViewById(R.id.multi);\r\n \tmultiplayer.setTypeface(tf);\r\n \tmultiplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Connect to other users to start a drawing surface*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (multiplayer.isEnabled()) {\r\n\t\t\t\t\tmultiplayer.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\tinitMultiPlayer();\r\n\t\t\t\t}\r\n\t\t}});\r\n \t\r\n \toptions = (Button) findViewById(R.id.options);\r\n \toptions.setTypeface(tf);\r\n \toptions.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start the options menu */\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, Options.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n }", "public void button_clicked(View v) {\n mCallback.onButtonClicked(v);\n }", "private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }", "public interface OnButtonPressListener {\n void onButtonPress(Message message);\n }", "private void currentGamesBtnListener() {\n currentGamesBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new CurrentGamesScreen(game));\n }\n });\n }", "private void bindListener() {\n\t\tmSeekButton.setOnClickListener(this);\r\n\t}", "private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tllistenBtnset();\n\t\t\t}", "void onInputEvent(View view, int buttons);", "private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void addListenerOnButton() {\n\n\t\tspinner1 = (Spinner) findViewById(R.id.spinner1);\n\t\t\n\t\t\n\t\tbtnSubmit = (Button) findViewById(R.id.btnSubmit);\n\n\t\tbtnSubmit.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tString text1=\"O'Connor Hospital,2105 Forest Ave,CA 95128\";\n\n\t\t\t\tIntent geoIntent = new Intent (android.content.Intent.ACTION_VIEW, Uri.parse (\"geo:0,0?q=\" + text1)); // Prepare intent\n\t\t\t\tstartActivity(geoIntent);\n\t\t\t}\n\n\t\t});\n\n\t}", "private void setClickListeners() {\n buttonSomethingWentWrong.setOnClickListener(this);\n buttonSuggestion.setOnClickListener(this);\n buttonHighlightRequest.setOnClickListener(this);\n closeButton.setOnClickListener(this);\n }", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "public void addListener(ClickListener listener);", "private void initListeners() {\n appCompatButtonLogin.setOnClickListener(this);\n }", "public void connectButtonListener()\n {\n final Context context = Monitoring.this;\n btnConnectDisconnect = (Button) findViewById(R.id.btn_select);\n\n btnConnectDisconnect.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View arg0)\n {\n if (!mBtAdapter.isEnabled())\n {\n Log.i(TAG, \"onClick - Bluetooth not enabled yet\");\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else\n {\n if (btnConnectDisconnect.getText().toString().equals(\"Connect\"))\n {\n //Connect button pressed, open DeviceListActivity class,\n // with popup windows that scan for devices...\n Intent newIntent = new Intent(context, Scanner.class);\n startActivityForResult(newIntent, REQUEST_SELECT_DEVICE);\n }\n else\n {\n //Disconnect button pressed\n if (mDevice != null)\n {\n mService.disconnect();\n }\n }\n }\n }\n });\n }", "private void setListener() {\n Log.d(TAG, \"TAG - MainActivity - setListener()\");\n\n if (buttonShow != null) {\n buttonShow.setOnClickListener( view -> showPicture());\n }\n }", "private void callEventListener(){\n //Listener for Button add service\n btn_Appointment.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogCreateAppointment();\n }\n }\n );\n\n }", "private void setListeners() {\r\n \t/*----------------------------\r\n\t\t * 1. Buttons\r\n\t\t\t----------------------------*/\r\n\t\t//\r\n \tButton bt_create = (Button) findViewById(R.id.db_manager_btn_create_table);\r\n \tButton bt_drop = (Button) findViewById(R.id.db_manager_btn_drop_table);\r\n \tButton bt_register_patterns = \r\n \t\t\t\t\t\t(Button) findViewById(R.id.db_manager_btn_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 2. Tags\r\n\t\t\t----------------------------*/\r\n \tbt_create.setTag(Methods.ButtonTags.db_manager_activity_create_table);\r\n \tbt_drop.setTag(Methods.ButtonTags.db_manager_activity_drop_table);\r\n \tbt_register_patterns.setTag(Methods.ButtonTags.db_manager_activity_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3. Listeners\r\n\t\t * \t\t1. OnClick\r\n\t\t * \t\t2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t/*----------------------------\r\n\t\t * 3.1. OnClick\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_drop.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_register_patterns.setOnClickListener(new ButtonOnClickListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3.2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_drop.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_register_patterns.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 4. Disenable => \"Create table\"\r\n\t\t\t----------------------------*/\r\n// \tbt_create.setEnabled(false);\r\n \t\r\n\t}", "public void clickedButton(View view) {\n\n switch (view.getId()) {\n case R.id.contactBook:\n intent = new Intent(this, ContactBookActivity.class);\n startActivity(intent);\n break;\n case R.id.message:\n intent = new Intent(this, SMS_Activity.class);\n startActivity(intent);\n break;\n case R.id.fav_contacts:\n intent = new Intent(this, ContactGridActivity.class);\n startActivity(intent);\n break;\n case R.id.lastCall:\n intent = new Intent(this, LatestCallsActivity.class);\n startActivity(intent);\n break;\n case R.id.microphone:\n SpeechRecognitionHelper.run(this);\n break;\n }\n }", "private void addPlayAgainButtonListener() {\n Button playAgainButton = findViewById(fall2018.csc2017.gamehub.R.id.hanoPlayAgain);\n playAgainButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hanoStart = new Intent(HanoEnd.this,\n fall2018.csc2017.gamehub.TowerOfHano.StartingActivity.class);\n hanoStart.putExtra(\"scoreboardManager\",scoreboardManager);\n hanoStart.putExtra(\"userManager\",userManager);\n startActivity(hanoStart);\n }\n });\n }", "private void friendsListBtnListener() {\n friendsListBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new FriendsListScreen(game));\n }\n });\n }", "public void onButtonPressed() {\n if (mListener != null) {\n mListener.onFragmentInteraction();\n }\n }", "private void setButtonListener2(Button button){\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tint pos = tagList.indexOf(tag);\n \t\t\t\tmViewPager.setCurrentItem(pos);\n \t\t\t\t\n\n \t\t\t}\n \t\t});\n }", "private void initListeners() {\n appCompatButtonLogout.setOnClickListener(this);\n appCompatButtonDelete.setOnClickListener(this);\n }", "private void initButtons() {\n findViewById(R.id.home_profileBtn).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent profile = new Intent(HomeView.this, ProfileView.class);\n profile.putExtra(\"profile\", user);\n startActivity(profile);\n }\n });\n\n findViewById(R.id.home_FindMatchBtn).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent match = new Intent(HomeView.this, MatchView.class);\n match.putExtra(\"profile\", user);\n match.putExtra(\"matches\", toBeMatched);\n startActivity(match);\n }\n });\n\n findViewById(R.id.sign_out_button).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signOut();\n Intent main = new Intent(HomeView.this, MainActivity.class);\n startActivity(main);\n }\n });\n }", "private void setListeners(){\n\n Button b = (Button) findViewById(R.id.newGameButton);\n b.setOnClickListener(this);\n\n LinearLayout cel1=(LinearLayout) findViewById(R.id.cel1);\n LinearLayout cel2=(LinearLayout) findViewById(R.id.cel2);\n LinearLayout cel3=(LinearLayout) findViewById(R.id.cel3);\n LinearLayout cel4=(LinearLayout) findViewById(R.id.cel4);\n LinearLayout cel5=(LinearLayout) findViewById(R.id.cel5);\n LinearLayout cel6=(LinearLayout) findViewById(R.id.cel6);\n LinearLayout cel7=(LinearLayout) findViewById(R.id.cel7);\n LinearLayout cel8=(LinearLayout) findViewById(R.id.cel8);\n LinearLayout cel9=(LinearLayout) findViewById(R.id.cel9);\n\n cel1.setOnClickListener(this);\n cel2.setOnClickListener(this);\n cel3.setOnClickListener(this);\n cel4.setOnClickListener(this);\n cel5.setOnClickListener(this);\n cel6.setOnClickListener(this);\n cel7.setOnClickListener(this);\n cel8.setOnClickListener(this);\n cel9.setOnClickListener(this);\n }", "@Override\n\tpublic void initListeners() {\n\t\tmClick.setOnClickListener(this);\n\t}", "private void initListener() {\n\t\tbtnCancel.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View v) {\n mOnButtonClickListener.onButtonClicked(v);\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()) {\n\t\t\tcase R.id.previousBtn:\n\t\t\t\t// 第一个按钮\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnPreviousButtonClicked(DksDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.middleBtn:\n\t\t\t\t// 中间按钮\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnMiddleButtonClicked(DksDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// 最后一个按钮\n\t\t\t\tDksDialog.this.dismiss();\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnNextButtonClicked(DksDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public void onClick(View v) {\n mListener.onAddButtonClicked();\n }", "public static interface TaskButtonListener {\n /**\n * A task button was clicked\n * @param view The view of the button\n */\n public void onTaskButtonClick(View view);\n }", "public void addListenerOnButton() {\n\n /* spinner1 = (Spinner) findViewById(R.id.spinner1);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n btnSubmit = (Button) findViewById(R.id.btnSubmit);\n\n btnSubmit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n Toast.makeText(askquestion.this,\n \"OnClickListener : \" +\n \"\\nSpinner 1 : \"+ String.valueOf(spinner1.getSelectedItem()) +\n \"\\nSpinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()),\n Toast.LENGTH_SHORT).show();\n }\n\n });*/\n }", "public void addActionListeners(){\n terugButton.addActionListener(this);\n klaarButton.addActionListener(this);\n\n }", "public ButtonListener(Fenetre fenetre) {\n\t\tthis.fenetre = fenetre;\n\t}", "public void buttonOnClick(View v) {\n\n }", "public interface ButtonListener {\n void add();\n}", "private void addReturnToGameCentreButtonListener() {\n Button returnToGameCentre = findViewById(fall2018.csc2017.gamehub.R.id.hanoReturnToLaunch);\n returnToGameCentre.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent gameHub = new Intent(HanoEnd.this, GameHub.class);\n gameHub.putExtra(\"userManager\",userManager);\n startActivity(gameHub);\n }\n });\n }", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t super.onCreate(savedInstanceState);\r\n\t setContentView(R.layout.activity_mainuser);\r\n\t button2 = (Button)findViewById(R.id.button2);\r\n\t\tbutton2.setOnClickListener(Listner);\r\n\t\tbutton3 = (Button)findViewById(R.id.button3);\r\n\t\tbutton3.setOnClickListener(Listner);\r\n\t\tbutton4 = (Button)findViewById(R.id.button4);\r\n\t\tbutton4.setOnClickListener(Listner);\r\n\t\tbtn_speak = (Button)findViewById(R.id.btn_speak);\r\n\t\tbtn_speak.setOnClickListener(Listner);\r\n\t\r\n\t // TODO Auto-generated method stub\r\n\t}", "public void addListener(ActionListener listener){\n\t\tbtn.addActionListener(listener);\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()) {\n\t\t\tcase R.id.previousBtn:\n\t\t\t\t// 第一个按钮\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnPreviousButtonClicked(ValueShopDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.middleBtn:\n\t\t\t\t// 中间按钮\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnMiddleButtonClicked(ValueShopDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// 最后一个按钮\n\t\t\t\tValueShopDialog.this.dismiss();\n\t\t\t\tif (null != listener) {\n\t\t\t\t\tlistener.OnNextButtonClicked(ValueShopDialog.this);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "private void initButtonsListener(){\n initDraw();\n initResign();\n initRedo();\n }", "@Override\n public void onClick(View v) {\n myCallback.buttonClicked();\n Log.d(TAG, \"onClick: \");\n }", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "private void addListenerOnButton() {\n\t\tradioSex = (RadioGroup) findViewById(R.id.radioSex);\n\t\tbtnDisplay = (Button) findViewById(R.id.btnDisplay);\n\t\n\t\tbtnDisplay.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint seledtedId = radioSex.getCheckedRadioButtonId();\n\t\t\t\tRadioButton radioMale = (RadioButton) findViewById(seledtedId);\n\t\t\t\tToast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t});\n\t}", "private void searchButton_addListener() {\n\t\tsearchButton = (ImageButton) findViewById(R.id.search_button);\n\t\tsearchButton.setOnClickListener(new OnClickListener() {\n\n\t\t\tSpinner spinner1 = (Spinner) findViewById(R.id.spinner1);\n\t\t\tSpinner spinner2 = (Spinner) findViewById(R.id.spinner2);\n\t\t\tEditText textNumber = (EditText) findViewById(R.id.numberText);\n\t\t\tEditText textYear = (EditText) findViewById(R.id.yearText);\n\t\t\tEditText textInitialDate = (EditText) findViewById(R.id.startDateText);\n\t\t\tEditText textAuthorName = (EditText) findViewById(R.id.authorNameText);\n\t\t\tSpinner textPoliticalPartyAcronym = (Spinner) findViewById(R.id.politicalPartyAcronymText);\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tboolean validation = searchController.updateDataInsideTheSearch(textYear.getText().toString(),\n\t\t\t\t\t\tString.valueOf(spinner1.getSelectedItem()), textNumber.getText().toString(),\n\t\t\t\t\t\ttextInitialDate.getText().toString(), textAuthorName.getText().toString(),\n\t\t\t\t\t\tString.valueOf(textPoliticalPartyAcronym.getSelectedItem()),\n\t\t\t\t\t\tString.valueOf(spinner2.getSelectedItem()));\n\t\t\t\t\n\t\t\t\tif (validation) {\n\t\t\t\t\tnew SearchForProjectsTask().execute();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tToast.makeText(SearchView.this, \"Dados inv‡lidos\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void addListenerOnButton() {\n\t\t\tfinal Context context = this;\n\t\t\t\n\t\t\tgetFromDate=MainActivity.fromdate;\n\t\t\tgetToDate=MainActivity.todate;\n\t\t\t//Create a class implementing “OnClickListener” and set it as the on click listener for the button\n\t\t\tbtnSkip.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif(editDetailsflag==false){\n\t\t\t\t\t\tIntent intent = new Intent(getApplicationContext(), menu.class);\n\t\t\t\t\t startActivity(intent);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t builder.setMessage(\"Are you sure, you want to reset all fields? \")\n\t\t\t\t .setCancelable(false)\n\t\t\t\t .setPositiveButton(\"Yes\", \n\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t\t\t\t\tetGetAddr.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tsGetPostal.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetPhone.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetFax.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetEmailid.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetGetWebSite.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetMVATnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetServiceTaxnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetPanNo.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetMVATnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetServiceTaxnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetRegNum.setText(\"\"); \n\t\t\t\t\t\t\t\t\t\t\t\tetFcraNum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tbtnRegDate.setText(Startup.getfinancialFromDate());\n\t\t\t\t\t\t\t\t\t\t\t\tbtnFcraDate.setText(Startup.getfinancialFromDate());\n\t\t\t\t\t\t\t\t\t\t\t\tgetstate.setSelection(0);\n\t\t\t\t\t\t\t\t\t\t\t\tgetcity.setSelection(0);\n\t\t\t\t }\n\t\t })\n\t\t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t dialog.cancel();\n\t\t\t }\n\t\t });\n\t\t AlertDialog alert = builder.create();\n\t\t alert.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}); \n\t\t\tbtnorgDetailSave.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tsavedeatils();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}); \n\t\t\tbtnDeleteOrg.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\tprivate TextView tvWarning;\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n \tLayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\t\t\tView layout = inflater.inflate(R.layout.import_organisation, (ViewGroup) findViewById(R.id.layout_root));\n\t\t\t\t\t//Building DatepPcker dialog\n\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t\tbuilder.setView(layout);\n\t\t\t\t\t//builder.setTitle(\"Delete orginsation for given financial year\");\n\t\t\t\t\ttrOrgnisation = (TableRow) layout.findViewById(R.id.trQuestion);\n\t\t\t\t\ttvWarning = (TextView) layout.findViewById(R.id.tvWarning);\n\t\t\t\t\ttrOrgnisation.setVisibility(View.GONE);\n\t\t\t\t\tgetFinancialyear = (Spinner)layout.findViewById(R.id.sYear);\n\t\t\t\t\tbtnDelete = (Button)layout.findViewById(R.id.btnImport);\n\t\t\t\t\tButton btnCancel = (Button) layout.findViewById(R.id.btnExit);\n\t\t\t\t\tbtnCancel.setText(\"Cancel\");\n\t\t\t TextView tvalertHead1 = (TextView) layout.findViewById(R.id.tvalertHead1);\n\t\t\t tvalertHead1.setText(\"Delete \"+getOrgName+\" orgnisation for given financial year?\");\n\t\t\t\t\tbtnDelete.setText(\"Delete\");\n\t\t\t\t\tSystem.out.println(\"print orgname : \"+getOrgName);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\taddListnerOnFinancialSpinner();\n\t\t\t\t\t\tbtnDelete.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(fromDate.equals(financialFrom)&&toDate.equals(financialTo))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmessage = \"Are you sure you want to permanently delete currently logged in \"+getOrgName+\" for financialyear \"+fromDate+\" To \"+toDate+\"?\\n\" +\n\t\t\t\t\t\t\t \t\t\"your data will be permanetly lost and session will be closed !\";\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\tmessage = \"Are you sure you want to permanently delete \"+getOrgName+\" for financialyear \"+fromDate+\" To \"+toDate+\"?\\n\" +\n\t\t\t\t\t\t\t \t\t\"It will be permenantly lost !\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//tvalertHead1 \n\t\t\t\t\t\t\t System.out.println(\"print orgname : \"+getOrgName);\n\t\t\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t\t\t\t builder.setMessage(message)\n\t\t\t\t\t\t\t .setCancelable(false)\n\t\t\t\t\t\t\t .setPositiveButton(\"Ok\",\n\t\t\t\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t \t//parameters pass to core_engine xml_rpc functions\n\t\t\t\t\t\t\t \t//addListnerOnFinancialSpinner();\n\t\t\t\t\t\t\t \tSystem.out.println(\"dlete params: \"+getOrgName+\"\"+fromDate+\"\"+toDate);\n\t\t\t\t\t\t\t \t\t\t\tdeleteprgparams=new Object[]{getOrgName,fromDate,toDate};\n\t\t\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t\t\t \t\t\t\tdeleted = startup.deleteOrgnisationName(deleteprgparams);\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t\t\tif(fromDate.equals(financialFrom)&&toDate.equals(financialTo))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t \t\t\t\t\t//To pass on the activity to the next page\n\t\t\t\t\t\t\t \t\t\t\t\tIntent intent = new Intent(context,MainActivity.class);\n\t\t\t\t\t\t\t \t\t\t\t\tstartActivity(intent);\n//\t\t\t\t\t\t\t \t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"In org details\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddListnerOnFinancialSpinner();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttvWarning.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttvWarning.setText(\"Deleted \"+getOrgName+\" for \"+fromDate+\" to \"+toDate);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t \t\t\t\t \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t dialog.cancel();\n\t\t\t\t\t\t\t dialog.dismiss();\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t AlertDialog alert = builder.create();\n\t\t\t\t\t\t\t alert.show();\n \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\tbtnCancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tdialog=builder.create();\n\t \t\tdialog.show();\n\t \t\t\n\t \t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\t\t\t\t//customizing the width and location of the dialog on screen \n\t\t\t\t\tlp.copyFrom(dialog.getWindow().getAttributes());\n\t\t\t\t\tlp.width = 700;\n\t\t\t\t\tdialog.getWindow().setAttributes(lp);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnRegDate.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t//for showing a date picker dialog that allows the user to select a date (Registration Date)\n\t\t\t\t\tString regDate = (String) btnRegDate.getText();\n\t\t\t\t\tString dateParts[] = regDate.split(\"-\");\n\t\t\t\t\tsetfromday = dateParts[0];\n\t\t\t\t\tsetfrommonth = dateParts[1];\n\t\t\t\t\tsetfromyear = dateParts[2];\n\t\t \n\t\t\t\t\tSystem.out.println(\"regdate is:\"+regDate);\n\t\t\t\t\tshowDialog(REG_DATE_DIALOG_ID);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnFcraDate.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t//for showing a date picker dialog that allows the user to select a date (FCRA Registration Date)\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public MyButtonListener(){\n super();\n }", "public void setListener(ButtonListener buttonListener) {\n\t\tthis.buttonListener = buttonListener;\n\t}", "private void initializeListeners() {\n llBack.setOnClickListener(this);\n btnChange.setOnClickListener(this);\n btnNext.setOnClickListener(this);\n }", "@Override\r\n protected void setListener() {\n logout.setOnClickListener(this);\r\n update.setOnClickListener(this);\r\n cleanCache.setOnClickListener(this);\r\n pushSwitch.setOnCheckedChangeListener(this);\r\n feedback.setOnClickListener(this);\r\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 5;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}\n\t\t});\n\t\timgbtnCancel.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 4;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickCancel();\n\t\t\t}\n\t\t});\n\t\tseekbarLevel.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tBrightnessManualLevel = seekBar.getProgress();\n\t\t\t\tCAN1Comm.Set_BacklightIlluminationLevel_719_PGN61184_109(BrightnessManualLevel + 1);\n\t\t\t\tCAN1Comm.TxCANToMCU(109);\n\t\t\t\tCAN1Comm.TxCMDToMCU(CAN1Comm.CMD_LCD, BrightnessManualLevel + 1);\n\t\t\t\t\n\t\t\t\tParentActivity.BrihgtnessCurrent = BrightnessManualLevel;\n\t\t\t}\n\t\t});\n\t}", "public void buttonClicked();", "@Override\n\tprotected void setOnClickListener() {\n\n\t}", "public interface DialogButtonListener {\n\n void buttonClicked(String buttonText);\n\n}", "private void setlistener() {\n\t\timg_home.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i = new Intent(ManageCustomersActivity.this,\n\t\t\t\t\t\tHome_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}\n\n\t\t});\n\t\tbtn_mc_genrate_invoice.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"himurtuza\" + filter_array);\n\t\t\t\tif (filter_array != null) {\n\t\t\t\t\tif (filter_array.length() == 0) {\n\t\t\t\t\t\tToast.makeText(activity,\n\t\t\t\t\t\t\t\tR.string.str_no_data_found_as_search,\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\t\t\tnew generate_invoice_manage_customer().execute();\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\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}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(activity,\n\t\t\t\t\t\t\tR.string.str_no_data_found_as_search,\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}", "public void onButtonPressed(ArrayList naleznosci, String KLUCZ) {\n if (mListener != null) {\n mListener.onFragmentInteraction(naleznosci, KLUCZ);\n }\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\ttextViewAvgInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickAverageInitial();\n\t\t\t}\n\t\t});\n\t\ttextViewDaysInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickDaysInitial();\n\t\t\t}\n\t\t});\t\t\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}\n\t\t});\t\t\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t \tswitch (v.getId()) {\n\t \t\n\t\tcase R.id.btn_start:\n\t\t BroadCastAction.broadcastUpdate(this.appContext, \"com.ainia.ble.ACTION_BLE_START_SCAN\");\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.btn_back:\n\t\t\tBroadCastAction.broadcastUpdate(this.appContext, \"com.ainia.ble.ACTION_BLE_STOP_SCAN\");\n\t\t\tDeviceListActivity.this.finish();\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "private void setListeners() {\n\t\timgBack.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "public void onButtonPressed(Uri uri) {\n if (mListener != null) {\n\n }\n }", "private void buttonListener(int x, int y) {\t\n\t\tbuttons[x][y].addActionListener(event -> controller.onClick(x, y));\n\t}", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "public void addMinesButtonListener(MinesButtonListener l) {\r\n\t\tif (!listeners.contains(l))\r\n\t\t\tlisteners.add(l);\r\n\t}", "private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}", "public void addListenerOnAddDateBtn() {\n\n addButton = (Button) findViewById(R.id.addButton);\n\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AddTodoActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "public void onButtonPressed(Uri uri) {\r\n if (mListener != null) {\r\n\r\n }\r\n }", "private View.OnClickListener getButtonOnClickListener() {\n return new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addMedication();\n }\n };\n }", "private void configureButtons() {\n\n\t\t// Set button listeners\n\t\tfor(SLChannelControllerViews views : mChannelViews) {\n\t\t\tviews.getChannelButton().setOnTouchListener(new SLSeekBarOnTouchListener(views.getChannelSeekBar()));\n\t\t}\n\t}", "private void setDoneButtonListener()\n\t{\n\t\tButton doneButton = (Button) findViewById(R.id.back_button);\n\t\tdoneButton.setOnClickListener\n\t\t(\n\t\t\tnew View.OnClickListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v)\n\t\t\t\t{\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t);//END setOnClickListener\n\t}", "private void setEventListener() {\n mCameraView.addCameraKitListener(this);\n mCameraButton.setOnClickListener(this);\n mCameraButtonCloud.setOnClickListener(this);\n }", "private void defineButtonClick(){\n activityForgetPassBinding.backButton.setOnClickListener(this);\n activityForgetPassBinding.changePasswordButton.setOnClickListener(this);\n }" ]
[ "0.7919145", "0.7858545", "0.7737363", "0.7203439", "0.7113852", "0.69795", "0.691992", "0.6903558", "0.6890577", "0.68187106", "0.6810698", "0.6800299", "0.67976546", "0.67857265", "0.6741794", "0.67236227", "0.67127", "0.66868675", "0.6685191", "0.66814274", "0.66579014", "0.6640156", "0.66136086", "0.6596424", "0.6589204", "0.6585369", "0.65740365", "0.6528386", "0.6504988", "0.65003186", "0.6473191", "0.6437227", "0.64206594", "0.6405319", "0.6397666", "0.6390786", "0.63870156", "0.6379649", "0.6376383", "0.63744223", "0.6369749", "0.6360745", "0.6357498", "0.63425666", "0.63164985", "0.63112795", "0.6301181", "0.62972426", "0.6280702", "0.6275278", "0.62674534", "0.62605774", "0.6239624", "0.6237501", "0.6224121", "0.6219518", "0.62171197", "0.6216443", "0.6205287", "0.62036914", "0.6181207", "0.6176968", "0.6176967", "0.61544645", "0.6150309", "0.6138773", "0.61316735", "0.61304677", "0.6128171", "0.61250466", "0.6114785", "0.6111488", "0.61106247", "0.6108992", "0.6108931", "0.61088425", "0.6108383", "0.6100336", "0.60948163", "0.60845876", "0.60833263", "0.60695", "0.6068425", "0.6054793", "0.6054143", "0.60527915", "0.6040818", "0.6040102", "0.603682", "0.6033887", "0.6027918", "0.60171866", "0.60138345", "0.60097355", "0.60087615", "0.6004533", "0.5999788", "0.5995103", "0.5991005", "0.5982609", "0.5980139" ]
0.0
-1
we need to check that both fields are NOT empty before we call attemptLogin() get text from values entered and trim whitespace
public void onClick(View view) { email = mEmailView.getText().toString().trim(); password = mPasswordView.getText().toString().trim(); //Detect empty fields before allowing user to continue to next activity if(TextUtils.isEmpty(email)){ //firstName is empty Toast.makeText(getApplicationContext(), "Please enter EMAIL", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } if(TextUtils.isEmpty(password)){ //lastName is empty Toast.makeText(getApplicationContext(), "Please enter PASSWORD", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } //User entered an text, but we need to check if text is valid email pattern wasEmailValid = isValidEmail(email); if (!(wasEmailValid)){ //email text is INVALID email pattern Toast.makeText(getApplicationContext(), "Please enter a valid EMAIL", Toast.LENGTH_SHORT).show(); //stopping the function from executing further return; } //email text was valid email pattern //Both text fields were filled, so we allow user to continue //place logic here to do login action attemptLogin2(email,password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "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 validateLogin() {\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n if (\"\".equals(userName)) {\n userText.setError(\"You must enter a username\");\n return false;\n }\n if (\"\".equals(userPass)) {\n passwordText.setError(\"You must enter a password\");\n return false;\n }\n return true;\n }", "public String Login_without_textfields_entered() {\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "protected boolean areStrFieldsBlank(String password, String firstname,\n String midname, String lastname, String email,\n String profile, String educ, String expertise,\n String location) {\n if (password.isEmpty() || firstname.isEmpty() || midname.isEmpty()\n || lastname.isEmpty() || email.isEmpty() || profile.isEmpty() ||\n educ.isEmpty() || expertise.isEmpty() || location.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 }", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "private void checkEditTexts() {\n\n if (!validateEmail(Objects.requireNonNull(edInputEmail.getText()).toString().trim())) {\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_invalid_email), Toasty.LENGTH_SHORT, true).show();\n } else {\n\n if (Objects.requireNonNull(edInputPass.getText()).toString().trim().equalsIgnoreCase(\"\")) {\n\n Toasty.error(Objects.requireNonNull(getActivity()), getString(R.string.error_empty_password), Toasty.LENGTH_SHORT, true).show();\n\n } else {\n sendLoginRequest(edInputEmail.getText().toString(), edInputPass.getText().toString());\n CustomProgressBar.showProgress(loadingLayout);\n }\n }\n }", "private void attemptLogin() {\n\n char ch;\n boolean hasUppercase = false;\n boolean hasLowercase = false;\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String firstname = mFirstNameView.getText().toString();\n String lastname = mLastNameView.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String passwordconfirm = mPasswordConfirmView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid first name.\n if (TextUtils.isEmpty(firstname)) {\n mFirstNameView.setError(getString(R.string.error_field_required));\n focusView = mFirstNameView;\n cancel = true;\n }\n\n // Check for a valid last name.\n if (TextUtils.isEmpty(lastname)) {\n mLastNameView.setError(getString(R.string.error_field_required));\n focusView = mLastNameView;\n cancel = true;\n }\n\n // Check if password field is empty.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n //Check if the second input password is empty\n if (TextUtils.isEmpty(passwordconfirm)) {\n mPasswordConfirmView.setError(\"This field is required!\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && password.length() < 7) {\n mPasswordView.setError(getString(R.string.error_short_password));\n focusView = mPasswordView;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check if both of the entered passwords are equal\n if (!Objects.equals(password, passwordconfirm)) {\n mPasswordConfirmView.setError(\"Your Passwords do not match\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n if (isNetworkAvailable()) {\n View view = this.getCurrentFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n Bundle args = new Bundle();\n args.putString(IHC_FIRSTNAME_KEY, firstname);\n args.putString(IHC_LASTNAME_KEY, lastname);\n args.putString(IHC_EMAIL_KEY, email);\n args.putString(IHC_PASSWORD_KEY, password);\n getSupportLoaderManager().initLoader(IHC_NONSTUDENT_SIGNUP_LOADER_ID, args, this);\n //new SignupAuthProcess(this).execute(firstname, lastname, email, password);\n }\n else {\n showNoInternetConnectionMsg();\n }\n }\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 }", "@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 }", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "public void login_now(View view) {\n String userMailId = email_id.getText().toString();\n String userPassword = password.getText().toString();\n\n\n if (!userMailId.equals(\"\")) {\n if (!userPassword.equals(\"\")) {\n loginUser(userMailId, userPassword);\n } else {\n Toast.makeText(this, \"Enter Your Password\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n Toast.makeText(this, \"Enter Your Email Address\", Toast.LENGTH_SHORT).show();\n }\n }", "private void checkInputData(){\n if(!TextUtils.isEmpty(email.getText())){\n if(!TextUtils.isEmpty(password.getText())){\n //Below code is only for testing purposes.\n //signInprogressBar.setVisibility(View.VISIBLE);\n mainSignInBtn.setEnabled(true);\n mainSignInBtn.setTextColor(Color.rgb(255,255,255));\n\n }else {\n mainSignInBtn.setEnabled(false);\n mainSignInBtn.setTextColor(Color.argb(50,255,255,255));\n }\n }else {\n mainSignInBtn.setEnabled(false);\n mainSignInBtn.setTextColor(Color.argb(50,255,255,255));\n }\n }", "public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "private void checkValidation() {\n // Get email id and password\n MainActivity.EmailAddress = emailid.getText().toString();\n finalPassword = password.getText().toString();\n\n // Check patter for email id\n Pattern p = Pattern.compile(Utils.regEx);\n\n Matcher m = p.matcher(MainActivity.EmailAddress);\n\n // Check for both field is empty or not\n if (MainActivity.EmailAddress.equals(\"\") || MainActivity.EmailAddress.length() == 0\n || finalPassword.equals(\"\") || finalPassword.length() == 0) {\n loginLayout.startAnimation(shakeAnimation);\n new CustomToast().Show_Toast(getActivity(), view,\n \"Enter both credentials.\");\n\n }\n // Check if email id is valid or not\n else if (!m.find())\n new CustomToast().Show_Toast(getActivity(), view,\n \"Your Email Id is Invalid.\");\n // Else do login and do your stuff\n else\n tryLoginUser();\n\n }", "public final boolean hasAllRequiredField() {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n CharSequence obj = editText.getText().toString();\n int length = obj.length() - 1;\n int i = 0;\n boolean z = false;\n while (i <= length) {\n boolean z2 = obj.charAt(!z ? i : length) <= ' ';\n if (!z) {\n if (!z2) {\n z = true;\n } else {\n i++;\n }\n } else if (!z2) {\n break;\n } else {\n length--;\n }\n }\n String obj2 = obj.subSequence(i, length + 1).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n CharSequence obj3 = editText2.getText().toString();\n int length2 = obj3.length() - 1;\n int i2 = 0;\n boolean z3 = false;\n while (i2 <= length2) {\n boolean z4 = obj3.charAt(!z3 ? i2 : length2) <= ' ';\n if (!z3) {\n if (!z4) {\n z3 = true;\n } else {\n i2++;\n }\n } else if (!z4) {\n break;\n } else {\n length2--;\n }\n }\n String obj4 = obj3.subSequence(i2, length2 + 1).toString();\n if (TextUtils.isEmpty(obj2) || TextUtils.isEmpty(obj4)) {\n return false;\n }\n return true;\n }", "private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }", "@Test(priority = 4)\n public void emptyUsernameLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, \"\");\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyUsernameError);\n }", "public boolean verifyFields() {\n String fname = firstName.getText();\n String lname = lastName.getText();\n String username = userName.getText();\n String emailString = email.getText();\n String passwordString = String.valueOf(password.getText());\n String confirmPasswordString = String.valueOf(confirmPassword.getText());\n\n\n if (fname.trim().equals(\"\") || lname.trim().equals(\"\") || username.trim().equals(\"\") || emailString.trim().equals(\"\") || passwordString.trim().equals(\"\")) {\n\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Fill in the Required Fields\");\n\n return false;\n }\n\n //check if confirm password equals password\n else if (!passwordString.equals(confirmPasswordString)) {\n outputText.setStyle(\"-fx-text-fill: #D33232\");\n outputText.setText(\"Password does not match Confirm Password\");\n return false;\n }\n\n // if everything is fine\n else {\n return true;\n }\n }", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "public boolean logInDatosCorrectos(){\n if (txtNombreUsuario.getText().equals(\"\") || txtContraseña.getText().equals(\"\")){\n return false;\n }\n return true;\n }", "public void LoginFunction(){\n\n if(EditTextEmptyHolder) {\n\n // Opening SQLite database write permission.\n sqLiteDatabaseObj = sqLiteHelper.getWritableDatabase();\n\n // Adding search email query to cursor.\n cursor = sqLiteDatabaseObj.query(DatabaseHelper.TABLE_NAME, null, \" \" + DatabaseHelper.Table_Column_2_Email + \"=?\", new String[]{EmailHolder}, null, null, null);\n\n while (cursor.moveToNext()) {\n\n if (cursor.isFirst()) {\n\n cursor.moveToFirst();\n\n // Storing Password associated with entered email.\n TempPassword = cursor.getString(cursor.getColumnIndex(DatabaseHelper.Table_Column_3_Password));\n\n // Closing cursor.\n cursor.close();\n }\n }\n\n // Calling method to check final result ..\n CheckFinalResult();\n\n }\n else {\n\n //If any of login EditText empty then this block will be executed.\n Toast.makeText(MainActivity.this,\"Please Enter UserName or Password.\",Toast.LENGTH_LONG).show();\n\n }\n\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 }", "@Test\n public void testLogin1() {\n System.out.println(\"login method tests empty string user input\");\n String accNo = \"\";\n String pinNo = \"\";\n assertEquals(\"Invalid entries should return false\",false, Account.login(accNo, pinNo));\n }", "boolean isInputValid(){\n\t\tString ac = edAccount.getText().toString();\n\t\tString pwd = edPassword.getText().toString();\n\t\tboolean isAccEmpty = StringUtil.isNullOrEmpty(ac);\n\t\tboolean isPwdEmpty = StringUtil.isNullOrEmpty(pwd);\n\t\tif(isAccEmpty){\n\t\t\tedAccount.requestFocus();\n\t\t}else if(isPwdEmpty){\n\t\t\tedPassword.requestFocus();\n\t\t}\n\t\treturn !( isAccEmpty|| isPwdEmpty);\n\t}", "private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }", "@Override\r\n public void onClick(View v) {\n String username = etUsername.getText().toString();\r\n String password = etPassword.getText().toString();\r\n\r\n // cek apakah username dan password terisi\r\n if (username.length() > 0 && password.length() > 0) {\r\n loginWithEmailAndPassword(username, password);\r\n } else {\r\n Toast.makeText(login.this, \"Fill all field!\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n }", "private void connectMembers() {\r\n userText = findViewById(R.id.usernameEditText);\r\n passText = findViewById(R.id.editTextPassword);\r\n submitButton = findViewById(R.id.loginButton);\r\n\r\n submitButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n String passedInUser = userText.getText().toString();\r\n String passedInPass = passText.getText().toString();\r\n\r\n //We clear the field colors to get rid of any red fields.\r\n resetFieldColors();\r\n //This function checks to see if the values typed in by the user are valid.\r\n checkValidLogin(passedInUser, passedInPass);\r\n }\r\n });\r\n }", "private boolean validateUsername() {\n // Get doctor's username\n EditText doctorUsername = (EditText) rootView.findViewById(R.id.doctorField);\n String doctorUsernameString = doctorUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `doctor` on user.id=doctor.userid where username='%s'\", doctorUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Get patient's username\n EditText patientUsername = (EditText) rootView.findViewById(R.id.patientField);\n String patientUsernameString = patientUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `patient` on user.id=patient.userid where username='%s'\", patientUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "public void loginUser() {\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \n \t// Validation part.\n \tString empty = \"\";\n \t// Check if username is empty.\n \tif(username.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a username.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t// Check if username contains othe characters.\n \tif(! Pattern.matches(\"[a-zA-Z]+\", username)) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Username can only contain alphabets\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t\n \t// Check if password is empty.\n \tif(password.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a password.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n\n \t\n \tArrayList<NameValuePair> userData = new ArrayList<NameValuePair>();\n \tuserData.add(new BasicNameValuePair(\"username\", username));\n \tuserData.add(new BasicNameValuePair(\"password\", password));\n \t\n \t// Now send the data to the login user task to\n \t// check if they are correct.\n \tnew AuthenticateUserTask(this, userData).execute();\n \t\n }", "public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tString email=email_login.getText().toString().trim();\n\t\t\tString password=password_login.getText().toString().trim();\n\t\t\tif(!TextUtils.isEmpty(email)&&!TextUtils.isEmpty(password)){\n\t\t\t\tlogin_login.setEnabled(true);\n\t\t\t}else{\n\t\t\t\tlogin_login.setEnabled(false);\n\t\t\t}\n\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif ((!userNameEditText.getText().toString().matches(\"\")) &&\n\t\t\t\t\t(!passwordEditText.getText().toString().matches(\"\")) &&\n\t\t\t\t\t(!numberPlateEditText.getText().toString().matches(\"\"))) {\n\t\t\t\t\t//checking if user is authenticated\n\t\t\t\t\tcheckPassword(userNameEditText.getText(),\n\t\t\t\t\t\t\t\tpasswordEditText.getText(),\n\t\t\t\t\t\t\t\tnumberPlateEditText.getText());\n\t\t\t\t}\t\t\t\n\t\t\t\tuserNameEditText.requestFocus();\n\t\t\t}", "@Test\n public void testValidUserNamePassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n UiObject2 welcomeText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"welcome_text_view\")),\n 500 /* wait 500ms */);\n assertThat(welcomeText.getText(), is(equalTo(WELCOME)));\n\n UiObject2 usernameText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_value\")),\n 500 /* wait 500ms */);\n assertThat(usernameText.getText(), is(equalTo(USERNAME_TO_BE_TYPED)));\n\n UiObject2 passwordText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_value\")),\n 500 /* wait 500ms */);\n assertThat(passwordText.getText(), is(equalTo(PASSWORD_TO_BE_TYPED)));\n\n }", "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "@Test\n public void testEmptyUserNamePassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(\"\");\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(\"\");\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }", "public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}", "private boolean validateInput(){\n Window owner=root.getScene().getWindow();\n inputFileds.addAll(txtfn,txtln,txtsurname,txtDOB,txtResidence,txtMobile,txtID,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().isEmpty()){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n inputFileds.removeAll(txtDOB,txtMobile,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().length()>30){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Sorry the text you entered can not be greater that 30 characters\",\"Text too Long\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n if(username.getText().length()>20 || username.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Username has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid input\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n if(pass.getText().isEmpty()){\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n if(pass.getText().length()>20 || pass.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Password has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat yearFormat = new SimpleDateFormat(\"yyyy\");\n try {\n date = dateFormat.parse(txtDOB.getText());\n Calendar cal=Calendar.getInstance();\n int year=Integer.parseInt(yearFormat.format(date));\n if (year <= 1900 || year>cal.get(Calendar.YEAR)) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n String initialEntry=txtDOB.getText();\n String parsedValue=dateFormat.format(date);\n if(!initialEntry.equals(parsedValue)){\n Dialog.showMessageDialog(owner, \"Note your Date of Birth has been corrected\", \"Date Corrected\",DialogIcon.INFORMATION);\n }\n txtDOB.setText(dateFormat.format(date));\n } catch (ParseException ex) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n try {\n int mobile=Integer.parseInt(txtMobile.getText());\n } catch (NumberFormatException e) {\n Dialog.showMessageDialog(owner, \"Invalid Mobile Number\", \"Invalid data\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n if(txtMobile.getText().length() != 10){\n Dialog.showMessageDialog(owner, \"Sorry your Mobile Number is invalid\", \"Invalid input\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n String sql=\"select Username,Password from users where Username=?\";\n try(PreparedStatement prstmt=con.prepareStatement(sql)) {\n prstmt.setString(1, username.getText());\n ResultSet rs=prstmt.executeQuery();\n if(rs.next()){\n Dialog.showMessageDialog(owner, \"Sorry Username already exists\\n Please change to different Username\", \"Username Exists\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n rs.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n return true;\n }", "public static int checkEmptyField(String addUser, String addPasswordStr, String name, String matricNo, String nationality) throws IOException {\n\t\t \t\t\n\t\tif(addUser.equals(\"\")||addPasswordStr.equals(\"\")||name.equals(\"\")||matricNo.equals(\"\")||nationality.equals(\"\")) {\n\t\t\tSystem.out.println(\"Error, please fill out username or password\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public void wrongPasswordOrUsername() {\n messageLabel.setForeground(Color.red);\n messageLabel.setText(\"Gebruikersnaam en/of wachtwoord incorrect\");\n usernameField.setText(\"\");\n passwordField.setText(\"\");\n }", "private boolean validateFields(){ \n ImplLogger.enterMethod(); \n StringBuffer validationMessage = new StringBuffer();\n boolean isValidationPassed = true;\n if(!ImplValidationUtils.isAlphaSpace(pharmaNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_NAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n pharmaNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n } \n if(!ImplValidationUtils.isAlphabetOnly(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplCommonUtil.isUserNameExist(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME_EXIST);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(contactTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_CONTACT);\n validationMessage.append(ImplConst.NEXT_LINE);\n contactTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(zipCodeTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_ZIPCODE);\n validationMessage.append(ImplConst.NEXT_LINE);\n zipCodeTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(passwordField.getText())){\n validationMessage.append(ImplConst.VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n passwordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n confirmPasswordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if (!ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText()) && !confirmPasswordField.getText().equals(passwordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n isValidationPassed = false; \n }\n if(!isValidationPassed){\n JOptionPane.showMessageDialog(null,validationMessage);\n } \n ImplLogger.exitMethod();\n return isValidationPassed;\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mIPView.setError(null);\r\n mPortView.setError(null);\r\n mUsernameView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String ip = mIPView.getText().toString();\r\n int port = 0;\r\n try {\r\n port = Integer.parseInt(mPortView.getText().toString());\r\n }catch (Exception e){\r\n\r\n }\r\n String username = mUsernameView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid ip address.\r\n if (TextUtils.isEmpty(ip)) {\r\n mIPView.setError(getString(R.string.error_field_required));\r\n focusView = mIPView;\r\n cancel = true;\r\n } else if (!isIPValid(ip)) {\r\n mIPView.setError(getString(R.string.error_invalid_ip));\r\n focusView = mIPView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid port.\r\n if (TextUtils.isEmpty(\"\"+port)) {\r\n mPortView.setError(getString(R.string.error_field_required));\r\n focusView = mPortView;\r\n cancel = true;\r\n }else if(port != (int)port){\r\n mPortView.setError(getString(R.string.error_invalid_port));\r\n focusView = mPortView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid username.\r\n if (TextUtils.isEmpty(username)) {\r\n mUsernameView.setError(getString(R.string.error_field_required));\r\n focusView = mUsernameView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(getString(R.string.error_field_required));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // Show a progress spinner, and kick off a background task to\r\n // perform the user login attempt.\r\n showProgress(true);\r\n mAuthTask = new UserLoginTask(ip, port, username, password);\r\n mAuthTask.execute((Void) null);\r\n }\r\n }", "public String setUserName(){\n String userName = \"\";\n while(userName.isBlank()) {\n System.out.print(\"Please Enter UserName: \");\n userName = supplyString.get();\n }\n return userName.trim();\n }", "@Test(priority = 3)\n public void emptyPasswordLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, \"\");\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyPasswordError);\n\n }", "private boolean validateFields() {\r\n\t\tif (txUsuario.getText().equals(\"\") || txPassword.getText().equals(\"\")\r\n\t\t\t\t|| checkAdmin.isIndeterminate()|| checkTPV.isIndeterminate())\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }", "public void logIn(View v){\n mUsername = (EditText) findViewById(R.id.username);\n mPassword = (EditText) findViewById(R.id.password);\n\n // Reset errors.\n mUsername.setError(null);\n mPassword.setError(null);\n\n // Store the data\n username = mUsername.getText().toString();\n password = mPassword.getText().toString();\n\n //Check username\n if (TextUtils.isEmpty(username)) {\n mUsername.setError(fielderror);\n checklog = false;\n }\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPassword.setError(fielderror);\n checklog = false;\n }\n if(checklog == true) {\n loginUser();\n }\n\n\n }", "public void CheckEditTextStatus(){\n\n // Getting value from All EditText and storing into String Variables.\n NameHolder = Name.getText().toString();\n EmailHolder = Email.getText().toString();\n PasswordHolder = Password.getText().toString();\n\n // Checking EditText is empty or no using TextUtils.\n if( TextUtils.isEmpty(NameHolder)|| TextUtils.isEmpty(EmailHolder)|| TextUtils.isEmpty(PasswordHolder)){\n\n EditTextEmptyHolder = false ;\n\n }\n else {\n\n EditTextEmptyHolder = true ;\n }\n }", "@Override\n public void check() {\n if(StringUtils.isBlank(username)||StringUtils.isBlank(password)){\n logger.error(\"登陆失败!\");\n throw new InyuException(ExceptionEnum.INVALID_PARAM.getIndex(),\"用户名或密码为空!\");\n }\n }", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "private String validarEntradas()\n { \n return Utilitarios.validarEntradas(campoNomeAC, campoEnderecoAC, campoBairroAC, campoCidadeAC, campoUfAC, campoCepAC, campoTelefoneAC, campoEmailAC);\n }", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public void validate() {\n\t\tlog(\"In validate of LoginAction\");\n\t\t//if (StringUtils.isEmpty(user.getUserId())) {\n\t if (StringUtils.isEmpty(userId)) {\t\n\t\t\tlog(\"In validate of LoginAction: userId is blank\");\n\t\t\taddFieldError(\"userId\", \"User ID cannot be blank\");\n\t\t}\n\t\t//if (StringUtils.isEmpty(user.getPassword())) {\n\t if (StringUtils.isEmpty(password)) {\n\t\t\tlog(\"In validate of LoginAction: password is blank\");\n\t\t\taddFieldError(\"password\", \"Password cannot be blank\");\n\t\t}\n\t\tlog(\"Completed validate of LoginAction\");\n\t}", "protected boolean checkFields() {\n // Check if any of the fields are empty\n boolean ok = true;\n ok = !isFieldEmpty(password2) && ok;\n ok = !isFieldEmpty(password) && ok;\n ok = !isFieldEmpty(email) && ok;\n\n if (!ok)\n return false;\n\n // Check whether passwords match\n if (!password.getText().toString().equals(password2.getText().toString())){\n password2.setError(getString(R.string.signup_password_mismatch));\n password2.requestFocus();\n return false;\n }\n return true;\n }", "@Test(priority = 2)\n public void incorrectLoginWithUsername() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }", "private boolean checkForInvalidInput(){\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n String name = usernameTextView.getText().toString();\n\n\n if(email.isEmpty() || password.isEmpty() || name.isEmpty()){\n Toast.makeText(getApplicationContext(),\"Please fill in all fields\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n if(!email.contains(\"@\")){\n Toast.makeText(getApplicationContext(),\"Please enter a valid email\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n if(!isStudent && !isTeacher){\n Toast.makeText(getApplicationContext(),\"Please select Student or Teacher\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n\n\n\n // add more checks?\n\n return true;\n\n }", "public void verifyLogin(String s1)\n\t{\n\t\tUtilityClass.fn_Click(\"usermanagement_plusicon_bt\");\n\t\t\n\t\t//log.info(\"providing mobile number in username input field\");\n\t\t//UtilityClass.fn_Input(\"Loginpage_usernm_Input\", s1);\n\t\t//System.out.println(\"in verifylogin\");\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n\n if (l.getText().length()<1 && m.getText().length()<1 && n.getText().length()<1 && o.getText().length()<1 && p.getText().length()<1) {\n\n Toast toast3 = Toast.makeText(Main2Activity.this, \"Please Enter Valid Input\", Toast.LENGTH_LONG);\n toast3.show();\n\n }\n\n\n //If the content is correct returning back to the main screen\n else {\n startActivity(new Intent(Main2Activity.this, MainActivity.class));\n\n }\n\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 }", "@Override\n public void onClick(View v) {\n biensoxe = etBienSoXe.getText().toString().toLowerCase().trim();\n passwordtx = etPasswordtx.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n tenchuxe = etTenChuXe.getText().toString().trim();\n sdt = etSDT.getText().toString().trim();\n mota = edMoTa.getText().toString().trim();\n loaixe = tenloaixe;\n trongtaixe = trongtai;\n if (validateInputs()) {\n registerUser();\n }\n\n }", "@Test\n\tpublic void TC_Login_02() throws Exception{\n\t\ttry{\n\t\t\tString expectedErrUserName=\"Please enter Username / Email Address.\";\n\t\t\tString expectedErrPassword=\"Please enter Password.\";\n\t\t\t\n\t\t\tdriver.findElement(By.id(\"BtnLogin\")).click();\n\t\t\tString actualErrUserName=driver.findElement(By.xpath(\"//*[@id='Div1']/div[2]/div\")).getText();\n\t\t\tString actualErrPassword=driver.findElement(By.xpath(\"//*[@id='Div1']/div[4]/div\")).getText();\n\t\t\tSystem.out.println(\"Actual validation message for User Name: \"+actualErrUserName);\n\t\t\tSystem.out.println(\"Actual validation message for Password: \"+actualErrPassword);\n\t\t\tAssert.assertEquals(expectedErrUserName, actualErrUserName);\n\t\t\tAssert.assertEquals(expectedErrPassword, actualErrPassword);\n\t\t\tSystem.out.println(\"Actual and Expected validation messages are Equal...\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t}", "public void run() {\n\n String userName = String.valueOf(username.getText());\n String passWord = String.valueOf(password.getText());\n /*\n Check if passwords match, if not, clear textboxes and ask user to input again\n If they do, show chalk check mark and allow submission\n */\n User user = new User();\n if(user.login(userName, passWord)) {\n sendToHome(user);\n //Finish the login activity and prevent users from going back\n finish();\n }\n else\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"Error on Login\",\n Toast.LENGTH_LONG).show();\n }\n });\n }", "public void attemptLogin() {\n\n\t\t// Reset errors.\n\t\tmUserView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Save values.\n\t\tmUser = mUserView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid user.\n\t\tif (TextUtils.isEmpty(mUser)) {\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t} else if (mUser.length() < 4) {\n\t\t\tmUserView.setError(getString(R.string.error_invalid_user));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t}\n\t\t\t\t\n\t\tif (cancel) {\n\t\t\t// There is an error, so registration does not success and focus on the error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Send information to server.\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_registering);\n\t\t\tshowProgress(true);\n\t\t\tsendInfoToServer();\n\t\t}\n\t}", "public void checkData(){\n if (isEmpty(etEmailLogin)){\n etEmailLogin.setError(\"Enter Email\");\n }\n\n //to check if the email is valid\n else if (!isEmail(etEmailLogin)){\n Toast.makeText(this, \"Please Enter Email Address\", Toast.LENGTH_SHORT).show();\n }\n\n //to check if the password is entered\n else if (isEmpty(etPasswordLogin)){\n etPasswordLogin.setError(\"Enter Password\");\n }\n }", "@Override\n\tpublic void validate() {\n\t\tSystem.out.println(user+\"//\"+password);\n\t\tif (user == null || user.trim().equals(\"\")) {\n\t\t\taddFieldError(\"user\", \"The user is required\");\n\t\t}\n\t\tif (password == null || password.trim().equals(\"\")) {\n\t\t\taddFieldError(\"password\", \"password is required\");\n\t\t}\n\t}", "private void clearTextFields() {\r\n\r\n\t\ttxfLoginEmail.clear();\r\n\t\ttxfLoginEmail.setPromptText(\"[email protected]\");\r\n\t\tpwfLoginPassword.clear();\r\n\t\ttxfFName.clear();\r\n\t\ttxfFName.setPromptText(\"Enter First Name\");\r\n\t\ttxfSName.clear();\r\n\t\ttxfSName.setPromptText(\"Enter Surname\");\r\n\t\ttxfEmail.clear();\r\n\t\ttxfEmail.setPromptText(\"Enter Email Address\");\r\n\t\ttxfPassword.clear();\r\n\t\ttxfPassword.setPromptText(\"Enter Password\");\r\n\t}", "private void checkRep(){\n assert !this.username.equals(\"\");\n assert !this.password.equals(\"\");\n assert accessLevel != null;\n }", "public void clearTextFields(){\n jtxt_username.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_username.getText().equals(\"\")){\n jtxt_username.setText(\"Type in your username...\");\n }else{\n \n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_username.getText().contains(\"Type in your username...\")){\n jtxt_username.setText(\"\");\n }\n }\n });\n jpassword.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jpassword.getPassword().equals(\"\")){\n jpassword.setText(\"password\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jpassword.getPassword().equals(\"password\")){\n jpassword.setText(\"\");\n }\n }\n });\n // End of Login form clearTextFields()\n \n \n \n // Start of createSavingsAcc form clearTextFields()\n jTextField_Create_Savings_Acc_acchol.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_acchol.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_acchol.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_acchol.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_acchol.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_accnum.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_accnum.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_accnum.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_accnum.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_accnum.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_bal.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_bal.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_bal.setText(\"000\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_bal.getText().contains(\"000\")){\n jTextField_Create_Savings_Acc_bal.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_joindate.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_joindate.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_joindate.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_joindate.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_joindate.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_pass.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_pass.getPassword().equals(\"\")){\n jTextField_Create_Savings_Acc_pass.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_pass.getPassword().equals(\"xxx\")){\n jTextField_Create_Savings_Acc_pass.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_usern.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_usern.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_usern.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_usern.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_usern.setText(\"\");\n }\n }\n });\n // End of createSavingsAcc form clearTextFields\n \n // Start of createNewCurrentAcc form clearTextFields\n jtxt_accno.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_accno.getText().equals(\"\")){\n jtxt_accno.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_accno.getText().contains(\"xxx\")){\n jtxt_accno.setText(\"\");\n }\n }\n });\n jtxt_holderName.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_holderName.getText().equals(\"\")){\n jtxt_holderName.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_holderName.getText().contains(\"xxx\")){\n jtxt_holderName.setText(\"\");\n }\n }\n });\n jtxt_joinDate.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_joinDate.getText().equals(\"\")){\n jtxt_joinDate.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_joinDate.getText().contains(\"xxx\")){\n jtxt_joinDate.setText(\"\");\n }\n }\n });\n jtxt_balance.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_balance.getText().equals(\"\")){\n jtxt_balance.setText(\"000\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_balance.getText().contains(\"000\")){\n jtxt_balance.setText(\"\");\n }\n }\n });\n jtxt_userName.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_userName.getText().equals(\"\")){\n jtxt_userName.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_userName.getText().contains(\"xxx\")){\n jtxt_userName.setText(\"\");\n }\n }\n });\n jpw_createCurrentAccPw.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jpw_createCurrentAccPw.getPassword().equals(\"\")){\n jpw_createCurrentAccPw.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jpw_createCurrentAccPw.getPassword().equals(\"xxx\")){\n jpw_createCurrentAccPw.setText(\"\");\n }\n }\n });\n jtxt_createCurrentAccPIN.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_createCurrentAccPIN.getText().contains(\"\")){\n jtxt_createCurrentAccPIN.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_createCurrentAccPIN.getText().contains(\"xxx\")){\n jtxt_createCurrentAccPIN.setText(\"\");\n }\n }\n });\n }", "private void attemptLogin() {\n // Reset errors.\n edtID.setError(null);\n edtPassword.setError(null);\n\n // Store values at the time of the login attempt.\n String userId = edtID.getText().toString();\n String password = edtPassword.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n edtPassword.setError(\"Password is empty\");\n focusView = edtPassword;\n cancel = true;\n } else if(!isPasswordValid(password)) {\n edtPassword.setError(getString(R.string.error_invalid_password));\n focusView = edtPassword;\n cancel = true;\n }\n\n // Check for a valid user id.\n if (TextUtils.isEmpty(userId)) {\n edtID.setError(getString(R.string.error_field_required));\n focusView = edtID;\n cancel = true;\n } else if (!isUserIdValid(userId)) {\n edtID.setError(getString(R.string.error_invalid_id));\n focusView = edtID;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n JSONObject json = new JSONObject();\n try {\n json.put(\"user_id\", userId);\n json.put(\"password\", password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n reqUserID = userId;\n reqUserPW = password;\n loginConnector.request(json);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n mEMSIpview.setError(null);\n // Store values at the time of the login attempt.\n final String emsIP = mEMSIpview.getText().toString();\n final String email = mEmailView.getText().toString();\n final String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(emsIP)) {\n mEMSIpview.setError(\"Please enter an ems ip\");\n focusView = mEMSIpview;\n cancel = true;\n }\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n performNetworkOperations.doLogin(emsIP, email, password);\n// Toast.makeText(this,token,Toast.LENGTH_SHORT).show();\n// List<String> nodeData = performNetworkOperations.getNodesList(emsIP,token);\n\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailField.setError(null);\n mPasswordField.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordField.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordField;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailField.setError(getString(R.string.error_field_required));\n focusView = mEmailField;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailField.setError(getString(R.string.error_invalid_email));\n focusView = mEmailField;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n signIn(email, password);\n }\n }", "private void login(JTextField user){\n\t\tString username1 = user.getText();\n\t\tuser.setText(null);\n\t\tuser.requestFocus();\n\n\t\t//Validate username\n\t\tif (username1.isEmpty()){\n\t\t\tJOptionPane.showMessageDialog(this,\"Empty values!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\telse if (!username1.matches(\"[a-zA-Z]+\")){\n\t\t\tJOptionPane.showMessageDialog(this,\"Improper Name!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\telse {\n\t\t\tif (DBInit.connectDB(username1)){\n\t\t\t\tFrameController s = BudgieUI.getSwitcher();\n\t\t\t\tJFrame main = new MainUI(\"Budgie\", s);\n\t\t\t\tBudgieUI.setMain(main);\n\t\t\t\ts.setFrame(main);\n\t\t\t\tFrameController.switchFrames();\n\t\t\t} else{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Host Does not exist\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tusername.setText(null);\n\t\t\t\tusername.requestFocus();\n\t\t\t}\n\t\t}\n\n\t}", "private void validarSinInternet() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n LoginUser(email_val, password_val);\n progressBar.setVisibility(View.GONE);\n }\n }", "@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(username.getText().toString()) || TextUtils.isEmpty(password.getText().toString())) {\n new DialogBox(LoginActivity.this, \"Please Enter In The Required Fields!\");\n } else {\n// if(isChecked) {\n// saveLoginDetails();\n// } else {\n// deleteLoginDetails();\n// }\n Login();\n }\n }", "private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "private void onLoginButtonClicked() {\n this.loginManager = new LoginManager(this, this);\n this.password = passwordEditText.getText().toString().trim();\n this.username = usernameEditText.getText().toString().trim();\n if (username.isEmpty() || password.isEmpty()) {\n Snackbar.make(coordinatorLayout, R.string.fill_all_fields_snackbar, Snackbar.LENGTH_LONG).show();\n } else loginManager.fetchUsersToDatabase(username, password, serverName, serverPort);\n }", "private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}", "private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "@Override\n public void onClick(View v) {\n String usernanme=et_username.getText().toString().trim();\n String password=et_password.getText().toString().trim();\n if(usernanme.equals(\"\")||password.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n String msg=repo.CheckUserAlreadyExist(usernanme,password);\n if(!msg.equals(\"exist\"))\n {\n repo.addUser(usernanme,password);\n dialog.dismiss();\n }\n else\n {\n Toast.makeText(AdminHomeActivity.this, \"Username or Password Already Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n\n\n }", "private boolean validateForm() {\n boolean valid = true;\n String tempString;\n\n //Check that username is not blank\n tempString = usernameField.getText();\n if(tempString.isEmpty() || tempString.isBlank()) {\n valid = false;\n errorMessageLabel.setError(ErrorCode.LOGIN_USERNAME_REQUIRED_ERROR);\n }\n\n //Check that password is not blank\n if(!(passwordField.getCharacters().length() > 0)) {\n valid = false;\n errorMessageLabel.setError(ErrorCode.LOGIN_PASSWORD_REQUIRED_ERROR);\n }\n\n return valid;\n }", "private boolean isValidInput() {\n if (null == mUsername || mUsername.length() <= 0) {\n return false;\n } else if (null == mPassword || mPassword.length() <= 0) {\n return false;\n }\n return true;\n }", "public String setPassword(){\n String passWord = \"\";\n while(passWord.isBlank()) {\n System.out.print(\"Please Enter PassWord: \");\n passWord = supplyString.get();\n }\n return passWord.trim();\n }", "public void attemptLogin()\n {\n if ( mAuthTask != null )\n {\n return;\n }\n\n // Reset errors.\n mIPView_.setError( null );\n mPortView_.setError( null );\n\n // Store values at the time of the login attempt.\n mIP_ = mIPView_.getText().toString();\n mPort_ = mPortView_.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if ( TextUtils.isEmpty( mPort_ ) )\n {\n mPortView_\n .setError( getString( R.string.error_field_required ) );\n focusView = mPortView_;\n cancel = true;\n }\n // The port should be four digits long\n else if ( mPort_.length() != 4 )\n {\n mPortView_\n .setError( getString( R.string.error_invalid_server ) );\n focusView = mPortView_;\n cancel = true;\n }\n\n // Check for a valid email address.\n if ( TextUtils.isEmpty( mIP_ ) )\n {\n mIPView_.setError( getString( R.string.error_field_required ) );\n focusView = mIPView_;\n cancel = true;\n }\n\n if ( cancel )\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView\n .setText( R.string.login_progress_signing_in );\n showProgress( true );\n\n // Start the asynchronous thread to connect and post to the server\n mAuthTask = new UserLoginTask();\n mAuthTask.execute( (Void) null );\n }\n }", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "public void authUser(){\n\n String emptyString = \"\";\n if(!(String.valueOf(userName.getText()).equals(emptyString) ||\n String.valueOf(userNumber.getText()).equals(emptyString))){\n\n SharedPreferences preferences = getApplicationContext().getSharedPreferences(\"user_info\", 0);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(getResources().getString(R.string.isLoggedIn), true);\n editor.putString(getResources().getString(R.string.userName), String.valueOf(userName.getText()));\n editor.putString(getResources().getString(R.string.userNumber), String.valueOf(userNumber.getText()));\n editor.apply();\n\n Intent intent = new Intent(getApplicationContext(), HomeScreen.class);\n\n startActivity(intent);\n }\n else{\n Toast.makeText(getApplicationContext(),\n \"Please enter compelete credentials..\", Toast.LENGTH_SHORT)\n .show();\n }\n\n }", "private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }", "public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}", "private void validar() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n firebase_inicio();\n }\n }", "private void InputTextValidator () {\n isNotNull = !txtCategoryNo.getText().equals(\"\") && !txtCategoryName.getText().equals(\"\");\n }", "@Test(\tdescription = \"Verify initial focus on the login screen should be in username\",\n\t\t\tgroups = { \"skip-functional\" })\n\tpublic void LoginScreen03() throws HarnessException {\n\t\tapp.zPageLogin.zNavigateTo();\n\t\t\n\t\t// Type a unique string into the browser\n\t\tString value = \"foo\" + ZmailSeleniumProperties.getUniqueString();\n\t\tapp.zPageLogin.zKeyboardTypeString(value);\n\t\t\n\t\t// Get the value of the username field\n\t\tString actual = app.zPageLogin.sGetValue(PageLogin.Locators.zInputUsername);\n\t\t\n\t\t// Verify typed text and the actual text match\n\t\tZAssert.assertEquals(actual, value, \"Verify the username has initial focus\");\n\t\t\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }", "private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\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 }", "@Override\n public void onClick(View view) {\n inputUsername = usernameInput.getText().toString().trim();\n inputPassword = passwordInput.getText().toString();\n\n if(!inputUsername.contains(\"@gmail.com\")){\n inputUsername = inputUsername.concat(\"@gmail.com\");\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n }\n\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n checkEmail(inputUsername);\n }" ]
[ "0.66842455", "0.6575288", "0.65292084", "0.6503579", "0.6405124", "0.6385137", "0.6348787", "0.63343334", "0.6326252", "0.63115835", "0.6203939", "0.61469364", "0.6145863", "0.61370325", "0.6135625", "0.6115959", "0.61008984", "0.60901815", "0.60851496", "0.60677725", "0.60653055", "0.6059794", "0.60546356", "0.60140884", "0.60059303", "0.59340423", "0.5917791", "0.5916106", "0.59088117", "0.5908443", "0.5906765", "0.5906125", "0.59043294", "0.5895246", "0.5873139", "0.5848119", "0.5833515", "0.5798981", "0.57962406", "0.5796098", "0.57906", "0.57890755", "0.57842994", "0.57643676", "0.5763302", "0.5758568", "0.57562625", "0.57501614", "0.5734035", "0.57218283", "0.57193357", "0.57152545", "0.57090724", "0.57075566", "0.5705262", "0.569903", "0.569851", "0.56979233", "0.5693881", "0.5687948", "0.5675013", "0.5661231", "0.564948", "0.56415236", "0.563992", "0.56351876", "0.5635146", "0.56302327", "0.56286293", "0.5626163", "0.5622301", "0.562187", "0.56110233", "0.5607159", "0.5602379", "0.56004983", "0.5599823", "0.5592408", "0.55893743", "0.55847585", "0.5575526", "0.5575298", "0.5572836", "0.5570197", "0.55655193", "0.55605733", "0.5556582", "0.55553544", "0.5554501", "0.5553391", "0.554988", "0.5549605", "0.5548211", "0.5540226", "0.55400217", "0.5539634", "0.55392796", "0.5537029", "0.5533083", "0.5532822" ]
0.55914056
78
declare where you intend to go
public void onClick(View view) { Intent intent = new Intent(loginActivity.this, resetPasswordActivity.class); //now make it happen startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void doHome()\n\t{\n\t\ttry\n\t\t{\n\t\t\tLocation l = getCurrentLocation();\n\t\t\tSourceFile file = l.getFile();\n\t\t\tint module = file.getId();\n\t\t\tint line = l.getLine();\n\n\t\t\t// now set it\n setListingPosition(module, line);\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"currentLocationUnknown\")); //$NON-NLS-1$\n\t\t}\n\t}", "public void setWhereToGo() {\n\t\tfloat diffZ=mApplications.get(CurIndex).getZ() - Constants.displayedPlace;\r\n\t\tif( Math.abs(diffZ) < Constants.threshold)\r\n\t\t{\r\n\t\t\tif(diffZ >=0)\r\n\t\t\t\tgoTo(Constants.TO_BACKWARD_CENTER);\r\n\t\t\telse\r\n\t\t\t\tgoTo(Constants.TO_FORWARD_CENTER);\r\n\t\t}\r\n\t\telse if( diffZ >= 0) // go to disappeared place\r\n\t\t{\r\n\t\t\tgoTo(Constants.TO_FRONT);\r\n\t\t}\r\n\t\telse if( diffZ < 0) // go to origin place\r\n\t\t{\r\n\t\t\tgoTo(Constants.TO_BACK);\r\n\t\t}\r\n\t}", "public void findDestination() {\n\t\t\n\t}", "private void setStart()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to start at? Enter the location number\"); \n computePaths(cities.get(input.nextInt()));\n printMenu(); \n }", "public void startPosition();", "private void getLocation() {\n\n }", "@Override\n protected void initLocation() {\n }", "public Place goNorth();", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "public void goToLocation (Locator checkpoint) { //Patrolling Guard and Stationary Guard\r\n\t\tVector2i start = new Vector2i((int)(creature.getXlocation()/Tile.TILEWIDTH), (int)(creature.getYlocation()/Tile.TILEHEIGHT));\r\n\t\tint destx = (int)(checkpoint.getX()/Tile.TILEWIDTH);\r\n\t\tint desty = (int)(checkpoint.getY()/Tile.TILEHEIGHT);\r\n\t\tif (!checkCollision(destx, desty)) {\r\n\t\tVector2i destination = new Vector2i(destx, desty);\r\n\t\tpath = pf.findPath(start, destination);\r\n\t\tfollowPath(path);\r\n\t\t}\r\n\t\tarrive();\r\n\t}", "@Override\n public final void noteAbsoluteEntryPoint(int currentValue, ClassicLang lang) {\n }", "private void Myinits() {\n \n \n \n setLocationRelativeTo(this);\n }", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "public void referToGP(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "private void gotoPath() {\n\t\tfinal String hdfs = getFullPath(txtRootPath.getText().trim());\n\t\tif (StringUtils.isEmpty(hdfs)) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tFileStatus fs = getFileStatusWithProgress(hdfs);\n\t\t\tgotoPath(fs);\n\t\t} catch (Exception e) {\n\t\t\tMessageDialog.openError(getShell(), Messages.msgError, e.getMessage());\n\t\t}\n\t}", "private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }", "public abstract int getStartPosition();", "private void goGuide() {\n }", "public MoveCursorToHome ( CTEUser user ) {\n _user = user;\n }", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "private HelperLocation() {}", "public void doGoToLocation(Structure structure)\n\t{\n\t\tif(vehicle.currentLocation != null)\n\t\t{\n\t\t\tx = (int)vehicle.currentLocation.getParkingLocation().getX();\n\t\t\ty = (int)vehicle.currentLocation.getParkingLocation().getY();\n\t\t}\n\t\tdestination = structure;\n\t\tdestX = (int)destination.getParkingLocation().getX();\n\t\tdestY = (int)destination.getParkingLocation().getY();\n\t\tfired = false;\n\t\tpresent = true;\n\n\t\tcurrent = new Point(x/CityPanel.GRID_SIZE,y/CityPanel.GRID_SIZE);\n\t\tnext = current;\n\t\t\t\t\n\t\tfindPath();\n\t}", "public void getLocation(){\n }", "public int getLocation() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}", "public void adjLocation(double l){this.PlayerLocation;}", "public static void main(String[] args) {\n int pos = 3;\n }", "private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }", "int getStartPosition();", "int getStartPosition();", "private void returnDriverLocationstoMaps() {\n }", "public void goToStart() {\n\t\tsetPosition(0);\n\t}", "public interface Location {\n\t/**\n\t * Returns the current path such as <code>/app/settings</code>.\n\t * \n\t * @return Path\n\t */\n\tString getPath();\n}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void navigation() {\n }", "private void setEnd()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to end at? Enter the location number\"); \n cities = getShortestPathTo(cities.get(input.nextInt())); \n }", "private void initLocation() {\n setLocationRelativeTo(null);\n }", "@Override\n\tpublic void prepare() {\n\t\tSystem.out.println(\"i am in ShanTou,i like the pork,so i add the pork\");\n\n\t}", "public int getLocation()\r\n {\n }", "public ImPoint getCurrentLoc() {\n\treturn curPoint; // REMOVE this line -- dummy code to get it to compile\n }", "protected void setupLocal() {}", "public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}", "public void prepare()\n\t{\n\t\tSystem.out.println(getClass().getName()+\" is preparing to go outside.\");\n\t}", "public ReturnHome() {\n addSequential(new SetShooterPos(Constants.shooterHome));\n addParallel(new HoldIntakePosition(Constants.intakeArmHome));\n addSequential(new WaitCommand(1.5));\n addSequential(new StopChassisIntake());\n }", "public Location getStartLocation() {\r\n \treturn new Location(0,0);\r\n }", "private void navToPoint(Unit unit){\n\t\tMapLocation currentLocation = unit.location().mapLocation();\n\t\tMapLocation locationToTest;\n\t\tMapLocation targetLocation = orderStack.peek().getLocation();\n\t\tlong smallestDist=1000000000; //arbitrary large number\n\t\tlong temp;\n\t\tDirection closestDirection=null;\n\t\tint i=1;\n\t\t\n\t\tif(gc.isMoveReady(unitID)){\n\t\t\t//first find the direction that moves us closer to the target\n\t\t\tfor(Direction dir : Direction.values()){\n\t\t\t\tif (debug) System.out.println(\"this (\"+dir.name()+\") is the \"+i+\"th direction to check, should get to 9\");\n\t\t\t\tlocationToTest=currentLocation.add(dir);\n\t\t\t\t//make sure it is on the map and is passable\n\t\t\t\tif (debug){\n\t\t\t\t\tSystem.out.println(\"testing this location: \"+locationToTest);\n\t\t\t\t\tSystem.out.println(\"valid move? \"+gc.canMove(unitID, dir));\n\t\t\t\t}\n\t\t\t\tif(gc.canMove(unitID, dir)){\n\t\t\t\t\tif (debug)System.out.println(\"we can indeed move there...\");\n\t\t\t\t\t//make sure the location hasn't already been visited\n\t\t\t\t\tif(!pastLocations.contains(locationToTest)){\n\t\t\t\t\t\tif (debug)System.out.println(\"not been there recently...\");\n\t\t\t\t\t\t//at this point its a valid location to test, check its distance\n\t\t\t\t\t\ttemp = locationToTest.distanceSquaredTo(targetLocation);\n\t\t\t\t\t\tif (debug)System.out.println(\"distance :\"+temp);\n\t\t\t\t\t\tif (temp<smallestDist){\n\t\t\t\t\t\t\tif (debug)System.out.println(\"new closest!\");\n\t\t\t\t\t\t\t//new closest point, update accordingly\n\t\t\t\t\t\t\tsmallestDist=temp;\n\t\t\t\t\t\t\tclosestDirection=dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}//end of for-each loop\n\t\t}//end move ready if.\n\t\t\n\t\t//actual movement and maintenance of places recently visited\n\t\tif(closestDirection!=null){\n\t\t\tif (debug){\n\t\t\t\tSystem.out.println(\"found a closest direction, calling navInDirection()\");\n\t\t\t\tSystem.out.println(\"heading \"+closestDirection.name());\n\t\t\t}\n\t\t\tmoveInDirection(closestDirection, unit);\n\t\t\tcleanUpAfterMove(unit);\n\t\t}else{\n\t\t\t//can't get any closer\n\t\t\tif (debug) System.out.println(\"can't get closer, erasing past locations\");\n\t\t\tpastLocations.clear();\n\t\t}\n\t\t\n\t\t//have we arrived close enough?\n\t\tif(unit.location().mapLocation().distanceSquaredTo(targetLocation)<=howCloseToDestination){\n\t\t\t//atTargetLocation=true;\n\t\t\t\n\t\t\t//if order was a MOVE order, it is complete, go ahead and pop it off the stack\n\t\t\tif(orderStack.peek().getType().equals(OrderType.MOVE)){\n\t\t\t\torderStack.pop();\n\t\t\t}\n\t\t\tif (debug) System.out.println(\"Unit \"+unit.id()+\" arrived at destination.\");\n\t\t}\n\t\t\n\t\t;\n\t}", "void moveToStart();", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "private static Position position(ParserRuleContext ctx) {\n return new Position(ctx.start.getLine(),\n ctx.start.getCharPositionInLine());\n }", "@Override\n protected void checkLocation() {\n // nothing\n }", "@Override\n public final void noteAbsoluteEntryPoint(int address) {\n }", "public void start( )\n {\n // Implemented by student.\n }", "public Location getStartingLocation() {\r\n return startingLocation;\r\n }", "private void setLocationRelativeTo(Object object) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void setLocationRelativeTo(Object object) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "public void moveRobber(HexLocation loc) {\n\n\t}", "public void goHome() throws ManipulatorException;", "public String getRunLocation();", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "public void Goto() {\n\t\t\n\t}", "private void goZhuSuOrder(int position){\n\t}", "private int parent ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "public RTWLocation parent();", "private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void sit();", "protected void foundGoal( Path pathToGoal ) {\n\t\t/* A dummy implementation that does nothing with this\n\t\t exciting news. */\n\t}", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public void goTo(Location l){\n\t\t//System.out.println(\"Agents:\" + i++);\n\t\tif(isLocated) System.out.println(\"is already located\");\n\t\tif(!l.hasContext()) new PContext(l);\n\t\tmyContext = l.getMyContext();\n\t\tmyContext.addAgent(this);\n\t\tif(CFG.GUI()) Helper.moveToObject(myGrid, this, l);\n\t\tsetLocated(true);\n\t}", "public void masterProg() {\n\t\tmoveObjsToGoals();\r\n\t}", "public void beginHostile()\r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic int whereAmI() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void goi() {\n\n\t}", "Point onPage();", "private void assignment() {\n\n\t\t\t}", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "private static void testGetCurrentLoc(Drunkard drunkard){\n\t System.out.println(\"get starting location[expected (3,5)]: (\" + drunkard.getCurrentLoc().getX() + \",\" + drunkard.getCurrentLoc().getY() + \")\");\n\t}", "public Location getEnterLocation() {\r\n return location;\r\n }", "public void goUp();", "private SourcePosition getTreeStartLocation() {\n return peekToken().location.start;\n }", "void sitOn();", "private stendhal() {\n\t}", "void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}", "public void home ()\r\n\t{\r\n\t\tthis.sector = this.head = this.cylinder = 0;\r\n\t}", "public void cursorHome();", "public void goHome();", "private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }", "static void EnterScope(){\r\n\t\tcurLevel++;\r\n\t\tScope scope = new Scope(curLevel);\r\n\t\t//scope.nextAdr = 3;\r\n\t\ttopScope.ant = scope;\r\n\t\tscope.sig = topScope; \r\n\t\ttopScope = scope;\r\n }", "public void travel();", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "public void go();", "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void OnGo(int position) {\n }", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "public void logic(){\r\n\r\n\t}", "public static String setLocation(Scanner sc){\n\t\t\n\t\tSystem.out.println(\"Ingrese la ubicacion inmueble:\");\n\t\tString location = sc.nextLine();\n\t\treturn location;\n\t\t\n\t}", "@Override\n\tpublic void resetLocation() {\n\t\t\n\t}", "void walk() {\n\t\t\n\t}", "int getLocation() throws IllegalStateException;" ]
[ "0.6503059", "0.60133356", "0.5805242", "0.5766369", "0.5622434", "0.55800796", "0.54610276", "0.54225826", "0.541433", "0.5412642", "0.53938127", "0.5386102", "0.53804606", "0.5354525", "0.5331646", "0.5299764", "0.5293963", "0.52864105", "0.5261076", "0.5229305", "0.521121", "0.5182219", "0.5172253", "0.5162253", "0.5154462", "0.5153599", "0.5134809", "0.51292497", "0.51142985", "0.51142985", "0.511135", "0.50967824", "0.50893784", "0.50852895", "0.50841093", "0.507081", "0.5062102", "0.505787", "0.5056266", "0.50536925", "0.50515276", "0.50514746", "0.5039996", "0.5032788", "0.50277233", "0.50149316", "0.50093", "0.50051075", "0.5004911", "0.50042427", "0.5001773", "0.4993838", "0.49924594", "0.49890292", "0.4986696", "0.4986696", "0.49765104", "0.49700361", "0.496596", "0.49657127", "0.4964498", "0.49587616", "0.49578625", "0.49560967", "0.49441054", "0.4934369", "0.49310723", "0.49268308", "0.4925543", "0.4918768", "0.49160933", "0.49147916", "0.49139002", "0.49131852", "0.49078304", "0.49042228", "0.48997378", "0.48978013", "0.48974976", "0.48915592", "0.48908126", "0.4890682", "0.48854402", "0.4883431", "0.48799032", "0.48776737", "0.48725086", "0.48688364", "0.486664", "0.48660958", "0.48642462", "0.48608172", "0.48569158", "0.48536012", "0.48477077", "0.48415416", "0.4835071", "0.48300675", "0.48270625", "0.48253995", "0.48212433" ]
0.0
-1
CHECK DATABASE IF REQUESTED USERNAME IS TAKEN Get an instance to our database
private void attemptLogin2(String emailString,String passwordString) { FirebaseDatabase skoovyDatabase = FirebaseDatabase.getInstance(); // Get a reference to our userInfo node DatabaseReference currentSkoovyUsers = skoovyDatabase.getReference("userInfo"); mAuth.signInWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { //Log.d(TAG, "signInWithEmail:onComplete:" + task.isSuccessful()); Toast.makeText(loginActivity.this, "login successful", Toast.LENGTH_SHORT).show(); // If sign in fails, display a message to the user. If sign in succeeds // the auth state listener will be notified and logic to handle the // signed in user can be handled in the listener. if (!task.isSuccessful()) { //Log.w(TAG, "signInWithEmail:failed", task.getException()); Toast.makeText(loginActivity.this, "login failed", Toast.LENGTH_SHORT).show(); } // ... } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "public boolean isUserAllowedDatabaseAccess(String dbname,String username) {\n return manager.getAccount(manager.getSystemSubject(), username)!=null;\n }", "Boolean checkUserExists(String userName) throws AppException;", "private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "public ResultSet namevalidate(String uname) throws Exception{\n\t\trs=DbConnect.getStatement().executeQuery(\"select * from LOGIN where USERNAME='\"+uname+\"'\");\r\n\t\treturn rs;\r\n\t}", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\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}", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "public boolean isUser(String userName) throws Exception;", "User checkUser(String username, String password);", "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean createNewUser(String username){\n boolean isCreated=false;\n try{\n\n database = dbH.getWritableDatabase();\n dbH.openDataBase();\n database.execSQL(\"INSERT INTO CurrentUser (Username) VALUES ('\" + username + \"');\");\n isCreated=true;\n dbH.close();\n }\n catch (SQLException e){\n }\n return isCreated;\n }", "@Override\n\tpublic boolean checkUsername(String userName) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tStatement userCheck = connectionService.getConnection().createStatement();\n\t\t\t//userCheck.executeQuery(\"SELECT name FROM players WHERE name='\" + userName + \"';\");\n\t\t\t\n\t\t\tResultSet rs = userCheck.executeQuery(\"SELECT username FROM players WHERE username='\" + userName + \"';\");\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\t\n\t\t\t\t//if (!rs.getString(\"\")\n\t\t\t\t\t\n\t\t\t\t\t//connectionService.finalize();\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//connectionService.finalize();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Exception: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t}", "public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }", "User getUser(String userName) throws DatabaseException;", "private void testUserName(){\r\n\t\t//get user with the 'test' userName\r\n\t\tString command = \"SELECT userName FROM users \"\r\n\t\t\t\t+ \"WHERE userName = \\\"\" + commandList.get(1) + \"\\\";\";\r\n\t\tSystem.out.println(command);//print command\r\n\t\ttry {//send command\r\n\t\t\trs = stmt.executeQuery(command);\r\n\t\t\t\r\n\t\t\tif(rs.next()){//if it returns user, userName exists\r\n\t\t\t\tout.println(\"exists\");\r\n\t\t\t} else {//no results returned, empty\r\n\t\t\t\tout.println(\"free\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());//send back error message\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public boolean isUsernameTaken(String username) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n boolean taken = dbb.isUsernameTaken(username);\n dbb.commit();\n dbb.closeConnection();\n return taken;\n }", "public static synchronized int checkVerification(String userName){\n\t\t\tConnection connection;\n\t\t \tint valid = 1;\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT Validated FROM Credential WHERE Email = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection=DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setString(1, userName);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tvalid = rs.getInt(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tvalid = 1;\n\t\t\t\t}\t\n\t\t\treturn valid;\n\t}", "@Override\n\tpublic boolean validateUser(String userName) throws FetchException{\n\t\ttry{\n\t\treturn new DishDaoImpl().validateUser( userName) ;\n\t\t}\n\t\tcatch(DaoException e){\n\t\t\te.printStackTrace();\n\t\t\tthrow new FetchException(e.getMessage());\n\t\t}\n\t\t\n\t}", "public abstract boolean checkUser(String username);", "public Boolean checkusername( String username){\n SQLiteDatabase sdb = this.getReadableDatabase();\n Cursor cursor = sdb.rawQuery(\"Select * from user where username=?\",new String[]{username});\n if(cursor.getCount()>0) {\n return false;\n }\n else {\n return true;\n }\n }", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "private void verifyFromSQLite(){\n textInputLayoutUsername.setErrorEnabled(false);\n textInputLayoutPassword.setErrorEnabled(false);\n User user = new User();\n boolean _isnorekexist = false;\n\n for (int i=0;i<User.users.size();i++) {\n if (User.users.get(i).username.equals(textInputEditTextUsername.getText().toString())) {\n _isnorekexist = true;\n user = User.users.get(i);\n break;\n }\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextUsername, textInputLayoutUsername, getString(R.string.error_message_username))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextPassword, textInputLayoutPassword,getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextNoRekExist(textInputEditTextUsername, textInputLayoutUsername,_isnorekexist,getString(R.string.error_username_not_exists))){\n return;\n }\n if (databaseHelper.checkUsername(textInputEditTextUsername.getText().toString().trim()\n , textInputEditTextPassword.getText().toString().trim())) {\n\n SessionManager sessionManager = SessionManager.with(this);\n sessionManager.createsession(user);\n progress = new ProgressDialog(this);\n progress.setMessage(\"Loading...\");\n progress.show();\n Thread _thread = new Thread() {\n @Override\n public void run() {\n try {\n Thread.sleep(2000);\n progress.dismiss();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n masuk();\n }\n });\n\n }\n };\n _thread.start();\n }\n else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(nestedScrollView, getString(R.string.error_valid_username_pin), Snackbar.LENGTH_LONG).show();\n }\n }", "private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}", "public static boolean availabilityCheck(String userName,String userEmail)\n\t{\n\t\ttry\n\t\t{\n\t\t\tString queryToExecute = \"select username , email from users \"\n\t\t\t\t\t+ \" where username=\\\"\"+userName+\"\\\" ;\";//need more advanced verifying system , gotta complete this stuff as soon as I'll come back\n\t\t\t\n\t\t\tquery = statement.executeQuery(queryToExecute);\n\t\t\t\n\t\t\tString userNameToCheck =\"\";\n\t\t\tString userEmailToCheck =\"\";\n\t\t\t\n\t\t\twhile(query.next())\n\t\t\t{\n\t\t\t\t\n\t\t\t\tuserNameToCheck = query.getString(\"username\");\n\t\t\t\tuserEmailToCheck = query.getString(\"email\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\"DB side :\"+userNameToCheck);\n\t\t\t\n\t\t\tString queryToExecute2 = \"select email from users where email=\\\"\"+userEmail+\"\\\" ;\";\n\t\t\t\n\t\t\tquery = statement.executeQuery(queryToExecute2);\n\t\t\t\n\t\t\tString emailVerifying =\"\";\n\t\t\t\n\t\t\twhile(query.next())\n\t\t\t{\n\t\t\t\temailVerifying = query.getString(\"email\");\n\t\t\t}\n\t\t\t\n\t\t\tif(userNameToCheck.trim().length() == 0 || userEmailToCheck.trim().length() ==0)\n\t\t\t{\n\t\t\t\tif(emailVerifying.trim().length() == 0)\n\t\t\t\t{\n\t\t\t\t return true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t return\tfalse;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private boolean validateUsername() {\n // Get doctor's username\n EditText doctorUsername = (EditText) rootView.findViewById(R.id.doctorField);\n String doctorUsernameString = doctorUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `doctor` on user.id=doctor.userid where username='%s'\", doctorUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Get patient's username\n EditText patientUsername = (EditText) rootView.findViewById(R.id.patientField);\n String patientUsernameString = patientUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `patient` on user.id=patient.userid where username='%s'\", patientUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "public boolean checkUsername(String name) {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(\"SELECT count(*) FROM users where username = '\" + name + \"'\");\r\n\t\t\treturn rs.first();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean isUserExist(String username) throws ErrorConnectionException, TException;", "private void checkUserExists() {\n dblogin.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n showData1(dataSnapshot);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }", "public void verify() {\n lblTheDatabaseNameIsEmpty();\n lblDatabaseName();\n lblUserName();\n lblPassword();\n lblDatabaseLocation();\n txtPassword();\n txtUserName();\n txtDatabaseLocation();\n btSettings();\n txtDatabaseName();\n btCancel();\n btOK();\n }", "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "public static boolean userExist(String username){\n boolean exist = false;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"RDS_HOST\",\"RDS_USERNAME\",\"RDS_PASSWORD\");\n String query = \"SELECT username FROM users WHERE username = ?\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1,username);\n resultSet = preparedStatement.executeQuery();\n if(resultSet.next()){\n exist = true;\n }\n\n }\n finally {\n close();\n return exist;\n }\n }", "public boolean checkUser(String mail) {\n String[] selectionArgs = {mail};\n String selectionString = \"SELECT * FROM \" + UserDBHelper.TABLE_NAME + \" WHERE \" + UserDBHelper.COLUMN_EMAIL + \" = ?\";\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectionString,selectionArgs);\n\n if (cursor.getCount() > 0) {\n cursor.close();\n db.close();\n return true;\n }\n else{\n cursor.close();\n db.close();\n return false;\n }\n\n }", "protected void verifyDatabaseNameBeforeTransaction( String databaseName )\n {\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "boolean checkAvailable(String userName);", "@Override\n public boolean verifyJobDatabase() {\n try (Connection conn = getConnection()) {\n } catch (Exception e) {\n LOG.error(\"Failed to verify connection to the Job Database. \", e);\n return false;\n }\n return true;\n }", "public boolean checkUsername(String user) {\n\n }", "User getUser(String userName) throws InstanceNotFoundException;", "public boolean checkUser(String name) {\n String[] columns = {\n PDF_NAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = PDF_NAME + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {name};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }", "@Override\n\tpublic boolean user_register_samenametest(Map<String, Object> reqs) {\n\t\tString sql=\"select userName from tp_users where userName=:userName\";\n\t\tif(joaSimpleDao.count(sql, reqs)==1 )\n\t\t{\t\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\t\n\t}", "@Override\n public boolean userExists(String name){\n\n String sql = \"SELECT count(*) FROM users WHERE name=?\";\n int count = jdbcTemplate.queryForObject(sql, Integer.class, name);\n if(count == 0) {\n return false;\n } else {\n return true;\n }\n\n }", "private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }", "public boolean verifyUser(User user) {\n GetUserTask getUserTask = new GetUserTask();\n User temp = new User();\n\n try {\n temp = getUserTask.execute(user.getUserName()).get();\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n //if user did not exist, add one\n if(temp == null){\n ElasticSearchUserController.AddUserTask addUserTask = new ElasticSearchUserController.AddUserTask();\n addUserTask.execute(user);\n return true;\n }\n return false;\n }", "boolean isUniqueUsername(String username) throws SQLException;", "void ensureUserCreationAllowed(String email, String userName) throws BadRequestException, ConflictException, ServerException;", "boolean checkUniqueUser(String login, Connection connection) throws DAOException;", "User getUserUnderValidation();", "public boolean getUser(String name) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"name=\" + name;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_USER;\r\n String data = server.get(url, parameters);\r\n return data.equals(\"1\");\r\n }", "public void queryServer()\n {\n if(!getPassword().equals(getPasswordConfirm()))\n {\n Toast.makeText( (getActivity() ) .getBaseContext(), \"Password Mismatch.\", Toast.LENGTH_SHORT).show();\n passwordEdit.setText(\"\");\n passwordConfirmEdit.setText(\"\");\n }\n else if(!noNullUserInput())\n {\n //TODO highlight unfished fields.\n Toast.makeText( (getActivity() ) .getBaseContext(), \"Finish filling out the data!\", Toast.LENGTH_SHORT).show();\n }\n else if(Model.instance().getServerHost() == null || Model.instance().getServerHost() == null )\n {\n ((FamilyMap) getActivity() ).createServerInfoQuery(this); //easy...\n }\n else\n {\n //try it out. if it fails\n WebAccess wa = new WebAccess();\n RegisterRequest rr = new RegisterRequest(this.getUserName(),this.getPassword(),this.getEmail(), this.getFirstName(), this.getLastName(), this.getGender());\n wa.execute(rr);\n deactivateButtons();\n }\n }", "private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\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}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }", "private void isUser() {\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n assert user != null;\r\n String Uphonenumber = user.getPhoneNumber();\r\n final String usernumber = Objects.requireNonNull(Uphonenumber);\r\n\r\n DatabaseReference reference = FirebaseDatabase.getInstance().getReference(\"UsersData\");\r\n Query checkUser = reference.orderByChild(\"phone\").equalTo(usernumber);\r\n checkUser.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\r\n if (dataSnapshot.exists()){\r\n\r\n nameFromDB = dataSnapshot.child(usernumber).child(\"name\").getValue(String.class);\r\n phoneFromDB = dataSnapshot.child(usernumber).child(\"phone\").getValue(String.class);\r\n dashboardUsername.setText(nameFromDB);\r\n dashboardPhoneNumber.setText(phoneFromDB);\r\n progressBar.DismissDialog();\r\n\r\n\r\n }\r\n else{\r\n Toast.makeText(getApplicationContext(),\"User data didn't matched! \", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }//End of onDataChange method\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError databaseError) {\r\n\r\n }\r\n });//End of addListenerForSingleValueEvent method\r\n\r\n\r\n }", "@Override\r\n\tpublic boolean isDatabaseAvailable(UserDatabase userDatabase) {\n\t\t\r\n\t\treturn false;\r\n\t}", "boolean isUser(String username);", "public boolean checkUser(String username){\n String hql = \"SELECT c.id from Customer c where c.username = :username\";\n Query query = entityManager.createQuery(hql);\n query.setParameter(\"username\", username);\n try {\n query.getSingleResult();\n }catch(NoResultException e){\n return true;\n }\n return false;\n }", "public String getUser(String userName){\n SQLiteDatabase database = this.getWritableDatabase();\n Cursor cursor=database.query(\"admin\", null, \" username=?\", new String[]{userName}, null, null, null);\n if(cursor.getCount()<1) // UserName Not Exist\n {\n cursor.close();\n return \"NOT EXIST\";\n }\n cursor.moveToFirst();\n String username= cursor.getString(cursor.getColumnIndex(\"username\"));\n cursor.close();\n return username;\n}", "User getUserByUsername(String name) throws InvalidUserException;", "private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }", "private void logic_for_username() {\n userID = SCUtils.getUniqueID(getApplicationContext());\n databaseRef.child(\"users\").child(userID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override public void onDataChange(DataSnapshot dataSnapshot) {\n progressBar.setVisibility(View.GONE);\n if (!dataSnapshot.exists()) {\n show_alert_username();\n } else {\n username = dataSnapshot.getValue(String.class);\n Snackbar.make(findViewById(android.R.id.content), \"Logged in as \" + username, Snackbar.LENGTH_SHORT).show();\n }\n }\n\n @Override public void onCancelled(DatabaseError databaseError) {\n Log.w(\"!!!\", \"username:onCancelled\", databaseError.toException());\n }\n });\n }", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "public boolean checkUser(User userobj)\n\t\t{\n\t\t\tCursor c = getUser();\n\t\t\tif(c!=null){\n\t\t\t\tc.moveToFirst();\n\t\t\t\tdo{\n\t\t\t\tif(userobj.getUserName().equalsIgnoreCase(c.getString(1))&& userobj.getPassword().equalsIgnoreCase(c.getString(2)))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t}while(c.moveToNext());\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public abstract boolean existsGame2(String username) throws SQLException;", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "public boolean tryConnection(String userName, String password){\n //ID cant be set BY the program, it has to be pull out from database\n //Compare the userName and the password in the database then return the ID\n //SQLite Query, need to change the name of variable for the proper field\n String getUserQuery = \"SELECT userID FROM UserAccount WHERE userName=\\\"\" + userName +\n \"\\\" and userPassword=\\\"\" + password + \"\\\"\";\n\n //Try / catch because when connection to database there is possible problem\n try {\n //This has to be changed for database handler\n boolean resultExist = true;//Get the result of database\n int result = 0;\n\n if(resultExist)//Look if there is 1 result, if so put the ID of the user in ID\n {\n this.ID = result;\n this.userName = userName;\n this.password = password;\n return(true);//Connection successful\n }\n }\n //If something went wrong with the database(lost connection or other thing)\n catch(Exception ex)\n {\n return(false);\n }\n return(false);//Connection unsuccessful\n }", "public boolean isUsernameTaken(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname;\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if(uname.equals(username)) {\n return true;\n }\n } while (cursor.moveToNext());\n }\n\n return false;\n }", "public boolean createUser() {\r\n\t\tboolean signupSuccess = false;\r\n\t\t/**\r\n\t\t*\tSince connecting to database (DbConnection()) and retrieving data (fetchSelectAllUsers())\r\n\t\t* throw SQLException and throwing an exception from multiple levels again and again is not\r\n\t\t*\ta good way, so its is needed to catch the exception here.\r\n\t\t*/\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tCreate a connection to the database\r\n\t\t\t*/\r\n\t\t\tDbConnection signupConn = new DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tinsert data into table\r\n\t\t\t*/\r\n\t\t\tsignupSuccess = signupConn.executeInsertIntoUsers(uName, password, fullName, phone, email);\r\n\r\n\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"**************Error Connecting to the Database**************\");\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn signupSuccess;\r\n\t}", "public static boolean checkRegisteredUsername(String username){\n \tboolean found = false;\n \ttry {\n\t\t\tfound = DBHandler.isUsernameTaken(username, c); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn found;\n }", "public static void phoneAdmin(){\r\n\r\n\r\n try (Connection c = getConnection()) {\r\n\r\n // String sql = \"SELECT * FROM sms.phones when PhoneNumber = 79827956841 \" ;\r\n String sql = \"SELECT * from sms_log.users where username = 'Pedro'\";\r\n PreparedStatement ps = c.prepareStatement(sql);\r\n\r\n\r\n try (ResultSet rs = ps.executeQuery()) {\r\n if (rs.next()) {\r\n isPhoneAdminExists = true;\r\n\r\n\r\n }\r\n\r\n adminSmsRid();\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (isPhoneAdminExists) {\r\n\r\n\r\n blackList();\r\n\r\n\r\n\r\n }\r\n\r\n }", "void regist(User user) throws SQLException;", "@Override\n\tpublic Boolean chkUserNameForApply(String usernameStr) {\n\t\tList<ApplyUsers> usersList = new ArrayList<ApplyUsers>();\n\t\tString sql=\"select applyid from apply_users where applyname='\" + usernameStr + \"'\";\n\t\tusersList = JdbcUtils.query(ApplyUsers.class, sql);\n\t\tif(usersList.size()>0){\n\t\t return false;\n\t\t}else{\n\t\t return true;\n\t\t}\n\t}", "public User userExist(User user);", "public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }", "@Override\r\n protected String doInBackground(String... params) {\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(RegistrationActivity.this);\r\n if(databaseAccess.checkIfUserEmailExists(params[2])){\r\n userRegistration=USER_ALREADY_EXISTS;\r\n }else{\r\n //else register User\r\n if(databaseAccess.createNewUser(params[0],params[1],params[2],params[3])) {\r\n userRegistration=USER_REGISTERED_SUCCESSFULLY;\r\n }\r\n }\r\n return userRegistration;\r\n }", "public boolean testUser(){\n VallidateUserName validator = new VallidateUserName();\n return validator.isValidUser(UserName);\n }", "public boolean existsUser(String username);", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "private boolean isRequestAlreadySent(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tString loggedInUserName = (String) httpSession.getAttribute(\"loggedInUserName\");\r\n\t\tlogger.debug(\"UserName in isRequestAlreadySent :\"+loggedInUserName);\r\n\t\tif(friendDAO.getFriendWithUserNameAndFriendName(loggedInUserName,friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public Boolean ins(User user);", "private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}", "private void verifyDatabaseNickname(String nickname){\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.collection(\"User\").orderBy(\"Nickname\", Query.Direction.DESCENDING)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n int nb=0;\n for (DocumentSnapshot doc : task.getResult())\n {\n System.out.println(\"===== \"+doc.getString(\"Nickname\"));\n System.out.println(\"===== N to test : \" + nickname);\n if(nickname.equals(doc.getString(\"Nickname\"))){\n nb++;\n }\n\n\n }\n TextView status = findViewById(R.id.inscr_verif_state);\n if(nb==0){\n\n status.setText(\"'\"+ nickname + \"'\" + \" is free to use !\");\n status.setTextColor(Color.GREEN);\n\n Button btn = findViewById(R.id.inscr_btn_next2);\n btn.setEnabled(true);\n btn.setVisibility(View.VISIBLE);\n user.nickname = nickname;\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.invalid_nickname), Toast.LENGTH_SHORT ).show();\n\n status.setText(nickname + \": already in use.\");\n status.setTextColor(Color.RED);\n }\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Subscription_part2_Activity.this,\"Fail on loading database.\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }", "public boolean checkEmail(String username) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\";\n String[] selectionArgs = {username};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }", "public boolean userNameExist(String username);", "public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "boolean verifyJobDatabase();", "boolean isUserExist(String username, String password);", "public static String userNameValid(String name){\n return \"select u_name from users having u_name = '\" + name + \"'\";\n }", "public boolean checkUserExists(String username) {\n boolean exists = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=?\");\n ps.setString(1, username);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is false if the set is empty\n exists = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return exists;\n }", "public static Boolean isUser(String username){\n connect();\n try{\n String queryCheck = \"SELECT u.username \" +\n \"FROM User u \" +\n \"WHERE u.username=?\";\n ps = conn.prepareStatement(queryCheck);\n ps.setString(1,username);\n rs = ps.executeQuery();\n if(rs.next()){\n return true;\n }\n }catch(SQLException sqle){\n System.out.println(\"SQLException in function \\\" getData\\\": \");\n sqle.printStackTrace();\n }finally{\n close();\n }\n return false;\n }", "public boolean validateRegister(String email) {\n\t\tLog.i(TAG, \"validate current user whether exisits in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return true;\n\t\treturn false;\n\t}", "public void check() {\r\n logger.info(\"ADIT monitor - Checking database and application.\");\r\n\r\n checkApplication();\r\n\r\n checkDBConnection();\r\n checkDBRead(this.getMonitorConfiguration().getTestDocumentId());\r\n }", "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "public void userExists(){\n\n DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();\n DatabaseReference userNameRef = rootRef.child(\"users\").child(winnerName);\n ValueEventListener eventListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(!dataSnapshot.exists()) {\n createNewUser();\n }\n else{\n updateUser();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"TAG\", databaseError.getMessage()); //Don't ignore errors!\n }\n };\n userNameRef.addListenerForSingleValueEvent(eventListener);\n\n\n }", "public static boolean check(User user) {\n\t\tboolean flag = false; \n\t\tResultSet resultSet = null;\n\t\ttry {\n\t\t\t//Register the Driver class\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\n\t\t\t//Create connection\n\t\t\tConnection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Login2\", \"root\", \"root\");\n\t\t\t\n\t\t\t//Create preparedStatement\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"select * from user where username = ? && password = ?\");\n\t\t\tpreparedStatement.setString(1, user.getUserName());\n\t\t\tpreparedStatement.setString(2, user.getUserPassword());\n\t\t\t\n\t\t\t//Execute queries\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tif(resultSet.next())\n\t\t\t\tflag = true;\n\t\t\telse\n\t\t\t\tflag = false;\n\t\t\t\n\t\t\t//Close connection\n\t\t\tpreparedStatement.close();\n\t\t\tconnection.close();\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn flag;\n\t}" ]
[ "0.63857996", "0.63116854", "0.6251701", "0.62436795", "0.62426704", "0.6111629", "0.6093705", "0.60872895", "0.6007904", "0.5987499", "0.5984483", "0.59804684", "0.5974157", "0.5956243", "0.5932462", "0.5905617", "0.58981293", "0.58799857", "0.5859796", "0.58565813", "0.5834801", "0.58347017", "0.5831126", "0.58247954", "0.57987577", "0.5778656", "0.575083", "0.57229036", "0.5718583", "0.5703608", "0.5700888", "0.5692354", "0.56866413", "0.568455", "0.56747335", "0.56704605", "0.5663351", "0.56546086", "0.5649578", "0.5618801", "0.5608197", "0.5607965", "0.55945396", "0.55802274", "0.5577315", "0.5570937", "0.55672234", "0.5566285", "0.55586505", "0.55524725", "0.5549493", "0.5537098", "0.55328435", "0.5523467", "0.5522555", "0.552204", "0.55211264", "0.55197364", "0.5486178", "0.5478902", "0.54768246", "0.54754174", "0.546771", "0.5466082", "0.5455169", "0.5452381", "0.54481775", "0.5446671", "0.54466003", "0.54278266", "0.54192424", "0.54116476", "0.5407906", "0.54061735", "0.5399052", "0.5394969", "0.53899854", "0.53892076", "0.538651", "0.53768706", "0.53700715", "0.5366966", "0.53521925", "0.5345144", "0.53368664", "0.53334475", "0.53334105", "0.5330772", "0.5327619", "0.53044534", "0.53037566", "0.5300705", "0.53002864", "0.52999467", "0.528949", "0.52871513", "0.5284216", "0.52811086", "0.528036", "0.5277895", "0.52760726" ]
0.0
-1
Log.d(TAG, "signInWithEmail:onComplete:" + task.isSuccessful());
@Override public void onComplete(@NonNull Task<AuthResult> task) { Toast.makeText(loginActivity.this, "login successful", Toast.LENGTH_SHORT).show(); // If sign in fails, display a message to the user. If sign in succeeds // the auth state listener will be notified and logic to handle the // signed in user can be handled in the listener. if (!task.isSuccessful()) { //Log.w(TAG, "signInWithEmail:failed", task.getException()); Toast.makeText(loginActivity.this, "login failed", Toast.LENGTH_SHORT).show(); } // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }", "@Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful())\r\n {\r\n Log.w(\"ContentValues\", \"signInWithEmail\", task.getException());\r\n Toast.makeText(loginActivity.this, \"Authentication failed.\", Toast.LENGTH_SHORT)\r\n .show();\r\n }\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(!task.isSuccessful())\r\n {\r\n Toast.makeText(MainActivity.this,\"Some Error Occured,Please try again later\",Toast.LENGTH_LONG).show();\r\n }\r\n if(task.isSuccessful())\r\n {\r\n Toast.makeText(MainActivity.this,\"Regristration Successful\",Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n\n Toast.makeText(RegistroActivity.this,\"Se ha registrado el usuario con el email: \"+ TextEmail.getText(),Toast.LENGTH_LONG).show();\n Intent intent = new Intent(RegistroActivity.this, LoginActivity.class);\n startActivity(intent);\n }\n else{\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisión\n Toast.makeText(RegistroActivity.this, \"Ese usuario ya existe \", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegistroActivity.this, \"No se pudo registrar el usuario \", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful())\n {\n addNewUserData(auth.getUid(), email, username);\n if (onCompleteListener != null) {\n onCompleteListener.onComplete(task);\n }\n }\n else\n {\n Toast.makeText(activity, \"faile to register ,Invalid email address Or the email is already registered\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n signUserIn(emailX);\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n progressBar.dismiss();\n setSnackBar(linearLayout,\"Check Your Email and Password\");\n // there was an error\n } else {\n progressBar.dismiss();\n session.createLoginSession(loginemail,loginpassword);\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n editor = settings.edit();\n editor.putString(\"password\", loginpassword);\n editor.putString(\"email\",loginemail);\n String key = loginemail.replace(\"@\",\"1\");\n String uniqkey = key.replace(\".\",\"2\");\n editor.putString(\"uid\", uniqkey);\n editor.commit();\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Add new Flag to start new Activity\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n Toasty.success(LoginActivity.this,\"Login Successfull\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(LoginActivity.this, \"Login Succesful\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(LoginActivity.this,HomeActivity.class));\n }\n else{\n Toast.makeText(LoginActivity.this, \"Error \" + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n //check password and username before proceeding to login page\n Intent intent = new Intent(MainActivity.this, LoginSuccessActivity.class);\n intent.putExtra(\"USERNAME\", inputUsername);\n intent.putExtra(\"PASSWORD\", inputPassword);\n startTrackerService();\n startActivityForResult(intent, 1);\n } else {\n // password does not match email\n Toast.makeText(MainActivity.this, \"Invalid Password\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user.isEmailVerified()) {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Intent intent = new Intent(LoginActivity.this, VerifyEmailScreen.class);\n startActivity(intent);\n }\n finish();\n }\n }", "public void callSignIn(String email, String password) {\n\n // progress bar\n\n\n\n progress = new ProgressDialog(LoginActivity.this);\n progress.setTitle(\"Sign In !!\");\n progress.setMessage(\"Please Wait !!\");\n progress.setCancelable(true);\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(\"TESTING\", \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n\n\n\n if (!task.isSuccessful()) {\n progress.dismiss();\n Log.w(\"TESTING\", \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, \"Signin Failed\",\n Toast.LENGTH_SHORT).show();\n } else {\n\n Intent signInIntent = new Intent(LoginActivity.this,AppoinmentBookingProfile.class);\n startActivity(signInIntent);\n finish();\n }\n\n // ...\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n\n if (!task.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Registration failed, Check your Network Connection!\", Toast.LENGTH_SHORT).show();\n } else {\n onAuthSuccess(task.getResult().getUser());\n //Toast.makeText(RegisterActivity.this, \"we will make pass of login here\", Toast.LENGTH_SHORT).show();\n //finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"Logado com sucesso!\", Toast.LENGTH_LONG).show();\n Intent i = new Intent(getApplicationContext(), ActivityPrincipal.class);\n startActivity(i);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Erro ao efetuar login!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"Cadastro concluido com sucesso!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Falha ao criar cadastro!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.INVISIBLE);\n if (!task.isSuccessful()) {\n // there was an error\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n } else {\n if(rememberMe.isChecked()){\n rememberMe(email,password);\n }else{\n deleteUser();\n }\n //Toast.makeText(getApplicationContext(), auth.getUid(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(LoginActivity.this, MainNavigationActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // make the progressBar invisible\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }\n });\n\n }", "private void signIn(String email, String password){\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n // ...\n }\n });\n }", "public void checkLogin() {\n String username = ((EditText) findViewById(R.id.Username)).getText().toString();\n String password = ((EditText) findViewById(R.id.Password)).getText().toString();\n final TextView feedback = (TextView) findViewById(R.id.feedback);\n mAuth.signInWithEmailAndPassword(username, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"LOG IN\", \"signInWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"LOGIN\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n feedback.setText(\"FAIL!\");\n }\n\n // ...\n }\n });\n\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(Signup.this,\"Signup Succcessful\",Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n userProfileChangeRequest = new UserProfileChangeRequest.Builder().setDisplayName(name).build();\n firebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n firebaseUser.updateProfile(userProfileChangeRequest);\n UsersInfo user = new UsersInfo(name, phone, mail, \"\");\n database.child(userAuth.getCurrentUser().getUid()).setValue(user);\n userRegister.onRegisterSuccess();\n } else {\n if (task.getException().getMessage().equals(\"The email address is already in use by another account.\")) {\n userRegister.onMailExistedError();\n }\n if (task.getException().getMessage().equals(\"The email address is badly formatted.\")) {\n userRegister.onMailFormatError();\n }\n }\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }", "public void createAccount (String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n //Sign in existing users\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n //if email and password are match it goes to other activity other wise show toast message\n startActivity(new Intent(getApplicationContext(), dashboard.class));\n\n } else {\n Toast.makeText(login_form.this,\"Invalid User\",Toast.LENGTH_LONG).show();\n\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n sentReset(finalInputUsername);\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(Resetpasswordpage.this, \"Email Sent\", Toast.LENGTH_SHORT).show();\n Intent resetpasswordintent = new Intent(Resetpasswordpage.this, Loginpage.class);\n startActivity(resetpasswordintent);\n //close activity when done\n finish();\n } else {\n //otherwise create new toast (error)\n Toast.makeText(Resetpasswordpage.this, \"Please enter correct details\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LogInActivity.this, \"Login success\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), SelectionActivity.class));\n finish();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n } else {\n Toast.makeText(LogInActivity.this, \"Your email or password is incorrect \"+task.getException(), Toast.LENGTH_SHORT).show();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup\n\n if (task.isSuccessful()) {\n // si el usuario se encontraba creado entonces la tarea es exitosa\n\n int pos = email.indexOf(\"@\");\n userstring = email.substring(0, pos); //consigue el nombre del usuario\n Toast.makeText(Login.this, \"Bienvenido: \" + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail\n Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad\n intencion.putExtra(\"user\", email); // le pasa como dato al usuario ingresado a la proxima actividad\n startActivity(intencion); //hay que hacer el get del usuario en la parte principal\n // userapasar = user;\n loged = true;\n\n } else {\n loged = false;\n\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn\n\n Toast.makeText(Login.this, \"Procesando\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"\", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {\n try {\n GoogleSignInAccount account = completedTask.getResult(ApiException.class);\n\n // Signed in successfully, show authenticated UI.\n accountEmail = account.getEmail();\n updateUI(account.toString());\n } catch (ApiException e) {\n // The ApiException status code indicates the detailed failure reason.\n updateUI(\"not Signed In\");\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //startActivity(new Intent(MainActivity.this, VentanaInicio.class));\n Intent intent = new Intent(getApplicationContext(), VentanaInicio.class);\n\n intent.putExtra(\"string_usuario\", email);\n\n startActivity(intent);\n //finish es para que no pueda volver a la pantalla anterior\n finish();\n }\n //Si no\n else {\n Toast.makeText(MainActivity.this, \"No se pudo iniciar la sesión, compruebe los datos\", Toast.LENGTH_SHORT).show();\n }\n }", "public void authenticateemail(final String email, final String pass){\n\n mAuth2.createUserWithEmailAndPassword(email, pass)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"MAIN\", \"createUserWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n linking(email,pass);\n //Log.d(\"MAIN\", \"yupyup\"+user.getUid());\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"MAIN\", \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(otherinfoActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private void signInUidPass(){\n mAuth.signInWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(Constants.TAG, \"signInwithEmail: onComplete:\" + task.isSuccessful());\n if(!task.isSuccessful()){\n Log.w(Constants.TAG, \"signInwithEmail: failed\", task.getException());\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful())\n {\n //verifier si l'utilisateur est etudiant ou volontaire pour le diriger\n startActivity(new Intent(getActivity(), profil_etd.class));\n }\n }", "private void userRegister(String email, String password)\n {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n // if successful, send email verification\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void attemptLogin() {\n\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n if (email.isEmpty())\n if (email.equals(\"\") || password.equals(\"\")) return;\n Toast.makeText(this, \"Login in progress...\", Toast.LENGTH_SHORT).show();\n\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n //Log.d(\"Memorization Game\", \"signInWithEmail() onComplete: \" + task.isSuccessful());\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }\n });\n\n\n }", "private void sendEmailVerification(){\n FirebaseUser firebaseUser = mfirebaseAuth.getCurrentUser();\n if(firebaseUser!=null){\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(SignUpActivity.this, \"Successfully Registered, Verification E-mail sent!\", Toast.LENGTH_SHORT).show();\n mfirebaseAuth.signOut();\n finish();\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\n }else {\n Toast.makeText(SignUpActivity.this, \"Verification email could not be sent, please try again later\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n }", "void signInComplete();", "@Override\n\tpublic void onSignInSucceeded() {\n\n\t}", "@Override\n public void onComplete(@NonNull Task<String> task) {\n if (!task.isSuccessful()) {\n Log.w(TAG, \"Fetching FCM registration token failed\", task.getException());\n return;\n } else {\n Log.i(TAG, \"onComplete: firbaSE GOT A TOKEN\");\n }\n\n // Get new FCM registration token\n String token = task.getResult();\n\n\n }", "@Override\n public void onClick(View v) {\n\n mAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n messageDisplay.setText(\"Reset Email Sent Successfully!\");\n Toast.makeText(ForgotPasswordActivity.this, \"Reset Email Sent Successfully!\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n //display some message here\n messageDisplay.setText(\"User Does Not Exist\");\n Toast.makeText(ForgotPasswordActivity.this, \"User Does Not Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void authUser(String email, String password){\n firebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: user logged in successfully\");\n Snackbar.make(view, \"User has logged in\", Snackbar.LENGTH_LONG).show();\n goToMainActivity();\n }\n if(!task.isSuccessful()){\n Log.d(TAG, \"onComplete: user's credentials're incorrect\");\n Snackbar.make(view, \"Login or password is incorrect\", Snackbar.LENGTH_LONG).show();\n }\n }\n });\n }", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "@Override\n public void onClick(View v) {\n if (!validate(\"\" + username.getText())) {\n// Toast.makeText(activity, \"Email nn valid\", Toast.LENGTH_LONG).show();\n Log.w(\"EMAIL_PASS\", \"Email nn valid\");\n }\n else if (password.getText().length() < 6){\n Log.w(\"ERROR_PASS\", \"password must be > 6\");\n } else{\n mFirebaseAuth.signInWithEmailAndPassword(\"\" + username.getText(), \"\" + password.getText())\n .addOnCompleteListener(activity, task -> {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"signInWithEmail\", \"signInWithEmail:success\");\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n startActivity(new Intent(activity, home.class));\n finish();\n// updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"FAILER AUTH\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n// updateUI(null);\n // ...\n }\n//\n });\n // Log.w(\"FIREBASE\", String.valueOf(mFirebaseAuth.getCurrentUser()));\n // Toast.makeText(getApplicationContext(), \"\" + mFirebaseAuth.getUid(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //caso sucesso ao fazer login usuario\n if (task.isSuccessful()){\n progressBarLogin.setVisibility(View.GONE);\n //instancio a activity de destino\n startActivity(new Intent(getApplicationContext(),SolicitacaoAreaActivity.class));\n finish();//fecha a activity atual\n }else{\n Toast.makeText(AutentinticacaoActivity.this,\n \"Erro ao fazer login\",\n Toast.LENGTH_SHORT).show();\n progressBarLogin.setVisibility(View.GONE);\n }\n\n\n }", "@Override\n public void onComplete(@NonNull Task<Void> task2) {\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n } else {\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "public void SignUp2(View view){\n\n mFirebaseAuth.createUserWithEmailAndPassword(EditEmail.getText().toString(),EditPass.getText().toString())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n saveUser(EditFirstName.getText().toString(),EditLastName.getText().toString(),EditEmail.getText().toString(),SelectSpinner.getSelectedItem().toString());\n mUserDatabaseReference.push().setValue(mClassUser);\n EditFirstName.setText(\"\");\n EditLastName.setText(\"\");\n EditEmail.setText(\"\");\n EditPass.setText(\"\");\n\n if (!task.isSuccessful()) {\n// Toast.makeText(ActivitySignup.this, \"failed to sign up\",\n// Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n userModel.setIdUrl(uri.toString());\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(userModel.getEmail(), userModel.getPassword())\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseFirestore.getInstance().collection(\"USERS\").add(userModel)\n .addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Registered Successfully\", Toast.LENGTH_SHORT).show();\n\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n startActivity(intent);\n } else\n Toast.makeText(RegisterActivity.this, \"\" + task1.getException(), Toast.LENGTH_SHORT).show();\n\n });\n\n } else\n Toast.makeText(RegisterActivity.this, \"\" + task.getException(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n }", "public void registerUser(String email, String password){\n fbAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n updateUI(user);\n Toast.makeText(Signup.this, \"Registration success.\",\n Toast.LENGTH_SHORT).show();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(Signup.this, \"Registration failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private Boolean loginUserToAccount() {\n String email = userEmail.getText().toString();\n String password = userPassword.getText().toString();\n // perform validations\n if(email.isEmpty()){\n Toast.makeText(this,\"Please Enter Email\",Toast.LENGTH_SHORT).show();\n }\n else if(password.isEmpty()){\n Toast.makeText(this,\"Please Enter Password\",Toast.LENGTH_SHORT).show();\n }\n else{\n\n loadingBar.setTitle(\"Login\");\n loadingBar.setMessage(\"Please wait, while we log into your account\");\n loadingBar.show();\n loadingBar.setCanceledOnTouchOutside(true);\n\n // Create user at firebase using email\n mAuth.signInWithEmailAndPassword(email,password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n loadingBar.dismiss();\n if(task.isSuccessful()){\n sendUserToMainActivity();\n Toast.makeText(LoginActivity.this, \"Login succesfully\", Toast.LENGTH_SHORT).show();\n }\n else{\n String errMessage = task.getException().getMessage();\n Toast.makeText(LoginActivity.this, \"Error in login: \"+errMessage, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n return true;\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n startActivity(new Intent(LoginPage.this, HomePage.class));\n\n } else {\n //if user failed to login, toast message is displayed\n Toast.makeText(LoginPage.this, \"User not found or Incorrect password\", Toast.LENGTH_LONG).show();\n userEmail.setText(\"\");\n userPassword.setText(\"\");\n }\n }", "public void onComplete(@NonNull Task<Void> task) {\n firebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n Intent intent = new Intent(Profile.this, Login.class);\n Pair[] pairs = new Pair[3];\n pairs[0] = new Pair<View, String>(welcomeTV, \"logo_text\");\n pairs[1] = new Pair<View, String>(usernameTV, \"slogan_text\");\n pairs[2] = new Pair<View, String>(signOutButton, \"sign_in_tran\");\n ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Profile.this, pairs);\n //startActivity(intent, options.toBundle());\n startActivity(intent);\n overridePendingTransition(0, 0);\n finish();\n }", "private void callRegisterByEmailToGoogleFirebase(){\n mFirebaseAuth = FirebaseAuth.getInstance();\n\n String userEmail = mEmailAddress.getText().toString();\n String userPassword = mPassword.getText().toString();\n\n // create the user with email and password\n mFirebaseAuth.createUserWithEmailAndPassword(userEmail,userPassword).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n showBottomSnackBar(\"Corresponding Firebase User Created\");\n }else{\n showBottomSnackBar(\"Firebase User Creation Fails\");\n }\n\n replaceActivity(MainActivity.class, null);\n }\n });\n\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n // showProgressDialog();\n\n // [START create_user_with_email]\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"createUserWithEmail:success\");\n //Toast.makeText(RegistrarActivity.this, \"Usuario creado correctamente, acepte su email de verificación para continuar\", Toast.LENGTH_SHORT).show();\n FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser();\n user.sendEmailVerification();\n ConstraintLayout constraintLayout=(ConstraintLayout)findViewById(R.id.layoutRegistrar);\n Snackbar snackbar=Snackbar.make(constraintLayout,\"Usuario creado correctamente, acepte su email de verificación\",Snackbar.LENGTH_LONG);\n snackbar.setAction(\"Ir a Login\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent=new Intent(getApplicationContext(),LoginActivity.class);\n startActivity(intent);\n }\n });\n snackbar.show();\n //updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegistrarActivity.this, \"Autenticación fallida.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // [START_EXCLUDE]\n //hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END create_user_with_email]\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Util.Log.i(TAG, \"onActivityResult: requestCode: %b resultCode: %b\", requestCode == RC_SIGN_IN,\n resultCode==Activity.RESULT_OK);\n if (requestCode == RC_SIGN_IN) {\n// IdpResponse response = IdpResponse.fromResultIntent(data);\n GoogleSignInResult response = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n // Successfully signed in\n if (resultCode == Activity.RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n account = task.getResult(ApiException.class);\n AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken()\n , null);\n mAuth.signInWithCredential(credential).addOnCompleteListener(this);\n\n } catch (ApiException e) {\n Util.Log.d(TAG, \"sign in attempt failed\");\n progressMsg.setText(getString(R.string.progress_failed_signin));\n }\n } else {\n // Sign in failed\n\n progressBar.setVisibility(View.GONE);\n if (response == null) {\n Log.d(TAG, \"null response object\");\n progressMsg.setText(getString(R.string.progress_null_response));\n return;\n }\n int gStatusCode = response.getStatus().getStatusCode();\n Log.d(TAG, String.format(\"failed sign-in in response:(%d) %s\",gStatusCode, response.toString()));\n switch (gStatusCode) {\n case CommonStatusCodes.NETWORK_ERROR:\n case CommonStatusCodes.TIMEOUT:\n progressMsg.setText(getString(R.string.progress_no_internet));\n break;\n default:\n progressMsg.setText(GoogleSignInStatusCodes\n .getStatusCodeString(gStatusCode));\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void authSignInResult() {\n userEmail = sharedPreferences.getString(getString(R.string.shared_prefs_key_email), \"\");\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(userEmail).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot appleSnapshot : dataSnapshot.getChildren()) {\n\n member = appleSnapshot.getValue(Member.class);\n String loginType = member.getLoginType().trim();\n if (loginType.equals(getString(R.string.login_type_auth))) {\n String key = appleSnapshot.getKey();\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n firebaseKey = key;\n getUserDetailsFromFirebase();\n userName = member.getUsername();\n String userPhotoUrlString = member.getPhotoUrl();\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrlString);\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.apply();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if(task.isSuccessful()){\n Toast.makeText(RegistrationActivity.this, \"User has been registered successfully!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n\n //Then redirect to login layout\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n\n }", "private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {\n IdpResponse response = result.getIdpResponse();\n if (result.getResultCode() == RESULT_OK) {\n // Successfully signed in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n // ...\n } else {\n // Sign in failed. If response is null the user canceled the\n // sign-in flow using the back button. Otherwise check\n // response.getError().getErrorCode() and handle the error.\n // ...\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n mCallbackManager.onActivityResult(requestCode, resultCode, data); // DATA CALLBACK FOR FACEBOOK\n if (data != null) {\n progressDialog.show();\n progressDialog.setMessage(\"Logging you in...\");\n if (requestCode == 9001 && resultCode == RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n assert account != null;\n firebaseAuthWithGoogle(account.getIdToken());\n } catch (ApiException e) {\n e.printStackTrace();\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }else {\n progressDialog.dismiss();\n }\n }", "private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {\n try {\n GoogleSignInAccount account = completedTask.getResult(ApiException.class);\n // Signed in successfully, show authenticated UI.\n// LoggerHelper.showDebugLog(\"Account: \" + account.toJson());\n\n FormSocialUser formSocialUser = new FormSocialUser();\n formSocialUser.setSocialID(account.getId());\n formSocialUser.setFirstName(account.getFamilyName() == null || account.getFamilyName().isEmpty() ? account.getGivenName() : account.getFamilyName());\n formSocialUser.setLastName(account.getGivenName());\n formSocialUser.setEmail(account.getEmail());\n formSocialUser.setSocialType(SocialType.GOOGLE.getValue());\n\n loginWithSocialAccount(prepareSocialLoginForm(formSocialUser));\n\n } catch (ApiException e) {\n Toast.makeText(this, \"Unable to login with google account. Please try another way.\", Toast.LENGTH_SHORT).show();\n LoggerHelper.showErrorLog(\"signInResult:failed code=\", e);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBarlogin.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = mAuth.getCurrentUser();\n String email = user.getEmail();\n String uid = user.getUid();\n HashMap<Object,String> hashMap = new HashMap<>();\n hashMap.put(\"email\", email);\n hashMap.put(\"uid\", uid);\n hashMap.put(\"onlineStatus\", \"online\");\n hashMap.put(\"typingTo\",\"noOne\");\n hashMap.put(\"username\", \"\");\n hashMap.put(\"phone\", \"\");\n hashMap.put(\"image\",\"\");\n hashMap.put(\"cover\",\"\");\n // path to store data\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference reference = database.getReference(\"Users\");\n reference.child(uid).setValue(hashMap);\n Intent intent = new Intent(MainActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n if(!mAuth.getCurrentUser().isEmailVerified()){\n PopupEmailVerification popupEmailVerification = new PopupEmailVerification(StartPage.this);\n popupEmailVerification.show();\n }\n else{\n //User found & ready for next page\n Toast.makeText(StartPage.this, \"Sign in successful\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(StartPage.this, CenterPage.class));\n finish();\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n tvOopsWrongPassword.setVisibility(View.VISIBLE);\n }\n }", "public void callLogin(View view) {\n /*\n if (email.isEmpty() || password.isEmpty()) {\n Toast.makeText(this, \"Ingrese campos\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n loginPanel.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isSuccessful());\n Log.d(TAG, \"Inicio sesion correcto: \" + task.isComplete());\n\n if (!task.isSuccessful()) {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.d(TAG, \"Inicio sesion malo: \" + task.getException());\n Log.d(TAG, \"Inicio sesion malo: \" + task.getResult());\n Toast.makeText(LoginActivity.this, \"Email o Contraseña Incorrectos\", Toast.LENGTH_SHORT).show();\n }\n }\n });*/\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.password_requirement));\n } else {\n Toast.makeText(getActivity(), \"Masukkan Data dengan Benar\", Toast.LENGTH_LONG).show();\n }\n } else {\n if (auth.getCurrentUser() != null) {\n Toast.makeText(getActivity(), \"Login Berhasi\", Toast.LENGTH_SHORT).show();\n }\n else{\n System.out.println(\"NO LOGGED\");\n }\n }\n }", "@Override\n protected void onPostExecute(String result) {\n Toast.makeText(context, \"Email Delivery: \"+result, Toast.LENGTH_SHORT).show();\n setResult(RESULT_OK);\n finish();\n }", "private void signIn(String email, String password) {\n Log.d(TAG, \"signIn:\" + email);\n if (!validateForm()) {\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n Log.d(TAG, \"signInWithEmail:success\");\n\n startActivity(new Intent(LoginActivity.this , MainActivity.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n if (!task.isSuccessful()) {\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n if(task.isSuccessful())\n {\n //write an activity here you want to go but for the time being let us use toast message\n\n// sendToMain();\n\n// Toast.makeText(LoginActivity.this,\"successfull\",Toast.LENGTH_LONG).show();\n\n //i added this see it\n Intent intent=new Intent(LoginActivity.this,IntentToOperations.class);\n startActivity(intent);\n }else{\n String errorMessage=task.getException().getMessage();\n Toast.makeText(LoginActivity.this,\"error :\"+errorMessage,Toast.LENGTH_LONG).show();\n }\n\n// loginProgress.setVisibility(View.VISIBLE);//after successfull login\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Log.d(\"check\", \"in onActivityResult\");\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Log.d(\"sign in\", \"1\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n if (result.isSuccess()) {\n // session.setLogin(true);\n\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = result.getSignInAccount();\n firebaseAuthWithGoogle(account);\n } else {\n Log.d(\"failed to google signin\", \"10\");\n // Google Sign In failed, update UI appropriately\n // [START_EXCLUDE]\n // updateUI(null);\n // [END_EXCLUDE]\n }\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (task.isSuccessful()) {\n ((MainActivity)getContext()).setFirebaseAuth(FirebaseAuth.getInstance());\n ((MainActivity)getContext()).setFirebaseUser(FirebaseAuth.getInstance().getCurrentUser());\n if (profileFragment == null)\n profileFragment = new ProfileFragment();\n outerTransaction(profileFragment);\n } else {\n Toast.makeText(getContext(), task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "public void onClick_AGSU_signUp(View view) {\n AnimationTools.startLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING, this, signUpButton_rootLayout, R.style.AGSU_loading_progress_bar);\n\n FirestoreManager.saveUserData(SecondarySignUpManager.getDatabaseUser());\n\n //add a password-email auth method\n AuthCredential credential = EmailAuthProvider.getCredential(SecondarySignUpManager.getDatabaseUser().getEmail(), SecondarySignUpManager.getDatabaseUser().getPassword());\n AuthenticationManager.getCurrentUser().linkWithCredential(credential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n System.out.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: link with email credential SUCCESSFUL! User uid = \" + task.getResult().getUser().getDisplayName());\n Constants.isSignUpInProcess = false; //sign up is now finished\n\n //in AGSU user is always new --> send verification email\n EmailVerification.sendVerificationEmail();\n\n Constants.isSecondarySignUpInProcess = false; //end of secondary sign up process\n\n ActivityTools.startNewActivity(activityContext, MainActivity.class);\n } else {\n System.err.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: ERROR: link with email credential FAILED! \" + task.getException().getMessage());\n }\n\n AnimationTools.stopLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING);\n }\n });\n\n }", "@Override\n\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\tToast.makeText(RegisterActivity.this,\"Sign up successfully!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tstartActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n\t\t\t\t\t}", "public void resendVerificationEmail(){\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n mAuth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n alertDialogBuilderSentSuccessMessage(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Sent email successfully.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n\n progressDialog.dismiss();\n }\n });\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n firebaseAuthWithGoogle(account);\n\n } catch (ApiException e) {\n // Google Sign In failed, update UI appropriately\n Log.w(TAG, \"Google sign in failed\", e);\n // [START_EXCLUDE]\n updateUI(null);\n // [END_EXCLUDE]\n }\n }else {\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n\n }\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n tPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(TeacherLoginActivity.this,getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n }\n else {\n task.isSuccessful();\n startActivity(new Intent(TeacherLoginActivity.this, TeaMainScreen.class));\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "private void userLogin() {\n String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n if(email.isEmpty()) {\n editTextEmail.setError(\"Email is required!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n editTextEmail.setError(\"Please enter a valid email!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(password.isEmpty()){\n editTextPassword.setError(\"Password is required!\");\n editTextPassword.requestFocus();\n return;\n }\n\n if(password.length() < 6) {\n editTextPassword.setError(\"Min password length is 6 characters!\");\n editTextPassword.requestFocus();\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if(user.isEmailVerified()) {\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else{\n user.sendEmailVerification();\n Toast.makeText(LoginActivity.this, \"Check your email to verify your account!\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login! Please check your credentials\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n\n\n }", "@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }", "@Override\n public void onSuccess(SignInResult signInResult) {\n intentLogin(mailPhone);\n }", "public void signIn(String email, String password) {\n\n // Validate the form, make sure that fields are filled in\n if (!validateForm()) {\n return;\n }\n\n loginBtn.setEnabled(false);\n startLoadAnim(getString(R.string.logging_in));\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Log.w(TAG, \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, R.string.auth_failed, Toast.LENGTH_SHORT).show();\n stopLoadAnim();\n loginBtn.setEnabled(true);\n }\n\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n passwordW.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(SignUpActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n\n FirebaseUser user = auth.getCurrentUser();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setDisplayName(dpName)\n .build();\n\n user.updateProfile(profileUpdates)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignUpActivity.this, \"User Created! Welcome to Udghosh.\", Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(SignUpActivity.this, \"Cannot connect to servers right now.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n mDatabase.child(\"app\").child(\"users\").child(user.getUid()).setValue(phoneNumber);\n\n Intent intent = new Intent(SignUpActivity.this, HomeActivity.class);\n startActivity(intent);\n finish();\n }\n }", "private void signIn() {\n final String email = ((EditText)findViewById(R.id.etSignInEmail)).getText().toString();\n final String password = ((EditText)findViewById(R.id.etSignInPassword)).getText().toString();\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success\n updateUI();\n } else {\n // Sign in failure\n Toast.makeText(LoginActivity.this, \"Incorrect email and/or password.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n //inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login failed\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(MessageFeedActivity.this, \"Login successful!\", Toast.LENGTH_LONG).show();\n //finish();\n }\n }", "private void handleSignInResult(GoogleSignInResult result) {\n Log.v(\"SIGNIN STATUS\", \"SIGNIN RESULT: \" + result.getStatus().getStatusMessage());\n Log.v(\"SIGNIN STATUS\", \"SIGNIN CODE: \" + result.getStatus().getStatusCode());\n if (result.isSuccess()) {\n // Signed in successfully\n GoogleSignInAccount acct = result.getSignInAccount();\n IlliniBusApplication myApplication = (IlliniBusApplication) getApplication();\n myApplication.signIn(acct);\n Intent intent = new Intent(StartActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Toast.makeText(getApplicationContext(), \"Failed to Login!\",\n Toast.LENGTH_LONG).show();\n }\n }", "public void onComplete(@NonNull Task<Void> task) {\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }", "public void signInWithCredential(PhoneAuthCredential credential) {\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult> () {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\nemailVerificationProgressBar.setVisibility (View.GONE);\n new CallUtils ().uidSignUp (phoneNo, address, address, address, username, address, actionProfileVerificationInstance, getContext (), email, password);\n\n\n } else {\n emailVerificationProgressBar.setVisibility (View.GONE);\n Toast.makeText(getContext (), task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n String userToken = fetchUserToken(mEmail, mPassword);\n mTanker.open(mEmail, userToken).then((openFuture) -> {\n if (openFuture.getError() != null) {\n return null;\n }\n\n if (mSignUp) {\n mTanker.generateAndRegisterUnlockKey().then((unlockKeyFuture) -> {\n if (unlockKeyFuture.getError() != null) {\n mError = 1;\n return null;\n }\n runOnUiThread(() -> {\n Intent intent = new Intent(LoginActivity.this, SaveUnlockKeyActivity.class);\n intent.putExtra(\"EXTRA_UNLOCK_KEY\", unlockKeyFuture.get());\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n return null;\n });\n }\n else {\n runOnUiThread(() -> {\n // Redirect to the MainActivity\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(\"EXTRA_USERID\", mEmail);\n intent.putExtra(\"EXTRA_PASSWORD\", mPassword);\n startActivity(intent);\n showProgress(false);\n });\n }\n return null;\n });\n } catch (ConnectException e) {\n Log.i(\"TheTankerShow\", \"Server Connection error\", e);\n mError = 503;\n } catch (IOException e) {\n Log.i(\"TheTankerShow\", \"Login error\", e);\n return false;\n } catch (Throwable e) {\n Log.e(\"TheTankerShow\", \"Other error\", e);\n return false;\n }\n\n return true;\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n\n saveUser save = new saveUser(registerEmailString, registerPassword);\n FirebaseDatabase.getInstance().getReference(\"Register\").child(FirebaseAuth.\n getInstance().getCurrentUser().getUid()).setValue(save).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Sign up successful\", Toast.LENGTH_SHORT).show();\n\n pleaseWait.setVisibility(View.GONE);//\n Intent bac = new Intent(Sign_Up.this, Sign_In.class);\n startActivity(bac);\n\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Email already exist error\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n\n }\n }\n });\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Error try again\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n }\n }", "Task<Void> signUp(String email, String password);", "private void signIn(String email, String password){\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user.toString());\n accountEmail = user.getEmail();\n } else {\n // If sign in fails, display a message to the user.\n updateUI(\"Authentication failed\");\n }\n\n }\n });\n\n }", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "void onSignUpEmailRegistered();" ]
[ "0.86228204", "0.84727794", "0.77560735", "0.76394325", "0.76308966", "0.7592324", "0.7538918", "0.7530005", "0.74885976", "0.7445116", "0.7436002", "0.73585945", "0.7294236", "0.72671425", "0.7244479", "0.7194257", "0.7167886", "0.7114279", "0.7113086", "0.7110531", "0.71093065", "0.7069942", "0.70473975", "0.70473546", "0.70187306", "0.7002074", "0.69955134", "0.6985896", "0.6985802", "0.69611144", "0.69565076", "0.6940728", "0.6934392", "0.69283473", "0.6917633", "0.69069415", "0.6856995", "0.68444896", "0.68008167", "0.6794902", "0.67753345", "0.67629606", "0.671603", "0.6704206", "0.66744435", "0.6668772", "0.6653355", "0.66508025", "0.6641883", "0.6635256", "0.6601244", "0.65994525", "0.65914637", "0.6591394", "0.65710086", "0.65670574", "0.6565911", "0.6560663", "0.6552264", "0.6544921", "0.65434515", "0.6541939", "0.6540156", "0.6505916", "0.64923996", "0.6482738", "0.64791983", "0.647752", "0.64739656", "0.647264", "0.64718986", "0.64689565", "0.64378464", "0.64320683", "0.64314246", "0.6412396", "0.64088035", "0.64051664", "0.63808155", "0.63765454", "0.63724315", "0.63724315", "0.63560313", "0.63517404", "0.6345265", "0.6344955", "0.6344955", "0.6336778", "0.63306946", "0.63230884", "0.63205844", "0.63131326", "0.6299299", "0.62929463", "0.6289815", "0.6287745", "0.62871504", "0.62852633", "0.6270799", "0.6262519" ]
0.84089273
2
isValidEmail Checks for valid email pattern
public final boolean isValidEmail(String target) { String regExpn = "^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]{1}|[\\w-]{2,}))@" +"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" +"[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\." +"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" +"[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|" +"([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"; CharSequence inputStr = target; Pattern pattern = Pattern.compile(regExpn,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()) { //Toast.makeText(getApplicationContext(), " VALID EMAIL", Toast.LENGTH_SHORT).show(); return true; } else { //Toast.makeText(getApplicationContext(), " BAD EMAIL", Toast.LENGTH_SHORT).show(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isEmailValid(String email) {\n if(Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n\n return true;\n }else {\n return false;\n }\n// return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return true;\r\n }", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "private boolean checkEmailPattern(String email) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "public static boolean validateEmail(String email){\n return email.matches(EMAIL_PATTERN);\n }", "private boolean isEmailValid(CharSequence email) {\n return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n return email.matches(\"^[a-zA-Z]{5,12}$\");\r\n }", "private void checkValidEmail(String email) throws ValidationException {\n String emailRegex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\n if (!email.matches(emailRegex)) {\n throw new ValidationException(\"Incorrect email format\");\n }\n }", "public boolean isEmailValid(String email) {\n return true;\n }", "public boolean emailValidate(final String email) {\n\n\t\tmatcher = pattern.matcher(email);\n\t\treturn matcher.matches();\n\n\t}", "public static boolean validateEmail(String email) {\n \n // Compiles the given regular expression into a pattern.\n Pattern pattern = Pattern.compile(PATTERN_EMAIL);\n \n // Match the given input against this pattern\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n \n }", "protected boolean isValidEmailAddress(String email) {\n return EMAIL_REGEX.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\r\n //TODO: Replace this with your own logic\r\n return email.contains(\"@\");\r\n }", "boolean isValidEmail(String email){\n boolean ValidEmail = !email.isEmpty() && Patterns.EMAIL_ADDRESS.matcher(email).matches();\n if(!ValidEmail){\n userEmail.setError(\"please fill this field correctly\");\n return false;\n }\n return true;\n }", "public static boolean checkEmail (String email) throws IllegalArgumentException{\n check = Pattern.compile(\"^[a-zA-Z0-9]+(?:\\\\+*-*.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]{2,}+)*$\").matcher(email).matches();\n if (check) {\n return true;\n } else {\n throw new IllegalArgumentException(\"Enter a valid Email Address\");\n }\n }", "private boolean validateEmail(String email) {\n return Constants.VALID_EMAIL_PATTERN.matcher(email).find();\n }", "private boolean isValidMail(String email) {\n String EMAIL_STRING = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n return Pattern.compile(EMAIL_STRING).matcher(email).matches();\n }", "private boolean isEmailValid(String email){\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n //Make the comparison case-insensitive.\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()){\n isValid = true;\n }\n return isValid;\n }", "private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.contains(\"@\");\n }", "static boolean isValid(String email) {\r\n\t\t String regex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\r\n\t\t return email.matches(regex);\r\n\t}", "public static boolean validateEmail(String email){\n String emailcheck= \"[a-zA-Z0-9._-]+@[a-z]+\\\\.+[a-z]+\";\n boolean iscorrect= email.trim().matches(emailcheck);\n return iscorrect;\n }", "private boolean isValidEmail(String email) {\n String EMAIL_PATTERN = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "public static boolean validateEmail(String email){\n String regular = \"^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$\";\n Pattern pattern = Pattern.compile(regular);\n return pattern.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "public static boolean validate(final String email){\n\t\t final Matcher matcher = pattern.matcher(email);\n\t\t return matcher.matches();\n\t }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "public boolean validarEmail(String email) { \r\n\t\tPattern p = Pattern.compile(\"[a-zA-Z0-9]+[.[a-zA-Z0-9_-]+]*@[a-z0-9][\\\\w\\\\.-]*[a-z0-9]\\\\.[a-z][a-z\\\\.]*[a-z]$\");\r\n\t\tMatcher m = p.matcher(email); \r\n\t\treturn m.matches(); \r\n\t}", "private boolean validEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n return email != null && pat.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.length() > 0;\n }", "private boolean isValidEmail(TextInputLayout tiEmail, EditText etEmail) {\n String email = etEmail.getText().toString().trim();\n boolean result = false;\n\n if (email.length() == 0)\n tiEmail.setError(c.getString(R.string.required));\n else {\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n if (!emailPattern.matcher(email).matches())\n tiEmail.setError(c.getString(R.string.invalid));\n else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "public boolean checkEmail(String email){\r\n boolean check = true;\r\n if(!email.matches(\"^[a-zA-Z0-9]+@[a-zA-Z0-9]+(.[a-zA-Z]{2,})$\")){\r\n check = false;\r\n }\r\n return check;\r\n }", "private boolean isEmailValid(String email){\n return email.contains(\"@\");\n }", "private static boolean isEmailValid(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n boolean valid = true;\n String emailPattern = \"[a-zA-Z0-9._-]+@[a-z]+\\\\.+[a-z]+\";\n if (TextUtils.isEmpty(email)) {\n mEmail_input_layout.setError(getString(R.string.error_field_required));\n valid = false;\n } else if (!email.matches(emailPattern)) {\n mEmail_input_layout.setError(getString(R.string.error_invalid_email));\n valid = false;\n }\n return valid;\n }", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "private boolean isEmailValid(String email) {\n return email.equals(\"[email protected]\");\n }", "public static boolean isEmailValid(String email) {\r\n\r\n return email.matches(\"^([a-z]|[A-Z]){1,100}@([a-z]|[A-Z]){1,100}\\\\.([a-z]|[A-Z]){1,10}\");\r\n }", "public static boolean checkEmail(String email){\n String regex = \"^[\\\\w!#$%&’*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&’*+/=?\"\n + \"`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\n if (email.matches(regex))\n return true;\n else\n return false;\n }", "public static boolean email(String email) throws UserRegistrationException {\n\t\tboolean resultEmail = validateEmail.validator(email);\n\t\tif(true) {\n\t\t\treturn Pattern.matches(patternEmail, email);\n\t\t}else\n\t\t\tthrow new UserRegistrationException(\"Enter correct Email\");\n\t}", "public boolean isEmailValid(String email) {\n boolean errorFlag = true;\n Pattern emailPattern = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n if(!emailPattern.matcher(email).find()){\n errorFlag = false;\n }\n return errorFlag;\n }", "public static boolean verifyEmailFormat(String email) {\n\t\tboolean isValid = false;\n\n\t\tif (email != null) {\n\t\t\tPattern p = Pattern.compile(\".+@.+\\\\.[a-z]+\");\n\t\t\tMatcher m = p.matcher(email);\n\t\t\tisValid = m.matches();\n\t\t}\n\n\t\treturn isValid;\n\t}", "public static boolean validateEmail(final String email) {\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "public static boolean isEmailValid(String email) {\n String regExpression = \"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,4}\";\n\n Pattern pattern = Pattern.compile(regExpression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(email);\n\n if (matcher.matches())\n return true;\n else\n return false;\n }", "static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid email address\");\n }\n } else {\n throw new Exception(\"The email is required\");\n }\n }", "private boolean checkEmail(String email) {\n\n\t\tString patternStr = \"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\";\n\t\tPattern pattern = Pattern.compile(patternStr, Pattern.CASE_INSENSITIVE);\n\t\tMatcher matcher = pattern.matcher(email);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\n\t}", "public static boolean isEmailValid(String email) {\r\n boolean isValid = false;\r\n\r\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\r\n CharSequence inputStr = email;\r\n\r\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\r\n Matcher matcher = pattern.matcher(inputStr);\r\n if (matcher.matches()) {\r\n isValid = true;\r\n }\r\n return isValid;\r\n }", "private static boolean isValid(String email){\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n\n }", "private void validateEmail() {\n mEmailValidator.processResult(\n mEmailValidator.apply(binding.registerEmail.getText().toString().trim()),\n this::validatePasswordsMatch,\n result -> binding.registerEmail.setError(\"Please enter a valid Email address.\"));\n }", "public boolean checkEmail(String email) {\n\t\t return EMAIL_ADDRESS_PATTERN.matcher(email).matches();\n\t\t}", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "public static\n\tboolean isValidEmail(String value)\n\t{\n\t\treturn !StringX.isBlank(value) && RegExHelper.EMAIL_PATTERN.matcher(value).matches();\n\t}", "private boolean isEmailValid(String email) {\n return email.contains(\"@\") && (email.length() <= 30); //TODO: Perhaps change to a longer maximum length? Also in db.\n }", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n //Acceptable email formats include:\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n CharSequence inputStr = email;\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "private boolean CheckEmail() {\n\t\tString email = Email_textBox.getText();\n\n\t\t// if field is empty\n\t\tif (email.equals(\"\")) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Enter Email\");\n\t\t\treturn false;\n\t\t}\n\n\t\tString emailFormat = \"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)+$\";\n\n\t\t// if field is not in wanted format\n\t\tif (!email.matches(emailFormat)) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Wrong Format\");\n\t\t\treturn false;\n\t\t}\n\n\t\tEmail_textBox.getStyleClass().remove(\"error\");\n\t\tEmailNote.setText(\"*\");\n\t\treturn true;\n\t}", "public static boolean isValidEmail(String email) {\r\n String emailPattern = \"^[\\\\w!#$%&’*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\r\n Pattern p = Pattern.compile(emailPattern);\r\n Matcher m = p.matcher(email);\r\n return m.matches();\r\n }", "public static boolean validateEmail(String email) {\n Pattern pattern = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "private boolean isEmailValid(String email) {\n if (email.length() == 8){\n return true;\n }\n\t//user names first two characters must be letters\n Boolean condition1 = false;\n Boolean condition2 = false;\n\n int ascii = (int) email.charAt(0);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition1 = true;\n }\n ascii = (int) email.charAt(1);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition2 = true;\n }\n if (condition1 == true && condition2 == true){\n return true;\n }\n\n\t//user names last six characters must be numbers\n for (int i = email.length()-6; i < email.length(); i++){\n ascii = (int) email.charAt(i);\n if (!(ascii >= 48 && ascii <= 57)){\n return false;\n }\n }\n\n return true;\n }", "private void emailValidation( String email ) throws Exception {\r\n if ( email != null && !email.matches( \"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\" ) ) {\r\n throw new Exception( \"Merci de saisir une adresse courriel valide.\" );\r\n }\r\n }", "private boolean checkEmailString(String email) {\n boolean validEmail = true;\n try {\n InternetAddress emailAddr = new InternetAddress(email);\n emailAddr.validate();\n } catch (AddressException ex) {\n validEmail = false;\n }\n return validEmail;\n }", "public boolean validateEmail() {\n\t\tString emailString = emailValidity.getText();\n\t\tString errorMsg = \"Email in use.\";\n\t\tboolean result = emailString.contains(errorMsg);\n\t\tif (result) {\n\t\t\tstoreVerificationResults(true, \"Email in use\");\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tstoreVerificationResults(false, \"User able to reuse email id\");\n\t\t}\n\t\treturn result;\n\t}", "public static boolean validateEmail(String testEmail) {\n String emailPattern = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n Pattern pattern = Pattern.compile(emailPattern);\n Matcher matcher = pattern.matcher(testEmail);\n return matcher.matches();\n }", "private final boolean emailIsValid(String email) {\n\n\t\tif (email == null || email.trim().length() == 0) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn FormValidationTools.isValidEmail(email);\n\n\t}", "public boolean isValidEmail(String u) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(u);\n return matcher.matches();\n }", "private boolean isValidEmail(final String theEmail) {\n return theEmail.contains(\"@\");\n }", "public static boolean checkEmail(String email) {\r\n\t\tboolean result = false;\r\n\t\tif (check(email) && email.matches(CommandParameter.REG_EXP_EMAIL)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static boolean isEmailValid(String email) {\n return email.contains(\"@\") && email.contains(\".\");\n }", "public static boolean emailCheck(String email)\r\n\t{\r\n\t\treturn email.matches(\"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\r\n\t}", "public static boolean checkEmail(String email) {\r\n return email != null && Pattern.matches(EMAIL_REGEX, email);\r\n }", "public static boolean validarEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+ \n \"[a-zA-Z0-9_+&*-]+)*@\" + \n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \n \"A-Z]{2,7}$\"; \n \n Pattern pat = Pattern.compile(emailRegex); \n if (email == null) \n return false; \n return pat.matcher(email).matches(); \n }", "public static boolean isEmailValid(String email) {\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "private void validateEmail() {\n myEmailValidator.processResult(\n myEmailValidator.apply(myBinding.editResetEmail.getText().toString().trim()),\n this::verifyAuthWithServer,\n result -> myBinding.editResetEmail.setError(\"Please enter a valid Email address.\"));\n }", "void validate(String email);", "public Boolean isValidEmail(final String email) {\r\n\t\t\r\n\t\tpattern = Pattern.compile(EMAIL_PATTERN);\r\n\t\tmatcher = pattern.matcher(email);\r\n\t\t\r\n\t\treturn matcher.matches();\r\n\t}" ]
[ "0.8361054", "0.8253472", "0.8249567", "0.8231512", "0.8197589", "0.8197589", "0.8197589", "0.8197589", "0.8169375", "0.8169375", "0.8164012", "0.813747", "0.81075126", "0.8097763", "0.8075125", "0.80551875", "0.80539006", "0.8045706", "0.8039706", "0.8026346", "0.8024151", "0.80215794", "0.8016738", "0.8011639", "0.800332", "0.7986288", "0.7976366", "0.79218286", "0.79174733", "0.789905", "0.78944325", "0.78944325", "0.78944325", "0.78944325", "0.7869616", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.78519773", "0.7849489", "0.78458995", "0.7844753", "0.78414667", "0.7837139", "0.7830074", "0.7822945", "0.7819802", "0.7807331", "0.78054565", "0.7803706", "0.77996445", "0.7784364", "0.77716005", "0.7770517", "0.77528226", "0.77352226", "0.7729795", "0.77271944", "0.77211", "0.77158916", "0.7715767", "0.7684455", "0.7671499", "0.7671499", "0.76651394", "0.76571596", "0.7653453", "0.76436186", "0.7638598", "0.76225096", "0.76169914", "0.7616629", "0.75777614", "0.75716704", "0.7558486", "0.7557676", "0.7548513", "0.75311923", "0.7521507", "0.752148", "0.7519635", "0.7512486", "0.75094545", "0.7494754", "0.745627", "0.74553686", "0.7452547" ]
0.0
-1
PreArea > Area Before All Calls
public static void preOrder(Node node) { if (node == null) { return; } System.out.print(node.data + " "); preOrder(node.left); preOrder(node.right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void before();", "protected abstract void before();", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "void beforeState();", "@Override\n public void preRun() {\n super.preRun();\n }", "@Override\n\tpublic void pre()\n\t{\n\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "@Override\n\tpublic AreaExecution modifyArea(Area area) {\n\t\treturn null;\n\t}", "void beforeRun();", "protected abstract void preRun();", "@Override\n\tpublic AreaExecution addArea(Area area) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void beforePhase(PhaseEvent arg0) {\n\t\t\n\t}", "private void before() {\n\t\tSystem.out.println(\"程序开始执行!\");\n\t}", "@Override\n public void onPre() {\n }", "@BeforeAll\n public static void executedBeforeAll() {\n System.out.println(\"\\n@Before: executedBeforeall\");\n }", "public void prePerform() {\n // nothing to do by default\n }", "@Override\n public void beforePhase(PhaseEvent event) {\n\n }", "public void mo9839a() {\n onLayout(false, 0, 0, 0, 0);\n }", "@Override\r\n\tpublic void beforePhase(PhaseEvent event) {\n\t\t\r\n\t}", "void preProcess();", "public void before() {\n }", "public void before() {\n }", "@Override\r\n\tpublic void beforeScript(String arg0, WebDriver arg1) {\n\t\t\r\n\t}", "public void testAreaInfo()\n\t{\n\t\tGameArea ga = new GameArea();\n\t\tga.areaInfo();\n\t\tga.setConditionsMet(true);\n\t\tga.setAreaProgress(1);\n\t\tga.areaInfo();\n\t\tga.areaInfo();\n\t\tga.setLoot(null);\n\t\tga.areaInfo();\n\t}", "public static void preInit() {\n registerBlocks();\n }", "protected void runBeforeStep() {}", "public void beforeFirst() {\n\t\tmoveTo(0);\n\t}", "@Override\n\tpublic void beforeScript(String arg0, WebDriver arg1) {\n\n\t}", "@Stub\n\tpublic void before()\n\t{\n\t\t//\n\t}", "@Override\n\tpublic void preExecution() {\n\t\tshowProgressBar();\n\t}", "@Override\n protected void before() throws Throwable {\n ClassLoader oldClassLoader = ClassLoaders.setContextClassLoader(STANDALONE.getClass().getClassLoader());\n try {\n Method before = STANDALONE.getClass().getDeclaredMethod(\"before\");\n before.setAccessible(true);\n before.invoke(STANDALONE);\n } finally {\n ClassLoaders.setContextClassLoader(oldClassLoader);\n }\n }", "@Override\r\npublic void beforeScript(String arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "public void beforeInput() {\n }", "public void beforeInput() {\n }", "@Override\n public void beforeRender()\n {\n\n }", "@Override\r\n public void beforeScript(final String arg0, final WebDriver arg1) {\n\r\n }", "public void postProcessing() {\n //empty\n }", "public void beforeInit(){\n System.out.println(\"## beforeInit() - Before Init - Called by Bean Post Processor\");\n }", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}", "default void beforeUse() {\n\t}", "private void doBeforeInvokeApplication(final PhaseEvent arg0) {\n\t}", "protected void beforeParentInit() {\n // by default do nothing\n }", "@Override\n\tpublic int insertArea(Area area) {\n\t\treturn areaMapper.insertArea(area);\n\t}", "protected abstract void beforeCall();", "protected void preRender()\n {\n // subclass\n }", "public void doBefore(JoinPoint jp) {\n }", "public void beginHostile()\r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void beforeInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\t\r\n\t}", "@Before\r\n\tpublic void before() {\r\n\t}", "@Before(\"forDaoPackage()\")\r\n\tpublic void beforeAddAccountAdvice() {\r\n\t\tSystem.out.println(\"\\n=======>>>>> execution @Before advice on addAccount\");\r\n\t\t// run this code BEFORE-target object method: \"public void addAccount()\"\r\n\t}", "@Override\n\tpublic void preProcessAction(GwtEvent e) {\n\t\t\n\t}", "void preInit();", "void preInit();", "private void doBeforeProcessValidations(final PhaseEvent arg0) {\n\t}", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "void beforeContentsSynchronized();", "public void areaTracker() {\n\n\t\turl = ClassLoader.getSystemClassLoader().getResource(\n\t\t\t\t\"res/floor_plan.jpg\");\n\n\t\t// file path is read to the buffered image\n\t\ttry {\n\t\t\ticon1 = ImageIO.read(url);\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// mouse listener (to display the selected area) for the mouse events\n\n\t\taddMouseListener(new MouseEventAdapterA());\n\t\tsetVisible(true);\n\t}", "protected void additionalProcessing() {\n\t}", "@Before\r\n\tpublic void before() {\r\n\t\tSystem.out.println(\" Before() \");\r\n\t\tcalc = new CalculadoraDos();// no forma parte del test es una precondicion para ejecutar el test\r\n\t}", "@Before(\"execution (* com.jayway.blog.YourClass.yourMethodBefore(..))\")\n //JointPoint = the reference of the call to the method\n public void beforeAdvice(JoinPoint joinPoint) {\n System.out.println(\"YourAspect's BeforeAdvice's body is now executed Before yourMethodBefore is called.\");\n }", "public void preGame() {\n\n\t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "protected void beforeJobExecution() {\n\t}", "@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\n public void doAfterAllAnalysed(AnalysisContext context) {\n\n }", "@BeforeGroup\n public void beforeGroup() {\n }", "public void onLoad() {\n\t}", "@Override\n\t protected void onPreExecute() {\n\t }", "public void onStart(LoadScenarioInfo loadScenarioInfo){\n }", "@Override\n public Object preProcess() {\n return null;\n }", "@Override\n\tprotected void onPreAutoDispatch(float gameTime) {\n\t}", "@Override\n\tpublic void dispatchBeforeFinish() {\n\t\t\n\t}", "void postInit();", "void postInit();", "protected void onBegin() {}", "private void react_mainRegion_State1() {\n\t\tif (check_mainRegion_State1_tr0_tr0()) {\n\t\t\teffect_mainRegion_State1_tr0();\n\t\t}\n\t}", "@Before(\"execution(* com.p.boot.interview.mgmt.rest.resource.*.*(..))\")\r\n\tpublic void before(JoinPoint joinPoint){\r\n\t\t//Advice\r\n\t\tlogger.info(\" Going to execute resource \");\r\n\t\tlogger.info(\r\n\t\t\t\t\"Entered into \"\r\n\t\t\t\t+ joinPoint.getSignature()\r\n\t\t\t\t+ \" method\");\r\n\t\tlogger.info(\" Allowed execution for {}\", joinPoint);\r\n\t}", "private void setUpScoreZone() {\n }", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "public abstract void postInit();", "private void topAFMgrSplitMouseEntered(java.awt.event.MouseEvent evt) {\n reportMouse(evt, \"Mouse entered \");\n\n }", "@BeforeMethod\n public void preCondtions() {\n }", "void beginGeoField();", "@Override\n\tpublic void areaTotal() {\n\t\tsolido.areaTotal = solido.areaLateral + solido.areaBase;\n\t}", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "@Override\n\tpublic void onPreExecute()\n\t{\n\t\t\n\t}", "protected void doPreEntryActions(RequestControlContext context) throws FlowExecutionException {\r\n\r\n\t}", "void preHandle() throws InvalidationException;", "private void northRegion() {\r\n\t\tthis.addComponent(BorderLayout.NORTH, sv);\r\n\t\t\r\n\t\tToolbar toolBar = new Toolbar();\r\n\t\tsetToolbar(toolBar);\r\n\t\ttoolBar.setTitle(\"ThePath Game\");\r\n\t\t\r\n\t\tCheckBox soundCheckBox = new CheckBox(\"Side Menu Item Check\");\r\n\t\tsoundCheckBox.getAllStyles().setBgTransparency(255);\r\n\t\tsoundCheckBox.getAllStyles().setBgColor(ColorUtil.LTGRAY);\r\n\t\t\r\n\t\tSoundCommand soundCommand = new SoundCommand(gw);\r\n\t\tsoundCheckBox.setCommand(soundCommand);\r\n\t\ttoolBar.addComponentToSideMenu(soundCheckBox);\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(accelerateCommand);\r\n\t\t\r\n\t\tAboutCommand aboutCommand = new AboutCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(aboutCommand);\r\n\t\t\r\n\t\tHelpCommand helpCommand = new HelpCommand(gw);\r\n\t\ttoolBar.addCommandToRightBar(helpCommand);\r\n\t\t\r\n\t\tExitCommand exitCommand = new ExitCommand();\r\n\t\ttoolBar.addCommandToLeftSideMenu(exitCommand);\r\n\t}", "@Before\n\tpublic void before() {\n\t\tpoint = new Point(-200, 150);\n\t\tpoint1 = new Point(-400, -150);\n\t}", "public /* synthetic */ void mo17789x99d0e4e3() {\n NotificationPanelViewController.this.mKeyguardBottomArea.launchLeftAffordance();\n }", "private void enterSequence_mainRegion_default() {\n\t\treact_mainRegion__entry_Default();\n\t}", "void tempInRegionUI();", "void PrepareRun() {\n }", "@Before\n public void before() {\n System.out.format(\"In Before of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }", "@Before(\"springdemo.AOPOrders.Aspect.LuvAopExpressions.forDaoPackageNoGetterSetter()\") // apply pointcut declaration to advice\n public void beforeAddAccountAdvice(){\n System.out.println(\"\\n ===> Executing @Before advice on method\");\n }", "@Before\n public void before() {\n }", "@Before\n public void before() {\n }" ]
[ "0.6280836", "0.6128616", "0.60497004", "0.59966195", "0.59839463", "0.59359694", "0.59275985", "0.58999836", "0.58968663", "0.58115226", "0.5786206", "0.576644", "0.569133", "0.5668904", "0.5662046", "0.5637173", "0.5622047", "0.5595525", "0.5581691", "0.55803156", "0.5574894", "0.5574894", "0.55734706", "0.55592966", "0.55156195", "0.5514233", "0.5511981", "0.5496244", "0.5484998", "0.54762715", "0.5475197", "0.5462842", "0.5454068", "0.5454068", "0.5453988", "0.54500794", "0.5402679", "0.54018193", "0.5401564", "0.53906167", "0.53661543", "0.53571796", "0.5345628", "0.53388005", "0.5335665", "0.5327628", "0.5322808", "0.5310515", "0.5310105", "0.5309279", "0.5307229", "0.53033656", "0.52974147", "0.52974147", "0.5287447", "0.52792245", "0.5266681", "0.52599794", "0.52590173", "0.5241584", "0.5219888", "0.521762", "0.5205895", "0.5197814", "0.5196196", "0.5190839", "0.5187833", "0.518733", "0.5178324", "0.5177717", "0.5176658", "0.51758957", "0.5175141", "0.51715463", "0.5167059", "0.5167059", "0.5165336", "0.51625246", "0.51607305", "0.5159911", "0.51545316", "0.51519483", "0.51514345", "0.51486796", "0.5146265", "0.51413995", "0.5139566", "0.51343703", "0.5133417", "0.5130975", "0.51290035", "0.51275754", "0.5127449", "0.51247483", "0.5114091", "0.51123464", "0.5104543", "0.510447", "0.5102912", "0.5100256", "0.5100256" ]
0.0
-1
InArea > Area Between the calls i.e. left and right calls
public static void inOrder(Node node) { if (node == null) { return; } inOrder(node.left); System.out.print(node.data + " "); inOrder(node.right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int area_intersection(int blx1, int bly1, int trx1,int try1, int blx2, int bly2,int trx2,int try2){\r\n\t\tint base = 0, height = 0, area = 0;\r\n\t\r\n\t\tif (blx2>=blx1 && blx2<=trx1){\r\n\t\t\tif (bly2>=bly1 && bly2<=try1){\r\n\tif (trx2<=trx1 && trx2>=blx1){\r\n\tbase = trx2 - blx2;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\telse{\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tif( blx1>=blx2 && blx1<=trx2){\r\n\tbase = trx1 - blx1;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (blx1>=blx2 && blx1<=trx2){\r\n\t if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx1;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t }\r\n\tif( trx2>=blx1 && trx2<=trx1){\r\n\tbase = trx2 - blx1;\r\n\theight = try2 - bly1;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\t//else if(trx1 - blx2)==0 || (try1 - bly1)==0 || !(trx1>blx2 and trx2>trx1 && bly2<=bly1){\r\n\t//area = 0\r\n\t\t//}\r\n\t//end\r\n\t \r\n\t//if( area && area<=2147483647 )\r\n\t//area\r\n\t//else\r\n\t//-1\r\n\t//end\r\n\r\n\t\treturn area;\r\n\t}", "public abstract int getArea();", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}", "@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}", "double area() {\nSystem.out.println(\"Inside Area for Rectangle.\");\nreturn dim1 * dim2;\n }", "public abstract float calArea();", "double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }", "@Test\n public void testcalAreaRectangle2() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(-3);\n endPoint.setY(-3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }", "abstract void findArea();", "abstract void findArea();", "double area() {\nSystem.out.println(\"Inside Area for Rectangle.\");\nreturn dim1 * dim2;\n}", "private static boolean withinArea(Point dronePos) {\r\n\t\tvar droneLat = dronePos.latitude();\r\n\t\tvar droneLon = dronePos.longitude();\r\n\t\treturn droneLat<latUB && droneLat>latLB && droneLon<lonUB && droneLon>lonLB;\r\n\t}", "@Override\n\tpublic void calcularArea() {\n\t\t\n\t}", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "@Override\n\tpublic void area() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(this.name+\"的面积:\"+land1high*land1);\n\t}", "double getArea();", "double getArea();", "@Test\n public void testcalAreaRectangle1() {\n double ex = 4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }", "public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}", "public abstract float getArea();", "public int area() {\n \tarea = width()*height();\n }", "int checkInside(Rectangle r1, Rectangle r2) {\n if (r1.x - r1.w / 2 >= r2.x - r2.w / 2 // left edge\n && r1.x + r1.w / 2 <= r2.x + r2.w / 2 // right edge\n && r1.y + r1.h / 2 <= r2.y + r2.h / 2 // top\n && r1.y - r1.h / 2 >= r2.y - r2.h / 2 // bottom\n ) {\n return 1;\n }\n // check if r2 is inside r1\n if (r2.x - r2.w / 2 >= r1.x - r1.w / 2 // left edge\n && r2.x + r2.w / 2 <= r1.x + r1.w / 2 // right edge\n && r2.y + r2.h / 2 <= r1.y + r1.h / 2 // top\n && r2.y - r2.h / 2 >= r1.y - r1.h / 2 // bottom\n ) {\n return 2;\n }\n\n return 0;\n }", "public abstract float area();", "@Test\n public void testcalAreaRectangle3() {\n double ex = -4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }", "abstract double area();", "abstract double area();", "abstract double area();", "abstract double area();", "public void calArea()\n {\n //Start of the formula\n for(int i = 0; i < sides-1; i++)\n {\n area += (poly[i].getX()*poly[i+1].getY())-(poly[i].getY()*poly[i+1].getX());\n }\n\n //half the total calculation\n area = area/2;\n\n //if area is negative times by -1\n if(area <= 0)\n {\n area = area*-1;\n }\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}", "@Test\n public void testcalAreaRectangle4() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }", "public void calcArea(){\n double p=(side1+side2+side3)/2;\n area=p*(p-side1)*(p-side2)*(p-side3);\n area=Math.sqrt(area);\n\n\n }", "int getAreaCount();", "int getAreaCount();", "int getAreaCount();", "private void getArea() {\n\t\tdouble a = 0;\n\t\tint n = points.length;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta += (points[i-1].x + points[i].x) * (points[i-1].y - points[i].y);\n\t\t}\n\t\t// process last segment if ring is not closed\n\t\tif (!points[0].equals(points[n-1])) {\n\t\t\ta += (points[n-1].x + points[0].x) * (points[n-1].y - points[0].y);\n\t\t}\n\t\tarea = Math.abs(a / 2);\n\t}", "@Override\r\n\tpublic void calcArea() {\n\t\tSystem.out.println(side*side);\r\n\t}", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public double getArea();", "public double getArea();", "public double getArea();", "public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public abstract double calculateArea();", "public abstract double calculateArea();", "@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}", "double calculateArea();", "void calculateArea() {\n this.setArea(this.getArea()/2);\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }", "@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "boolean rectRect(float r1x, float r1y, float r1w, float r1h, float r2x, float r2y, float r2w, float r2h) {\n\t \n\t // are the sides of one rectangle touching the other?\n\t \n\t if (r1x + r1w >= r2x && // r1 right edge past r2 left\n\t r1x <= r2x + r2w && // r1 left edge past r2 right\n\t r1y + r1h >= r2y && // r1 top edge past r2 bottom\n\t r1y <= r2y + r2h) { // r1 bottom edge past r2 top\n\t return true;\n\t }\n\t return false;\n\t}", "@Override\r\n public double area() {\n return height*width;\r\n }", "@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}", "public abstract double calcBaseArea();", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public abstract String getArea();", "public abstract double computeArea();", "public double calcArea()\n\t{\n\t\treturn (double) oneside * oneside;\n\t}", "public int getArea()\n {\n //implement a recursive method\n\t if (width==1) \n\t {\n\t\t return 1;\n\t }\n\t else\n\t {\n\t\t Square smallerSquare = new Square(width - 1);\n\t\t return (2 * width - 1 + smallerSquare.getArea());\n\t }\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}", "private void calculateAreas() {\n\n\t\t/*\n\t\t * Each section is a trapezoid, so that the area is given by:\n\t\t * \n\t\t * (thicknessAtMainSpar + thicknessAtSecondarySpar)*distanceBetweenSpars*0.5\n\t\t * \n\t\t */\n\t\tint nSections = this._thicknessAtMainSpar.size();\n\t\tfor(int i=0; i<nSections; i++)\n\t\t\tthis._prismoidsSectionsAreas.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\t(this._thicknessAtMainSpar.get(i).plus(this._thicknessAtSecondarySpar.get(i)))\n\t\t\t\t\t\t\t.times(this._distanceBetweenSpars.get(i)).times(0.5).getEstimatedValue(),\n\t\t\t\t\t\t\tSI.SQUARE_METRE\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t}", "public double area(){\n return (base*height) / 2;\n }", "public int area(String[] rectangles){\n TreeMap<Integer, Events> events = new TreeMap<>();\n\n int tag = 0;\n for(String r : rectangles){\n tag++;\n Scanner sc = new Scanner(r);\n int x1 = sc.nextInt();\n int y1 = sc.nextInt();\n int x2 = sc.nextInt();\n int y2 = sc.nextInt();\n if(!events.containsKey(x1))\n events.put(x1, new Events());\n if(!events.containsKey(x2))\n events.put(x1, new Events());\n\n events.get(x1).in.add(new YRange(y1, y2, tag));\n events.get(x2).out.add(new YRange(y1, y2, tag));\n }\n\n // Active set of tags for each unique y\n // we need to identify where each each rectangle starts & end\n // positve tag - start \n // negative tag - end\n // We need all of them sorted\n TreeSet<Pair> active = new TreeSet<Pair>(new Comparator<Pair>(){\n @Override\n public int compare(Pair a, Pair b){\n if(a.y == b.y)\n return Integer.compare(a.tag, b.tag);\n return Integer.compare(a.y, b.y);\n }\n });\n\n int area = 0;\n for(Map.Entry<Integer, Events> entry : events.entrySet()){\n int x = entry.getKey();\n Integer next_x = events.higherKey(x);\n // processed last unique x\n if(next_x == null) break;\n Events e = entry.getValue();\n\n // Construct the current active set\n for(YRange y : e.in){\n active.add(new Pair(y.y1, y.tag));\n active.add(new Pair(y.y2, -y.tag));\n }\n\n for(YRange y : e.out){\n active.remove(new Pair(y.y1, y.tag));\n active.remove(new Pair(y.y2, -y.tag));\n }\n // Compute union of y segments\n Integer lasty = null;\n int ySum = 0;\n int cnt = 0;\n for(Pair p : active){\n int y = p.y;\n if(cnt == 0){\n lasty = y;\n }\n // closing\n if(p.tag < 0) cnt--;\n else cnt++;\n\n if(cnt == 0){\n ySum += y - lasty;\n // reset lasty\n lasty = null;\n }\n }\n area += (next_x - x)*ySum;\n }\n return area;\n }", "public void getArea(int a, int b) {\n\n\t\tSystem.out.println(\"the area of a rectangle is \" + (a * b));\n\n\t}", "public void checkLeftAndRightXs() {\r\n this.leftX = (int) this.enemies.get(0).getCollisionRectangle().getBoundaries().getLeftX();\r\n this.rightX = (int) (this.enemies.get(0).getCollisionRectangle().getBoundaries().getRightX());\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getBoundaries().getLeftX() < this.leftX) {\r\n this.leftX = (int) e.getCollisionRectangle().getBoundaries().getLeftX();\r\n }\r\n if (e.getCollisionRectangle().getBoundaries().getRightX() > this.rightX) {\r\n this.rightX = (int) e.getCollisionRectangle().getBoundaries().getRightX();\r\n }\r\n }\r\n }", "public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }", "double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }", "@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }", "private float signedArea()\n {\n float twiceArea = 0.0f;\n\n for (int i = 0; i < size(); i++)\n {\n PointF curr = get(i);\n PointF next = get(i + 1);\n twiceArea += curr.x * next.y - next.x * curr.y;\n }\n\n return twiceArea / 2;\n }", "public void testAreaInfo()\n\t{\n\t\tGameArea ga = new GameArea();\n\t\tga.areaInfo();\n\t\tga.setConditionsMet(true);\n\t\tga.setAreaProgress(1);\n\t\tga.areaInfo();\n\t\tga.areaInfo();\n\t\tga.setLoot(null);\n\t\tga.areaInfo();\n\t}", "private boolean isInArea(Area area, Position p) {\n long shipLongitude = p.getLongitude();\n long shipLatitude = p.getLatitude();\n\n if (shipLongitude >= area.getLongLeft() && shipLongitude <= area.getLongRight()\n && shipLatitude >= area.getLatBottom() && shipLatitude <= area.getLatTop()) {\n return true;\n }\n return false;\n }", "double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}", "@Override\n double areaFigure() {\n if (!isRealFigure()) {\n return -1;\n }\n //When the triangular prism is real\n double faceArea = (getA() + getB() + getC()) * getD();\n return faceArea + 2 * super.areaFigure();\n }", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "int getAreaSize();", "@Test\r\n\tpublic void testArea() {\r\n\t\tint area = LENGTH * WIDTH;\r\n\t\tassertEquals(area, validRectangle.area());\r\n\t}", "double area();", "public double area();", "private ResizeContext getHoverArea(Point p) {\n ResizeContext toRet = null;\n ResizeType resizeType = null;\n Point resizePoint = null;\n for (Rectangle rectangle : originalAreas) {\n if (isMatch(new Point(rectangle.x, rectangle.y), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x, rectangle.y); \n } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y); \n } else if (isMatch(new Point(rectangle.x, rectangle.y + rectangle.height), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x, rectangle.y + rectangle.height); \n } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height), p)) {\n resizeType = ResizeType.CORNER;\n resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height);\n } \n // TODO The side resizing is not yet supported.\n// else if (isMatch(new Point(rectangle.x + rectangle.width / 2, rectangle.y), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width / 2, rectangle.y); \n// } else if (isMatch(new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2); \n// } else if (isMatch(new Point(rectangle.x, rectangle.y + rectangle.height / 2), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x, rectangle.y + rectangle.height / 2); \n// } else if (isMatch(new Point(rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height), p)) {\n// resizeType = ResizeType.SIDE;\n// resizePoint = new Point(rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height); \n// }\n\n if (resizeType != null) {\n toRet = new ResizeContext(resizeType, resizePoint, rectangle);\n break;\n }\n }\n\n return toRet;\n }", "public int area(String[] rectangles){\n TreeMap<Integer, Events> events = new TreeMap<>();\n\n int tag = 0;\n for(String r : rectangles){\n tag++;\n Scanner sc = new Scanner(r);\n int x1 = sc.nextInt();\n int y1 = sc.nextInt();\n int x2 = sc.nextInt();\n int y2 = sc.nextInt();\n if(!events.containsKey(x1))\n events.put(x1, new Events());\n if(!events.containsKey(x2))\n events.put(x2, new Events());\n\n events.get(x1).in.add(new YRange(y1, y2, tag));\n events.get(x2).out.add(new YRange(y1, y2, tag));\n }\n\n // Active set of tags for each unique y\n // we need to identify where each each rectangle starts & end\n // positve tag - start \n // negative tag - end\n // We need all of them sorted\n TreeMap<Integer, TreeSet<Integer>> active = new TreeMap<>();\n int area = 0;\n for(Map.Entry<Integer, Events> entry : events.entrySet()){\n int x = entry.getKey();\n Integer next_x = events.higherKey(x);\n // processed last unique x\n if(next_x == null) break;\n Events e = entry.getValue();\n\n // Construct the current active set\n for(YRange y : e.in){\n if(!active.containsKey(y.y1)) active.put(y.y1, new TreeSet<>());\n if(!active.containsKey(y.y2)) active.put(y.y2, new TreeSet<>());\n\n active.get(y.y1).add(y.tag);\n active.get(y.y2).add(-y.tag);\n }\n for(YRange y : e.out){\n active.get(y.y1).remove(y.tag);\n active.get(y.y2).remove(-y.tag);\n }\n // Compute union of y segments\n Integer lasty = null;\n int ySum = 0;\n int cnt = 0;\n for(Map.Entry<Integer, TreeSet<Integer>> ytags : active.entrySet()){\n int y = ytags.getKey();\n if(cnt == 0){\n lasty = y;\n }\n for(int ytag : ytags.getValue()){\n // closing\n if(ytag < 0) cnt--;\n else cnt++;\n }\n\n if(cnt == 0){\n ySum += y - lasty;\n // reset lasty\n lasty = null;\n }\n }\n area += (next_x - x)*ySum;\n }\n return area;\n }", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }", "double getArea(){\n return height*width;\n }", "@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }", "public int getArea()\n {\n return area;\n }", "public void testArea() {\n\t CircleArc2D whole = new CircleArc2D(-10, -10, 5, 0, 4*PI);\r\n\t double expectedAreaWhile = PI*25; // \\pi * 5^2\r\n\r\n\t assertEquals(expectedAreaWhile, whole.getArea());\r\n\r\n\t // TODO: Pull in JCheck to supercharge this.\r\n\t Random r = new Random();\r\n\t double sweepExtent = r.nextDouble();\r\n\t CircleArc2D partial = new CircleArc2D(-10, -10, 5, 45, (4*PI)/sweepExtent);\r\n\t double expectedAreaParial = expectedAreaWhile / sweepExtent;\r\n\r\n\t assertEquals(expectedAreaParial, partial.getArea(), 0.0001);\r\n\t }", "@Override\r\n public double getArea() {\r\n return (0.5 * (base * height));\r\n }", "public Rectangle getArea() {\n return area;\n }", "@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }", "public void fun1()\n\t{\n\tSystem.out.println(\"area of rectangle : \" +(b*a));\n\t}", "@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}", "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 void getArea() {\n\t\ts = (double) (a + b + c) / 2;\n\t\tarea = Math.sqrt(s * (s - a) * (s - b) * (s - c));\n\t\tSystem.out.println(\"Area: \" + area);\n\t}", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}" ]
[ "0.6518581", "0.6477939", "0.64069724", "0.6394964", "0.6384945", "0.6355292", "0.6335583", "0.62734765", "0.62698543", "0.6268876", "0.6268876", "0.6261108", "0.6221583", "0.621968", "0.62025666", "0.6201482", "0.61747354", "0.61747354", "0.61718297", "0.61625844", "0.61523235", "0.61381507", "0.6113947", "0.60764134", "0.60746914", "0.60744214", "0.60744214", "0.60744214", "0.60744214", "0.6045149", "0.60430944", "0.6034791", "0.6029239", "0.59850043", "0.59850043", "0.59850043", "0.597938", "0.5972916", "0.5950785", "0.5950785", "0.5950785", "0.59194726", "0.59194726", "0.59194726", "0.58982867", "0.5882904", "0.5871582", "0.5858056", "0.5858056", "0.58339024", "0.58244175", "0.5818929", "0.58094704", "0.5797918", "0.57842284", "0.5780207", "0.57760084", "0.5771989", "0.57607305", "0.57594323", "0.57534546", "0.5749612", "0.5748485", "0.5746649", "0.57434434", "0.57407695", "0.5738366", "0.5735174", "0.5724323", "0.57221645", "0.57165927", "0.571183", "0.5705889", "0.56931895", "0.5692671", "0.5691924", "0.569118", "0.5686171", "0.56836516", "0.56794643", "0.5653987", "0.5639957", "0.5639032", "0.5636041", "0.5634078", "0.5630002", "0.5625961", "0.56181747", "0.561344", "0.5611248", "0.56055397", "0.5601158", "0.55951554", "0.5585132", "0.5583827", "0.55766976", "0.55753374", "0.5560823", "0.556052", "0.55594474", "0.5558674" ]
0.0
-1
PostArea > Area After all calls
public static void postOrder(Node node) { if (node == null) { return; } postOrder(node.left); postOrder(node.right); System.out.print(node.data + " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void PostRun() {\n }", "@Override\n\tpublic void postRun() {\n\t}", "public void postProcessing() {\n //empty\n }", "@Override\n\tprotected void postRun() {\n\n\t}", "void postProcess();", "void postProcess();", "public void postPerform() {\n // nothing to do by default\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\n\tpublic AreaExecution modifyArea(Area area) {\n\t\treturn null;\n\t}", "@Override\n\tpublic AreaExecution addArea(Area area) {\n\t\treturn null;\n\t}", "public void closePost() {\n // TODO implement here\n }", "@Override\n public void doAfterAllAnalysed(AnalysisContext context) {\n\n }", "@Override\n\tpublic void afterAction(String method, HttpServletRequest request, HttpServletResponse response) {\n\t}", "protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "@Override\n\tpublic void postorder() {\n\n\t}", "protected abstract void after();", "private void doAfterRenderResponse(final PhaseEvent arg0) {\n\t}", "@Override\n\tpublic void postProcessAction(GwtEvent e) {\n\t\t\n\t}", "public void PostOrder() {\n\t\tPostOrder(root);\n\t}", "private void doAfterInvokeApplication(final PhaseEvent arg0) {\n\t}", "private void doAfterEveryPhase(final PhaseEvent arg0) {\n\t}", "void afterRun();", "@Override\n\tpublic void dispatchBeforeFinish() {\n\t\t\n\t}", "private void doAfterApplyRequest(final PhaseEvent arg0) {\n\t}", "@Override\n protected void after() {\n }", "@Override\r\n\tpublic void completeScene() {\n\t\t\r\n\t}", "void analysisPostponed();", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse arg1, Object arg2, ModelAndView arg3)\n\t\t\tthrows Exception {\n\t\tSystem.out.println(\"方法执行之后拦截\");\n\t}", "public void postData() {\n\n\t}", "void after();", "public void post() {\n//\t\tif(!supercachequery){\n//\t\t\thandlePostReset();\n//\t\t}\n//\t\tsupercachequery = false;\n\t}", "private void postAnimationCallback() {\n this.mChoreographer.postCallback(1, this.mAnimationCallback, null);\n }", "default void afterInvocation() {\n afterInvocation(false);\n }", "protected void afterActiveHandled() {\n\t}", "public void postOrder() {\r\n\t\tSystem.out.print(\"POST: \");\r\n\t\tpostOrder(root);\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n public void finish() {\n\n super.finish();\n //construction.updateConstructionZones();\n }", "public void postOrder() {\n postOrder(root);\n }", "protected void runAfterStep() {}", "@Override\n public void run() {\n setPointActions(host.getUnlockedStages());\n }", "@AfterMethod\n\tpublic void end()\n\t{\n\n\t}", "@Override\n\t\tprotected AllArea doInBackground(Void... params) \n\t\t{\n\t\t\t\n\t\t\tAPICall api = new APICall();\n\t\t\tAllArea result = api.getArea();\n\t\t\treturn result;\n\t\t}", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@Override\n\tpublic void areaTotal() {\n\t\tsolido.areaTotal = solido.areaLateral + solido.areaBase;\n\t}", "protected void doPostAlgorithmActions() {\r\n if (outputPanel.isOutputNewImageSet()) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "@Override\n public void afterFinish() {\n \n }", "public void testAreaInfo()\n\t{\n\t\tGameArea ga = new GameArea();\n\t\tga.areaInfo();\n\t\tga.setConditionsMet(true);\n\t\tga.setAreaProgress(1);\n\t\tga.areaInfo();\n\t\tga.areaInfo();\n\t\tga.setLoot(null);\n\t\tga.areaInfo();\n\t}", "@Stub\n\tpublic void after()\n\t{\n\t\t//\n\t}", "@Override\n public void onExitedRegion(Region arg0) {\n\n }", "public void doAfter(JoinPoint jp) {\n }", "@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}", "@Override \r\n public void afterReturning(Object arg0, Method arg1, Object[] arg2, \r\n Object arg3) throws Throwable {\n \r\n System.out.println(\"-------------------\"); \r\n \r\n System.out.println(\"After method \"); \r\n \r\n \r\n \r\n }", "protected void afterJobExecution() {\n\t}", "@Override\n\t\tpublic void onFinish() {\n\t\t\tfinalizar();\n\t\t}", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "@Override\n\tpublic void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3)\n\t\t\tthrows Exception {\n\t\tSystem.out.println(\"方法执行之后视图生成之前拦截\");\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic void save(Area area) {\n\t\tdao.save(area);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void afterExecution(final Object bapiObject) {\n }", "private void removeArea() {\n \t\tthis.set.remove( this.area );\n \t\tthis.finish();\n \t}", "@After(\"execution (public !Object com.jayway.blog.YourClass.yourMethodAfter(..))\")\n public void afterAdvice(JoinPoint joinPoint) {\n System.out.println(\"YourAspect's afterAdvice's body is now executed After yourMethodAfter is called.\");\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(String area) {\n this.area = area;\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\n\t\t\tLog.d(TAG, \"before post\");\n\t\t}", "public void baocun() {\n\t\t\n\t}", "public void AfterPicking() {\r\n\t EventDispatcher.dispatchEvent(this, \"AfterPicking\");\r\n\t }", "@Override\r\n\tpublic void PostExecute(TaskConfig config){\n\t}", "@Override\n public final void setArea(JQLayoutArea area)\n {\n if (area != null)\n {\n removeClass(area.getAreaClass().toString());\n }\n this.area = area;\n if (this.area != null)\n {\n addClass(this.area.getAreaClass().toString());\n }\n }", "protected abstract void postDestroy();", "public void onMissionEnd() {\n\n }", "public void postLayout(ZGroup node) {\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t\n\t\t\tLog.d(TAG, \"before post\");\n\t\t}", "protected void callbackPostReceived(){\n swipeRefreshLayout.setRefreshing(false);\n swipeRefreshLayout.setEnabled(true);\n }", "public DataHolder postProcess( DataHolder holder );", "protected void postProcess(HRegionInfo hri) throws IOException {\n // do nothing by default\n }", "protected void postInstantiate() {}", "protected void postRun() {\r\n\t\tthis.calculateFlowBandwidthHops();\r\n\t\tdouble abt = this.ABT();\r\n\t\tdouble agt = this.AGT();\r\n\t\tthis.metrics.add(new ResultMetric(\"ABT\", abt));\r\n\t\tthis.metrics.add(new ResultMetric(\"AGT\", agt));\r\n\t\tthis.metrics.add(new ResultMetric(\"Hops\", this.Hops()));\r\n\t\tthis.metrics.add(new ResultMetric(\"AveHops\", this.Hops()\r\n\t\t\t\t/ this.flows.size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"SuccCount\", this.successfulCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"FailCount\", this.failedCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"ServerNum\", this.dcn\r\n\t\t\t\t.getServerUUIDs().size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"ThroughputPerLink\", abt\r\n\t\t\t\t/ this.dcn.linkCount()));\r\n\t}", "@Override\n\tpublic int updateArea(Area area) {\n\t\treturn areaMapper.updateArea(area);\n\t}", "@Override\n\tpublic void postProcess(NodeCT node) {\n\t}", "public void afterDone() {\n }", "public void afterDone() {\n }", "@Override\n\tpublic int insertArea(Area area) {\n\t\treturn areaMapper.insertArea(area);\n\t}", "private void commitApuesta() {\n\t\tif(tipo != -1){\n\t\t\tmodelo.setDestLogin(ModeloApuestas.DEST_APOSTUBERRI);\n\t\t\tmodelo.setApuestaInProgress(apostado.get(), tipo);\n\t\t\tif(!myController.isScreenLoaded(\"login\")){\n\t\t\t\tmyController.loadScreen(ScreensFramework.Login, ScreensFramework.Login_FXML);\n\t\t\t}\n\t\t\tmyController.setScreenOverlay(\"login\");\n\t\t}\n\t\t\n\t\t\n\t}", "@AfterMethod\n\tpublic void afterMethod() {\n\t}", "public void setArea(String area) {\n\t\tthis.area = area;\n\t}", "@OAuthPostAuthorization\n public void postAuthorize() {\n }", "@AfterMethod()\n\tpublic void afterMethod() {\n\t\textent.endTest(test);\n\t\textent.flush();\n\t}", "@Override\n\tpublic void calcularArea() {\n\t\t\n\t}", "public void mo10682b() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10100a((Activity) MultiPhotoFrameMainActivity.this);\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.SaveCompleteDlg, (Bundle) null);\n }\n });\n }\n }", "@Override\r\n\tpublic void afterInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\t\r\n\t}", "public void doPost( )\n {\n \n }", "protected abstract void postOpen();", "public abstract void postInit();", "private void postCloseEvent() {\n container.getToolkit().getSystemEventQueue().postEvent(new WindowEvent(container, WindowEvent.WINDOW_CLOSING));\n \n }", "@AfterMethod(enabled =true)\n\tpublic void afterMethod(){\n\t\tSystem.out.println(\"In AfterMethod\");\n\t}", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "protected void onEnd() {}", "@Override\r\n\tpublic void execute(PostAllParserPluginContext ctx) throws ParserPluginException {\r\n\t\tTestAgenda testAgenda = ctx.getTestAgenda();\r\n\t\tTraceabilityMatrix.produceTraceabilityMatrix(testAgenda);\r\n\t}", "public void onPostCreate(Bundle bundle) {\n super.onPostCreate(bundle);\n getDelegate().b(bundle);\n }", "void doAfterEndTag() {\r\n }", "void postInit();", "void postInit();" ]
[ "0.64479667", "0.62154156", "0.6203869", "0.61030734", "0.6044507", "0.6044507", "0.59975195", "0.59703195", "0.5922512", "0.587111", "0.5782436", "0.57541025", "0.5736206", "0.5674558", "0.5620987", "0.5577342", "0.5565753", "0.5565173", "0.5539751", "0.5521554", "0.54900247", "0.5417443", "0.53979295", "0.5389539", "0.53848624", "0.5376913", "0.5374369", "0.53702617", "0.5352784", "0.5350735", "0.5341043", "0.5338059", "0.5331014", "0.5327134", "0.5309713", "0.52990234", "0.5298281", "0.5297635", "0.5285956", "0.52839255", "0.52820164", "0.52717096", "0.5267481", "0.5248403", "0.52375025", "0.5231426", "0.5230897", "0.5211066", "0.52092797", "0.5203919", "0.51960844", "0.51915646", "0.51873004", "0.51787674", "0.5174655", "0.5160988", "0.51607656", "0.51381296", "0.5137397", "0.51305723", "0.51263493", "0.5124579", "0.51229006", "0.51208824", "0.5112375", "0.51118475", "0.5106102", "0.5097178", "0.50891936", "0.5087212", "0.5071639", "0.5070006", "0.5068241", "0.5064351", "0.50579786", "0.50579107", "0.50511676", "0.5040511", "0.5034732", "0.5034732", "0.50342894", "0.5021523", "0.501971", "0.5018961", "0.5018397", "0.50133735", "0.5013084", "0.5008504", "0.50083166", "0.50052637", "0.5004569", "0.49956644", "0.49922436", "0.49901912", "0.4986101", "0.49855724", "0.49854305", "0.49845487", "0.4983036", "0.49812052", "0.49812052" ]
0.0
-1
TLE on Test 10
public static void main(String[] args) throws IOException { //Scanner in = new Scanner(System.in); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out); solve(in, out); out.close(); in.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n @Tag(\"slow\")\n public void testKEN_07() {\n CuteNetlibCase.doTest(\"KEN-07.SIF\", \"-6.795204433816869E8\", \"-1.61949281194431E8\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_11() {\n CuteNetlibCase.doTest(\"KEN-11.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testTRUSS() {\n CuteNetlibCase.doTest(\"TRUSS.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_18() {\n CuteNetlibCase.doTest(\"KEN-18.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testKEN_13() {\n CuteNetlibCase.doTest(\"KEN-13.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSTAIR() {\n CuteNetlibCase.doTest(\"STAIR.SIF\", \"-251.26695119296787\", \"-208.79999\", NumberContext.of(7, 2));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSHIP08L() {\n CuteNetlibCase.doTest(\"SHIP04L.SIF\", \"1793324.5379703548\", null, NumberContext.of(7, 4));\n }", "@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }", "public static void testTalletUlige() {\n\n if (21 % 2 == 0) {\n System.out.println(\"** \" + 21 + \" er et lige tal.\");\n }\n else\n System.out.println(\"** \" + 21 + \" er et ulige tal.\");\n }", "@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }", "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 testTalletLige() {\n\n if (20 % 2 == 0) {\n System.out.println(\"** \" + 20 + \" er et lige tal.\");\n }\n else\n System.out.println(\"** \" + 20 + \" er et ulige tal.\");\n }", "@Test\n @Tag(\"slow\")\n public void testSTANDMPS() {\n CuteNetlibCase.doTest(\"STANDMPS.SIF\", \"1406.0175\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testADLITTLE() {\n CuteNetlibCase.doTest(\"ADLITTLE.SIF\", \"225494.96316238036\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice((-1), 13, Integer.MAX_VALUE, 0);\n assertEquals(\"id=-1 modelOptComp=2.147483647E9 noAutoExecute\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testBNL1() {\n CuteNetlibCase.doTest(\"BNL1.SIF\", \"1977.629561522682\", \"1977.629561522682\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testQAP8() {\n CuteNetlibCase.doTest(\"QAP8.SIF\", \"2.0350000000E+02\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testWOOD1P() {\n CuteNetlibCase.doTest(\"WOOD1P.SIF\", \"1.44290241157344\", \"9.99999999999964\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCSD8() {\n CuteNetlibCase.doTest(\"SCSD8.SIF\", \"905\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSHIP04L() {\n CuteNetlibCase.doTest(\"SHIP04L.SIF\", \"1793324.5379703548\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(3033, 611, 186.275786794074, (-1.0), 186.275786794074, 40);\n assertEquals(\"id=3033 unknown: vol = 186.275786794074 delta = -1.0\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testSHELL() {\n CuteNetlibCase.doTest(\"SHELL.SIF\", \"1.208825346E9\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCTAP1() {\n CuteNetlibCase.doTest(\"SCTAP1.SIF\", \"1412.25\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testPEROLD() {\n CuteNetlibCase.doTest(\"PEROLD.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCYCLE() {\n CuteNetlibCase.doTest(\"CYCLE.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(98, (-2146523664), 1.0, 0.0, 98, 568.38);\n assertEquals(\"id=98 unknown: vol = 1.0 delta = 0.0\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testSTANDGUB() {\n CuteNetlibCase.doTest(\"STANDGUB.SIF\", \"1257.6995\", null, NumberContext.of(7, 4));\n }", "@Test\n public void testGenererTempsTriangulaire() throws Exception {\n System.out.println(\"genererTempsTriangulaire\");\n double min = 0.0;\n double mode = 0.0;\n double max = 0.0;\n double expResult = 0.0;\n double result = Utils.genererTempsTriangulaire(min, mode, max);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void test80BAU3B() {\n CuteNetlibCase.doTest(\"80BAU3B.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSTANDATA() {\n CuteNetlibCase.doTest(\"STANDATA.SIF\", \"1257.6995\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setUseStopList(true);\n assertTrue(naiveBayesMultinomialText0.getUseStopList());\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning((-1));\n int int0 = naiveBayesMultinomialText0.getPeriodicPruning();\n assertEquals((-1), int0);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.getHeader();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }", "@Override\r\n\tpublic int dtlTest(int paran) {\n\t\treturn paran;\r\n\t}", "@Test\n @Tag(\"slow\")\n public void testSIERRA() {\n CuteNetlibCase.doTest(\"SIERRA.SIF\", \"1.5394362183631932E7\", \"8.042913100947624E8\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickGeneric(13, 48, (-2212.2532659315993));\n assertEquals(\"id=13 RTVolume=-2212.2532659315993\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void testSHIP08S() {\n CuteNetlibCase.doTest(\"SHIP04L.SIF\", \"1793324.5379703548\", null, NumberContext.of(7, 4));\n }", "@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(timeout = 4000)\n public void test80() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.lowercaseTokensTipText();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(\"Whether to convert all tokens to lowercase\", string0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test\n public void testLargeA() {\n assertEquals(18, PiGenerator.powerMod(123456, 2, 23));\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"slow\")\n public void testSHIP12L() {\n CuteNetlibCase.doTest(\"SHIP04L.SIF\", \"1793324.5379703548\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"rud\");\n assertEquals(\"rus\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testQAP15() {\n CuteNetlibCase.doTest(\"QAP15.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testWOODW() {\n CuteNetlibCase.doTest(\"WOODW.SIF\", \"1.30447633308416\", \"6.463675062936\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n @Tag(\"bm1000\")\n public void testRECIPELP() {\n CuteNetlibCase.doTest(\"RECIPELP.SIF\", \"-266.616\", \"-104.818\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice(Integer.MAX_VALUE, Integer.MAX_VALUE, 0.0, (-2146710316));\n assertEquals(\"id=2147483647 unknown=0.0 canAutoExecute\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_A() {\n CuteNetlibCase.doTest(\"CRE-A.SIF\", \"2.9889732905677114E7\", \"2.9889732905677114E7\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCTAP3() {\n CuteNetlibCase.doTest(\"SCTAP3.SIF\", \"1424.000000000573\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.pctIncorrect();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\r\n\tvoid lowDiffLowPlus8TimesHigh()\r\n\t{\r\n\t\tSystem.out.println(\"NOW TESTING LOWDIFSTRING LOWPLUS8TIMESHIGH\");\r\n\t\tint k = 42;\r\n\t\tDomino d1 = new DominoLowDifferenceStringImpl_Khan(k);\r\n\t\tint assertHigh = d1.getHighPipCount();\r\n\t\tint assertLow = d1.getLowPipCount();\r\n\t\tassertEquals(assertHigh, 5);\r\n\t\tassertEquals(assertLow, 2);\r\n\t\t\r\n\t\tk = 34;\r\n\t\tDomino d2 = new DominoLowDifferenceStringImpl_Khan(k);\r\n\t\tassertHigh = d2.getHighPipCount();\r\n\t\tassertLow = d2.getLowPipCount();\r\n\t\tassertEquals(assertHigh, 4);\r\n\t\tassertEquals(assertLow, 2);\r\n\t\tSystem.out.println(\"TEST SUCCESFULLY COMPLETED\");\r\n\t}", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testGREENBEB() {\n CuteNetlibCase.doTest(\"GREENBEB.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.setNorm(0.0);\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(29, 13, 1.7976931348623157E308, 1.7976931348623157E308, 1.7976931348623157E308, 0.0);\n assertEquals(\"id=29 modelOptComp: vol = N/A delta = N/A: modelPrice = N/A: pvDividend = 0.0\", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_30() {\n CuteNetlibCase.doTest(\"OSA-30.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n int int0 = naiveBayesMultinomialText0.getPeriodicPruning();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, int0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_useStopList = true;\n boolean boolean0 = naiveBayesMultinomialText0.getUseStopList();\n assertTrue(boolean0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"metr\");\n assertEquals(\"meter\", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testNESM() {\n CuteNetlibCase.doTest(\"NESM.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR7() {\n CuteNetlibCase.doTest(\"SCAGR7.SIF\", \"-2331389.8243309837\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testQAP12() {\n CuteNetlibCase.doTest(\"QAP12.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Ignore\r\n @Test\r\n public void speedTest() throws InterruptedException {\n for (int i = 0; i < 10; i++) {\r\n singleSpeedTest();\r\n }\r\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testOSA_60() {\n CuteNetlibCase.doTest(\"OSA-60.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testGROW15() {\n CuteNetlibCase.doTest(\"GROW15.SIF\", \"-1.068709412935753E8\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCTAP2() {\n CuteNetlibCase.doTest(\"SCTAP2.SIF\", \"1724.8071428568292\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation((-2236), 13, (-1732.5392580492), (-1581.22787), (-1732.5392580492), (-1732.5392580492));\n assertEquals(\"id=-2236 modelOptComp: vol = N/A delta = N/A: modelPrice = N/A: pvDividend = N/A\", string0);\n }", "@Test\n @Tag(\"slow\")\n public void test25FV47() {\n CuteNetlibCase.doTest(\"25FV47.SIF\", \"5501.845888286646\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n public void testSCSD6() {\n CuteNetlibCase.doTest(\"SCSD6.SIF\", \"50.5\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testGREENBEA() {\n CuteNetlibCase.doTest(\"GREENBEA.SIF\", \"-1.74990012991E+03\", \"-1.74990012991E+03\", NumberContext.of(7, 4));\n }", "@Test\n public void usesToner(){\n printer.print(10,2);\n assertEquals(4980, printer.getTonerLevel());\n }", "private void test(NFV root) throws Exception{\n\t\tlong beginAll=System.currentTimeMillis();\n\t\tNFV rootTest = init(root);\n\t\tlong endAll=System.currentTimeMillis();\n //System.out.println(\"Total time -> \" + ((endAll-beginAll)/1000) + \"s\");\n\t\trootTest.getPropertyDefinition().getProperty().forEach(p ->{\n \tif(p.isIsSat()){\n\t\t\t\tmaxTotTime = maxTotTime<(endAll-beginAll)? (endAll-beginAll) : maxTotTime;\n\t\t\t\tSystem.out.print(\"time: \" + (endAll-beginAll) + \"ms;\");\n\t\t\t\ttotTime += (endAll-beginAll);\n \t\tnSAT++;\n \t}\n \telse{\n \t\tnUNSAT++;\n \t}\n });\n return;\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSC50B() {\n CuteNetlibCase.doTest(\"SC50B.SIF\", \"-7.0000000000E+01\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test82() throws Throwable {\n NaiveBayesMultinomialText.main((String[]) null);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testBNL2() {\n CuteNetlibCase.doTest(\"BNL2.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public void testRandomLongsTiny() throws Exception {\n doTestRandomLongs(10);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSTOCFOR1() {\n CuteNetlibCase.doTest(\"STOCFOR1.SIF\", \"-41131.97621943626\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice((-1403), 2125570549, 4832, 4832);\n assertEquals(\"id=-1403 unknown=4832.0 canAutoExecute\", string0);\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"ert\");\n assertEquals(\"ers\", string0);\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n ZeroR zeroR0 = new ZeroR();\n String string0 = Evaluation.wekaStaticWrapper(zeroR0, \"\");\n assertNotNull(string0);\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.avgCost();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testD2Q06C() {\n CuteNetlibCase.doTest(\"D2Q06C.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testMAROS_R7() {\n CuteNetlibCase.doTest(\"MAROS-R7.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n UnderComp underComp0 = new UnderComp();\n String string0 = EWrapperMsgGenerator.deltaNeutralValidation((-131), underComp0);\n assertEquals(\"id = -131 underComp.conId =0 underComp.delta =0.0 underComp.price =0.0\", string0);\n }", "@Test\n @Tag(\"bm1000\")\n public void testGROW7() {\n CuteNetlibCase.doTest(\"GROW7.SIF\", \"-4.7787811814711526E7\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test\n\tpublic void testHigherDifficulty()\n\t{\n\t\n\t\tLaboonCoin l = new LaboonCoin();\n\t\tassertTrue(l.validHash(1, 16619695));\t\n\t\t\t\n\t}" ]
[ "0.67655444", "0.6489419", "0.6434865", "0.63379", "0.6251482", "0.62320954", "0.618996", "0.611339", "0.6078762", "0.6072334", "0.6071053", "0.6050371", "0.5978325", "0.5977962", "0.59554034", "0.5948304", "0.58986175", "0.5895504", "0.5889423", "0.58658314", "0.58638144", "0.5854987", "0.58397967", "0.58368266", "0.58265793", "0.5826123", "0.5815714", "0.5809944", "0.57885015", "0.57835877", "0.57706326", "0.5762428", "0.57615215", "0.57377034", "0.5727194", "0.5721529", "0.5693199", "0.5687952", "0.56879306", "0.56768614", "0.5674076", "0.566925", "0.566552", "0.5652608", "0.5647036", "0.5640532", "0.56374377", "0.5635462", "0.56248", "0.56199425", "0.56196415", "0.5617905", "0.56085056", "0.5606076", "0.56039846", "0.56034666", "0.5600737", "0.5590374", "0.55891377", "0.55887395", "0.5581748", "0.55800736", "0.5567813", "0.5565894", "0.5559588", "0.55586934", "0.5556336", "0.5555373", "0.5553095", "0.55530643", "0.55519253", "0.55506414", "0.5547658", "0.5543718", "0.5530671", "0.55291843", "0.5526315", "0.5523089", "0.5518973", "0.5512762", "0.5512713", "0.5512532", "0.5508703", "0.55074114", "0.5506959", "0.5505533", "0.5503265", "0.55016446", "0.5500951", "0.54979265", "0.5497233", "0.54967195", "0.5484812", "0.5481884", "0.54757077", "0.5468446", "0.5467832", "0.54662675", "0.5465578", "0.54609245", "0.5454364" ]
0.0
-1
TODO Autogenerated method stub
@Override public void messagesRemoved(MessageCountEvent 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
This Method validates the layout on NonIpoConfirmationScreen
public boolean Verify_NonIpoConfirmation() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_ThankYou", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION", "DISPLAYED"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed(); if(flag){extentLogs.pass("VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON", "DISPLAYED"); }else{extentLogs.pass("VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON", "DISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION", "NOTDISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION", "NOTDISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION", "NOTDISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION", "NOTDISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL", "NOTDISPLAYED");} }else{extentLogs.fail("VerifyNonIPOConfirmationScreen_ThankYou", "NOTDISPLAYED");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "public boolean requiresLayout() {\n return false;\n }", "public boolean requiresLayout() {\n return false;\n }", "public boolean requiresLayout() {\n return true;\n }", "@After\n \tpublic void confirm() {\n \t\tcheckGlobalStatus();\n \n \t\tIterator<CyNetworkView> viewIt = viewManager.getNetworkViewSet().iterator();\n \n \t\tCyNetworkView view = viewIt.next(); \n \t\tCyNetwork network = view.getModel();\n \t\t\n \t\tcheckNetwork(network);\n \t\tcheckNetworkView(network);\n \t\tcheckAttributes(network);\n \t}", "@Test\n public void checkInitialLayout(){\n\n onView(withId(R.id.lbsRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.kgsRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.maleRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.femaleRBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.nextBTN)).check(matches(isDisplayed()));\n onView(withId(R.id.weightET)).check(matches(isDisplayed()));\n\n }", "private void validatePage() {\n String error = null;\n String warning = null;\n\n // -- validate project\n if (getProject() == null) {\n error = \"Please select an Android project.\";\n }\n\n // -- validate filename\n if (error == null) {\n String fileName = getFileName();\n if (fileName == null || fileName.length() == 0) {\n error = \"A destination file name is required.\";\n } else if (!fileName.endsWith(AndroidConstants.DOT_XML)) {\n error = String.format(\"The filename must end with %1$s.\", AndroidConstants.DOT_XML);\n }\n }\n\n // -- validate type\n if (error == null) {\n TypeInfo type = getSelectedType();\n\n if (type == null) {\n error = \"One of the types must be selected (e.g. layout, values, etc.)\";\n }\n }\n\n // -- validate type API level\n if (error == null) {\n IAndroidTarget target = Sdk.getCurrent().getTarget(mProject);\n int currentApiLevel = 1;\n if (target != null) {\n currentApiLevel = target.getVersion().getApiLevel();\n }\n\n TypeInfo type = getSelectedType();\n\n if (type.getTargetApiLevel() > currentApiLevel) {\n error = \"The API level of the selected type (e.g. AppWidget, etc.) is not \" +\n \"compatible with the API level of the project.\";\n }\n }\n\n // -- validate folder configuration\n if (error == null) {\n ConfigurationState state = mConfigSelector.getState();\n if (state == ConfigurationState.INVALID_CONFIG) {\n ResourceQualifier qual = mConfigSelector.getInvalidQualifier();\n if (qual != null) {\n error = String.format(\"The qualifier '%1$s' is invalid in the folder configuration.\",\n qual.getName());\n }\n } else if (state == ConfigurationState.REGION_WITHOUT_LANGUAGE) {\n error = \"The Region qualifier requires the Language qualifier.\";\n }\n }\n\n // -- validate generated path\n if (error == null) {\n String wsFolderPath = getWsFolderPath();\n if (!wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n error = String.format(\"Target folder must start with %1$s.\", RES_FOLDER_ABS);\n }\n }\n\n // -- validate destination file doesn't exist\n if (error == null) {\n IFile file = getDestinationFile();\n if (file != null && file.exists()) {\n warning = \"The destination file already exists\";\n }\n }\n\n // -- update UI & enable finish if there's no error\n setPageComplete(error == null);\n if (error != null) {\n setMessage(error, WizardPage.ERROR);\n } else if (warning != null) {\n setMessage(warning, WizardPage.WARNING);\n } else {\n setErrorMessage(null);\n setMessage(null);\n }\n }", "public void SessionConfirmationDialog() {\n sessiondetailConfirmationDialogBinding = DataBindingUtil.\n inflate(LayoutInflater.from(mContext), R.layout.sessiondetail_confirmation_dialog, (ViewGroup) addStudentScreenBinding.getRoot(), false);\n confimDialog = new Dialog(mContext, R.style.Theme_Dialog);\n Window window = confimDialog.getWindow();\n WindowManager.LayoutParams wlp = window.getAttributes();\n confimDialog.getWindow().getAttributes().verticalMargin = 0.20f;\n wlp.gravity = Gravity.TOP;\n window.setAttributes(wlp);\n\n // confimDialog.getWindow().setBackgroundDrawableResource(R.drawable.session_confirm);\n confimDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n confimDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n confimDialog.setCancelable(false);\n confimDialog.setContentView(sessiondetailConfirmationDialogBinding.getRoot());\n callSessionListApi();\n sessiondetailConfirmationDialogBinding.cancelTxt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n confimDialog.dismiss();\n }\n });\n sessiondetailConfirmationDialogBinding.confirmTxt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AppConfiguration.TeacherSessionIdStr = sessionIDStr;\n AppConfiguration.TeacherSessionContactIdStr = contatIDstr;\n AppConfiguration.UserName=firstNameStr+\" \"+lastNameStr;\n callSessioncapacityApi();\n confimDialog.dismiss();\n }\n });\n confimDialog.show();\n\n }", "public void validateUIStatus() {\n\n boolean timeZoneCheck = false, timeFormatCheck = false, fetchTimeCheck = false, statusPathCheck = false;\n\n if (!timeZone.getText().isEmpty()) {\n timeZoneCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Time zone should not be Empty.\\n\");\n }\n if (!statusPath.getText().isEmpty()) {\n statusPathCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Status File should not be empty.\\n\");\n }\n if (!fetchTime.getText().isEmpty()) {\n fetchTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Refresh Time should not be empty.\\n\");\n }\n if (!timeFormat.getText().isEmpty()) {\n timeFormatCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Date & Time format should not be Empty.\\n\");\n }\n\n if (timeFormatCheck == true && timeZoneCheck == true && fetchTimeCheck == true && statusPathCheck == true) {\n uiStatusCheck = true;\n } else {\n\n uiStatusCheck = false;\n timeZoneCheck = false;\n timeFormatCheck = false;\n fetchTimeCheck = false;\n statusPathCheck = false;\n }\n }", "public void validorolin() {\n if (roli.equals(\"Menaxher\")) {\n madministrimi.setVisible(false);\n }\n\n }", "boolean isWasLayouting();", "public void verify() {\n lblPaletteContent();\n treePaletteContentsTree();\n lblJLabel();\n btMoveUp();\n btMoveDown();\n btRemove();\n btNewCategory();\n btAddFromJAR();\n btAddFromLibrary();\n btAddFromProject();\n btResetPalette();\n btClose();\n }", "private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }", "@Override\n public void onResume() {\n int width = ConstraintLayout.LayoutParams.MATCH_PARENT;\n int height = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n getDialog().getWindow().setLayout(width, height);\n\n super.onResume();\n }", "@Override\n public void showDiscardDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive, neutral and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_unsaved_changes_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(R.string.product_config_unsaved_changes_dialog_positive_text, mUnsavedDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(R.string.product_config_unsaved_changes_dialog_negative_text, mUnsavedDialogOnClickListener);\n //Set the Neutral Button and its listener\n builder.setNeutralButton(R.string.product_config_unsaved_changes_dialog_neutral_text, mUnsavedDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "@SuppressWarnings(\"unused\")\n\tprivate void CreateVerificationPage(final Composite wizPanel,\n\t\t\tfinal StackLayout wizLayout) {\n\t\tif(wizPages.size() > wizpagenum + 1)\n\t\t{\n\t\t\twizPages.remove(wizpagenum + 1);\n\t\t}\n\t\tfinal Composite verific = new Composite(wizPanel, SWT.NONE);\n\t\tLabel wiz14Label = new Label(verific, SWT.NONE);\n\t\twiz14Label.setText(\"Name: \" + spellname +\"\\nComponent: \"+ spellcomp\n\t\t\t\t+\"\\nSchool: \" + spellschool + \"\\nRange: \" + spellrange + \n\t\t\t\t\"\\nEffect: \" + spelleffect + \"\\nCasting Time: \" +\n\t\t\t\tspellcastime + \"\\nMaterial Component: \" + spellmaterial + \n\t\t\t\t\"\\nSaving Throw: \" + spellsaving +\"\\nFocus: \" + spellfocus + \n\t\t\t\t\"\\nDuration: \" + spellduration + \"\\nLevel: \" + spelllevel + \n\t\t\t\t\"\\nSpell Resistance: \" + spellresistance + \"\\nDescription: \" + spellscript);\n\t\twiz14Label.pack();\n\t\tButton confirm = new Button(verific, SWT.PUSH);\n\t\tcreateBackButton(verific, wizPanel, wizLayout);\n\t\tcreateCancelButton(verific, wizPanel, wizLayout);\n\t\tconfirm.setText(\"Confirm\");\n\t\tconfirm.setBounds(WIDTH-117, HEIGHT - 90, 100, 50);\n\t\tconfirm.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\t//TODO save the item\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\twizPages.add(verific);\n\t\t\n\t}", "private void TakeApproversConfirmation(final OnItemClickListner listner, final int position) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(mContext, R.style.AlertDialogTheme);\n builder.setCancelable(false);\n builder.setTitle(\"Confirmation!\");\n builder.setMessage(\"Are you sure?\");\n\n\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n slider.setClickable(false);\n // sliderLbl.setText(leaveStatus);\n\n /* if (leaveStatus.equals(Constants.LeaveRequestStatus.APPROVED)) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n slider.setBackground(mContext.getResources().getDrawable(R.drawable.green_bg_round_corner));\n }\n\n } else {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n slider.setBackground(mContext.getResources().getDrawable(R.drawable.red_bg_round_corner));\n }\n }*/\n\n ApproveLeaveInputModel inputModel = new ApproveLeaveInputModel();\n inputModel.LeaveId = leaveId;\n inputModel.Reason = approversNote;\n\n switch (leaveStatus) {\n case Constants.LeaveRequestStatus.APPROVED:\n inputModel.LeaveStatus = Constants.LeaveRequestStatusVal.APPROVED;\n inputModel.LeaveStatusStr = Constants.LeaveRequestStatus.APPROVED;\n break;\n case Constants.LeaveRequestStatus.REJECTED:\n inputModel.LeaveStatus = Constants.LeaveRequestStatusVal.REJECTED;\n inputModel.LeaveStatusStr = Constants.LeaveRequestStatus.REJECTED;\n break;\n default:\n inputModel.LeaveStatus = Constants.LeaveRequestStatusVal.PENDING;\n inputModel.LeaveStatusStr = Constants.LeaveRequestStatus.PENDING;\n break;\n }\n\n listner.OnApproveReject(inputModel, position);\n RefreshForm();\n }\n });\n\n /* ApproveLeaveInputModel inputModel = new ApproveLeaveInputModel();\n inputModel.LeaveId = leaveId;\n inputModel.Reason = approversNote;\n\n switch (leaveStatus) {\n case Constants.LeaveRequestStatus.APPROVED:\n inputModel.LeaveStatus = Constants.LeaveRequestStatusVal.APPROVED;\n break;\n case Constants.LeaveRequestStatus.REJECTED:\n inputModel.LeaveStatus = Constants.LeaveRequestStatusVal.REJECTED;\n break;\n }\n\n listner.OnApproveReject(inputModel);\n dialog.dismiss();*/\n\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n leaveStatus = Constants.LeaveRequestStatus.PENDING;\n approversNote = \"\";\n ResetStatus();\n }\n });\n\n builder.show();\n }", "private void check_displaysInputOverlay() {\n onView(withId(R.id.voiceInput))\n .check(matches(isDisplayed()));\n // the permission overlay should not\n onView(withId(R.id.voicePermission))\n .check(doesNotExist());\n }", "@OnClick(R.id.fragment_register_sign_up_button)\n public void validateSignupInformation() {\n mValidator.validate();\n }", "public abstract int presentViewLayout();", "private boolean checkValidations() {\n if (TextUtils.isEmpty(etFirstName.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_name_war));\n return false;\n } else if (etPhoneNo.getText().length() > 0 && etPhoneNo.getText().toString().trim().length() < 7) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.valid_mo_no_war));\n return false;\n }\n /*else if (TextUtils.isEmpty(etAdress.getText().toString().trim())) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.empty_address_war));\n return false;\n } else if (countryId==null || countryId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.country_war));\n return false;\n } else if (stateId==null || stateId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.state_war));\n return false;\n }*/ /*else if (cityId==null || cityId.equals(\"\")) {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), getString(R.string.city_war));\n return false;\n }*/\n else\n return true;\n }", "private void clearErrors()\n {\n ConstraintLayout.LayoutParams usernameParams = (ConstraintLayout.LayoutParams) etUsername.getLayoutParams();\n usernameParams.setMargins(32,72,32,0);\n etUsername.setLayoutParams(usernameParams);\n\n ConstraintLayout.LayoutParams passwordParams = (ConstraintLayout.LayoutParams) etPassword.getLayoutParams();\n passwordParams.setMargins(32,72,32,0);\n etPassword.setLayoutParams(passwordParams);\n\n ConstraintLayout.LayoutParams createAccountParams = (ConstraintLayout.LayoutParams) btnCreateAccount.getLayoutParams();\n createAccountParams.setMargins(32,72,32,72);\n btnCreateAccount.setLayoutParams(createAccountParams);\n\n etEmail.setBackgroundResource(R.drawable.edit_text);\n etUsername.setBackgroundResource(R.drawable.edit_text);\n etPassword.setBackgroundResource(R.drawable.edit_text);\n tvEmailError.setText(\"\");\n tvEmailError.setVisibility(View.GONE);\n tvUsernameError.setText(\"\");\n tvUsernameError.setVisibility(View.GONE);\n tvPasswordError.setText(\"\");\n tvPasswordError.setVisibility(View.GONE);\n\n }", "public void onValidateState() {\n // Case first time\n if (mNewslettersForm == null) {\n triggerGetNewslettersForm();\n }\n // Case rotate restore the form\n else if(mNewsletterScroll.getChildCount() == 0){\n showDynamicForm(mNewslettersForm);\n }\n // Default, show current form\n else {\n showFragmentContentContainer();\n }\n }", "@Override\n public void onGlobalLayout() {\n if (bottom == 0) {\n txtGrayInstructions.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n bottom = txtGrayInstructions.getBottom();\n }\n //showHelpView(layoutInflater);\n\n }", "public void verValidarCandidato()\r\n\t{\r\n\t\tcandidato = new ValidarCandidato(this);\r\n\t\tcandidato.setVisible(true);\r\n\t}", "public abstract void validatePanel();", "public void requestLargeLayout() {\n Dialog dialog = getDialog();\n if (dialog == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout dialog has not init yet!\");\n return;\n }\n Window window = dialog.getWindow();\n if (window == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout window has not init yet!\");\n return;\n }\n FragmentActivity activity = getActivity();\n if (activity != null) {\n float displayWidthInDip = UIUtil.getDisplayWidthInDip(activity);\n float displayHeightInDip = UIUtil.getDisplayHeightInDip(activity);\n int dimensionPixelSize = getResources().getDimensionPixelSize(C4558R.dimen.annotate_dialog_min_width);\n if (displayWidthInDip < displayHeightInDip) {\n displayHeightInDip = displayWidthInDip;\n }\n if (displayHeightInDip < ((float) dimensionPixelSize)) {\n window.setLayout(dimensionPixelSize, -1);\n }\n }\n }", "public boolean VerifyOrderConfirmation_UponDeliverySection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "public boolean validatePageElements() {\n boolean nameCheck = name.isDisplayed() && name.isEnabled();\n boolean emailCheck = email.isDisplayed() && email.isEnabled();\n boolean passwordCheck = password.isDisplayed() && password.isEnabled();\n boolean signupGoogleCheck = signupGoogle.isDisplayed() && signupGoogle.isEnabled();\n boolean signupSlackCheck = signupSlack.isDisplayed() && signupSlack.isEnabled();\n boolean signupOutlookCheck = signupOutlook.isDisplayed() && signupOutlook.isEnabled();\n boolean signupAppleCheck = signupApple.isDisplayed() && signupApple.isEnabled();\n boolean signupFacebookCheck = signupFacebook.isDisplayed() && signupFacebook.isEnabled();\n boolean logoCheck = miroLogo.isDisplayed();\n\n return nameCheck && emailCheck && passwordCheck && signupGoogleCheck && signupSlackCheck && signupOutlookCheck && signupAppleCheck && signupFacebookCheck && logoCheck;\n\n }", "@Override\n\tpublic void onNoButtonDialogToConfirmDuiClicked() {\n\n\t}", "public boolean VerifyOrderConfirmation_MyStoreSection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyMyStoreSection\", \"MyStoreSectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyMyStoreSection\", \"MyStoreSectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "private void $$$setupUI$$$() {\n myContentPanel = new JPanel();\n myContentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n myContentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n myAcceptYoursButton = new JButton();\n myAcceptYoursButton.setEnabled(false);\n myAcceptYoursButton.setText(\"Accept Yours\");\n myAcceptYoursButton.setMnemonic('Y');\n myAcceptYoursButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptYoursButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myAcceptTheirsButton = new JButton();\n myAcceptTheirsButton.setEnabled(false);\n myAcceptTheirsButton.setText(\"Accept Theirs\");\n myAcceptTheirsButton.setMnemonic('T');\n myAcceptTheirsButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptTheirsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myMergeButton = new JButton();\n myMergeButton.setEnabled(false);\n myMergeButton.setText(\"Merge\");\n myMergeButton.setMnemonic('M');\n myMergeButton.setDisplayedMnemonicIndex(0);\n panel1.add(myMergeButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JBScrollPane jBScrollPane1 = new JBScrollPane();\n myContentPanel.add(jBScrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myItemsTable = new JBTable();\n myItemsTable.putClientProperty(\"Table.isFileList\", Boolean.FALSE);\n jBScrollPane1.setViewportView(myItemsTable);\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public void finishLayout() {\n\t\tsetTypeState(ir_type_state.layout_fixed);\n\t}", "private boolean isInputValid(){\n boolean isUserInfoValid = userInfoCheck();\n boolean isProductInfoValid = productInfoCheck();\n ImageView iv_error_user_info = findViewById(R.id.iv_error_user_info);\n ImageView iv_error_product_info = findViewById(R.id.iv_error_product_info);\n if(!isUserInfoValid){\n iv_error_user_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_user_info.setVisibility(View.INVISIBLE);\n }\n if (!isProductInfoValid){\n iv_error_product_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_product_info.setVisibility(View.INVISIBLE);\n }\n\n return isUserInfoValid && isProductInfoValid;\n }", "public void alertInvalid(){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Herencia invalida\");\n alert.setHeaderText(\"Un hijo no puede ser hijo de su padre o un padre no puede ser padre de su padre,\"\n + \"No puede crear herencia con entidades debiles.\");\n alert.showAndWait();\n }", "@MediumTest\n\t public void testInfoTextView_layout() {\n\t final View decorView = mMainActivity.getWindow().getDecorView();\n\n\t //Verify that the mInfoTextView is on screen and is not visible\n\t ViewAsserts.assertOnScreen(decorView, mtextView1);\n\t assertTrue(View.GONE == mtextView1.getVisibility());\n\t }", "abstract void validate(TaskList tasks, MainWindow ui, Storage storage)\n throws DukeInvalidArgumentException;", "@UiThreadTest\r\n public void testValidationRequired() {\n View addProjectValidateRequired = solo.getView(R.id.projectname_required);\r\n View addProjectValidateUnique = solo.getView(R.id.projectname_unique);\r\n assertEquals(\"The validation error message 'required' should be gone\", View.GONE, addProjectValidateRequired.getVisibility());\r\n assertEquals(\"The validation error message 'unique' should be gone\", View.GONE, addProjectValidateUnique.getVisibility());\r\n\r\n // Try to add with empty values\r\n ActionBar.clickMenuItem(R.id.menu_add_project_activity_save, solo.getCurrentActivity());\r\n solo.assertCurrentActivity(\"The add/edit project activity is expected\", AddEditProjectActivity.class);\r\n addProjectValidateRequired = solo.getView(R.id.projectname_required);\r\n addProjectValidateUnique = solo.getView(R.id.projectname_unique);\r\n assertEquals(\"The validation error message 'required' should be visible\", View.VISIBLE, addProjectValidateRequired.getVisibility());\r\n assertEquals(\"The validation error message 'unique' should be gone\", View.GONE, addProjectValidateUnique.getVisibility());\r\n }", "protected void validateAction() {\r\n\t\tthis.lblLoading.setVisible(true);\r\n\t\tThread longThread = new Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tMajFicheClientCarteFidelite.this.newsletter = MajFicheClientCarteFidelite.this.valeurCaseNewsletter;\r\n\t\t\t\tif (checkfields()) {\r\n\t\t\t\t\tconfirmation();\r\n\t\t\t\t} else {\r\n\t\t\t\t\talerte();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlongThread.start();\r\n\t}", "protected abstract void iniciarLayout();", "@SmallTest\n public void testEmailDialog()\n {\n emailXMLButton.callOnClick();\n LayoutInflater factory = LayoutInflater.from(getActivity());\n View textEntryView = factory.inflate(R.layout.email_dialog, null);\n ViewAsserts.assertOnScreen(textEntryView, textEntryView);\n }", "public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}", "public boolean validateBrokersAndNavigatorsPageisDisplayed() {\n\t\tboolean result = false;\n\n\t\tif (Browser.isDisplayed(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\")) {\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "private void $$$setupUI$$$() {\n panel_ProfessorApp = new JPanel();\n panel_ProfessorApp.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n questionNumberLabel = new JLabel();\n questionNumberLabel.setText(\"Question 1\");\n panel1.add(questionNumberLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n QuestionInput = new JTextArea();\n QuestionInput.setText(\"\");\n panel_ProfessorApp.add(QuestionInput, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n answerInput1 = new JTextField();\n answerInput1.setText(\"Answer Text\");\n panel2.add(answerInput1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput2 = new JTextField();\n answerInput2.setText(\"Answer Text\");\n panel2.add(answerInput2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput3 = new JTextField();\n answerInput3.setText(\"Answer Text\");\n panel2.add(answerInput3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n answerInput4 = new JTextField();\n answerInput4.setText(\"Answer Text\");\n panel2.add(answerInput4, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n OptionA = new JRadioButton();\n OptionA.setText(\"A\");\n panel2.add(OptionA, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionB = new JRadioButton();\n OptionB.setText(\"B\");\n panel2.add(OptionB, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionC = new JRadioButton();\n OptionC.setText(\"C\");\n panel2.add(OptionC, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n OptionD = new JRadioButton();\n OptionD.setText(\"D\");\n panel2.add(OptionD, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel3, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n nextButton = new JButton();\n nextButton.setText(\"Next\");\n panel3.add(nextButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel3.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n saveButton = new JButton();\n saveButton.setText(\"Save\");\n panel3.add(saveButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n ButtonGroup buttonGroup;\n buttonGroup = new ButtonGroup();\n buttonGroup.add(OptionA);\n buttonGroup.add(OptionB);\n buttonGroup.add(OptionC);\n buttonGroup.add(OptionD);\n }", "@Override\n public boolean checkLayoutParams(RecyclerView.LayoutParams lp) {\n return true;\n }", "public void onLayoutCancelled() {\n /* do nothing - stub */\n }", "private void validate() {\n mergeTransplantOpBase\n .mergeKeyBehaviors()\n .forEach(\n (key, mergeKeyBehavior) -> {\n switch (mergeKeyBehavior.getMergeBehavior()) {\n case NORMAL:\n if (mergeKeyBehavior.getResolvedContent() != null) {\n checkArgument(\n mergeKeyBehavior.getExpectedTargetContent() != null,\n \"MergeKeyBehavior.resolvedContent requires setting MergeKeyBehavior.expectedTarget as well for key %s\",\n key);\n }\n break;\n case DROP:\n case FORCE:\n checkArgument(\n mergeKeyBehavior.getResolvedContent() == null,\n \"MergeKeyBehavior.resolvedContent must be null for MergeBehavior.%s for %s\",\n mergeKeyBehavior.getMergeBehavior(),\n key);\n break;\n default:\n throw new IllegalArgumentException(\n \"Unknown MergeBehavior \" + mergeKeyBehavior.getMergeBehavior());\n }\n });\n }", "private void setupPopupLayout() {\n mainBox.getChildren().addAll(errorLabel, buttonBox);\n buttonBox.setAlignment(Pos.CENTER);\n }", "private void confirm() {\n\t\tcheckGlobalStatus();\n\n\t\tfinal Set<CyNetwork> networks = networkManager.getNetworkSet();\n\t\tfinal Iterator<CyNetwork> itr = networks.iterator();\n\t\tCyNetwork network = itr.next();\n\n\t\tcheckNetwork(network);\n\t}", "public boolean VerifyOrderDetails_OrderConfirmation(){\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PAYMENTCONFIRMATION_LABEL).isDisplayed();\n\tif(flag){extentLogs.passWithCustom(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERNUMBER_LABEL).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.passWithCustom(\"VerifyOrderDetails\", \"OrderNumberLabelIsDisplayed\");\n\t\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"OrderNumberLabelIsNotDisplayed\");}\n\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");}\n\t\n\treturn flag;\n\t}", "@Override\n public void onGlobalLayout() {\n //on all of the container area create a rectangle off same height and width\n Rect r = new Rect();\n //put the size of the layout to the rectangle\n loginActivity.getWindowVisibleDisplayFrame(r);\n //check if the rectangle height shrinks like when keyboard launches\n //for than check on the difference between regular container's height and\n //actual container's\n int heightDiff = loginActivity.getRootView().getHeight() - (r.bottom - r.top);\n if (login != null && password != null) {\n // if more than 100 pixels, its probably a keyboard...\n if (heightDiff > 100) {\n //then set cursor visible for login and password\n login.setCursorVisible(true);\n password.setCursorVisible(true);\n } else {\n //else set both cursors invisible\n //cursor will appear when item is selected only\n //so when keyboard launches\n login.setCursorVisible(false);\n password.setCursorVisible(false);\n }\n }\n }", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "public void validateFooters() {\n\t}", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.WEST,firstButton,107,SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstButton, -32, SpringLayout.SOUTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, firstField, 37, SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstField, -24, SpringLayout.SOUTH, this);\n\t}", "private void MoodRatingAddNoteConfirmDialog() {\n final Dialog dialog = new Dialog(getActivity());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // Include dialog.xml file\n dialog.setContentView(R.layout.lay_moodratings_addnote);\n // Set dialog TV_TITLE\n dialog.setTitle(\"Custom Dialog\");\n\n // set values for custom dialog components - text, image and button\n TextView _tvNo = (TextView) dialog.findViewById(R.id.tvNo);\n TextView _tvYes = (TextView) dialog.findViewById(R.id.tvYes);\n\n dialog.show();\n _tvNo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n\n _tvYes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n MoodRatingAddNoteDialog();\n }\n });\n }", "@Override\n public boolean canResolveLayoutDirection() {return false;}", "private Group victoryScreenLayout() {\n\t\t\n\t\tLabel gameWin = new Label(\"Congratulations!\");\n\t\tgameWin.setTextFill(Color.GREEN);\n\t\tgameWin.setScaleX(2.5);\n\t\tgameWin.setScaleY(2.5);\n\t\tgameWin.setMinWidth(300);\n\t\tgameWin.setAlignment(Pos.BASELINE_CENTER);\n\t\t\n\t\tLabel endStatement1 = new Label(\"The word was indeed \" + currentWordLabel.getText() + \"!\");\n\t\tendStatement1.setMinWidth(300);\n\t\tendStatement1.setAlignment(Pos.CENTER);\n\t\tLabel endStatement2 = new Label(\"Please input your name and press enter.\");\n\t\tendStatement2.setMinWidth(300);\n\t\tendStatement2.setAlignment(Pos.BASELINE_CENTER);\n\t\tendStatement3 = new Label(new String(inputName));\n\t\tendStatement3.setMinWidth(300);\n\t\tendStatement3.setAlignment(Pos.BASELINE_CENTER);\n\t\t\n\t\tVBox v = new VBox(20,eh,gameWin,endStatement1,endStatement2,endStatement3);\n\t\tv.setAlignment(Pos.TOP_CENTER);\n\t\tVBox.setVgrow(eh,Priority.ALWAYS);\n\t\t\n\t\treturn new Group(v);\t\n\t}", "private void checkIfAllGraphRelativeLayoutsAreGone() {\n\n if (mHeartRateLayout.getVisibility() == View.GONE && mSkinTempLayout.getVisibility() == View.GONE &&\n mBodyTempLayout.getVisibility() == View.GONE && mBloodPressureLayout.getVisibility() == View.GONE &&\n mActivityTypeLayout.getVisibility() == View.GONE && mPerspirationLayout.getVisibility() == View.GONE) {\n\n tvNoData.setVisibility(View.VISIBLE);\n }\n else {\n\n tvNoData.setVisibility(View.GONE);\n }\n }", "private void notifyUiApiFailure() {\n\n if (stillAlive()) {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.api_error_alert_title, null);\n alertDialog.setCustomTitle(convertView);\n\n alertDialog.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }\n }", "public boolean VerifyProductDisplayed_OrderConfirmation() {\n\t\t\n\t\tboolean flag = false;\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.pass(\"VerifyProductImageDisplayedInConfirmationPage\", \"Displayed\");\n\t\t}else{extentLogs.fail(\"VerifyProductImageDisplayedInConfirmationPage\", \"NotDisplayed\");\t\t}\n\treturn flag;\n\t\t}", "@Override\n\tpublic void onFinishLayout(View lay) {\n\t}", "private void requestForValidationOfQibla() {\n TextView textView2 = (TextView) findViewById(R.id.location_text_line2);\n ImageView arrow = ((ImageView) findViewById(R.id.arrowImage));\n ImageView compass = ((ImageView) findViewById(R.id.compassImage));\n ImageView frame = ((ImageView) findViewById(R.id.frameImage));\n FrameLayout qiblaFrame = ((FrameLayout) findViewById(R.id.qiblaLayout));\n LinearLayout noLocationLayout = ((LinearLayout) findViewById(R.id.noLocationLayout));\n\n if (faceUp && (gpsLocationFound || currentLocation != null)) {\n textView2.setVisibility(View.VISIBLE);\n textView2.setText(location_line2);\n findViewById(R.id.textLayout)\n .setVisibility(View.VISIBLE);\n noLocationLayout.setVisibility(View.INVISIBLE);\n qiblaFrame.setVisibility(View.VISIBLE);\n arrow.setVisibility(View.VISIBLE);\n compass.setVisibility(View.VISIBLE);\n frame.setVisibility(View.VISIBLE);\n } else {\n if (!faceUp) {\n onScreenDown();\n } else if (!(gpsLocationFound || currentLocation != null)) {\n onGPSOn();\n }\n }\n }", "private void checkBlFunctAdvert() {\n if (blAdapt.isMultipleAdvertisementSupported()) {\n checkPermLocation();\n } else {\n DialogCreator.createDialogAlert(this, R.string.txt_bl_adv_needed, R.string.txt_bl_descr_adv_needed, R.string.txt_ok, null,\n new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n finish();\n }\n });\n }\n }", "public void showConfirmDialog() {\n mDialogClickInterface = (DialogueInterface) mContext;\n final Dialog dialog = new Dialog(mContext);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogue_modify);\n Button buttonCancel = dialog.findViewById(R.id.btn_cancel);\n Button buttonOK = dialog.findViewById(R.id.btn_ok);\n final RadioGroup radioGroupLanguage = dialog.findViewById(R.id.radio_group);\n\n\n\n\n dialog.setCancelable(true);\n dialog.show(); // if decline button is clicked, close the custom dialog\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n buttonOK.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n int selectedId = radioGroupLanguage.getCheckedRadioButtonId();\n\n switch (selectedId) {\n\n case R.id.rb_arabic:\n view.editItem(listModel,index);\n break;\n case R.id.rb_english:\n view.deleteItem(listModel);\n break;\n }\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n\n }", "private boolean tryOnMeasure(int n, int n2) {\n int n3;\n int n4;\n View view;\n View view2 = null;\n View view3 = null;\n View view4 = null;\n int n5 = this.getChildCount();\n for (n4 = 0; n4 < n5; ++n4) {\n view = this.getChildAt(n4);\n if (view.getVisibility() == 8) continue;\n n3 = view.getId();\n if (n3 == R.id.topPanel) {\n view2 = view;\n continue;\n }\n if (n3 == R.id.buttonPanel) {\n view3 = view;\n continue;\n }\n if (n3 != R.id.contentPanel && n3 != R.id.customPanel) {\n return false;\n }\n if (view4 != null) {\n return false;\n }\n view4 = view;\n }\n int n6 = View.MeasureSpec.getMode((int)n2);\n int n7 = View.MeasureSpec.getSize((int)n2);\n int n8 = View.MeasureSpec.getMode((int)n);\n n3 = 0;\n int n9 = n4 = this.getPaddingTop() + this.getPaddingBottom();\n if (view2 != null) {\n view2.measure(n, 0);\n n9 = n4 + view2.getMeasuredHeight();\n n3 = View.combineMeasuredStates((int)0, (int)view2.getMeasuredState());\n }\n n4 = 0;\n int n10 = 0;\n int n11 = n3;\n int n12 = n9;\n if (view3 != null) {\n view3.measure(n, 0);\n n4 = AlertDialogLayout.resolveMinimumHeight(view3);\n n10 = view3.getMeasuredHeight() - n4;\n n12 = n9 + n4;\n n11 = View.combineMeasuredStates((int)n3, (int)view3.getMeasuredState());\n }\n int n13 = 0;\n n3 = n11;\n n9 = n12;\n if (view4 != null) {\n n3 = n6 == 0 ? 0 : View.MeasureSpec.makeMeasureSpec((int)Math.max(0, n7 - n12), (int)n6);\n view4.measure(n, n3);\n n13 = view4.getMeasuredHeight();\n n9 = n12 + n13;\n n3 = View.combineMeasuredStates((int)n11, (int)view4.getMeasuredState());\n }\n n11 = n3;\n int n14 = n7 -= n9;\n n12 = n9;\n if (view3 != null) {\n n10 = Math.min(n7, n10);\n n12 = n4;\n n11 = n7;\n if (n10 > 0) {\n n11 = n7 - n10;\n n12 = n4 + n10;\n }\n view3.measure(n, View.MeasureSpec.makeMeasureSpec((int)n12, (int)1073741824));\n n12 = n9 - n4 + view3.getMeasuredHeight();\n n4 = View.combineMeasuredStates((int)n3, (int)view3.getMeasuredState());\n n14 = n11;\n n11 = n4;\n }\n n3 = n11;\n n4 = n12;\n if (view4 != null) {\n n3 = n11;\n n4 = n12;\n if (n14 > 0) {\n view4.measure(n, View.MeasureSpec.makeMeasureSpec((int)(n13 + n14), (int)n6));\n n4 = n12 - n13 + view4.getMeasuredHeight();\n n3 = View.combineMeasuredStates((int)n11, (int)view4.getMeasuredState());\n }\n }\n n11 = 0;\n for (n9 = 0; n9 < n5; ++n9) {\n view = this.getChildAt(n9);\n n12 = n11;\n if (view.getVisibility() != 8) {\n n12 = Math.max(n11, view.getMeasuredWidth());\n }\n n11 = n12;\n }\n this.setMeasuredDimension(View.resolveSizeAndState((int)(n11 + (this.getPaddingLeft() + this.getPaddingRight())), (int)n, (int)n3), View.resolveSizeAndState((int)n4, (int)n2, (int)0));\n if (n8 != 1073741824) {\n this.forceUniformWidth(n5, n2);\n }\n return true;\n }", "public void validate()\n\t{\t\t\n\t\t// calculate the corner position\n\t\tsetCorner(\n\t\t\t\tcalculateCornerPosition(\n\t\t\t\t\t\tgetCentrePosition(),\n\t\t\t\t\t\tgetHorizontalSpanVector(),\n\t\t\t\t\t\tgetVerticalSpanVector()\n\t\t\t\t\t)\n\t\t\t);\n\t}", "private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }", "public void HideValidation() {\n try {\n rl_validation.setVisibility(View.GONE);\n } catch (Exception e) {\n e.printStackTrace();\n appsingleton.ToastMessage(\"\" + e.getMessage());\n }\n }", "@Override\n public void setLayout(Layout layout) {\n checkWidget();\n return;\n }", "private void setConfirmState() {\n if (state == CONFIRM_STATE)\n return;\n consoleLayout.setVisibility(GONE);\n confirmContainer.setVisibility(VISIBLE);\n state = CONFIRM_STATE;\n }", "@Then(\"^validation error message should be displayed$\")\n public void verifyThatValidationErrorMessageIsDiplayed() {\n assertion.assertTrue(StoryBoard.validationError());\n }", "public void onLayout(boolean r10, int r11, int r12, int r13, int r14) {\n /*\n r9 = this;\n int r10 = r9.getChildCount()\n int r0 = r9.measureKeyboardHeight()\n r1 = 1101004800(0x41a00000, float:20.0)\n int r1 = org.telegram.messenger.AndroidUtilities.dp(r1)\n r2 = 0\n if (r0 > r1) goto L_0x001c\n org.telegram.ui.PopupNotificationActivity r0 = org.telegram.ui.PopupNotificationActivity.this\n org.telegram.ui.Components.ChatActivityEnterView r0 = r0.chatActivityEnterView\n int r0 = r0.getEmojiPadding()\n goto L_0x001d\n L_0x001c:\n r0 = 0\n L_0x001d:\n if (r2 >= r10) goto L_0x00e3\n android.view.View r1 = r9.getChildAt(r2)\n int r3 = r1.getVisibility()\n r4 = 8\n if (r3 != r4) goto L_0x002d\n goto L_0x00df\n L_0x002d:\n android.view.ViewGroup$LayoutParams r3 = r1.getLayoutParams()\n android.widget.FrameLayout$LayoutParams r3 = (android.widget.FrameLayout.LayoutParams) r3\n int r4 = r1.getMeasuredWidth()\n int r5 = r1.getMeasuredHeight()\n int r6 = r3.gravity\n r7 = -1\n if (r6 != r7) goto L_0x0042\n r6 = 51\n L_0x0042:\n r7 = r6 & 7\n r6 = r6 & 112(0x70, float:1.57E-43)\n r7 = r7 & 7\n r8 = 1\n if (r7 == r8) goto L_0x0056\n r8 = 5\n if (r7 == r8) goto L_0x0051\n int r7 = r3.leftMargin\n goto L_0x0061\n L_0x0051:\n int r7 = r13 - r4\n int r8 = r3.rightMargin\n goto L_0x0060\n L_0x0056:\n int r7 = r13 - r11\n int r7 = r7 - r4\n int r7 = r7 / 2\n int r8 = r3.leftMargin\n int r7 = r7 + r8\n int r8 = r3.rightMargin\n L_0x0060:\n int r7 = r7 - r8\n L_0x0061:\n r8 = 16\n if (r6 == r8) goto L_0x0073\n r8 = 80\n if (r6 == r8) goto L_0x006c\n int r6 = r3.topMargin\n goto L_0x007f\n L_0x006c:\n int r6 = r14 - r0\n int r6 = r6 - r12\n int r6 = r6 - r5\n int r8 = r3.bottomMargin\n goto L_0x007e\n L_0x0073:\n int r6 = r14 - r0\n int r6 = r6 - r12\n int r6 = r6 - r5\n int r6 = r6 / 2\n int r8 = r3.topMargin\n int r6 = r6 + r8\n int r8 = r3.bottomMargin\n L_0x007e:\n int r6 = r6 - r8\n L_0x007f:\n org.telegram.ui.PopupNotificationActivity r8 = org.telegram.ui.PopupNotificationActivity.this\n org.telegram.ui.Components.ChatActivityEnterView r8 = r8.chatActivityEnterView\n boolean r8 = r8.isPopupView(r1)\n if (r8 == 0) goto L_0x0094\n int r3 = r9.getMeasuredHeight()\n if (r0 == 0) goto L_0x0092\n int r3 = r3 - r0\n L_0x0092:\n r6 = r3\n goto L_0x00da\n L_0x0094:\n org.telegram.ui.PopupNotificationActivity r8 = org.telegram.ui.PopupNotificationActivity.this\n org.telegram.ui.Components.ChatActivityEnterView r8 = r8.chatActivityEnterView\n boolean r8 = r8.isRecordCircle(r1)\n if (r8 == 0) goto L_0x00da\n org.telegram.ui.PopupNotificationActivity r6 = org.telegram.ui.PopupNotificationActivity.this\n android.widget.RelativeLayout r6 = r6.popupContainer\n int r6 = r6.getTop()\n org.telegram.ui.PopupNotificationActivity r7 = org.telegram.ui.PopupNotificationActivity.this\n android.widget.RelativeLayout r7 = r7.popupContainer\n int r7 = r7.getMeasuredHeight()\n int r6 = r6 + r7\n int r7 = r1.getMeasuredHeight()\n int r6 = r6 - r7\n int r7 = r3.bottomMargin\n int r6 = r6 - r7\n org.telegram.ui.PopupNotificationActivity r7 = org.telegram.ui.PopupNotificationActivity.this\n android.widget.RelativeLayout r7 = r7.popupContainer\n int r7 = r7.getLeft()\n org.telegram.ui.PopupNotificationActivity r8 = org.telegram.ui.PopupNotificationActivity.this\n android.widget.RelativeLayout r8 = r8.popupContainer\n int r8 = r8.getMeasuredWidth()\n int r7 = r7 + r8\n int r8 = r1.getMeasuredWidth()\n int r7 = r7 - r8\n int r3 = r3.rightMargin\n int r7 = r7 - r3\n L_0x00da:\n int r4 = r4 + r7\n int r5 = r5 + r6\n r1.layout(r7, r6, r4, r5)\n L_0x00df:\n int r2 = r2 + 1\n goto L_0x001d\n L_0x00e3:\n r9.notifyHeightChanged()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.PopupNotificationActivity.AnonymousClass1.onLayout(boolean, int, int, int, int):void\");\n }", "public void checkComponent() {\r\n Component component = ViewToEntityConverter.view2Model(view);\r\n validate(component);\r\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 }", "private boolean hasCorrectDetails() {\n // set any error to null\n mEdit_name_layout.setError(null);\n mEmail_input_layout.setError(null);\n mPassword_input_layout.setError(null);\n\n View focusView = null;\n boolean cancel = false;\n\n // grab data from views\n mPassword = mPassword_input_layout.getEditText().getText().toString().trim();\n mEmail = mEmail_input_layout.getEditText().getText().toString().trim();\n mName = mEdit_name_layout.getEditText().getText().toString().trim();\n mGender = mRadioGender.indexOfChild(findViewById(mRadioGender.getCheckedRadioButtonId()));\n mPhone = mPhone_input_layout.getEditText().getText().toString().trim();\n mMajor = mMajor_input_layout.getEditText().getText().toString().trim();\n mYearGroup = mClass_input_layout.getEditText().getText().toString().trim();\n\n\n if (TextUtils.isEmpty(mName)) {\n mEdit_name_layout.setError(getString(R.string.error_field_required));\n cancel = true;\n }\n\n if (!isPasswordValid(mPassword)) {\n focusView = mPassword_input_layout;\n focusView.requestFocus();\n cancel = true;\n }\n\n if (!isEmailValid(mEmail)) {\n focusView = mEdit_name_layout;\n cancel = true;\n }\n\n if (mGender < 0) {\n Toast.makeText(this, \"Gender \" + getString(R.string.error_field_required),\n Toast.LENGTH_SHORT).show();\n focusView = mRadioGender;\n cancel = true;\n }\n if (cancel) {\n if (focusView != null) {\n focusView.requestFocus();\n }\n return false;\n } else {\n // all is good, return true\n return true;\n }\n\n }", "public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n });\n /* .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\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 void errorWindow(int i) {\n Alert alert = new Alert(AlertType.INFORMATION);\n if (i == 1) {\n alert.setTitle(\"Missing partID\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter Part ID\");\n alert.showAndWait();\n }\n if (i == 2) {\n alert.setTitle(\"Missing part name!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter part name\");\n alert.showAndWait();\n }\n if (i == 3) {\n alert.setTitle(\"Enter Price!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter price of item\");\n alert.showAndWait();\n }\n if (i == 4) {\n alert.setTitle(\"Max items not entered!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter max items\");\n alert.showAndWait();\n }\n if (i == 5) {\n alert.setTitle(\"Min items not entered!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter min items\");\n alert.showAndWait();\n }\n if (i == 6) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Min cant be more then max.\");\n alert.showAndWait();\n }\n if (i == 7) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Inv cant be more then max or less than min.\");\n alert.showAndWait();\n }\n if (i == 8) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Inv cant be less then min.\");\n alert.showAndWait();\n }\n if (i == 9) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Machine ID and Company name cant be empty.\");\n alert.showAndWait();\n }\n if (i == 10) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Must enter inv\");\n alert.showAndWait();\n }\n if (i == 11) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Must enter Integer value for max, min, Machine ID, and inv.\\nEnter a double for cost\");\n alert.showAndWait();\n }\n if (i == 12) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Min cannot be less then 0!\");\n alert.showAndWait();\n }\n }", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "public Confirm() {\n initComponents();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n }", "private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }", "protected boolean hasPositiveButton() {\n return false;\n }", "protected void updateUi() {\n final boolean canInput = mSaveAndFinishWorker == null;\n byte[] password = LockPatternUtils.charSequenceToByteArray(mPasswordEntry.getText());\n final int length = password.length;\n if (mUiStage == Stage.Introduction) {\n mPasswordRestrictionView.setVisibility(View.VISIBLE);\n final int errorCode = validatePassword(password);\n String[] messages = convertErrorCodeToMessages(errorCode);\n // Update the fulfillment of requirements.\n mPasswordRequirementAdapter.setRequirements(messages);\n // Enable/Disable the next button accordingly.\n setNextEnabled(errorCode == NO_ERROR);\n } else {\n // Hide password requirement view when we are just asking user to confirm the pw.\n mPasswordRestrictionView.setVisibility(View.GONE);\n setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));\n setNextEnabled(canInput && length >= mPasswordMinLength);\n mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));\n }\n int message = mUiStage.getMessage(mIsAlphaMode, getStageType());\n if (message != 0) {\n mMessage.setVisibility(View.VISIBLE);\n mMessage.setText(message);\n } else {\n mMessage.setVisibility(View.INVISIBLE);\n }\n\n setNextText(mUiStage.buttonText);\n mPasswordEntryInputDisabler.setInputEnabled(canInput);\n Arrays.fill(password, (byte) 0);\n }", "@Override\n \t\tpublic void onClick(View v) {\n \t\t mvalidateDialog.dismiss();\n \t\t}", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "private void prepareLayoutForNoVideoAndNoThumbnail() {\n mBinding.tvDesc.setText(vm.getStep().getDescription());\n mBinding.exoplayer.setVisibility(View.GONE);\n mBinding.ivRecipeImage.setVisibility(View.GONE);\n /*If it came here then we cannot display a video */\n }", "public void onLayout(boolean r10, int r11, int r12, int r13, int r14) {\n /*\n r9 = this;\n r6 = r13 - r11;\n r7 = r14 - r12;\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0 = r0.listView;\n r0 = r0.getChildCount();\n r1 = 1;\n r8 = 0;\n r2 = -1;\n if (r0 <= 0) goto L_0x003f;\n L_0x0013:\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0 = r0.listView;\n r3 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r3 = r3.listView;\n r3 = r3.getChildCount();\n r3 = r3 - r1;\n r0 = r0.getChildAt(r3);\n r3 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r3 = r3.listView;\n r3 = r3.findContainingViewHolder(r0);\n r3 = (org.telegram.p004ui.Components.RecyclerListView.Holder) r3;\n if (r3 == 0) goto L_0x003f;\n L_0x0036:\n r3 = r3.getAdapterPosition();\n r0 = r0.getTop();\n goto L_0x0041;\n L_0x003f:\n r0 = 0;\n r3 = -1;\n L_0x0041:\n if (r3 < 0) goto L_0x0051;\n L_0x0043:\n r4 = r9.lastHeight;\n r5 = r7 - r4;\n if (r5 == 0) goto L_0x0051;\n L_0x0049:\n r0 = r0 + r7;\n r0 = r0 - r4;\n r4 = r9.getPaddingTop();\n r0 = r0 - r4;\n goto L_0x0053;\n L_0x0051:\n r0 = 0;\n r3 = -1;\n L_0x0053:\n super.onLayout(r10, r11, r12, r13, r14);\n if (r3 == r2) goto L_0x0074;\n L_0x0058:\n r2 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r2.ignoreLayout = r1;\n r1 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r1 = r1.layoutManager;\n r1.scrollToPositionWithOffset(r3, r0);\n r1 = 0;\n r0 = r9;\n r2 = r11;\n r3 = r12;\n r4 = r13;\n r5 = r14;\n super.onLayout(r1, r2, r3, r4, r5);\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0.ignoreLayout = r8;\n L_0x0074:\n r9.lastHeight = r7;\n r9.lastWidth = r6;\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0.updateLayout();\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0.checkCameraViewPosition();\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.p004ui.Components.ChatAttachAlert$C40922.onLayout(boolean, int, int, int, int):void\");\n }", "@MediumTest\n\t public void testClickMeButton_layout() {\n\t final View decorView = mMainActivity.getWindow().getDecorView();\n\n\t //Verify that the mClickMeButton is on screen\n\t ViewAsserts.assertOnScreen(decorView, mcontactButton);\n\n\t //Verify width and heights\n\t final ViewGroup.LayoutParams layoutParams = mcontactButton.getLayoutParams();\n\t assertNotNull(layoutParams);\n\t assertEquals(layoutParams.width, WindowManager.LayoutParams.MATCH_PARENT);\n\t assertEquals(layoutParams.height, WindowManager.LayoutParams.WRAP_CONTENT);\n\t }", "public interface YesNoDialogConfirmation {\n\n public void onYesClicked(int pos,String type);\n}", "private void showbadgedialog() {\n final LayoutInflater li = LayoutInflater.from(mContext);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_badges, null);\n // number=session.getMobileNumber();\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n final Button buttonconfirm = (Button) confirmDialog.findViewById(R.id.buttonConfirm);\n\n\n AlertDialog.Builder alert = new AlertDialog.Builder(mContext);\n\n alert.setView(confirmDialog);\n\n final AlertDialog alertDialog = alert.create();\n alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonconfirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n\n }", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "@Override\r\n public void onValidStateEvent(ValidStateEvent event) {\r\n if(event.getViewType() == ValidStateEvent.ViewType.Protein) {\r\n hiding = false;\r\n getView().asWidget().setVisible(true);\r\n }\r\n else {\r\n hiding = true;\r\n getView().asWidget().setVisible(false);\r\n }\r\n }", "public void forgetLayout()\r\n\t{\n\t}", "private void addAddressDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(ConsumerCheckOutActivity.this);\n LayoutInflater inflater = getLayoutInflater();\n View dialogLayout = inflater.inflate(R.layout.consumer_checkout_dialogue, null);\n TextView header = dialogLayout.findViewById(R.id.header);\n TextView subHeader = dialogLayout.findViewById(R.id.subHeader);\n Button trackOrderButton = dialogLayout.findViewById(R.id.trackOrderButton);\n Button exploreFoodButton = dialogLayout.findViewById(R.id.exploreFoodButton);\n TextView okButton = dialogLayout.findViewById(R.id.okButton);\n ImageView tickIcon = dialogLayout.findViewById(R.id.tickIcon);\n header.setTypeface(poppinsBold);\n subHeader.setTypeface(poppinsLight);\n header.setTextSize(22);\n header.setText(\"Add Address\");\n subHeader.setText(\"Please add your address to deliver on time\");\n subHeader.setTextSize(16);\n tickIcon.setVisibility(View.GONE);\n okButton.setVisibility(View.VISIBLE);\n trackOrderButton.setVisibility(View.GONE);\n exploreFoodButton.setVisibility(View.GONE);\n builder.setView(dialogLayout);\n AlertDialog alertDialog = builder.create();\n okButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(ConsumerCheckOutActivity.this, Address.class);\n intent.putExtra(\"AddorEdit\", \"Add\");\n intent.putExtra(\"emailId\", SaveSharedPreference.getLoggedInUserEmail(ConsumerCheckOutActivity.this));\n startActivityForResult(intent, 101);\n alertDialog.dismiss();\n }\n });\n alertDialog.show();\n }", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public void defaultstatus()\n {\n try{\n this.isExpaneded = false;\n \n // hide the right annotation edit and diff area\n if (main_splitpane !=null)\n {\n main_splitpane.setDividerLocation(\n main_splitpane.getParent().getWidth() // width of wholesplitter\n - this.main_splitpane.getDividerSize() // width of divider of splitter\n );\n }}catch(Exception ex){\n System.out.println(\"error 1206151048\");\n }\n }", "private boolean isInfoValidate(){\n if(mEmailAddress.getText() == null || mEmailAddress.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_input_email_address);\n return false;\n }\n\n if(!mEmailAddress.getText().toString().contains(\"@\")){\n errorText = getString(R.string.register_warning_valid_email_address);\n return false;\n }\n\n// if(mRegionSpinner.getSelectedItemPosition() == Constant.NON_SELECT){\n// errorText = getString(R.string.register_warning_select_region);\n// return false;\n// }\n\n// if( (mRegionSpinner.getSelectedItemPosition() == Constant.HONG_KONG)\n// &&\n// (mEmailAddress.getText().toString().length() != Constant.HONGKONG_PHONE_LENGTH) ){\n//\n// errorText = getString(R.string.register_warning_valid_phone_num);\n// return false;\n// }\n//\n// if( (mRegionSpinner.getSelectedItemPosition() == Constant.CHINA)\n// &&\n// (mEmailAddress.getText().toString().length() != Constant.CHINA_PHONE_LENGTH) ){\n//\n// errorText = getString(R.string.register_warning_valid_phone_num);\n// return false;\n// }\n\n if(mPassword.getText() == null || mPassword.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_input_password);\n return false;\n }\n\n if(mRetypePassword.getText() == null || mRetypePassword.getText().toString().equals(\"\")){\n errorText = getString(R.string.register_warning_retype_password);\n return false;\n }\n\n if(!mPassword.getText().toString().equals(mRetypePassword.getText().toString())){\n errorText = getString(R.string.register_warning_not_the_same);\n return false;\n }\n\n if(!Utility.judgeContainsStr( mPassword.getText().toString())){\n errorText = getString(R.string.register_warning_contains_character);\n return false;\n }\n\n// if(!mPolicyCheckBox.isChecked()){\n// errorText = getString(R.string.register_warning_check_agreement);\n// return false;\n// }\n\n return true;\n }" ]
[ "0.6068885", "0.6068885", "0.5975474", "0.5975474", "0.5911163", "0.59041315", "0.58803093", "0.5605827", "0.5506984", "0.54351395", "0.5433761", "0.5422628", "0.5387947", "0.535486", "0.5329667", "0.5319291", "0.531828", "0.53079784", "0.5296568", "0.5293238", "0.52884674", "0.5282765", "0.5282382", "0.5261413", "0.5259949", "0.5238383", "0.52378666", "0.5234213", "0.5223534", "0.52180105", "0.51956564", "0.5184858", "0.5181732", "0.51798445", "0.5175236", "0.5163941", "0.5161075", "0.51573867", "0.51527315", "0.5151358", "0.51437074", "0.51382846", "0.5134861", "0.5129699", "0.5126296", "0.51193726", "0.5114854", "0.5113946", "0.51077026", "0.5103885", "0.50989956", "0.5098607", "0.50960004", "0.50949097", "0.5077305", "0.506091", "0.5058686", "0.50455636", "0.5036177", "0.5031135", "0.5026391", "0.50262976", "0.50247085", "0.50210214", "0.50165683", "0.5009652", "0.5006358", "0.5000945", "0.50002295", "0.49938333", "0.49910647", "0.49882412", "0.49880075", "0.49872229", "0.4984851", "0.49705258", "0.49694508", "0.49678203", "0.49675557", "0.49591038", "0.49512318", "0.49488777", "0.49483624", "0.49418765", "0.4939498", "0.49394464", "0.49371222", "0.49355146", "0.4935299", "0.4931975", "0.49317607", "0.49313182", "0.49286318", "0.49285972", "0.49207318", "0.49168238", "0.4912929", "0.49093658", "0.4907883", "0.49074596" ]
0.6028444
2
This method verifies the product image container on Order Confirmation page
public boolean VerifyProductDisplayed_OrderConfirmation() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed(); if(flag){ extentLogs.pass("VerifyProductImageDisplayedInConfirmationPage", "Displayed"); }else{extentLogs.fail("VerifyProductImageDisplayedInConfirmationPage", "NotDisplayed"); } return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean VerifyOrderConfirmation_ProductDetails() {\n\t\tboolean flag = false;\n\t\t\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyProductDetails\", \"ProductDetailsareIsDisplayed\");\n\t }else{extentLogs.fail(\"VerifyProductDetails\", \"ProductDetailsareNotDisplayed\");}\n\t\t\n\t\treturn flag;\n\t}", "public void VerifyShiptoStoreImagein_Cart_incheckout(){\r\n\t\tString countriess = \"Germany,Norway,Netherland,UK\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ship to Cart image should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"imgShiptoStoreinCartinCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"Ship to Store image is present\");\r\n\t\t\t\t\tReporter.log(\"PASS_MESSAGE:- Ship to Store image is present\");\r\n\t\t\t\t}else {\r\n\t\t\t\t\tSystem.out.println(\"Ship to Store image is not present for the country -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Exception(\"Ship to Store image is not present for the country -\"+countries.get(countrycount));\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Ship to Store image will not be present for country -\"+countries.get(countrycount));\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ship to Store image is not present for country -\"+countries.get(countrycount));\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}", "public boolean verifyCartItem()\n\t{ if (einKaufswagenBtn.isDisplayed())\n\t{\n\t\teinKaufswagenBtn.click();\n\t}\n\tfor (int j=0;j<collectnToStorePrdktIdLst.size();j++)\n\t{\n\t\tString expectedProduct1=collectnToStorePrdktIdLst.get(j);\n\t\tList<WebElement> fndProduct=driver.findElements(By.xpath(\"//form[@id='activeCartViewForm']//div[@class='a-section a-spacing-mini sc-list-body sc-java-remote-feature']//div[@class='a-row sc-list-item sc-list-item-border sc-java-remote-feature']\"));\n\t\tfor (int e=0;e<=fndProduct.size();e++)\n\t\t{\n\t\t\tString actProdkt=fndProduct.get(e).getAttribute(\"data-asin\");\n\t\t\tif (actProdkt.contains(expectedProduct1))\n\t\t\t{\n\t\t\t\tcnt++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (cnt==2)\n\t{\n\t\treturn true;\n\t}\n\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}", "@Test(priority = 5)\n\tpublic void validateContents() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the content of the product\");\n\t\tHeroImageProductPageFlow.clickHeroImage(locator);\n\t\theroImg.validateDescriptionContent(locator, validate);\n\t\t;\n\t\tlog.info(\"Content validation is correct\");\n\t\tHeroImageProductPageFlow.clickProductSpecification(locator);\n\t\theroImg.validateSpecificationContent(locator, validate);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}", "public static void VerifyCommonComponent_ImageShape(int ImageShape){\n\t\t\tString actualCommonComponentDataImage=\"\";\n\t\t\ttry{\n\t\t\t\tactualCommonComponentDataImage=sitecoreObj.commonComponentImageShape.getAttribute(\"class\");\n\t\t\t\tAssert.assertEquals(actualCommonComponentDataImage, \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape));\n\t\t\t\tlog.info(\"The Actual AboutUs CommonComponent Data Image- \"+actualCommonComponentDataImage);\n\t\t\t\tlog.info(\"The Expected AboutUs CommonComponent Data Image- \"+ \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape));\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs CommonComponent Inset Images are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs CommonComponent Data Image- \"+actualCommonComponentDataImage);\n\t\t\t\tlog.error(\"The Expected AboutUs CommonComponent Data Image- \"+ \"common--component \" + expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape)); \n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs CommonComponent Inset Images are NOT same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is No Inset Images and On CommonComponent Container\");\n\t\t\t}\n\t\t}", "public synchronized void verifySizeofTheProd(String size) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(actualSize, \"cart button\", 30);\n\t\t\tString actProdSize= actualSize.getAttribute(\"value\");\n\t\t\tif(size.equals(actProdSize))\n\t\t\t{\n\t\t\t\tWebActionUtil.info(\"Product size is verified\");\n\t\t\t}\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to verify actual size of the product\");\n\t\t\tAssert.fail(\"Unable to verify actual size of the product\");\n\t\t}\n\t}", "public boolean VerifyOrderDetails_OrderConfirmation(){\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PAYMENTCONFIRMATION_LABEL).isDisplayed();\n\tif(flag){extentLogs.passWithCustom(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERNUMBER_LABEL).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.passWithCustom(\"VerifyOrderDetails\", \"OrderNumberLabelIsDisplayed\");\n\t\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"OrderNumberLabelIsNotDisplayed\");}\n\t}else{extentLogs.fail(\"VerifyOrderDetails\", \"PAYMENTCONFIRMATION_LABEL\");}\n\t\n\treturn flag;\n\t}", "public static void VerifyChildComponent_ImageShape(String renderControl, int ImageShape){\n\t\t\t\tString actualChildComponentDataImage=\"\";\n\t\t\t\tString expectedChildComponentDataImage = expectedData.getProperty(\"FourItemsWithInset_InsetImageShape\"+ImageShape);\n\t\t\t\ttry{\n\t\t\t\t\tactualChildComponentDataImage=sitecoreObj.childComponentImageShape.getAttribute(\"class\");\n\t\t\t\t\tif(ImageShape==0){\n\t\t\t\t\t\tAssert.assertEquals(actualChildComponentDataImage, \"twoitems_sidebyside_item \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tAssert.assertEquals(actualChildComponentDataImage, \"twoitems_sidebyside_item \" + expectedChildComponentDataImage);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(\"The Actual AboutUs \" + renderControl + \" Image- \" + actualChildComponentDataImage);\n\t\t\t\t\tlog.info(\"The Expected AboutUs \" + renderControl + \" Image- \" + \"twoitems_sidebyside_item \" + expectedChildComponentDataImage);\n\t\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderControl + \" Images are Same\");\n\t\t\t\t}catch(AssertionError e){\n\t\t\t\t\tlog.error(\"The Actual AboutUs \" + renderControl + \" Image- \" + actualChildComponentDataImage);\n\t\t\t\t\tlog.error(\"The Expected AboutUs \" + renderControl + \" Image- \" + \"twoitems_sidebyside_item \" + expectedChildComponentDataImage); \n\t\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderControl + \" Images are NOT same\");\n\t\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\t\tlog.error(\"TEST FAILED: There is No Images On ChildComponent Container\");\n\t\t\t\t}\n\t\t\t}", "public boolean VerifyOrderConfirmation_MyStoreSection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyMyStoreSection\", \"MyStoreSectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyMyStoreSection\", \"MyStoreSectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "public void VerifylogosonCheckoutPage(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Vat Exclude button with WebElement \"+elementProperties.getProperty(\"Vatinclusion\")+\" should be clicked\");\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"imgStapleslogoonleft\"))& isElementPresent(locator_split(\"imgCheckoutLockicon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"imgCheckoutNortan\")) ){\r\n\t\t\t\tSystem.out.println(\"All the three logos are present\");\r\n\t\t\t\tPoint stapleslogo = getcoordinates(locator_split(\"imgStapleslogoonleft\"));\r\n\t\t\t\tSystem.out.println(stapleslogo);\r\n\t\t\t\tPoint lockicon = getcoordinates(locator_split(\"imgCheckoutLockicon\"));\r\n\t\t\t\tSystem.out.println(lockicon);\r\n\t\t\t\tPoint Nortonicon = getcoordinates(locator_split(\"imgCheckoutNortan\"));\r\n\t\t\t\tSystem.out.println(Nortonicon);\r\n\t\t\t\tif(stapleslogo.x<lockicon.x & lockicon.x<Nortonicon.x){\r\n\t\t\t\t\tSystem.out.println(\"Staples logo is on left side, Lock icon in middle and Norton img on right side\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Logos are mis aligned\");\r\n\t\t\t\t\tthrow new Error(\"Logos are mis aligned\");\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"One or all the three logos are not present\");\r\n\t\t\t\tthrow new Error(\"One or all the three logos are not present\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logo Elements are not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgStapleslogoonleft\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutLockicon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCheckoutNortan\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- One or all the three logos are not present/Logos are mis aligned\");\r\n\r\n\t\t}\r\n\t}", "public boolean productsTabVerification() {\r\n\t\t\r\n\t\t\r\n\t\twaitUntilPresenceOfElementLocated(ourProductsTab);\r\n\r\n\t\tList<WebElement> list = driver.findElements(By.xpath(\"//a[text()='OUR PRODUCTS']\"));\r\n\t\tif (list != null && !list.isEmpty()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void isImagePresent() {\r\n\t\t\t\r\n\t\t}", "public void stateForUnavailableItems_InShoppingCart() {\n List<WebElement> productList = getDriver().findElements(By.xpath(\"//*[@id='itemList']//li\"));\n for (int i = 1; i <= productList.size(); i++) {\n WebElement itemList = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]\"));\n String status = itemList.getAttribute(\"class\");\n if (!status.contains(\"outofstock\")) {\n continue;\n }\n String productName = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//*[@class='mjr-product-name']\")).getText();\n System.out.println(\"=== Product Index [\" + i + \"], Name [\" + productName + \"] is Unavailable\");\n WebElement qtyStepper = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//div[@class='mjr-qty-stepper']\"));\n Assert.assertFalse(\"=== Verify Qty-Steppers Are Removed for Unavailable Item \", qtyStepper.isDisplayed());\n String notAvailMsg = getDriver().findElement(By.xpath(\"//*[@id='itemList']//li[\" + i + \"]//*[contains(@class,'msgNotAvail')]\")).getText();\n Assert.assertEquals(\"=== Verify Product Not Available Message - Shopping Cart Page \", Constants.notAvailProd_shoppingCart, notAvailMsg);\n WebElement checkoutButtons = getDriver().findElement(By.xpath(\"//*[@class='rightSidebar-footer-inner']//*[@type='submit']\"));\n Assert.assertFalse(\"=== Verify Checkout Buttons are Disabled for Guest OR Signed-In User \", checkoutButtons.isEnabled());\n }\n }", "public void deleteProduct() {\n deleteButton.click();\n testClass.waitTillElementIsVisible(emptyShoppingCart);\n Assert.assertEquals(\n \"Message is not the same as expected\",\n MESSAGE_EMPTY_SHOPPING_CART,\n emptyShoppingCart.getText());\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public void VerifyDetailsin_Cart_inCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Image, ItemDesc, ItemNum, Price, Quantity, Inc/Exec tax, Remove and change in Cart in Checkout\");\r\n\r\n\t\ttry{\r\n\t\t\tString image= getPropertyValue(locator_split(\"imgCartinCheckout\"), \"src\");\r\n\t\t\tString ItemDesc = getText(locator_split(\"txtItemDescCartinCheckout\"));\r\n\t\t\tString ItemNum = getText(locator_split(\"txtitemNumCartinCheckout\"));\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkRemChanCartinCheckout\"));\r\n\t\t\tString Remove = getText(ele.get(0));\r\n\t\t\tString change = getText(ele.get(1));\r\n\t\t\tString Price = getText(locator_split(\"txtpriceCartinCheckout\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtIncExctaxinCartinCheckout\"));\r\n\t\t\tString Tax= getText(ele1.get(0));\r\n\t\t\tString Quantity = getText(locator_split(\"txtQuantityCartinCheckout\"));\r\n\t\t\tString UnitofMeasure= getText(locator_split(\"txtUnitofmeasureCartinCheckout\"));\r\n\t\t\tSystem.out.println(\"Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkRemChanCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtIncExctaxinCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void verifyToCart() {\n if (priceText.getText().equalsIgnoreCase(\"$0.00\")) {\n Assert.fail();\n System.out.println(\"No products have been added to your cart.\");\n\n\n } else\n System.out.println(\"\\n\" +\n \"The product has been successfully added to the Cart.\" + \"\\n\" + \"Total Price: \" + priceText.getText());\n\n }", "public static void VerifyCommonComponent_ImageShapeWithImageSize(String renderControl, int imageShape, int imageSize){\n\t\t\tString actualCommonComponentImage = \"\";\n\t\t\tString expectedCommonComponentImage = \"common--component\" \n\t\t\t\t\t+ \" \" + expectedData.getProperty(\"CommonComponent_ImageShape\" + imageShape) \n\t\t\t\t\t+ \" \" + expectedData.getProperty(\"CommonComponent_ImageSize\" + imageSize);\n\t\t\ttry{\n\t\t\t\tactualCommonComponentImage = sitecoreObj.commonComponentImageShape.getAttribute(\"class\");\t\t\t\t\n\t\t\t\tAssert.assertEquals(actualCommonComponentImage, expectedCommonComponentImage);\n\t\t\t\t\n\t\t\t\tlog.info(\"The Actual AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + actualCommonComponentImage);\n\t\t\t\tlog.info(\"The Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + expectedCommonComponentImage);\n\t\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size are Same\");\n\t\t\t}catch(AssertionError e){\n\t\t\t\tlog.error(\"The Actual AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + actualCommonComponentImage);\n\t\t\t\tlog.error(\"The Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size - \" + expectedCommonComponentImage);\n\t\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs OneItem/\"+ renderControl + \" Image Shape and Size are NOT Same\");\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\tlog.error(\"TEST FAILED: There is NO Image Shape and Size on AboutUs OneItem/\"+ renderControl + \" Container\");\n\t\t\t}\n\t\t}", "@Then(\"Order is placed successfully confirmed by screenshot\")\r\n public void successfulOrder() throws InterruptedException {\n ProductPage prodPage = new ProductPage(driver);\r\n prodPage.goToCartAfterProductAdding();\r\n //Finishing an order form cart\r\n CartAndOrderProcess cartAndOrderProcess = new CartAndOrderProcess(driver);\r\n cartAndOrderProcess.proceedToChekout();\r\n cartAndOrderProcess.addressContinue();\r\n cartAndOrderProcess.shippingContinue();\r\n cartAndOrderProcess.payByCheckAndOrder();\r\n // Taking screenshot of successfully placed order\r\n // Also checking order history to make sure that amount is the same in order history\r\n cartAndOrderProcess.takeScreenshot(driver);\r\n cartAndOrderProcess.checkOfTotalCostAndPaymentStatus();\r\n }", "public synchronized void verifyCartBtn() {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(cartBtn, \"cart button\", 30);\n\t\t\tWebActionUtil.isElementClickable(cartBtn, \"Cart button\");\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to clk on cart button\");\n\t\t\tAssert.fail(\"Unable to clk on cart button\");\n\t\t}\n\t}", "public void VerifyViewCartandPrintinCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- View Cart and Print Cart should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkViewPrintCart\"));\r\n\t\t\tif(ele.size()==2){\r\n\t\t\t\tSystem.out.println(\"View Cart -\"+ele.get(1).getText()+\" and print Cart -\"+ele.get(0).getText()+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- View Cart \"+ele.get(1).getText()+\" and print Cart \"+ele.get(0).getText()+\" is present\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"View cart or Print or both is not present\");\r\n\t\t\t}\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View cart or Print or both is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkViewPrintCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void verifyFullViewImage(WebDriver driver) {\n FindElement.waitForElementXpath(driver, \"//div[@class = 'letterbox']//img[contains(@src,'.png')]\", \"full view modal image\");\n }", "public void ValidateProductSearchIsSuccessfull(){\n\t if (driver.findElement(search_refinement_categories_segment).isDisplayed()){\n\t Assert.assertTrue(true);\n\t logger.info(\"Search Page is displayed because refinement category is displayed\");\n\t }\n\t else{\n\t logger.fatal(\"Search Page is not displayed because refinement category is not displayed\");\n\t Assert.fail(\"Search Page is not displayed because refinement category is not displayed\");\n\t }\n\t }", "@Test(priority = 4)\n\tpublic void validateCartAfterAdd() {\n\t\tCss = read.readPropertiesFile(\"loc.validate.clickoncart.afteradd.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// click view cart\n\t\tCss = read.readPropertiesFile(\"loc.viewcartbtn.click.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// validate each cart items-product 1\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.iphone.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct1 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct1 = read.readPropertiesFile(\"exppro1\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct1, exptproduct1, \"No match\");\n\t\tlog.info(\"Product1\");\n\t\t// product 2\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.mac.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct2 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct2 = read.readPropertiesFile(\"exppro2\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct2, exptproduct2, \"No match\");\n\t\tlog.info(\"Product2\");\n\t\t// grand total after adding products\n\t\tXpath = read.readPropertiesFile(\"loc.verify.grandtotal.aftradd.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actgrandadd = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptgrandadd = read.readPropertiesFile(\"expgrandadd\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actgrandadd, exptgrandadd, \"No match\");\n\t\tlog.info(\"Grand total after adding products\");\n\n\t}", "public void verifyProductDetailAttribute(String Sku, String totalGemAmount, String MetalType, String height, String width,\r\n\r\n\t\t\tString MetalWeight, String Catagory, String TypeOfProduct, String DiamondShape, String NoOfDiamonds,\r\n\r\n\t\t\tString Collection, String GemstoneType, String GemstoneShape, String NoOfGemstones, String TotalGemWeight,\r\n\r\n\t\t\tString TotalDiamondWeight, Product productItms) {\n\r\n\t\tif (productItms.getTGemAmount() != null && !productItms.getTGemAmount().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualTGemAmount = utility.converPrice(productItms.getTGemAmount());\r\n\r\n\t\t\tif (!(actualTGemAmount.trim().toUpperCase().equals(totalGemAmount.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"totalGemAmount\", finalResult.get(\"totalGemAmount\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(totalGemAmount, finalResult.get(\"totalGemAmount\") & false);\r\n\r\n\t\t\ttotalGemAmount = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Metal type\r\n\r\n\t\tif (productItms.getmetalPurity() != null && !productItms.getmetalPurity().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualmetalPurity = productItms.getmetalPurity();\r\n\r\n\t\t\tif (!(actualmetalPurity.trim().toUpperCase().equals(MetalType.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"MetalType\", finalResult.get(\"MetalType\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(MetalType, finalResult.get(\"MetalType\") & false);\r\n\r\n\t\t\tMetalType = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// Verification of height of the product page\r\n\r\n\t\tif (productItms.getHeight() != null && !productItms.getHeight().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualHeight = utility.convertDecimal(productItms.getHeight());\r\n\r\n\t\t\tString expectedHeight = utility.convertDecimal(height);\r\n\r\n\t\t\tif (!(actualHeight.trim().toUpperCase().equals(expectedHeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"height\", finalResult.get(\"height\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse if (height == \"0\")\r\n\r\n\t\t{\r\n\r\n\t\t\theight = \"N/A\";\r\n\r\n\t\t\tfinalResult.put(height, finalResult.get(\"height\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of width of the product page\r\n\r\n\t\tif (productItms.getWidth() != null && !productItms.getWidth().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualWidth = utility.convertDecimal(productItms.getWidth());\r\n\r\n\t\t\tString expectedWidth = utility.convertDecimal(width);\r\n\r\n\t\t\tif (!(actualWidth.trim().toUpperCase().equals(expectedWidth.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"width\", finalResult.get(\"width\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse if (width == \"0\")\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"width\", finalResult.get(\"width\") & false);\r\n\r\n\t\t\twidth = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of gold weight\r\n\r\n if((Sku.contains(\"RG\")||Sku.contains(\"BR\")))\r\n {\r\n MetalWeight=\"N/A\";\r\n \r\n }\r\n else {\r\n \r\n if(productItms.getGoldWeight() != null && !productItms.getGoldWeight().trim().equals(\"N/A\")){\r\n\r\n\r\n\t\t\tString actualGoldWeight = utility.convertDecimal(productItms.getGoldWeight().split(\" \")[0].toString());\r\n\r\n\t\t\tString expectedGoldWeight = utility.convertDecimal(MetalWeight);\r\n\r\n\t\t\tif (!(actualGoldWeight.trim().toUpperCase().equals(expectedGoldWeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"MetalWeight\", finalResult.get(\"MetalWeight\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"MetalWeight\", finalResult.get(\"MetalWeight\") & false);\r\n\r\n\t\t\tMetalWeight = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Design Type\r\n\r\n\t\tif (productItms.getDesignType() != null && !productItms.getDesignType().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualDesignType = productItms.getDesignType();\r\n\r\n\t\t\tif (!(actualDesignType.trim().toUpperCase().equals(Catagory.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"Catagory\", finalResult.get(\"Catagory\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"Catagory\", finalResult.get(\"Catagory\") & false);\r\n\r\n\t\t\tCatagory = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// Verification of style of the product in Product Page. String\r\n\r\n\t\tif (productItms.getstyle() != null && !productItms.getstyle().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getstyle(), TypeOfProduct)))\r\n\r\n\t\t\t\tfinalResult.put(\"TypeOfProduct\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"TypeOfProduct\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t\tTypeOfProduct = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Diamond shape\r\n\r\n\t\tif (productItms.getDshape() != null && !productItms.getDshape().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getDshape(), DiamondShape)))\r\n\r\n\t\t\t\tfinalResult.put(\"DiamondShape\", finalResult.get(\"DiamondShape\") & false);\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"DiamondShape\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t\tDiamondShape = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Total number of Diamonds\r\n\r\n\t\tString actualTotalnoDiamonds = productItms.getTotalnoDiamonds();\r\n\r\n\t\tif (!(actualTotalnoDiamonds.trim().toUpperCase().equals(NoOfDiamonds.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"NoOfDiamonds\", finalResult.get(\"NoOfDiamonds\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Diamond total Weight\r\n\r\n\t\tString actualDtotalWeight = utility.convertDecimal(productItms.getDtotalWeight().split(\"ct\")[0].toString());\r\n\r\n\t\tString expetedDtotalWeight1 = utility.convertDecimal(TotalDiamondWeight.trim());\r\n\r\n\t\tif (!(actualDtotalWeight.trim().toUpperCase().equals(expetedDtotalWeight1.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"TotalDiamondWeight\", finalResult.get(\"TotalDiamondWeight\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Collections\r\n\r\n\t\tif (!(utility.matchTwoString(productItms.getCollections(), Collection)))\r\n\r\n\t\t\tfinalResult.put(\"Collection\", finalResult.get(\"Collection\") & false);\r\n\r\n\t\t// verification of Gemstone Type\r\n\r\n\t\tif (GemstoneType.length() > 0)\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getGemType(), GemstoneType)))\r\n\r\n\t\t\t\tfinalResult.put(\"GemstoneType\", finalResult.get(\"GemstoneType\") & false);\r\n\r\n\t\t// verification of Gemstone shape\r\n\r\n\t\tif (GemstoneShape.length() > 0)\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getGemShape(), GemstoneShape)))\r\n\r\n\t\t\t\tfinalResult.put(\"GemstoneShape\", finalResult.get(\"GemstoneShape\") & false);\r\n\r\n\t\t// verification of Number of Gemstones\r\n\r\n\t\tif (!(NoOfGemstones.equals(\"0\"))) {\r\n\r\n\t\t\tString actualTotalNoGem = productItms.getTotalNoGem();\r\n\r\n\t\t\tif (!(actualTotalNoGem.trim().toUpperCase().equals(NoOfGemstones.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"NoOfGemstones\", finalResult.get(\"NoOfGemstones\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Total Gemstone weight\r\n\r\n\t\tif (!(TotalGemWeight.equals(\"0\"))) {\r\n\r\n\t\t\tString actualTotalGemWeight = utility\r\n\r\n\t\t\t\t\t.convertDecimal(productItms.getTotalGemWeight().split(\"ct\")[0].toString());\r\n\r\n\t\t\tString expectedTotalGemWeight = utility.convertDecimal(TotalGemWeight);\r\n\r\n\t\t\tif (!(actualTotalGemWeight.trim().toUpperCase().equals(expectedTotalGemWeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"TotalGemWeight\", finalResult.get(\"TotalGemWeight\") & false);\r\n\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\t\t\r\n\r\n\t}", "public static WebElement check_supplierServiceIconsAreMatching(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tWebElement elementVerSupp = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_verifiedSupPop']/img\"));\r\n \t\tWebElement elementTradeShow = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_sfPop']/img\"));\r\n \t\tWebElement elementMagazine = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_eMagPop']/img\")); \r\n \t\tWebElement elementMajorCust = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_customerPop']/img\"));\r\n \t//\tWebElement elementOnlineStore = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_storeFrontPop']/img\"));\r\n \t\t\r\n \t\tBoolean isVerSuppIconExists = elementVerSupp.isDisplayed();\r\n \t\tBoolean isTradeShowIconExists = elementTradeShow.isDisplayed();\r\n \t\tBoolean isMagazineIconExists = elementMagazine.isDisplayed();\r\n \t\tBoolean isMajorCustIconExists = elementMajorCust.isDisplayed();\r\n \t//\tBoolean isOnlineStoreIconExists = elementOnlineStore.isDisplayed();\r\n \t\t\r\n \t\tAdd_Log.info(\"Is Verified Supplier icon displayed ::\" + isVerSuppIconExists);\r\n \t\tAdd_Log.info(\"Is Trade Show icon displayed ::\" + isTradeShowIconExists);\r\n \t\tAdd_Log.info(\"Is Magazine icon displayed ::\" + isMagazineIconExists);\r\n \t\tAdd_Log.info(\"Is Major Cust icon displayed ::\" + isMajorCustIconExists);\r\n \t//\tAdd_Log.info(\"Is Online Store icon displayed ::\" + isOnlineStoreIconExists);\r\n \t\t\r\n \t\tif(isVerSuppIconExists == true && isTradeShowIconExists == true && isMagazineIconExists == true){\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are NOT matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "private void checking() {\n\n System.out.println(cart);\n\n for (Order o : cart) {\n if (o.getOrderedProduct().getPrice()!= productRepository.getOne(o.getOrderedProduct().getId()).getPrice()){\n System.out.println(\"product will be updated\");\n deleteFromCart(o.getOrderedProduct().getId());\n addToCart(o.getOrderedProduct().getId(),o.getCount());\n }\n }\n }", "public boolean isCheckoutButtonPresent() {\n\t\ttry{\n\t\t\tdriver.findElement(By.xpath(\"//android.view.View[@resource-id='\" + checkout + \"']\"));\n\t\t\treturn true;\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public void initialAddToCart() {\n JavascriptExecutor js = (JavascriptExecutor) webDriver;\n js.executeScript(\"arguments[0].scrollIntoView();\", productImage);\n Actions action = new Actions(webDriver);\n action.moveToElement(productImage).perform();\n\n Controllers.button.click(addtoCartInitial);\n }", "public void verifyTrashToDoIcon() {\n try {\n waitForVisibleElement(trashToDoBtnEle, \"Trash ToDo icon\");\n NXGReports.addStep(\"Verify trash ToDo icon\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify trash ToDo icon\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Test //Associated with Confirm image icon exists (Scenario 2)\n public void confirmImageIconExistsTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //types in the name \"Shane\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Shane\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Shane\")).perform(click());\n\n //performs a click operation on the \"Edit Contact Info\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //confirms that the button on the Edit Contact screen associated with the id info_delete_button\n //has a string associated with it that reads \"Delete Contact\". This string and id is unique in the\n //app and only exists in this singular activity.\n onView(withId(R.id.info_delete_button)).check(matches(withText(R.string.info_delete)));\n\n onView(withId(R.id.info_pic)).check(matches(withContentDescription(R.string.image_contact)));\n\n //clicks the Delete Contact button\n onView(withId(R.id.info_delete_button)).perform(click());\n }", "public String getProductPictureDetails(){\r\n\t\t\t\r\n\t\t\treturn (hasProductPicture())?McsElement.getElementByXpath(driver, PRODUCT_PIC_CONTAINER+\"//img\").getAttribute(\"src\"): \"\";\r\n\t\t}", "private void displayReceiptPhoto() {\n\t\tif (mForm == null)\n\t\t\treturn;\n\t\tif (mReceipt == null)\n\t\t\treturn;\n\t\timageWidget().displayPhoto(getRBuddyActivity().photoStore(),\n\t\t\t\tmReceipt.getId(),\n\t\t\t\tmReceipt.getPhotoId());\n\t}", "public static void verifyEquipmentImage(WebDriver driver, int cardNumber) {\n\n int sizeY = FindElement.waitForElementXpath(driver, \"(//div[contains(@class,'spectrum-card__thumbnail-container')]//img)[\" + cardNumber + \"]\", \"device image\").getSize().getHeight();\n if (sizeY > 0 && sizeY < 150) {\n ExtentManager.stepReport(Status.PASS, \"Equipment image from card \"+cardNumber+\" is present\");\n } else{\n ExtentManager.stepReport(Status.FAIL, \"Equipment image from card \"+cardNumber+\" is not present or broken image is displayed\");\n }\n }", "boolean isCartValid();", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "public boolean hasOrderButtons() {\n return orderButtonImageCount == 4;\n }", "public boolean VerifyOrderConfirmation_UponDeliverySection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "private void displayProductDetails() {\n //loading picture offline\n Picasso.get().load(pImage).networkPolicy(NetworkPolicy.OFFLINE)\n .placeholder(R.drawable.warning).into(productImage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError(Exception e) {\n Picasso.get().load(pImage)\n .placeholder(R.drawable.warning).into(productImage);\n }\n });\n productName.setText(pName);\n productPrize.setText(pPrice);\n\n try{\n if (pCategory.equalsIgnoreCase(\"Bulk Purchase\")){\n quantity.setText(pLimitedQty);\n }\n } catch (Exception ex){\n Log.i(\"error\", ex.getMessage());\n catchErrors.setErrors(ex.getMessage(), dateAndTime.getDate(), dateAndTime.getTime(),\n \"OrderProductActivity\", \"displayProductDetails\");\n }\n }", "public void VerifyDeliveryLinkPopup(String title){\r\n\t\tString Title = getValue(title);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Pop up should come when delivery link is clicked in order summary\");\r\n\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"lnkDeliverylinkinOrderSummary\"));\r\n\t\t\tHashMap<String, String> windowids=getWindowID();\r\n\t\t\tdriver.switchTo().window(windowids.get(\"childID\"));\r\n\t\t\tverifyPage(Title);\r\n\t\t\tcloseBrowser();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ship to Store image is not present for country -\"+countries.get(countrycount));\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void VerifyShoppingCartPreview(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Shopping Cart Preview should be displayed \"+Text);\r\n\r\n\t\tif(getText(locator_split(\"txtShoppingCartPreview\")).equalsIgnoreCase(Text)){\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Shopping Cart Preview is displayed and it has Text -\"+Text);\r\n\t\t\tSystem.out.println(\"Verified the text -\"+Text);\r\n\t\t}else {\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Shopping Cart Preview is not displayed and it dosent contain Text -\"+Text);\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtShoppingCartPreview\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductImage)) {\n return false;\n }\n ProductImage other = (ProductImage) object;\n if ((this.idImage == null && other.idImage != null) || (this.idImage != null && !this.idImage.equals(other.idImage))) {\n return false;\n }\n return true;\n }", "private void verifyImageResponse(String imageProcessResult) {\n\t\ttry {\n\t\t\tif (imageProcessResult != null) {\n\t\t\t\tJSONObject imageResponseJson = new JSONObject(imageProcessResult);\n\t\t\t\tif ((imageResponseJson.has(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG)) & (imageResponseJson.getBoolean(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG))) {\n\t\t\t\t\tthis.smartCameraListener.onSuccessCameraOperation(imageProcessResult);\n\t\t\t\t} else {\n\t\t\t\t\t// this means there has been some error in the\n\t\t\t\t\t// camera service operation. Need to throw the error\n\t\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(imageResponseJson.getInt(SmartConstants.CAMERA_OPERATION_EXCEPTION_TYPE_TAG),\n\t\t\t\t\t\t\timageResponseJson.getString(SmartConstants.CAMERA_OPERATION_EXCEPTION_MESSAGE_TAG));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION, ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION_MESSAGE);\n\t\t\t}\n\t\t} catch (JSONException je) {\n\t\t\t// TODO handle this exception\n\t\t}\n\t}", "public synchronized List<WebElement> productImage() throws Exception {\n\t\tList<WebElement> images = null;\n\t\ttry {\n\t\t\timages = utils.findElementsByLocator(driver, \"PDP_productImage\", \"| product image not present\");\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn images;\n\t}", "public void VerifyCartCheckout_Coupon_OrderSumamrysections(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- cartcheckout, coupon and Order summary should be present in checkout page\");\r\n\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"boxCheckoutCartCheckout\")) & isElementPresent(locator_split(\"boxCheckoutCoupon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"boxCheckoutOrderSummary\"))){\r\n\t\t\t\tSystem.out.println(\"cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCartCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCoupon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutOrderSummary\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void compareShoppingCartToReOrderItems() {\n UtilityHelper.compareShoppingCartToReOrderItems();\n }", "public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }", "public synchronized void verifyActualProdTitle(String productName) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(actualProdTitle, \"cart product title\", 30);\n\t\t\tString actProdTitle= actualProdTitle.getAttribute(\"value\");\n\t\t\tif(productName.equals(actProdTitle))\n\t\t\t{\n\t\t\t\tWebActionUtil.info(\"Product title is verified\");\n\t\t\t}\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to verify actual title of the product\");\n\t\t\tAssert.fail(\"Unable to verify actual title of the product\");\n\t\t}\n\t}", "public boolean VerifyOrderConfirmation_ThankYouMessage() {\n\t\tboolean flag = false;\n\t\t\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyOrderDetails\", \"OrderConfirmationIsDisplayed\");\n\t }else{extentLogs.fail(\"VerifyOrderDetails\", \"OrderNumberLabelIsNotDisplayed\");}\n\t\t\n\t\treturn flag;\n\t}", "boolean isImageDisplayed();", "public boolean verifyElementPresentOnCheckoutOrderPage(String key) {\n\t\t// TODO Auto-generated method stub\n\n\t\treturn verifyElementIsPresent(checkoutOrderPropertiesReader.getProperties(key));\n\t}", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Test\n\tpublic void productValidation() throws IOException, InterruptedException {\n\t\tservice=startServer();\n\t\tAndroidDriver<AndroidElement> driver=AndroidCapabilities(\"app.under.test\");\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tProductScreen productScreen=new ProductScreen(driver);\n\t\t\n\t\tdriver.findElementByAccessibilityId(\"test-Username\").sendKeys(\"standard_user\");\n\t\tdriver.findElementByAccessibilityId(\"test-Password\").sendKeys(\"secret_sauce\");\n\t\tdriver.hideKeyboard();\n\t\tdriver.findElementByAccessibilityId(\"test-LOGIN\").click();\n\n\t\t//product listing\n\n\t\t//int count=driver.findElementsByXPath(\"//android.widget.ScrollView//android.view.ViewGroup\").size();\n\t\tint count=productScreen.getProductGroup().size();\n\t\tSystem.out.println(count);\n\n\t\tString expectedProduct=\"Sauce Labs Backpack\";\n\t\tString displayedProduct=\"\";\n\n\t\tfor(int i=0;i<count;i++)\n\n\t\t{\n\t\t\t\n\t\t\t//String text=driver.findElementsByXPath(\"//android.widget.ScrollView//android.view.ViewGroup//android.widget.TextView\").get(i).getText();\n\t\t\tString text=productScreen.getProductText().get(i).getText();\n\t\t\tSystem.out.println(text);\n\t\t\tif(text.equalsIgnoreCase(expectedProduct))\n\n\t\t\t{\n\n\t\t\t\tproductScreen.getProductText().get(i).click();\n\t\t\t\t\n\t\t\t\tdisplayedProduct=productScreen.getProductText().get(i).getText();\n\t\t\t\tSystem.out.println(displayedProduct);\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tAssert.assertEquals(expectedProduct, displayedProduct);\n\t\tstopServer();\n\n}", "@Test\n public void add_to_cart_without_loginTest() {\n\n Actions action = new Actions(driver);\n action.moveToElement(driver.findElement(By.cssSelector(\"#nav > ol > li.level0.nav-1.first.parent \"))).build().perform();\n\n driver.findElement(By.cssSelector(\"#nav > ol > li.level0.nav-1.first.parent > ul > li.level1.nav-1-4.last > a\")).click();\n\n driver.findElement(By.cssSelector(\"#product-collection-image-424\")).click();\n\n driver.findElement(By.cssSelector(\"#swatch76 > span.swatch-label\")).click();\n\n driver.findElement(By.cssSelector(\"#swatch15 > span.swatch-label > img\")).click();\n\n driver.findElement(By.cssSelector(\"#qty\")).clear();\n driver.findElement(By.cssSelector(\"#qty\")).sendKeys(\"2\");\n\n driver.findElement(By.cssSelector(\"#product_addtocart_form > div.product-shop > div.product-options-bottom > div.add-to-cart > div.add-to-cart-buttons > button > span > span\")).click();\n String number = driver.findElement(By.cssSelector(\"#header span.count\")).getText();\n System.out.println(\"Produse din cos = \" + number);\n Assert.assertEquals(\"2\", number);\n }", "public void verifyPopupShouldNotDisplayAfterPublishingTheAd() throws Exception {\n\t\t\tCreateStockTradusProPage createStockObj= new CreateStockTradusProPage(driver);\n\t\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t\twaitTill(2000);\n\t\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\t\tloginPage.setAccountEmailAndPassword(\"[email protected]\", \"sunfra123\");\n\t\t\tjsClick(driver, loginPage.LoginButton);\n\t\t\twaitTill(5000);\n\t\t\tif(!verifyElementPresent(overviewObj.PostYourAdButtonOnWelcomePopup))\n\t\t\t{\n\t\t\t\tdriver.navigate().refresh();\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.TradusWelcomeBox);\n\t\t\tjsClick(driver, overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\t\tcreateStockObj.uploadImageButtonInPostingForm.sendKeys(System.getProperty(\"user.dir\") + \"\\\\Tire.jpeg\");\n\t\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.priceSectionInPostingForm);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.priceTypeFieldPostingForm);\n\t\t\twaitTill(1000);\n\t\t\tactionClick(driver, createStockObj.priceTypeasFixed);\n\t\t\twaitTill(1000);\n\t\t\tif (!getText(createStockObj.currencyFieldAutofillValue).equalsIgnoreCase(\"EUR\")) {\n\t\t\t\tclick(createStockObj.currencyTypeFieldPostingForm);\n\t\t\t\twaitTill(1000);\n\t\t\t\tactionClick(driver, createStockObj.currencyTypeasEuro);\n\t\t\t}\n\t\t\tsendKeys(createStockObj.netPriceFieldPostingForm, \"10000\");\n\t\t\twaitTill(1000);\n\t\t\tscrollToElement(driver, createStockObj.yourVehicleSectionInPostingForm);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleTypeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleTypeasSpareParts);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleCategoryFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleCategoryasTires);\n\t\t\twaitTill(2000);\n\t\t\tclick(createStockObj.vehicleMakeFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleMakeasVolvo);\n\t\t\twaitTill(3000);\n\t\t\tclick(createStockObj.vehicleModelFieldPostingForm);\n\t\t\tactionClick(driver, createStockObj.vehicleModelas8700);\n\t\t\twaitTill(4000);\n\t\t\tsendKeys(createStockObj.descriptionAreainPostingForm, \"Ad\");\n\t\t\tjsClick(driver, createStockObj.postYourAdButton);\n\t\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\t\tjsClick(driver, overviewObj.overviewOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\t\twaitTill(5000);\n\t\t\tAssert.assertFalse(verifyElementPresent(overviewObj.TradusWelcomeBox),\n\t\t\t\t\t\"Welcome popup displaying even after clicking cross icon\");\n\t\t}", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "java.lang.String getProductImageUrl();", "public void printReceipt() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION,\"Would you like a receipt?\",ButtonType.YES,ButtonType.NO);\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.YES) {\n try {\n String element = \"\";\n int height = 200;\n int length = 0;\n for (int i = 0; i < getItemList().size(); i++) {\n element += getItemList().get(i).toString() + \" \"+System.getProperty(\"line.separator\");\n height += 20;\n }\n String text = \"Receipt \" + System.getProperty(\"line.separator\")\n + System.getProperty(\"line.separator\") + \"Items: \" + System.getProperty(\"line.separator\")\n + element + System.getProperty(\"line.separator\") + \"Total: \" + getTotalCost();\n char[] array = text.toCharArray();\n System.out.println(array);\n length += array.length;\n BufferedImage bi = imageGenerator.createImageWithText(array, length, height);\n File outputfile = new File(\"receipt.png\");\n ImageIO.write(bi, \"png\", outputfile);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else{\n alert.close();\n }\n }", "public boolean comprobacion()\n\t{\n\t\tif(txtNombre.getText().isEmpty())\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Por favor, rellene el nombre del producto\"); \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\tif(txtMarca.getText().isEmpty())\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Por favor, rellene la marca del producto\"); \n\t\t\t\treturn false;\n\t\t\t}\n\t\tif(txt_Material.getText().isEmpty()&& rdbtnTextil.isSelected())\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\"Por favor, rellene el material principal del producto\"); \n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(txtPrecio.getText().equals(\"€\"))\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Por favor, establezca un precio al producto\"); \n\t\t\t\treturn false;\n\t\t\t}\n\t\tif(!fotoSubida)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Por favor, seleccione una imagen para su producto\"); \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }", "public void stateForUnavailableItems_InMiniCart() {\n int count = 0;\n List<WebElement> itemInMiniCart = getDriver().findElements(By.xpath(\"//*[@id='itemList']//li\"));\n for (WebElement unavailable : itemInMiniCart) {\n if (count != itemInMiniCart.size()) {\n if (!String.valueOf(unavailable.getAttribute(\"class\")).contains(\"outofstock\")) {\n continue;\n }\n count++;\n System.out.println(\"unavailable ===>> \" + String.valueOf(unavailable.findElement(By.xpath(\"//*[@class='productNameInner']\")).getText()));\n WebElement childQtyStepper = unavailable.findElement(By.xpath(\".//*[@class='mjr-qtyButton plus noSelect']\"));\n Assert.assertFalse(\"Verify Qty Stepper NOT displayed for Unavailable Product via Mini-Cart\", (childQtyStepper.isDisplayed()));\n }\n }\n System.out.println(\"=== Total Number of Products [\" + itemInMiniCart.size() + \"]\");\n System.out.println(\"=== Number of Unavailable Products In Mini-Cart [\" + count + \"]\");\n Assert.assertEquals(\"Verify there is at least one (1) unavailable product \", 1, count);\n }", "public int checkIfGiftCardsAreBeingPurchased(Order order) {\r\n Iterator commerceItemIterator = order.getCommerceItems().iterator();\r\n NMCommerceItem tempCommerceItem = null;\r\n \r\n if (getAreAllGiftCardsBlank() && !getOrderContainsGiftCards()) {\r\n return NO_ERRORS;\r\n }\r\n \r\n while (commerceItemIterator.hasNext()) {\r\n tempCommerceItem = (NMCommerceItem) commerceItemIterator.next();\r\n try {\r\n if (((String) ((RepositoryItem) tempCommerceItem.getAuxiliaryData().getProductRef()).getPropertyValue(\"merchandiseType\")).trim().equalsIgnoreCase(GIFT_CARD_MERCH_TYPE)\r\n || ((String) ((RepositoryItem) tempCommerceItem.getAuxiliaryData().getProductRef()).getPropertyValue(\"merchandiseType\")).trim().equalsIgnoreCase(VIRTUAL_GIFT_CARD_MERCH_TYPE)) {\r\n return GIFT_CARD_PURCHASE;\r\n }\r\n } catch (Exception e) {/* if some strange ocurrence happens trying to retrieve the productRef, don't throw errors */}\r\n }\r\n \r\n return NO_ERRORS;\r\n }", "public ConfirmProductInstanceResponse confirmProductInstance(ConfirmProductInstance confirmProductInstance) {\n \t\treturn null;\r\n \t}", "public static WebElement img_clickToExpendPdtCertSection() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='trigger_filter_prodCert']/img\"));\r\n \t\tAdd_Log.info(\"User is click on '+' icon to expend the Product Certificates section.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"'+' icon to expend the Product Certificates section is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n\n public void add_to_cart_with_loginTest() {\n WebElement accountLink = driver.findElement(By.cssSelector(\"div.skip-links > div > a\"));\n accountLink.click();\n\n driver.findElement(By.cssSelector(\"#header-account li.last \")).click();\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\n driver.findElement(By.cssSelector(\"#pass\")).sendKeys(\"11martie11\");\n\n WebElement loginButton = driver.findElement(By.cssSelector(\"#send2\"));\n loginButton.click();\n\n driver.findElement(By.cssSelector(\"#header div.skip-links div div [class=\\\"icon\\\"]\")).click();\n driver.findElement(By.cssSelector(\"#header-cart > div.minicart-wrapper > div.minicart-actions > a\")).click();\n\n driver.findElement(By.cssSelector(\"#empty_cart_button \")).click();\n driver.findElement(By.cssSelector(\"#header div.skip-links > div > div\")).click();\n String message = driver.findElement(By.cssSelector(\"div.page-title\")).getText();\n\n Assert.assertEquals(\"SHOPPING CART IS EMPTY\", message);\n\n Actions action = new Actions(driver);\n action.moveToElement(driver.findElement(By.cssSelector(\"#nav > ol > li.level0.nav-1.first.parent \"))).build().perform();\n\n driver.findElement(By.cssSelector(\"#nav > ol > li.level0.nav-1.first.parent > ul > li.level1.nav-1-4.last > a\")).click();\n\n driver.findElement(By.cssSelector(\"#product-collection-image-424\")).click();\n\n driver.findElement(By.cssSelector(\"#swatch76 > span.swatch-label\")).click();\n\n driver.findElement(By.cssSelector(\"#swatch15 > span.swatch-label > img\")).click();\n\n driver.findElement(By.cssSelector(\"#qty\")).clear();\n driver.findElement(By.cssSelector(\"#qty\")).sendKeys(\"2\");\n\n driver.findElement(By.cssSelector(\"#product_addtocart_form > div.product-shop > div.product-options-bottom > div.add-to-cart > div.add-to-cart-buttons > button > span > span\")).click();\n String number = driver.findElement(By.cssSelector(\"#header span.count\")).getText();\n System.out.println(\"Produse din cos = \" + number);\n Assert.assertEquals(\"2\", number);\n\n }", "public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithOriginalPriceDetailPage();\n }", "private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "@Test\n public void editPicture_NotNull(){\n Bitmap originalImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(originalImage, appContext);\n Bitmap newImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_cart);\n testRecipe.setImage(newImage, appContext);\n assertNotEquals(\"editPicture - New Image Not Null\", null, testRecipe.getImage(appContext));\n }", "@Test\n public void addPicture_ReturnsTrue(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n assertEquals(\"addPicture - Returns True Upon Valid Pic\", true, testRecipe.setImage(image, appContext));\n assertNotEquals(\"addPicture - Not Null Upon Valid Pic\", null, testRecipe.getImage(appContext));\n }", "public void verifyStaticMessageOnMiniCart() {\n String element = \"//*[@id='disclaimerText']\";\n if (UtilityHelper.isNotClickable(org.openqa.selenium.By.xpath(element))) {\n UtilityHelper.waitUntilClickable(org.openqa.selenium.By.xpath(element));\n }\n WebElement staticmessage = getDriver().findElement(org.openqa.selenium.By.xpath(element));\n UtilityHelper.waitUntilClickable(staticmessage);\n Assert.assertEquals(\"Final price and discounts will be determined at pickup.\", staticmessage.getText());\n System.out.println(\"==========Static message is displayed in minicart======== \");\n }", "public static WebElement img_clickToExpendCompCertSection() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='trigger_filter_comCert']/img\"));\r\n \t\tAdd_Log.info(\"User is click on '+' icon to expend the Company Certification section.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"'+' icon to expend the Company Certification section is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void ClickContinueShoppingBtnAddedToCartPage( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tclick(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Continue Shopping button is not clicked in Added to Cart Page.\"+elementProperties.getProperty(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnShoppingCartContinueShopping\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithSpecialPriceDetailPage();\n }", "private void checkProducts() {\n for (JButton prodButton : productButtons) {\n if (inventoryManager.checkProductAvailability(prodButton.getText())) {\n prodButton.setEnabled(true);\n } else {\n prodButton.setEnabled(false);\n }\n }\n }", "@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }", "public void clickDeleteProductandApply()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.wishListItemDeleteButton,Constant.explicitTime);\r\n clickElement(pageFactory.wishListItemDeleteOkButton,Constant.explicitTime);\r\n }", "private void loadCloudImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_cloud, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n getImagesList();\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void validate_ButtonsDisplayAnonymousUser_ShoppingCartPage() {\n Assert.assertTrue(CHECKOUT_AS_GUEST_BUTTON.isDisplayed());\n Assert.assertTrue(LOG_IN_AND_CHECKOUT_BUTTON.isDisplayed());\n }", "public void EditOrderTest() {\n wait.until(ExpectedConditions.visibilityOfElementLocated(editOrderQuantityLocator));\n WebElement editOrderQuantity = driver.findElement(editOrderQuantityLocator);\n editOrderQuantity.click();\n // Click on the checkout button\n By goToCheckOutBtnLocator = By.xpath(\"//div[@class='Basket-bf28b64c20927ec7']//button[contains(@class,'ccl-d0484b0360a2b432')]\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(goToCheckOutBtnLocator));\n WebElement goToCheckOutBtn = driver.findElement(goToCheckOutBtnLocator);\n goToCheckOutBtn.click();\n // Check that the order added to the basket\n By basketSectionSummaryLocator = By.className(\"ccl-9aab795066526b4d ccl-24c197eb36c1c3d3\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(basketSectionSummaryLocator));\n\n }", "@Step\n public void verifyToProductListAreEquals(List<CartProduct> expectedProducts,List<CartProduct> actualProducts ){\n\n for (CartProduct expectedProduct: expectedProducts) {\n CartProduct actualProduct = findProductInList(expectedProduct, actualProducts);\n Assert.assertTrue(\"Prices are not correct\",expectedProduct.getPrice() == actualProduct.getPrice());\n Assert.assertTrue(\"Sizes are not correct\",expectedProduct.getSize() == actualProduct.getSize());\n Assert.assertTrue(\"Names are not correct\",expectedProduct.getName() == actualProduct.getName());\n Assert.assertTrue(\"Colors are not correct\",expectedProduct.getColor() == actualProduct.getColor());\n Assert.assertTrue(\"Qty are not correct\",expectedProduct.getQty() == actualProduct.getQty());\n }\n }", "public boolean hasProduct(ProductBarcode code);", "public void ClickAddtoCartiteminCustomersalsoOrdered(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoOrderedtitle\").split(\",\", 2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Add to Cart button should be clicked in CustomeralsoOrdered table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoOrdered table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void clickQuilllogo(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Staples logo should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"imgQuilllogo\"));\r\n\t\t\twaitForPageToLoad(1000);\r\n\t\t\tclick(locator_split(\"imgQuilllogo\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Staples logo is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- staples logo is not clicked \"+elementProperties.getProperty(\"imgQuilllogo\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgQuilllogo\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "private void checkPage() {\n Assert.assertTrue(\"Electric cars button not displayed.\",electricCars.isDisplayed());\n }", "@Then(\"^product in shown as available\")\n public void clicks_On_Add_Button(){\n }", "public void ClickAddtoCartiteminCustomersalsoViewed(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoViewedtitle\").split(\",\", 2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Add to Cart button should be clicked in CustomeralsoViewed table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoViewed table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void miniCartFulfillmentGroupOrder() {\n List<WebElement> fGroupType1 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-1')]\"));\n List<WebElement> fGroupType2 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-2')]\"));\n List<WebElement> fGroupType8 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-8')]\"));\n\n //CNC ONLY\n if (fGroupType1.size() == 1 && fGroupType2.size() == 0 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [CNC] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n }\n //SPO ONLY\n if (fGroupType2.size() == 1 && fGroupType1.size() == 0 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [SPO] Fulfillment Group Order ===\");\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n }\n //STH ONLY\n if (fGroupType8.size() == 1 && fGroupType1.size() == 0 && fGroupType2.size() == 0) {\n System.out.println(\"=== Attempting [STH] Fulfillment Group Order ===\");\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //CNC & SPO\n if (fGroupType2.size() == 1 && fGroupType1.size() == 1 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [CNC][SPO] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n }\n //CNC & STH\n if (fGroupType8.size() == 1 && fGroupType1.size() == 1 && fGroupType2.size() == 0) {\n System.out.println(\"=== Attempting [CNC][STH] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //SPO & STH\n if (fGroupType2.size() == 1 && fGroupType8.size() == 1 && fGroupType1.size() == 0) {\n System.out.println(\"=== Attempting [SPO][STH] Fulfillment Group Order ===\");\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //CNC & SPO & STH\n if (fGroupType1.size() == 1 && fGroupType2.size() == 1 && fGroupType8.size() == 1) {\n System.out.println(\"=== Attempting [CNC][SPO][STH] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[3]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n }", "public boolean validateBrokersAndNavigatorsPageisDisplayed() {\n\t\tboolean result = false;\n\n\t\tif (Browser.isDisplayed(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\")) {\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public void clickProductDetailsAddToCartBtn(){\n clickElement(productDetailsAddToCart);\n }", "public void compareTwoImages(WebDriver driver, String expectedImageFileName) throws Throwable {\n\t\t\n\t\tBufferedImage expectedImages = ImageIO.read(new File(constantValues.getSavedImagesFolderPath() + \"\\\\\" + expectedImageFileName + \".png\"));\n\t\t\n\t\tRandom randomVal = new Random();\n\t\tboolean comapareReturnValue = Shutterbug.shootPage(driver, ScrollStrategy.WHOLE_PAGE).withName(String.valueOf(randomVal.nextInt(1000))).equals(expectedImages);\n\t\tAssert.assertTrue(comapareReturnValue);\n\t\tlogger.info(\"Both imanges are matching as expected\");\n\t}", "public boolean verifyElementIsClickableOnCheckoutOrderPage(String key){\n\n\t\treturn verifyElementIsClickable(checkoutOrderPropertiesReader.getProperties(key));\n\t}", "@Test\n public void testProductMatchingExceptionThrown() throws Exception {\n service.loadFiles(); \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Reptile\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n boolean correctExceptionThrown = false;\n try {\n service.calculateNewOrderDataInput(newOrder);\n } catch (FlooringValidationException e) {\n correctExceptionThrown = true;\n }\n\n Assert.assertTrue(\"Must Match Products\", correctExceptionThrown);\n\n }" ]
[ "0.74939424", "0.6663336", "0.6644701", "0.65634984", "0.65557885", "0.62045777", "0.61306083", "0.5998328", "0.5835081", "0.57905036", "0.57226866", "0.5644498", "0.5628223", "0.5623271", "0.5599585", "0.5590173", "0.5535719", "0.553438", "0.551006", "0.5501983", "0.5489559", "0.54876775", "0.54709", "0.5445823", "0.54314923", "0.5423138", "0.53965455", "0.5393359", "0.53881216", "0.5383922", "0.5372953", "0.53690314", "0.5363758", "0.5353739", "0.53477204", "0.5333823", "0.5314167", "0.5312855", "0.5303593", "0.52969813", "0.5286188", "0.52572286", "0.52339363", "0.5231395", "0.52193433", "0.52124894", "0.51996046", "0.51931894", "0.51773614", "0.5167505", "0.51597273", "0.51452494", "0.5117259", "0.5094588", "0.50840896", "0.50817066", "0.5072383", "0.50683326", "0.5067167", "0.50644416", "0.506123", "0.5048278", "0.50471646", "0.50446725", "0.5038476", "0.5037678", "0.50249606", "0.5023081", "0.50222635", "0.50216144", "0.5019409", "0.50188273", "0.5011352", "0.5011267", "0.4990111", "0.49842185", "0.49741286", "0.49649665", "0.49348995", "0.49208948", "0.4908053", "0.4907651", "0.48945263", "0.4890909", "0.4890238", "0.48870105", "0.48837945", "0.4883792", "0.48798466", "0.48788905", "0.48768982", "0.48738018", "0.4873341", "0.48727593", "0.48717105", "0.4866263", "0.4861301", "0.48603666", "0.4859669", "0.4857263" ]
0.7821644
0
This method verifies the order details text containers on Order confirmation page
public boolean VerifyOrderDetails_OrderConfirmation(){ boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PAYMENTCONFIRMATION_LABEL).isDisplayed(); if(flag){extentLogs.passWithCustom("VerifyOrderDetails", "PAYMENTCONFIRMATION_LABEL"); flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERNUMBER_LABEL).isDisplayed(); if(flag){ extentLogs.passWithCustom("VerifyOrderDetails", "OrderNumberLabelIsDisplayed"); }else{extentLogs.fail("VerifyOrderDetails", "OrderNumberLabelIsNotDisplayed");} }else{extentLogs.fail("VerifyOrderDetails", "PAYMENTCONFIRMATION_LABEL");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean VerifyOrderConfirmation_ProductDetails() {\n\t\tboolean flag = false;\n\t\t\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyProductDetails\", \"ProductDetailsareIsDisplayed\");\n\t }else{extentLogs.fail(\"VerifyProductDetails\", \"ProductDetailsareNotDisplayed\");}\n\t\t\n\t\treturn flag;\n\t}", "@Test\n public void testDAM32001002() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3PageListPage orderMB3PageListPage = dam3IndexPage\n .dam32001002Click();\n\n orderMB3PageListPage.checkITM0000001();\n\n orderMB3PageListPage = orderMB3PageListPage.clickItemCodeSearch();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001\\nITM0000002, Orange juice\\nNotePC, CTG0000001\\nCTG0000002, Drink\\nPC, dummy7\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3PageListPage.getOrderDetails(7);\n\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3PageListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }", "public void VerifyCustomeralsoOrderedtitle(String Exptext){\r\n\t\tString[] ExpText = getValue(Exptext).split(\",\", 2);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Title with \"+ExpText[1]+\" should be present in SKU Page\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtCustomeralsoOrdered\"), ExpText[1], Integer.valueOf(ExpText[0]))){\r\n\t\t\t\tSystem.out.println(ExpText[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpText[1]+\" is present in SKU Page\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpText[1]+\" and Actual Text : \"+getText(locator_split(\"txtCustomeralsoOrdered\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "public void EditOrderTest() {\n wait.until(ExpectedConditions.visibilityOfElementLocated(editOrderQuantityLocator));\n WebElement editOrderQuantity = driver.findElement(editOrderQuantityLocator);\n editOrderQuantity.click();\n // Click on the checkout button\n By goToCheckOutBtnLocator = By.xpath(\"//div[@class='Basket-bf28b64c20927ec7']//button[contains(@class,'ccl-d0484b0360a2b432')]\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(goToCheckOutBtnLocator));\n WebElement goToCheckOutBtn = driver.findElement(goToCheckOutBtnLocator);\n goToCheckOutBtn.click();\n // Check that the order added to the basket\n By basketSectionSummaryLocator = By.className(\"ccl-9aab795066526b4d ccl-24c197eb36c1c3d3\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(basketSectionSummaryLocator));\n\n }", "public boolean VerifyProductDisplayed_OrderConfirmation() {\n\t\t\n\t\tboolean flag = false;\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.pass(\"VerifyProductImageDisplayedInConfirmationPage\", \"Displayed\");\n\t\t}else{extentLogs.fail(\"VerifyProductImageDisplayedInConfirmationPage\", \"NotDisplayed\");\t\t}\n\treturn flag;\n\t\t}", "public boolean VerifyOrderConfirmation_ThankYouMessage() {\n\t\tboolean flag = false;\n\t\t\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyOrderDetails\", \"OrderConfirmationIsDisplayed\");\n\t }else{extentLogs.fail(\"VerifyOrderDetails\", \"OrderNumberLabelIsNotDisplayed\");}\n\t\t\n\t\treturn flag;\n\t}", "public void verifyOrderRecape(String orderrecape1){\r\n\r\n\t\tString order = getValue(orderrecape1);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- orderrecape page should be displayed\");\r\n\t\ttry{\r\n\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"orderrecape\"),order)) { \r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- orderrecape page is Displayed\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- orderrecape is not displayed \"+elementProperties.getProperty(\"orderrecape\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \" + elementProperties.getProperty(\"orderrecape\").toString().replace(\"By.\", \" \") + \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "@Test\n public void testDAM32001001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n // This call brings te order details from various tables into single entity using join\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32001001Click();\n\n // Expected order details\n // the string is of the format\n // ORDER STATUS NAME, ITEM CODE, ITEM NAME, CATEGORY CODE, CATEGORY NAME, MEMO\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n // confirmation for some more order details....\n\n expectedOrdeDetails = \"Stock checking, ITM0000002, NotePC, CTG0000002, PC, \";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(2);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Item Shipped, ITM0000003, Car, CTG0000003, Hot selling, dummy3\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(3);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }", "@Override\n\tpublic void sendOrderConfirmationHtmlEmail(Order order) {\n\t\t\n\t}", "public void VerifyCustomeralsoViewedTitle(String Exptext){\r\n\t\tString[] ExpText = getValue(Exptext).split(\",\", 2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Title with \"+ExpText+\" should be present in SKU Page\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtCustomeralsoOrdered\"), ExpText[1], Integer.valueOf(ExpText[0]))){\r\n\t\t\t\tSystem.out.println(ExpText[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpText[1]+\" is present in SKU Page\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpText[1]+\" and Actual Text : \"+getText(locator_split(\"txtCustomeralsoOrdered\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"), \"Order Details Button\");\t\n\t}", "public boolean VerifyOrderConfirmation_MyStoreSection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyMyStoreSection\", \"MyStoreSectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyMyStoreSection\", \"MyStoreSectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "private void assertDetailScreenContents(String description, String buttonText, String footerText) {\n ViewInteraction imageView3 = onView(\n allOf(withId(R.id.promotion_detail_image), withContentDescription(\"Promotional Image\"), isDisplayed()));\n imageView3.check(matches(isDisplayed()));\n\n // Check promotion description contents\n ViewInteraction textView3 = onView(\n allOf(withId(R.id.promotion_detail), withText(description), isDisplayed()));\n textView3.check(matches(withText(description)));\n\n // Check button name.\n ViewInteraction button = onView(\n allOf(withId(R.id.promotion_button), withText(buttonText), isDisplayed()));\n button.check(matches(isDisplayed()));\n\n // Check footer contents or lack of presence if there isn't one.\n if(footerText == null) {\n onView(withId(R.id.promotion_footer)).check(matches(not(isDisplayed())));\n } else {\n ViewInteraction textView4 = onView(\n allOf(withId(R.id.promotion_footer), withText(footerText), isDisplayed()));\n textView4.check(matches(withText(footerText)));\n }\n\n }", "public void verifyAuDisclaimerReservationPage() {\n\t\treadFile.readDataFromExcel();\n\t\tString expecteddiscText = (String) readFile.data[23][21];\n\t\tlogger.info(expecteddiscText);\n\t\tutil.scrollTo(\"Disclaimers\");\n\t\tutil.click(reservationDetailPage_DisclaimerHeader);\n\t\tDriverWait.waitById(\"com.ihg.apps.android:id/disclaimers_content\");\n\t\tutil.singleScroll();\n\t\tString disclaimerContent = reservationDetailPage_DisclaimerMsg.getAttribute(\"text\");\n\t\tlogger.info(disclaimerContent);\n\t\tString[] contentSplit = disclaimerContent.split(\"Check with hotel for details.\");\n\t\tString actualDiscText = contentSplit[1].trim();\n\t\tlogger.info(actualDiscText);\n\t\tAssert.assertEquals(expecteddiscText, actualDiscText);\n\t}", "@Test\n public void testDAM32101001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32101001Click();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n orderMB3ListPage.setItemCode(\"ITM0000001\");\n\n orderMB3ListPage = orderMB3ListPage.fetchRelatedEntity();\n\n // Expected related entity category details\n String expRelatedEntityDet = \"CTG0000001, Drink\";\n\n String actRelatedEntityDet = orderMB3ListPage\n .getRelatedEntityCategoryDeatils(1);\n\n // confirmed realted entity details\n assertThat(actRelatedEntityDet, is(expRelatedEntityDet));\n\n }", "public void VerifyCheckoutTermsandCondition(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Terms and Condition should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutTermstitle\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Terms and Condition in Billing is present \"+getText(locator_split(\"txtCheckoutTermstitle\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Terms and Condition in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Terms and Condition is present\");\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Terms and Condition in Billing is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutTermstitle\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "private void showOrderDetails(Order order) {\n\t\tString status, shownOption;\n\n\t\tif (order.getStatus()) {\n\t\t\tstatus = new String();\n\t\t\tstatus = \"Processed\";\n\n\t\t\tshownOption = new String();\n\t\t\tshownOption = \"Return\";\n\t\t}\n\t\telse {\n\t\t\tstatus = new String();\n\t\t\tshownOption = new String();\n\n\t\t\tstatus = \"Pending\";\n\t\t\tshownOption = \"Set Processed\";\n\t\t}\n\n\t\tString orderDetailsMessage = \"ORDER DATE : \" + order.getDate();\n\t\torderDetailsMessage += \"\\nSTATUS: \" + status;\n\t\torderDetailsMessage += \"\\nITEMS: \";\n\t\tfor (StockItem stockItem : order.getOrderEntryList()) {\n\t\t\torderDetailsMessage += \"\\n \" + stockItem.getQuantity() + \" \\t x \\t \"\n\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \\t\\t\\t Subtotal: \\t\\u20ac\"\n\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity());\n\t\t}\n\n\t\torderDetailsMessage += \"\\n\\nCUSTOMER ID: \" + order.getPerson().getId()\n\t\t\t\t+ \"\\nPersonal Details: \";\n\t\torderDetailsMessage += \"\\n Name: \\t\" + order.getPerson().getName();\n\t\torderDetailsMessage += \"\\n Phone: \\t\" + order.getPerson().getContactNumber();\n\t\torderDetailsMessage += \"\\n Address: \\t\" + order.getPerson().getAddress();\n\t\torderDetailsMessage += \"\\n\\nThe total order value is \\t\\u20ac\"\n\t\t\t\t+ order.getGrandTotalOfOrder() + \"\\n\";\n\n\t\tObject[] options = { \"OK\", shownOption };\n\t\tint n = JOptionPane.showOptionDialog(null, orderDetailsMessage, \"ORDER ID: \"\n\t\t\t\t+ (order.getId()) + \" STAFF ID: \" + order.getCurrentlyLoggedInStaff().getId()\n\t\t\t\t+ \" STATUS : \" + status /* order.isStatus() */, JOptionPane.YES_NO_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\tif (n == 1) {\n\t\t\torder.setStatus(true);\n\t\t}\n\t}", "@Test\n\tpublic void verifyAdIdPriceTMVVisitsEmailsAndStatusDetailsAreDisplaying() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986865\"),\n\t\t\t\t \"Expected Ad id is not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 1st ad in All stock page\");break;\n\t\t\t\t \n\t\t\tcase 1: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986861\"),\n\t\t\t\t \"Expected Ad id is not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 2nd ad in All stock page\");\n\t\t\t}*/\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsAdIds.get(i)),\n\t\t\t\t\t \"Expected Ad id is not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t \t\t\"Given currency & price are not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t \t\t\"Tradus market value is not displaying as no price rating for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsVisits.get(i)),\n\t\t \t\t\"Visits are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t \t\t\"Emails are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsStatus.get(i)),\n\t\t \t\t\"Status is not displaying as active on tradus for \"+i+ \" ad in All stock page\");\n\t\t}\n\t}", "public void verifyToCart() {\n if (priceText.getText().equalsIgnoreCase(\"$0.00\")) {\n Assert.fail();\n System.out.println(\"No products have been added to your cart.\");\n\n\n } else\n System.out.println(\"\\n\" +\n \"The product has been successfully added to the Cart.\" + \"\\n\" + \"Total Price: \" + priceText.getText());\n\n }", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void VerifyViewCartandPrintinCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- View Cart and Print Cart should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkViewPrintCart\"));\r\n\t\t\tif(ele.size()==2){\r\n\t\t\t\tSystem.out.println(\"View Cart -\"+ele.get(1).getText()+\" and print Cart -\"+ele.get(0).getText()+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- View Cart \"+ele.get(1).getText()+\" and print Cart \"+ele.get(0).getText()+\" is present\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"View cart or Print or both is not present\");\r\n\t\t\t}\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View cart or Print or both is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkViewPrintCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void VerifyCheckoutTotalPrice(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Total Price should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutOrdertotal\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Total Price in Billing is present \"+getText(locator_split(\"txtCheckoutOrdertotal\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Total Price in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Total Price title is present\");\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Total Price title is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutOrdertotal\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}", "public void VerifyCartCheckout_Coupon_OrderSumamrysections(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- cartcheckout, coupon and Order summary should be present in checkout page\");\r\n\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"boxCheckoutCartCheckout\")) & isElementPresent(locator_split(\"boxCheckoutCoupon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"boxCheckoutOrderSummary\"))){\r\n\t\t\t\tSystem.out.println(\"cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCartCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCoupon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutOrderSummary\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "public void VerifyShoppingCartPreview(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Shopping Cart Preview should be displayed \"+Text);\r\n\r\n\t\tif(getText(locator_split(\"txtShoppingCartPreview\")).equalsIgnoreCase(Text)){\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Shopping Cart Preview is displayed and it has Text -\"+Text);\r\n\t\t\tSystem.out.println(\"Verified the text -\"+Text);\r\n\t\t}else {\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Shopping Cart Preview is not displayed and it dosent contain Text -\"+Text);\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtShoppingCartPreview\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}", "public void VerifyBillingTabPaymentDetails(String payment0, String payment1, String payment2, String payment3){\r\n\t\tString[] Payment = {getValue(payment0),getValue(payment1),getValue(payment2),getValue(payment3)};\r\n\t\tString Payments=\"\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Payment Methods should be present in Checkout Page\");\r\n\r\n\t\ttry{\r\n\t\t\tsleep(8000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtCheckoutPaymentMethods\"));\r\n\r\n\t\t\tfor(int i=0; i<ele.size(); i++){\r\n\t\t\t\tif(getText(ele.get(i)).contains(Payment[i])){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" payment option is present\");\r\n\t\t\t\t\tPayments=Payments.concat(getText(ele.get(i))).concat(\", \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"one or more Payment options are not present\");\r\n\t\t\t\t\tthrow new Error(\"one or more Payment options are not present\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- All the payment options\"+Payments+\" are present\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutPaymentMethods\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- one or more Payment options are not present\");\r\n\r\n\t\t}\r\n\t}", "@Test\n public void testDAM32102002() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32102002Click();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n orderMB3ListPage.setItemCode(\"ITM0000001\");\n\n orderMB3ListPage = orderMB3ListPage.fetchRelatedEntityLazy();\n\n // Expected related entity category details\n String expRelatedEntityDet = \"CTG0000001, Drink\";\n\n String actRelatedEntityDet = orderMB3ListPage\n .getRelatedEntityCategoryDeatils(1);\n\n // confirmed realted entity details\n assertThat(actRelatedEntityDet, is(expRelatedEntityDet));\n }", "public boolean VerifyOrderConfirmation_UponDeliverySection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyUponDeliverySection\", \"UponDeliverySectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "public String checkOrder(ArrayList<ArrayList<Furniture>> orders, boolean gui){\n ArrayList<ArrayList<Furniture>> last = new ArrayList<ArrayList<Furniture>>();\n // if the amount requested is larger than the amount of valid orders found then the request fails\n if(getRequestNum() > orders.size()){\n return printOutputFail(gui);\n }else{\n for(int i = 0; i < getRequestNum(); i++){\n last.add(orders.get(i));\n }\n deleteOrders(last);\n return printOutput(last, gui);\n }\n }", "public void VerifyDetailsin_Cart_inCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Image, ItemDesc, ItemNum, Price, Quantity, Inc/Exec tax, Remove and change in Cart in Checkout\");\r\n\r\n\t\ttry{\r\n\t\t\tString image= getPropertyValue(locator_split(\"imgCartinCheckout\"), \"src\");\r\n\t\t\tString ItemDesc = getText(locator_split(\"txtItemDescCartinCheckout\"));\r\n\t\t\tString ItemNum = getText(locator_split(\"txtitemNumCartinCheckout\"));\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkRemChanCartinCheckout\"));\r\n\t\t\tString Remove = getText(ele.get(0));\r\n\t\t\tString change = getText(ele.get(1));\r\n\t\t\tString Price = getText(locator_split(\"txtpriceCartinCheckout\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtIncExctaxinCartinCheckout\"));\r\n\t\t\tString Tax= getText(ele1.get(0));\r\n\t\t\tString Quantity = getText(locator_split(\"txtQuantityCartinCheckout\"));\r\n\t\t\tString UnitofMeasure= getText(locator_split(\"txtUnitofmeasureCartinCheckout\"));\r\n\t\t\tSystem.out.println(\"Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkRemChanCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtIncExctaxinCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void verifyBillingWithDeliveryAddress(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Both Billing and Delivery address should be same\");\r\n\t\ttry{\r\n\t\t\tString BillingAddress = driver.findElement(locator_split(\"txtBillingAddress\")).getText().toString();\r\n\t\t\tclick(locator_split(\"btnDeliverytab\"));\r\n\t\t\tString DeliveryAddress = driver.findElement(locator_split(\"txtDeliveryAddress\")).getText().toString();\r\n\t\t\tif(BillingAddress.equals(DeliveryAddress)){\r\n\t\t\t\tSystem.out.println(\"Both Billing and Delivery address are same\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Both Billing and Delivery address are same\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Billing and Delivery address are not same\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element \"+elementProperties.getProperty(\"txtBillingAddress\")+\" \"+elementProperties.getProperty(\"txtDeliveryAddress\")+\" \"+elementProperties.getProperty(\"btnDeliverytab\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtAddtoCartPage\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "private AlertDialog showOrderDetails(int pos) {\n AlertDialog.Builder diabuilder = new AlertDialog.Builder(this);\n diabuilder .setTitle(R.string.alertOrderTitle)\n .setMessage(helpInfo[pos])\n .setPositiveButton(R.string.btnOK, this)\n .setIcon(R.drawable.cart);\n diabuilder.create();\n return diabuilder.show();\n }", "public void VerifyDeliveryLinkPopup(String title){\r\n\t\tString Title = getValue(title);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Pop up should come when delivery link is clicked in order summary\");\r\n\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"lnkDeliverylinkinOrderSummary\"));\r\n\t\t\tHashMap<String, String> windowids=getWindowID();\r\n\t\t\tdriver.switchTo().window(windowids.get(\"childID\"));\r\n\t\t\tverifyPage(Title);\r\n\t\t\tcloseBrowser();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ship to Store image is not present for country -\"+countries.get(countrycount));\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "private void checkManualPlaceDetails() {\n // now in DetailActivity, check the name and address are correct\n onView(withId(R.id.et_name)).check(matches(withText(PLACE_NAME)));\n onView(withId(R.id.et_address)).check(matches(withText(PLACE_ADDRESS)));\n\n checkManualVisit();\n\n // scroll to notes EditText\n onView(withId(R.id.et_notes))\n .perform(scrollTo());\n onView(withId(R.id.et_notes)).check(matches(isDisplayed()));\n // check notes displays correct text\n onView(withId(R.id.et_notes)).check(matches(withText(NOTES)));\n\n // go back\n Espresso.pressBack();\n }", "public void VerifyShoppingCartPreviewVatText(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Shopping Cart Preview should be displayed \"+Text);\r\n\t\tmousehover(locator_split(\"btnCheckout\"));\r\n\t\tif(getText(locator_split(\"txtShoppingCartPreviewVat\")).equalsIgnoreCase(Text)){\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Shopping Cart Preview is displayed and it has Text -\"+Text);\r\n\t\t\tSystem.out.println(\"Verified the text -\"+Text);\r\n\t\t}else {\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Shopping Cart Preview is not displayed and it dosent contain Text -\"+Text);\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtShoppingCartPreviewVat\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public InboxPage verifyUiElements(boolean checkChangedDob) {\n\t\tList<WebElement> ele = driver.findElements(By.tagName(\"a\"));\n\t\tfor (WebElement webElement : ele) {\n\t\t\tSystem.out.println(webElement.getText());\n\t\t}\n\n\t\t// Get the xpath of the firstName\n\t\tList<WebElement> ele1 = driver.findElements(By.xpath(\"//section[1]\"));\n\t\tfor (WebElement webElement : ele1) {\n\t\t\tList<WebElement> pTagElements = webElement.findElements(By\n\t\t\t\t\t.tagName(\"p\"));\n\t\t\tfor (int i = 0; i < pTagElements.size(); i++) {\n\t\t\t\tList<WebElement> spanElements = pTagElements.get(i)\n\t\t\t\t\t\t.findElements(By.tagName(\"span\"));\n\t\t\t\tfor (int j = 0; j < spanElements.size(); j++) {\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMEFIRSTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMENAMEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTNAME)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.ABOUTMELASTVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.LANGUAGE)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.LANGUAGEVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText()\n\t\t\t\t\t\t\t.equals(Constant.COUNTRYREGION)) {\n\n\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t.equals(Constant.COUNTRYVALUE));\n\t\t\t\t\t}\n\t\t\t\t\tif (spanElements.get(j).getText().equals(Constant.DOB)) {\n\t\t\t\t\t\tif (checkChangedDob) {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBCHANGEDVALUE));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tassert (spanElements.get(j + 1).getText()\n\t\t\t\t\t\t\t\t\t.equals(Constant.DOBVALUE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}", "private void fireOrderValidityCheck() {\n ordersDatabaseReference.child(eventUid).child(order.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists() && (dataSnapshot.getValue() != null)) {\n order = dataSnapshot.getValue(Order.class);\n\n // We check if by the time the user finished entering his details the order has become invalid\n // If so, we send him back to main activity\n if (order.getStatusAsEnum() == DataUtils.OrderStatus.CANCELLED) {\n progressDialog.dismiss();\n onOrderExpired();\n }\n // Otherwise continue the order process\n else {\n fireCreditCardTokenCreation();\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {}\n });\n }", "public void validateAllocationdetails(int strOrderLines, String strTempLoc) throws InterruptedException{\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"AllCheckBox\"), \"Select Wave\");\n\t\tThread.sleep(4000);\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnMore\"), \"More Button\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnAllocationDetails\"), \"Allocation Details Option\");\n\t\tThread.sleep(4000);\n\t\tfor(int intLoop=1;intLoop<=strOrderLines;intLoop++)\n\t\t{\n\t\t\tString actualTempLoc = libManhattanCommonFunctions.getElementByProperty(\"//*[@id='dataForm:listView:dataTable:\"+intLoop+\":c003']\", \"XPATH\").getText();\n\t\t\tif(actualTempLoc.trim().contains(strTempLoc))\n\t\t\t\t\t{\n\t\t\t\treport.updateTestLog(\"Allocation Details verification\", \"Expected Temp Location for item line\"+intLoop+\":\"+strTempLoc+\"|| Actual Temp Location for item line\"+intLoop+\":\"+actualTempLoc, Status.PASS);\n\t\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\treport.updateTestLog(\"Allocation Details verification\", \"Expected Temp Location for item line\"+intLoop+\":\"+strTempLoc+\"|| Actual Temp Location for item line\"+intLoop+\":\"+actualTempLoc, Status.FAIL);\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void verifylistcreated(String orderrecape1){\r\n\r\n\t\tString order = getValue(orderrecape1);\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Created List should be dispalyed\");\r\n\t\ttry{\r\n\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"verifycurrentlist\"),order)) { \r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Created List is Displayed\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- orderrecape is not displayed \"+elementProperties.getProperty(\"verifycurrentlist\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \" + elementProperties.getProperty(\"verifycurrentlist\").toString().replace(\"By.\", \" \") + \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@When(\"^User should see Review Confirmation Message$\")\n\tpublic void user_should_see_Review_Confirmation_Message() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getreviewconfirmmsg(), 70);\n\t\treviewConfirmationPageObjects.verifyreviewconfirmation();\n\t}", "public void verifyStaticMessageOnMiniCart() {\n String element = \"//*[@id='disclaimerText']\";\n if (UtilityHelper.isNotClickable(org.openqa.selenium.By.xpath(element))) {\n UtilityHelper.waitUntilClickable(org.openqa.selenium.By.xpath(element));\n }\n WebElement staticmessage = getDriver().findElement(org.openqa.selenium.By.xpath(element));\n UtilityHelper.waitUntilClickable(staticmessage);\n Assert.assertEquals(\"Final price and discounts will be determined at pickup.\", staticmessage.getText());\n System.out.println(\"==========Static message is displayed in minicart======== \");\n }", "@Test\n\tpublic void verifyEditDeleteAndPromoteOptionsAreDisplayingForPublishedAds() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\t/*Assert.assertEquals(AllStockPage.PostedAds.size(), 2, \n\t\t\t\t\"No of ads found is not showing as 2 ads\");*/\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\tswitch(i) {\n\t\t\tcase 0: Assert.assertTrue(verifyElementPresent(AllStockPage.EditOptionOnPostedAds.get(i)),\n\t\t\t\t \"Edit option is not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.DeleteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Delete option is not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PromoteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Promote option is not displaying for 1st ad in all stock page\");break;\n\t\t\tcase 1: Assert.assertTrue(verifyElementPresent(AllStockPage.EditOptionOnPostedAds.get(i)),\n\t\t\t\t \"Edit option is not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.DeleteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Delete option is not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PromoteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Promote option is not displaying for 2nd ad in all stock page\");\n\t\t\t}\n\t\t\t}\n\t}", "public void verifyNzDisclaimerReservationPage() {\n\t\treadFile.readDataFromExcel();\n\t\tString expecteddiscText = (String) readFile.data[24][21];\n\t\tlogger.info(expecteddiscText);\n\t\tutil.scrollTo(\"Disclaimers\");\n\t\tutil.click(reservationDetailPage_DisclaimerHeader);\n\t\tDriverWait.waitById(\"com.ihg.apps.android:id/disclaimers_content\");\n\t\tutil.singleScroll();\n\t\tString disclaimerContent = reservationDetailPage_DisclaimerMsg.getAttribute(\"text\");\n\t\tlogger.info(disclaimerContent);\n\t\tString[] contentSplit = disclaimerContent.split(\"Check with hotel for details.\");\n\t\tString actualDiscText = contentSplit[1].trim();\n\t\tlogger.info(actualDiscText);\n\t\tAssert.assertEquals(expecteddiscText, actualDiscText);\n\t}", "public boolean verifyCartItem()\n\t{ if (einKaufswagenBtn.isDisplayed())\n\t{\n\t\teinKaufswagenBtn.click();\n\t}\n\tfor (int j=0;j<collectnToStorePrdktIdLst.size();j++)\n\t{\n\t\tString expectedProduct1=collectnToStorePrdktIdLst.get(j);\n\t\tList<WebElement> fndProduct=driver.findElements(By.xpath(\"//form[@id='activeCartViewForm']//div[@class='a-section a-spacing-mini sc-list-body sc-java-remote-feature']//div[@class='a-row sc-list-item sc-list-item-border sc-java-remote-feature']\"));\n\t\tfor (int e=0;e<=fndProduct.size();e++)\n\t\t{\n\t\t\tString actProdkt=fndProduct.get(e).getAttribute(\"data-asin\");\n\t\t\tif (actProdkt.contains(expectedProduct1))\n\t\t\t{\n\t\t\t\tcnt++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (cnt==2)\n\t{\n\t\treturn true;\n\t}\n\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "private static double checkOrder() {\n double total = 0;\n System.out.println();\n System.out.println(\"Your total order : \");\n System.out.println();\n System.out.printf(\"%2s. %-40s %3s %8s%n\", \"No\", \"Title\", \"Qty\", \"Price\");\n for (int i = 0, j = 1; i < menuItems.length; i++) {\n if (menuOrder[i] == 0) continue;\n double price = menuOrder[i] * menuPrices[i];\n total += price;\n System.out.printf(\"%2d. %-40s %3d %8.2f Baht%n\", j, menuItems[i], menuOrder[i], price);\n j++;\n }\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Total\", total);\n return total;\n }", "public void Case35(){\n System.out.println(\"Testing Case 35\");\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n MobileElement summaryMenu = (MobileElement) driver.findElementByAccessibilityId(\"Show action\");\n summaryMenu.click();\n MobileElement previewBtn = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_preview_btn\");\n previewBtn.click();\n MobileElement previewDataWithoutOrder = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_print_data\");\n String previewDataWithoutOrderText = previewDataWithoutOrder.getText();\n System.out.println(\"Summary Data without order: \\n\"+previewDataWithoutOrderText);\n MobileElement closeBtn = (MobileElement) driver.findElementById(\"android:id/button1\");\n closeBtn.click();\n driver.navigate().back();\n actualOrderPC();\n summaryMenu.click();\n previewBtn.click();\n MobileElement previewDataWithOrder = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_print_data\");\n String previewDataWithOrderText = previewDataWithOrder.getText();\n System.out.println(\"Summary Data with order: \\n\"+previewDataWithOrderText);\n closeBtn.click();\n driver.navigate().back();\n clear();\n System.out.println(\"Case 35 done\");\n }", "private void showVerification(View v){\n Button addBtn, closeBtn;\n final EditText tableField;\n\n verificationDialog.setContentView(R.layout.verify_order);\n\n addBtn = verificationDialog.findViewById(R.id.send_btn);\n closeBtn = verificationDialog.findViewById(R.id.close_btn);\n tableField = verificationDialog.findViewById(R.id.tableField);\n tableField.setText(String.valueOf(tableID));\n\n //listener when user sends an order\n addBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n //if field is not empty keeps the id from the input\n if(!tableField.getText().toString().isEmpty())\n tableID = Integer.parseInt(tableField.getText().toString());\n\n if(tableID == 0)\n tableID = Integer.parseInt(tableField.getText().toString());\n\n OrderDatabase orderDatabase = new OrderDatabase(order.getOrdered(), String.valueOf(tableID));\n\n //save the order to the database if table is not 0\n if(tableID != 0){\n if(order.getOrdered().size() != 0){\n orderRef.child(storeID)\n .push()\n .setValue(orderDatabase)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n updateTableStatus(tableID);\n Toast.makeText(getContext(), \"Order successfully sent!\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(getContext(), \"Order can't be sent!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n verificationDialog.dismiss();\n }\n else\n Toast.makeText(getContext(), \"Can't send empty order\", Toast.LENGTH_SHORT).show();\n }\n else\n Toast.makeText(getContext(), \"Select a table!\", Toast.LENGTH_SHORT).show();\n\n clearOrderView();\n }\n });\n\n closeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n verificationDialog.dismiss();\n }\n });\n\n verificationDialog.show();\n }", "public static boolean verifyOrderSummaryEmail(String xpath, List<Param> params) throws Exception {\n boolean flag = false;\n try {\n\t\t\t\t\tThread.sleep(40000);\n\t\t\t\t\t String orderSummery = GmailUtility.getOrderHistoryEmailDetails(params.get(0).getValue(), params.get(1).getValue());\n\t\t\t\t\t //String orderSummery = GmailUtility.getOrderHistoryEmailDetails(\"[email protected]\", \"Orange@5\");\n\t\t\t\t\t //if (orderSummery.contains(\"3473\") && orderSummery.contains(\"raj kumar\"))\n\t\t\t\t\t \n\t\t\t\t\t System.out.println(\"Date in Email:\" + catchingInfo.get(\"Date\") + \":OrderID in Email:\" + catchingInfo.get(\"OrderId\"));\n\t\t\t\t\t if (orderSummery.contains(catchingInfo.get(\"Date\")) && orderSummery.contains(catchingInfo.get(\"OrderId\")))\n\t\t\t\t\t flag = true;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tSystem.out.println(\"Exception was raised in verifyOrderSummaryEmail method and the exception is :\"+e);\n\t\t\t\t\tflag=false;\n\t\t\t\t}\n return flag;\n }", "@Override\n public void sure(OrderDetail orderDetail) {\n }", "void showOrdersText();", "@When(\"je verifie les informations et clique sur Submit Order\")\n\tpublic void je_verifie_les_informations_et_clique_sur_Submit_Order() {\n\t throw new PendingException();\n\t}", "public void VerifyCheckoutcollapsedheaders(String edittext){\r\n\t\tString EditText = getValue(edittext);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Contact info and Delivery address should be in Collpased mode\");\r\n\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtcheckoutHeader\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtCheckoutEdit\"));\r\n\r\n\t\t\tfor(int i=0; i<ele1.size(); i++){\r\n\t\t\t\tif(getText(ele1.get(i)).contains(EditText)){\r\n\t\t\t\t\tSystem.out.println(getText(ele.get(i))+\" is in collapsed mode\");\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Contact info and Delivery address are not collapsed or given text in data sheet is incorrect\");\r\n\t\t\t\t\tthrow new Error(\"Contact info and Delivery address are not collapsed or given text in data sheet is incorrect\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Contact info and Delivery address are in Collpased mode\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutHeader\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutEdit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Contact info and Delivery address are not collapsed or given text in data sheet is incorrect\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Log.d(TAG, \"showMessageBox: order field check \" + msg);\n\n return;\n }", "public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }", "@Then(\"Order is placed successfully confirmed by screenshot\")\r\n public void successfulOrder() throws InterruptedException {\n ProductPage prodPage = new ProductPage(driver);\r\n prodPage.goToCartAfterProductAdding();\r\n //Finishing an order form cart\r\n CartAndOrderProcess cartAndOrderProcess = new CartAndOrderProcess(driver);\r\n cartAndOrderProcess.proceedToChekout();\r\n cartAndOrderProcess.addressContinue();\r\n cartAndOrderProcess.shippingContinue();\r\n cartAndOrderProcess.payByCheckAndOrder();\r\n // Taking screenshot of successfully placed order\r\n // Also checking order history to make sure that amount is the same in order history\r\n cartAndOrderProcess.takeScreenshot(driver);\r\n cartAndOrderProcess.checkOfTotalCostAndPaymentStatus();\r\n }", "@Test(priority = 5)\n\tpublic void validateContents() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the content of the product\");\n\t\tHeroImageProductPageFlow.clickHeroImage(locator);\n\t\theroImg.validateDescriptionContent(locator, validate);\n\t\t;\n\t\tlog.info(\"Content validation is correct\");\n\t\tHeroImageProductPageFlow.clickProductSpecification(locator);\n\t\theroImg.validateSpecificationContent(locator, validate);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}", "@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}", "public synchronized void verifyAddToWishlistMsg(WebDriver driver) throws Exception {\n\n\t\ttry {\n\n\t\t\tString elemText = utils.findElementByLocator(driver, \"WishList_Added_Msg\",\n\t\t\t\t\t\"ADDED text not displayed after clicking on Add To Wishlist\").getText();\n\t\t\tAssert.assertEquals(elemText, \"ADDED\");\n\t\t} catch (Exception e) {\n\n\t\t\tCustomException.throwExceptionError(e, \"PDP\", \"Add To WishList Modal not displayed\", driver);\n\t\t}\n\t}", "@Test\n\tpublic void verifyPostedAdWithImageTitleCategoryTypeSubTypeCurrencyAndPriceAreDisplayingBelowMyStockText() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\t/*Assert.assertEquals(getText(AllStockPage.CountOfAllCategoryAds), \"2 results for all categories\", \n\t\t\t\t\"No of ads found is not showing as 2 ads\");*/\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(AllStockPage.PostedAdsImages.get(i).getAttribute(\"src\").equals(\"https://images.tradus.com/v1/bc71cea3-14fa-44d3-b115-8941000caa91.jpg\"),\n\t\t\t\t \"Uploaded image is not displaying for 1st ad in All stock page\");\n\t\t\t Assert.assertTrue(getText(AllStockPage.PostedAdsTitles.get(i)).equals(\"Dionex 32\"),\n\t\t\t\t\t\"Given Title is not displaying for 1st ad in All stock page\");\n\t\t\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCategoryTypeAndSubType.get(i)).equals(\"Spare parts / Other spare parts and tools / Tools\"),\n\t\t\t\t \"Given category, Type & Sub type are not displaying for 1st ad in All stock page\");\n\t\t\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");break;\n\t\t\tcase 1: Assert.assertTrue(AllStockPage.PostedAdsImages.get(i).getAttribute(\"src\").equals(\"https://images.tradus.com/v1/65487bf4-7650-4c26-b3bb-8d87d0c154bd.jpg\"),\n\t\t\t\t\t\"Uploaded image is not displaying for 2nd ad in All stock page\");\n\t\t\t Assert.assertTrue(getText(AllStockPage.PostedAdsTitles.get(i)).equals(\"MAN\"),\n\t\t\t\t\t\t\"Given Title is not displaying for 2nd ad in All stock page\");\n\t\t\t Assert.assertTrue(getText(AllStockPage.PostedAdsCategoryTypeAndSubType.get(i)).equals(\"Spare parts / Engines\"),\n\t\t\t\t\t \"Given category, Type & Sub type are not displaying for 2nd ad in All stock page\");\n\t\t\t Assert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");*/\n\t\t \n\t\t\t\n\t\t\t Assert.assertFalse(AllStockPage.PostedAdsImages.get(i).getAttribute(\"src\").isEmpty(),\n\t\t\t\t\t\t\t\"Uploaded image is not displaying for \"+i+ \" ad in All stock page\");\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTitles.get(i)),\n\t\t\t\t\t\t\t\"Given Title is not displaying for \"+i+ \" ad in All stock page\");\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCategoryTypeAndSubType.get(i)),\n\t\t\t\t\t\t \"Given category, Type & Sub type are not displaying for \"+i+ \" ad in All stock page\");\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t} \n\t\t\t\n\t}", "public void validateWavesummary(String strOrderLines, String strUnitsRequired, String strUnitsAllocated, String strTasks){\n\t\ttry{\n\t\t\t\n\t\t\tString actualOrderLines=libManhattanCommonFunctions.getElementByProperty(\".//*[@id='dataForm:OrderLinesSelected']\", \"XPATH\").getText();\n\t\t\tString actualUnitsRequired=libManhattanCommonFunctions.getElementByProperty(\".//*[@id='dataForm:UnitsRequired']\", \"XPATH\").getText();\n\t\t\tString actualUnitsAllocated=libManhattanCommonFunctions.getElementByProperty(\".//*[@id='dataForm:UnitsAllocated']\", \"XPATH\").getText();\n\t\t\tString actualTasks=libManhattanCommonFunctions.getElementByProperty(\".//*[@id='dataForm:Tasks']\", \"XPATH\").getText();\n\t\t\t\n\t\t\tif(actualOrderLines.trim().equals(strOrderLines) && actualUnitsRequired.trim().equals(strUnitsRequired) && actualUnitsAllocated.trim().equals(strUnitsAllocated) && actualTasks.trim().equals(strTasks))\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Wave Details verification\", \"Expected Order Lines:\" +strOrderLines+ \"Actual Order Lines:\" +actualOrderLines+ \"Expected Units Required:\" +strUnitsRequired+ \"Actual Units Required:\" +actualUnitsRequired+ \"Expected Units Allocated:\" +strUnitsAllocated+ \"Actual Units Allocated:\" +actualUnitsAllocated+ \"Expected Tasks:\" +strTasks+ \"Actual Tasks:\" +actualTasks, Status.PASS);\n\t\t\t}else\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Wave Details verification\", \"Expected Order Lines:\" +strOrderLines+ \"Actual Order Lines:\" +actualOrderLines+ \"Expected Units Required:\" +strUnitsRequired+ \"Actual Units Required:\" +actualUnitsRequired+ \"Expected Units Allocated:\" +strUnitsAllocated+ \"Actual Units Allocated:\" +actualUnitsAllocated+ \"Expected Tasks:\" +strTasks+ \"Actual Tasks:\" +actualTasks, Status.FAIL);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\treport.updateTestLog(\"Element\", \"Element Not Found\", Status.FAIL);\n\n\n\t\t} \n\t}", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "public void VerifyBillingAddress(String billingaddresstitle, String billingaddress){\r\n\t\tString BilingTitle=getValue(billingaddresstitle);\r\n\t\tString Billingaddress=getValue(billingaddress);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Billing address and title should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutBillingAddressTitle\"), BilingTitle)){\r\n\t\t\t\tSystem.out.println(\"Billing address title is present \"+getText(locator_split(\"txtCheckoutBillingAddressTitle\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Error(\"Billing address title is not present\");\r\n\t\t\t}\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutBillingAddress\"), Billingaddress)){\r\n\t\t\t\tSystem.out.println(\"Billing address is present \"+getText(locator_split(\"txtCheckoutBillingAddress\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Error(\"Billing address is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Billing address and title are present\");\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddressTitle\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutBillingAddress\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\tcatch (Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Billing title or address is not present\");\r\n\t\t\tthrow new Error(\"Billing address is not present\");\r\n\r\n\t\t}\r\n\t}", "@Step(\"Creating a new Clinical Purchase Requisitions for a Work Order\")\n public void verifyCreatingNewPurchaseRequistion() throws Exception {\n SeleniumWait.hold(GlobalVariables.ShortSleep);\n pageActions.scrollthePage(ClinicalPurchaseRequisitionsTab);\n new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOf(ClinicalPurchaseRequisitionsTab));\n functions.highlighElement(driver, ClinicalPurchaseRequisitionsTab);\n pageActions.clickAt(ClinicalPurchaseRequisitionsTab, \"Clicking on purchase requistions tab\");\n pageActions.clickAt(clinicalPurchaseReqNewButton, \"Clicking on purchase requistions New buttton\");\n String randomExternalPO_Number = \"Test\"+Functions.getTimeStamp();\n pageActions.type(externalPO_Number, randomExternalPO_Number, \"Entered Clicnical PO Number\");\n clinicalPurchaseShortDescription.sendKeys(\"Automation externalPO_Numbner desc\");\n pageActions.clickAt(clinicalPurchaseSubmitButton, \"Clicking on SubmitButton\");\n pageActions.clickAt(saveAndGoButton, \"Clicked on save and go button\");\n searchExternalPONumber();\n\n }", "@Test(priority = 4)\n\tpublic void validateCartAfterAdd() {\n\t\tCss = read.readPropertiesFile(\"loc.validate.clickoncart.afteradd.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// click view cart\n\t\tCss = read.readPropertiesFile(\"loc.viewcartbtn.click.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// validate each cart items-product 1\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.iphone.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct1 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct1 = read.readPropertiesFile(\"exppro1\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct1, exptproduct1, \"No match\");\n\t\tlog.info(\"Product1\");\n\t\t// product 2\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.mac.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct2 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct2 = read.readPropertiesFile(\"exppro2\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct2, exptproduct2, \"No match\");\n\t\tlog.info(\"Product2\");\n\t\t// grand total after adding products\n\t\tXpath = read.readPropertiesFile(\"loc.verify.grandtotal.aftradd.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actgrandadd = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptgrandadd = read.readPropertiesFile(\"expgrandadd\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actgrandadd, exptgrandadd, \"No match\");\n\t\tlog.info(\"Grand total after adding products\");\n\n\t}", "@When(\"^enter all details except order reference$\")\r\n\tpublic void enter_all_details_except_order_reference() {\n\t\tnop.click(\"//*[@id=\\\"id_contact\\\"]\"); // clicking dropdown\r\n\t\tnop.click(\"//*[@id=\\\"id_contact\\\"]/option[2]\"); //clicking option2 customercare from dropdown\r\n\t\tnop.Enter(\"//*[@id=\\\"email\\\"]\", \"[email protected]\"); //entering email address\r\n\t\tnop.Enter(\"//*[@id=\\\"fileUpload\\\"]\", \"C:\\\\Users\\\\BLTuser.BLT73\\\\Desktop\\\\loga\\\\dependencies.txt\");\r\n\t\tnop.Enter(\"//*[@id=\\\"message\\\"]\", \"website is worst\");\r\n\t}", "public void miniCartFulfillmentGroupOrder() {\n List<WebElement> fGroupType1 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-1')]\"));\n List<WebElement> fGroupType2 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-2')]\"));\n List<WebElement> fGroupType8 = getDriver().findElements(By.xpath(\"//*[contains(@id,'group-type-8')]\"));\n\n //CNC ONLY\n if (fGroupType1.size() == 1 && fGroupType2.size() == 0 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [CNC] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n }\n //SPO ONLY\n if (fGroupType2.size() == 1 && fGroupType1.size() == 0 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [SPO] Fulfillment Group Order ===\");\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n }\n //STH ONLY\n if (fGroupType8.size() == 1 && fGroupType1.size() == 0 && fGroupType2.size() == 0) {\n System.out.println(\"=== Attempting [STH] Fulfillment Group Order ===\");\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //CNC & SPO\n if (fGroupType2.size() == 1 && fGroupType1.size() == 1 && fGroupType8.size() == 0) {\n System.out.println(\"=== Attempting [CNC][SPO] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n }\n //CNC & STH\n if (fGroupType8.size() == 1 && fGroupType1.size() == 1 && fGroupType2.size() == 0) {\n System.out.println(\"=== Attempting [CNC][STH] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //SPO & STH\n if (fGroupType2.size() == 1 && fGroupType8.size() == 1 && fGroupType1.size() == 0) {\n System.out.println(\"=== Attempting [SPO][STH] Fulfillment Group Order ===\");\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n //CNC & SPO & STH\n if (fGroupType1.size() == 1 && fGroupType2.size() == 1 && fGroupType8.size() == 1) {\n System.out.println(\"=== Attempting [CNC][SPO][STH] Fulfillment Group Order ===\");\n String fGroupTitle1 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[1]/h5\")).getText();\n String fGroupTitle2 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[2]/h5\")).getText();\n String fGroupTitle8 = getDriver().findElement(By.xpath(\"//*[@id='prod-sort-list']/div[3]/h5\")).getText();\n Assert.assertEquals(Constants.cncFulfillmentTitle, fGroupTitle1);\n Assert.assertEquals(Constants.spoFulfillmentTitle, fGroupTitle2);\n Assert.assertEquals(Constants.sthFulfillmentTitle, fGroupTitle8);\n }\n }", "@Then(\"^I should see Price reminder$\")\n\tpublic void i_should_see_Price_reminder() throws Throwable {\n\t\tString msg=BrowserFactory.driver.findElement(By.xpath(\".//*[@class='cart-item-help-mod contextError']/div[@class='cart-item-error-text']\")).getText();\n\t\tassertTrue(\"price reminder is not displayed\", msg.equals(\"Please fill out the Vehicle Price field.\"));\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void moreComplexAssertion() {\n\t\tOrder order1 = null, order2 = null, order3 = null, order4 = null;\n\t\t// when\n\t\tList<Order> orders = null;// orderSearchService.getOrders(trader,\n\t\t\t\t\t\t\t\t\t// tradingAcct, goldIsinCode);\n\t\t// then\n\t\t// Using Basic JUnit\n\t\tassertEquals(orders.size(), 2);\n\t\tIterator<Order> itr = orders.iterator();\n\t\tassertEquals(itr.next(), order3);\n\t\tassertEquals(itr.next(), order4);\n\t\t// Using Hamcrest\n\t\tassertThat(orders, hasItems(order3, order4));\n\t\tassertThat(orders.size(), is(2));\n\t\t// Using FEST Assertions\n\t\tassertThat(orders).containsOnly(order3, order4);\n\t\t// Using FEST Assertions (chained assertions)\n\t\tassertThat(orders).containsOnly(order3, order4).containsSequence(order3, order4);\n\t}", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "public void Case34(){\n System.out.println(\"Testing Case 34\");\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n MobileElement summaryMenu = (MobileElement) driver.findElementByAccessibilityId(\"Show action\");\n summaryMenu.click();\n MobileElement VATwithoutValue = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_grand_total_w_o_tax\");\n String VATwithoutValueText = VATwithoutValue.getText();\n System.out.println(\"VAT (Without Order): \"+VATwithoutValueText);\n VATwithoutValue.click();\n driver.navigate().back();\n swipeFastRight();\n actualOrderPC();\n summaryMenu.click();\n MobileElement VATwithValue = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_grand_total_w_o_tax\");\n VATwithValue.click();\n String VATwithValueText = VATwithValue.getText();\n System.out.println(\"VAT (With Order): \"+VATwithValueText);\n driver.navigate().back();\n clear();\n System.out.println(\"Case 34 done\");\n }", "@Then(\"^He should get a ticket confirmation$\")\n\tpublic void heShouldGetATicketConfirmation() throws Exception {\n\t\tdante.should(seeThat(FlySearchResult.displayed(),\n\t\t\t\thasItem(\"(Clic para ver el adjunto)\")));\n\t}", "public void submitOrder(View view) {\n EditText getName = (EditText)findViewById(R.id.name_field);\n String nameValue = getName.getText().toString();\n\n CheckBox whippedCreamCheckBox = (CheckBox) findViewById(R.id.Whipped_cream_checkbox);\n boolean hasWhippedCream = whippedCreamCheckBox.isChecked();\n\n CheckBox chocolateCheckBox = (CheckBox) findViewById(R.id.Chocolate_checkbox);\n boolean hasChocolate = chocolateCheckBox.isChecked();\n\n CheckBox CinnamonCheckBox = (CheckBox) findViewById(R.id.Cinnamon_checkbox);\n boolean hasCinnamon = CinnamonCheckBox.isChecked();\n\n CheckBox MarshmallowsCheckBox = (CheckBox) findViewById(R.id.Marshmallows_checkbox);\n boolean hasMarshmallows = MarshmallowsCheckBox.isChecked();\n\n int price = calculatePrice(hasWhippedCream, hasChocolate, hasMarshmallows, hasCinnamon);\n String priceMessage = createOrderSummary(nameValue, price, hasWhippedCream,hasChocolate, hasCinnamon, hasMarshmallows);\n /*displayMessage(priceMessage);*/\n // Use an intent to launch an email app.\n // Send the order summary in the email body.\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\")); // only email apps should handle this\n intent.putExtra(Intent.EXTRA_SUBJECT, \"JustJava order for \" + nameValue);\n intent.putExtra(Intent.EXTRA_TEXT, priceMessage);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "@Test\r\n\tpublic void Orderbooks()\r\n\t{\r\n\t\thome.clickOnBookLink();\r\n\t\tbooks.selectRandomBook();\r\n\t\tbook1.ClickOnAddToCartButton();\r\n\t\thome.clickOnShoppingCartLink();\r\n\t\tshoppingcart.selectCountry(\"India\");\r\n\t\tshoppingcart.selectCheckbox();\r\n\t\tshoppingcart.clickOnCheckOutButton();\r\n\t\tlogin.clickOnCheckAsGuest();\r\n\t\tbookAddresscheckout.enterFirstName(\"ssssi\");\r\n\t\tbookAddresscheckout.enterLastName(\"yyaa\");\r\n\t\tbookAddresscheckout.enterEmail(\"[email protected]\");\r\n\t\tbookAddresscheckout.enterCompany(\"Tata motors\");\r\n\t\tbookAddresscheckout.selectCountry(\"India\");\r\n\t bookAddresscheckout.enterCity(\"Solapur\");\r\n\t\tbookAddresscheckout.enterAddress1(\"Xyz street Solapur India\");\r\n\t\tbookAddresscheckout.enterAddress2(\"zzz street Solapur India\");\r\n\t\tbookAddresscheckout.enterZipPostalCode(\"21991\");\r\n\t\tbookAddresscheckout.enterPhoneNumber(\"9970815987\");\r\n\t\tbookAddresscheckout.enterFaxNumber(\"8882222\");\r\n\t bookAddresscheckout.clickOnContinueButton();\r\n\t\tShippingCheckOut.clickOnContinueButton();\r\n\t\tShippingMethodCheckOut.selectGroundRadioButton();\r\n\t\tShippingMethodCheckOut.clickOnContinueButton();\r\n\t\tPaymentMethodCheckOut.selectPaymentMethod();\r\n\t\tPaymentMethodCheckOut.clikOnContinueBtn();\r\n\t\tPaymentInformationCheckOut.clickOnContinueButton();\r\n\t\tConfirmorder.clickOnConfirmButton();\r\n\t\tcheckOut.clickOnOrderDetailsLink();\r\n\t}", "@Test //Test to see you are able to buy policy and confirmation page is displayed\n public void policyConfirmationTest() throws InterruptedException {\n \t WebElement submitPolicy=driver.findElement(By.xpath(\"/html/body/center/form/center[3]/pre/input[3]\"));\n \t submitPolicy.click();\n \t assertTrue(driver.findElement(By.xpath(\"/html/body/center[2]/h3\")).isDisplayed()); \n\t Thread.sleep(3000);\n\t driver.close();\n\n}", "public boolean verifyPaymentDetailsAtEditQuoteAcceptanceTab(HashMap<String, String> testData, ExtentTest extentedReport,\n\t\t\tboolean screenShot) throws Exception {\n\t\tboolean isOk = false;\n\n\t\ttry {\n\t\t\tGenericUtils.scrollIntoView(driver, spnOneOffPaymentAcceptanceTab);\n\t\t\tString oneOffPaymentCoverTab = testData.get(\"oneOffPaymentCoverTab\");\n\t\t\tString totalPaymentCoverTab = testData.get(\"totalPaymentCoverTab\");\n\t\t\tString firstPaymentCoverTab = testData.get(\"firstPaymentCoverTab\");\n\t\t\tString installmentPaymentCoverTab = testData.get(\"installmentPaymentCoverTab\");\n\n\t\t\tString oneOffPaymentAcceptanceTab = spnOneOffPaymentAcceptanceTab.getText().trim();\n\t\t\tString totalPaymentAcceptanceTab = spnTotalPaymentAcceptanceTab.getText().trim();\n\t\t\tString firstPaymentAcceptanceTab = spnFirstPaymentAcceptanceTab.getText().trim();\n\t\t\tString installmentPaymentAcceptanceTab = spnInstallmentPaymentAcceptanceTab.getText().trim();\n\n\t\t\ttestData.put(\"oneOffPaymentAcceptanceTab\", oneOffPaymentAcceptanceTab);\n\t\t\ttestData.put(\"totalPaymentAcceptanceTab\", totalPaymentAcceptanceTab);\n\t\t\ttestData.put(\"firstPaymentAcceptanceTab\", firstPaymentAcceptanceTab);\n\t\t\ttestData.put(\"installmentPaymentAcceptanceTab\", installmentPaymentAcceptanceTab);\n\n\t\t\tLog.message(\"Acceptance Tab Payment Details:- One-Off Payment: [\" + oneOffPaymentAcceptanceTab\n\t\t\t\t\t+ \"]; Total Payment: [\" + totalPaymentAcceptanceTab + \"]; First Payment: [\"\n\t\t\t\t\t+ firstPaymentAcceptanceTab + \"]; Installment Payment: [\" + installmentPaymentAcceptanceTab + \"]\",\n\t\t\t\t\textentedReport);\n\n\t\t\tboolean isOkOneOffPayment = oneOffPaymentAcceptanceTab.equals(oneOffPaymentCoverTab);\n\t\t\tboolean isOkTotalPayment = totalPaymentAcceptanceTab.equals(totalPaymentCoverTab);\n\t\t\tboolean isOkFirstPayment = firstPaymentAcceptanceTab.equals(firstPaymentCoverTab);\n\t\t\tboolean isOkInstallmentPayment = installmentPaymentAcceptanceTab.equals(installmentPaymentCoverTab);\n\n\t\t\tisOk = isOkOneOffPayment && isOkTotalPayment && isOkFirstPayment && isOkInstallmentPayment;\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Exception in verifying payment details at Acceptance tab. \" + e);\n\t\t}\n\n\t\treturn isOk;\n\t}", "public void submitOrder(View view) {\n\n EditText nameField = (EditText) findViewById(R.id.name_field);\n String name = nameField.getText().toString();\n //Figure out if you want to add whipped cream\n CheckBox whippedCream = (CheckBox) findViewById(R.id.whipped_cream_checkbox);\n Boolean hasWhippedCream = whippedCream.isChecked();\n //Figure out if you want to add chocolate\n CheckBox chocolate = (CheckBox) findViewById(R.id.chocolate_checkbox);\n Boolean hasChocolate = chocolate.isChecked();\n\n int price = calculatePrice(hasWhippedCream, hasChocolate);\n\n// // Log.v(\"MainActivity\", \"This price is \" + price);\n\n String priceMessage = createOrderSummary(name, price, hasWhippedCream, hasChocolate);\n\n\n// composeEmail(\"[email protected]\", name, priceMessage);\n displayText(priceMessage);\n }", "private ArrayList<String> GetOrderContent() {\n ArrayList<String> order_content = new ArrayList<>();\n boolean added = false;\n for (String line : receipt_lines) {\n if (IsReceiptHeader(line) || IsReceiptFooter(line) || ColesReceiptItem.Is_So_On_Keyword(line) || ColesReceiptItem.Is_Empty(line))\n continue;\n if (ColesReceiptItem.Is_Total_Line(line)) break;\n if (ColesReceiptItem.Is_Order_Summary_Keyword(line))\n added = true;\n else if (added) order_content.add(line);\n }\n return order_content;\n }", "void showOrderText(int ID) throws OrderNotFoundException;", "private void launchTextConfirmationDialog(final int storeId, Intent data) {\n final Bundle capturedArgs = data.getBundleExtra(\"data\");\n\n //get the keys and values and build a message\n StringBuilder message = new StringBuilder();\n if (capturedArgs != null) {\n for (String key: capturedArgs.keySet()) {\n String value = capturedArgs.get(key).toString();\n message.append(key.toUpperCase() + \": \" + value + \"\\n\");\n\n }\n }\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Are these values correct?\")\n .setMessage(message)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Log.d(\"Dialog\", \"Captured values are correct\");\n dialog.dismiss();\n //Add store id to identify whose these fields are from\n capturedArgs.putInt(Store.KEY_FIELD_STORE_ID, storeId);\n submitSurvey(capturedArgs);\n\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Log.d(\"Dialog\", \"Captured values are NOT correct\");\n dialog.dismiss();\n startOcrCaptureActivity(storeId);\n\n\n }\n })\n .show();\n\n }", "public void verifyAgentRemovalConfirmation(String confirm_text) throws Exception {\n\t\tString pypeNameFromGetElement = wdriver.findElement(By.xpath(WebData.confirmAgentRemoval)).getText();\n\n\t\tAssert.assertEquals(pypeNameFromGetElement, confirm_text);\n\t}", "public void v_Verify_Guest3_Displayed(){\n\t}", "public static void verifyPlaceStoreOrderResponse(Response response, long expectedId, long expectedPetId, int expectedQuantity, String expectedShipDate, String expectedStatus, boolean expectedCompleted) {\n verifySuccessStatusCodeInPlaceStoreOrderResponse(response);\n\n StoreOrderResponse storeOrderResponse = response.as(StoreOrderResponse.class);\n\n long actualId = storeOrderResponse.getId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - id, Actual: \" + actualId + \" , Expected: \" + expectedId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualId, expectedId, \"Place Store Order service response - id field error\");\n\n long actualPetId = storeOrderResponse.getPetId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - pet id, Actual: \" + actualPetId + \" , Expected: \" + expectedPetId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualPetId, expectedPetId, \"Place Store Order service response - pet id field error\");\n\n int actualQuantity = storeOrderResponse.getQuantity();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - quantity, Actual: \" + actualQuantity + \" , Expected: \" + expectedQuantity);\n MicroservicesEnvConfig.softAssert.assertEquals(actualQuantity, expectedQuantity, \"Place Store Order service response - quantity field error\");\n\n String actualShipDate = storeOrderResponse.getShipDate().substring(0,23);\n expectedShipDate = expectedShipDate.replace(\"Z\", \"\");\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - ship date, Actual: \" + actualShipDate + \" , Expected: \" + expectedShipDate);\n MicroservicesEnvConfig.softAssert.assertEquals(actualShipDate, expectedShipDate, \"Place Store Order service response - ship date field error\");\n\n String actualStatus = storeOrderResponse.getStatus();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - status, Actual: \" + actualStatus + \" , Expected: \" + expectedStatus);\n MicroservicesEnvConfig.softAssert.assertEquals(actualStatus, expectedStatus, \"Place Store Order service response - status field error\");\n\n boolean actualCompleted = storeOrderResponse.isComplete();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - complete, Actual: \" + actualCompleted + \" , Expected: \" + expectedCompleted);\n MicroservicesEnvConfig.softAssert.assertEquals(actualCompleted, expectedCompleted, \"Place Store Order service response - complete field error\");\n }", "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}", "public void appearsConfirmationPopup(String operation) {\n\t\tassertTrue(true);\n\t\t//assertTrue(browser.currentPage().div(\"jqi_state_\" + operation).exists());\n\t\t//assertTrue(div(\"jqi_state_\" + operation).exists());\t\n\t}", "public void VerifyFrequentlyBoughtTogetherTitle(String Exptext){\r\n\t\tString[] ExpectedTitle = getValue(Exptext).split(\",\",2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Frequently Bought Item title should be present\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"txtTitle\"));\r\n\t\t\tif(getAndVerifyPartialText(ele.get(Integer.valueOf(ExpectedTitle[0])-1), ExpectedTitle[1])){\r\n\t\t\t\tSystem.out.println(ExpectedTitle[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpectedTitle[1]+\" is present in Frequenlty bought box\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpectedTitle[1]+\" is not present\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtTitle\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtTitle\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Expected text - '\"+ExpectedTitle[1]+\" and Actual Text : \"+getText(locator_split(\"txtTitle\"))+\" is not equal from Frequenlty bought box\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpectedTitle[1]+\" and Actual Text : \"+getText(locator_split(\"txtTitle\"))+\" is not equal\");\r\n\t\t}\r\n\t}", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "boolean isOrderCertain();", "public boolean verifyElementPresentOnCheckoutOrderPage(String key) {\n\t\t// TODO Auto-generated method stub\n\n\t\treturn verifyElementIsPresent(checkoutOrderPropertiesReader.getProperties(key));\n\t}", "@Override\n\tpublic String confirmOrder(int oid, int code) {\n \n\t\tOrder order = orderRepo.findById(oid).get();\n\t\tUser user = order.getUser();\n\t\t\n\t\tSystem.out.println(\"code at conifrmOdrer \"+user.getVerficationCode()+\" matches with int code \"+code);\n\t\tif (user.getVerficationCode() == code) {\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tcartRepo.delete(c);\n\t\t\t}\n\t\t\tuser.getCart().clear();\n\t\t\torder.setPaymentStatus(\"Success\");\n\t\t\temailService.sendConfirmationMail(user, oid); //Order Information sent to Email.\n\t\t\treturn \"Order successfull\";\n\t\t} else {\n\t\t\torder.setPaymentStatus(\"Failed\");\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tc.getProduct().setStock(c.getProduct().getStock()+c.getQuantity());\n\t\t\t}\t\t\t\n\t\t\treturn \"Order not successfull\";\n\t\t }\n\t\t\n\t\t\n\n\t}" ]
[ "0.6663509", "0.63565356", "0.63104475", "0.6291492", "0.6244569", "0.6231502", "0.62227076", "0.6190325", "0.61783713", "0.6160289", "0.6120859", "0.61005473", "0.6081764", "0.60544217", "0.6018735", "0.6010437", "0.5944593", "0.5939134", "0.5938001", "0.59143627", "0.5911231", "0.59079015", "0.5900925", "0.5891766", "0.5885302", "0.5880075", "0.58734953", "0.5863815", "0.5863815", "0.5863815", "0.5853255", "0.5809728", "0.57861495", "0.57550293", "0.57524157", "0.5741109", "0.57207775", "0.569469", "0.568316", "0.5658616", "0.5634544", "0.562886", "0.5624498", "0.56229496", "0.560834", "0.56069547", "0.560343", "0.55987227", "0.55891013", "0.5584574", "0.5583653", "0.55688024", "0.5560585", "0.5556452", "0.5546169", "0.5538743", "0.553812", "0.5535261", "0.5534177", "0.55299556", "0.5505186", "0.55040467", "0.54952514", "0.54941756", "0.5489162", "0.548112", "0.5476204", "0.5473443", "0.5468273", "0.54574543", "0.5424994", "0.5415703", "0.5414651", "0.54089105", "0.5407123", "0.5401305", "0.5399775", "0.5397902", "0.53921247", "0.53921175", "0.5390806", "0.5387856", "0.5382497", "0.5362971", "0.53580993", "0.53501606", "0.53456986", "0.5340238", "0.5331911", "0.532394", "0.5320741", "0.531955", "0.5315964", "0.53139323", "0.53088963", "0.53036296", "0.5302051", "0.5293784", "0.5288317", "0.52850866" ]
0.742851
0
this method verify the Thank you message
public boolean VerifyOrderConfirmation_ThankYouMessage() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed(); if(flag){extentLogs.pass("VerifyOrderDetails", "OrderConfirmationIsDisplayed"); }else{extentLogs.fail("VerifyOrderDetails", "OrderNumberLabelIsNotDisplayed");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void userShouldGetMessage() {\n assertTextMessage(getTextFromElement(_emailResult), expected, \"Your message has been sent\");\n\n }", "public void thankYou()\n {\n onSales = false;\n clearScreen();\n showText(\"Thank you!\", getHeight()/2, getWidth()/2);\n Greenfoot.stop();\n }", "public void verifyThanksMessageTextAfterEndingAboutContentStructure(String text)\r\n\t {\r\n\t\t WebElement element_greetings_message=about_content_structure_end_thank_you_text.get(2);\r\n\t\t textVerification(element_greetings_message, text);\r\n\t }", "public void checkAlert() {\n try {\n wait(1000);\n driver.switchTo().alert();\n driver.findElement(By.xpath(\"//*[@title='No, thanks']\")).click();\n } catch (Exception e) {\n // Do nothing\n }\n }", "public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}", "public boolean isDisplayed_txt_ThankYou_Message_Text(){\r\n\t\tif(txt_ThankYou_Message_Text.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}", "public void forgotPasswordValidate()\r\n\t{\n\t\tString expectedMessage = \"An email with a confirmation link has been sent your email address.\";\r\n\t\tString actualMessage=this.forgotPasswordSuccessMessage.getText();\r\n\t\tAssert.assertEquals(expectedMessage,actualMessage);\r\n\t}", "public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}", "private void pleaseCheck() {\n\t\tPrimeFaces.current().executeScript(\"new PNotify({\\r\\n\" + \n\t\t\t\t\"\t\t\ttitle: 'Check this ',\\r\\n\" + \n\t\t\t\t\"\t\t\ttext: 'Please Make sure that the Passwords are the same and not empty!',\\r\\n\" + \n\t\t\t\t\"\t\t\tleft:\\\"2%\\\"\\r\\n\" + \n\t\t\t\t\"\t\t});\");\n\t\t\n\t}", "public boolean verifySuccess() {\r\n return driver.findElement(successMsg).isDisplayed();\r\n }", "public void registerConfirm_Dear(WebDriver driver) {\n\t\tString ActualValue_RegConfDear = op.getText(driver, RegisterConfirmObj.textDearFnLn);\r\n\t\tString expectedValue_RegConfDear = \"Dear Sangam Y,\";\r\n\r\n\t\t// validation\r\n\t\tif(expectedValue_RegConfDear.equals(ActualValue_RegConfDear))\r\n\r\n\t\t\tSystem.out.println(\"Pass - Dear Sangam Y\");\r\n\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Fail - Dear Sangam Y\");\r\n\t}", "@When(\"^User should see Review Confirmation Message$\")\n\tpublic void user_should_see_Review_Confirmation_Message() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getreviewconfirmmsg(), 70);\n\t\treviewConfirmationPageObjects.verifyreviewconfirmation();\n\t}", "public boolean verifyMentorRequestContinue(){\n\t\treturn mentorConnectRequestObjects.almostDoneText.isDisplayed();\n\t}", "String getConfirmationMessage();", "public void verifyLabelConfirmationMessage() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying if Label is available or not\");\n\t\tJavaScriptExec.sleep();\n\t\tAssert.assertTrue(labelConfirmationMessage.getText().contains(BasePage.getCellData(xlsxName, sheetName, 20, 0)),\n\t\t\t\t\"Assert Failed as its unable to search text in Logged in Page\");\n\t}", "public void verifyStaticMessageOnMiniCart() {\n String element = \"//*[@id='disclaimerText']\";\n if (UtilityHelper.isNotClickable(org.openqa.selenium.By.xpath(element))) {\n UtilityHelper.waitUntilClickable(org.openqa.selenium.By.xpath(element));\n }\n WebElement staticmessage = getDriver().findElement(org.openqa.selenium.By.xpath(element));\n UtilityHelper.waitUntilClickable(staticmessage);\n Assert.assertEquals(\"Final price and discounts will be determined at pickup.\", staticmessage.getText());\n System.out.println(\"==========Static message is displayed in minicart======== \");\n }", "public void verifyRegistrationwelcomemsg(String welcomemessage){\r\n\t\tString weolcome = getValue(welcomemessage);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"Regwelcomemsg\"),weolcome)) { \r\n\t\t\t\twaitForPageToLoad(20);\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Welcome msg Displayed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Welcome msg Displayed is displayed \"+elementProperties.getProperty(\"Regwelcomemsg\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \" + elementProperties.getProperty(\"Regwelcomemsg\").toString().replace(\"By.\", \" \") + \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\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}", "AlertDialog.Builder alertDialogBuilderSentSuccessMessage(Context context) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Verification Account Message\");\n builder.setMessage(R.string.resend_ver_email_message_success);\n builder.setIcon(R.drawable.ic_action_info);\n builder.setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n\n return builder;\n }", "public static void INTTransfer_Insufficientbalance() {\n\n try {\n clickHarmburgerMenuBTN();\n clickTransferBTN();\n clickIntertnational();\n internationalFundTransfer();\n waitToElement(\"//android.widget.TextView[@text='Insufficient balance.']\");\n\n MobileElement insufficientMSG = driver.findElement(By.xpath(\"//android.widget.TextView[@text='Insufficient balance.']\"));\n verifyElementIsDisplayed(insufficientMSG, \"Insufficient Balance\");\n clickCancelButton();\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"unable to verify the message\" + e.getMessage());\n }\n\n\n }", "public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}", "public boolean isEnabled_txt_ThankYou_Message_Text(){\r\n\t\tif(txt_ThankYou_Message_Text.isEnabled()) { return true; } else { return false;} \r\n\t}", "@Then(\"The user should see the success message\")\n\tpublic void the_user_should_see_the_success_message() {\n\t\tAddTariffPlanPage details = new AddTariffPlanPage();\n\t\tString actual = details.getSucessmsg().getText();\n\t\tAssert.assertEquals(\"Congratulation you add Tariff Plan\", actual);\n\n\t}", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }", "public boolean containsSuccessMsg(String txt) {\n\t\n\t\tWebDriverWait wait = new WebDriverWait (driver, 90);\n\t\twait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath(\"//div/h1\"), Constants.SUCCESS_TITLE));\n\t\t\n\t\treturn driver.getPageSource().contains(txt);\n\t}", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }", "public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }", "@Then(\"^i should have an error message that An account using this email address has already been registered\\\\. Please enter a valid password or request a new one\\\\.$\")\n public void i_should_have_an_error_message_that_An_account_using_this_email_address_has_already_been_registered_Please_enter_a_valid_password_or_request_a_new_one() throws Throwable {\n AlreadyUserPage alreadyuserpage = PageFactory.initElements(driver, AlreadyUserPage.class);\n alreadyuserpage.verify_email_already_registered();\n\n }", "@Test\n public void basicConfirmHandlingAcceptTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.accept();\n assertEquals(\"true\", confirmResult.getText());\n }", "@Test\n\tpublic void checkconfirmpasswordfieldpresent()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.password.sendKeys(\"password\");\n\t\tResetpassword.confirm_password.sendKeys(\"confirm password\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"Password should match with confirm password.\");\n\t\t\n\t}", "public void verifyNotificationMessage(String mMessage) throws Exception {\n\n\t\t// waitForElement.waitForElement(WebData.notificationMessage);\n\t\tString confirmMessage = \"\"; //wdriver.findElement(By.xpath(WebData.notificationMessage)).getText();\n//\t\tSystem.out.println(\"confirmMessage: \" + confirmMessage);\n\t\twhile (confirmMessage == null || confirmMessage.isEmpty()) {\n\t\t\tconfirmMessage = wdriver.findElement(By.xpath(WebData.notificationMessage)).getText();\n\t\t\tif (!confirmMessage.isEmpty()) {\n\t\t\t\twdriver.findElement(By.xpath(WebData.notificationClose)).click();\n\t\t\t}\n\t\t\tSystem.out.println(\"confirmMessage: \" + confirmMessage);\n\t\t}\n\t\tAssert.assertEquals(confirmMessage, mMessage);\n\t}", "public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }", "public void verifyTextSignUpToLetsKodeIt() {\n verifyTextAssertMethod(signUpToLetsKodeIt, \"Sign Up to Let's Kode It\");\n }", "public void verifyMessageInDialogBox(String message) {\n\t String actualMessage=getDriver().switchTo().alert().getText();\n\t if(message.equalsIgnoreCase(actualMessage)){\n\t\tAssert.assertTrue(true);\n\t }\n\t else {\n\t\tAssert.assertTrue(false);\n\t }\t\n }", "private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }", "public void handleSMSAlert()\n\t{\n\t\t\n\t\tWebDriverWait wait=new WebDriverWait(driver, 60);\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tif(checker.getText().contains(\"verification could not be completed\"))\n\t\t\t\tAssert.fail(\"Phone Verification failed\");\n\t\t\t\n\t\t\tLog.info(\"== Handling SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twaitOnProgressBarId(60);\n\t\t}\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tLog.info(\"== Handling second SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t}", "public String checkMessage() throws InterruptedException {\n\t\tThread.sleep(5000);\n\t\treturn driver.findElement(By.id(\"_ctl0__ctl0_Content_Main_message\")).getText();\n\t}", "public void verifyAlertText(String message) {\n\t\tboolean assertion = message.equals(uiElementAction.getTextfromAlert());\n\t\tLog.info(\"Alert message is correct : \" + assertion);\n\t\tAssert.assertTrue(\"Alert message is correct : \" + assertion, assertion);\n\t}", "@Step\n public void waitUntilSmsCodeWillBeSent(){\n Utils.waitABit(3);\n actionWithWebElements.waitVisibilityOfElement(confirmationCodeFromSmsHeader);\n actionWithWebElements.waitVisibilityOfElement(confirmationSmsCodeInput);\n }", "@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}", "public String getText_txt_ThankYou_Message_Text(){\r\n\t\treturn txt_ThankYou_Message_Text.getText();\r\n\t}", "public String getRegisterSuccessMessage() {\n\t\twaitToElementVisible(driver,RegisterPageUI.REGISTER_SUCCEESS_MESSAGE);\n\t\treturn getElementText(driver,RegisterPageUI.REGISTER_SUCCEESS_MESSAGE);\n\t}", "public void verifyAlertMessage(String vExpMsg) {\n\t\tvActMessage = myD.findElement(By.id(\"hideMe\")).getText();\n\t\tSystem.out.println(\"Actual Message is :\" + vActMessage);\n\t\tSystem.out.println(\"Expected Message is :\" + vExpMsg);\n\t\tif (vActMessage.equals(vExpMsg)) {\n\t\t\tvResult = \"Pass\";\n\t\t} else {\n\t\t\tvResult = \"Fail\";\n\t\t}\n\t\tSystem.out.println(\"Test Case is a \"+ vResult);\n\t}", "private void emailSentMessageFrame() {\r\n\t\tcreateWarning(2000, \"EMAIL SENT\"); //show warning message\r\n\t\t\r\n\t\twarningFrame.dispose(); //close warning window\r\n\t}", "void chooseOkOnNextConfirmFor(final ContentPattern aMessagePattern) {\n message = aMessagePattern;\n result = true;\n }", "public void verifyAgentInvitationSentMsg(String aFName, String aLName) throws Exception {\n\t\twdriver.findElement(By.xpath(\"//span[contains(text(),'Agent invitation to' + \" + aFName + \" + \" + aLName\n\t\t\t\t+ \" + 'was sent successfully.')]\")).click();\n\n\t}", "public void printThankYou() {\r\n \r\n System.out.printf(\"Thank you for being a valued SA Cable Customer!%n%n\");\r\n }", "public static void verifyMyAccountTitle(String expectedMessage, String messageOnFailure){\n String actualMessage = getText(MY_ACCOUNT_HEAD);\n assertEquals(actualMessage, expectedMessage, messageOnFailure);\n }", "public void userShouldBeAbleToRegisterSuccessfully() {\n clickElement(reg_link);\n //Select gender\n clickElement(gender);\n //Enter Firstname\n enterText(firstName, readTestDataFile(\"FirstName\"));\n //Enter Lastname\n enterText(lastName, readTestDataFile(\"LastName\"));\n //Select date of birth\n int num=Integer.valueOf(readTestDataFile(\"DateDay\"));\n selectByIndex(dateDay,num);\n //Select date of month\n selectbyVisibleText(month, readTestDataFile(\"Month\"));\n //Select date of Year\n selectByValue(year, readTestDataFile(\"Year\"));\n //Enter Email\n enterText(email, readTestDataFile(\"Email\")+dateStamp()+\"@test.com\");\n //Enter Company name\n enterText(company, readTestDataFile(\"Company\"));\n //Enter Newsletter option\n driver.findElement(newsletter).isSelected();\n //Enter Password\n enterText(password, readTestDataFile(\"Password\"));\n //Enter ConfirmPassword\n enterText(confirmPassword, readTestDataFile(\"ConfirmPassword\"));\n //Click Register button\n clickElement(registerButton);\n //Expected Result\n String expectedRegisterSuccessMessage = \"Your registration completed\";\n String actualRegisterSuccessMessage=getText(actualMessage);\n //assert use to compare expected and actual result are same or not\n softAssert.assertEquals(expectedRegisterSuccessMessage,actualRegisterSuccessMessage,\"Registration Fail\");\n softAssert.assertAll();\n //Click logout button\n clickElement(logOut);\n }", "public boolean verifyMessage(ATMMessage atmMessage){\n if(!(this.currTimeStamp < atmMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n if(!(parameterGenerator.getPreviousNonce() == atmMessage.getResponseNonce())) error (\"Nonce does not match\");\r\n return true;\r\n \r\n }", "public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}", "public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}", "public void resendVerificationEmail(){\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n mAuth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n alertDialogBuilderSentSuccessMessage(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Sent email successfully.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n\n progressDialog.dismiss();\n }\n });\n }", "public void confirmOK(String expectedMessage) throws InterruptedException {\r\n\t\tfor (int second = 0;; second++) {\r\n\t\t\tif (second >= 60)\r\n\t\t\t\tfail(\"timeout\");\r\n\t\t\ttry {\r\n\t\t\t\tif (selenium.isConfirmationPresent())\r\n\t\t\t\t\tbreak;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t\tThread.sleep(1000);\r\n\t\t}\r\n\t\tString actual = selenium.getConfirmation();\r\n\t\t// selenium.chooseOkOnNextConfirmation();\r\n\t\t// System.out.println(s+\" confirmMessage: \"+confirmMessage);\r\n\t\tassertTrue(\"Did not see matching confirm message. \" + \"\\n Expected: \"\r\n\t\t\t\t+ expectedMessage + \"\\n Actual: \" + actual, actual\r\n\t\t\t\t.matches(expectedMessage));\r\n\t}", "public void click_NoofAlert_msg() throws InterruptedException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_NoBtn = driver.findElementByName(\"No\");\r\n\t\t\tclickOn(alrtmsg_NoBtn);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t}\r\n\r\n\t}", "public String checkMessage() {\n\t\tString userLatestStep = questionBot.get(owner.id());\n\n\t\t//se a amensagem comeca com '/', trata-se de um item de menu sendo acionado\n\t\tif(answerUser != null && answerUser.startsWith(\"/\"))\n\t\t\tuserLatestStep = answerUser;\n\n\t\t//busca no mapa de respostas as opcoes para o usuario\n\t\tObject options = response.get(userLatestStep);\n\n\t\t//obtem a mensagem a ser devolvida para o usuario\n\t\tString result = parseResult(options, answerUser);\n\n\t\t//mantem a ultima resposta do usuario\n\t\tuserLatestAnswer.put(owner.id(), answerUser);\n\n\t\treturn result;\n\t}", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "private void VerifyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VerifyButtonActionPerformed\n\n String email = textArea.getText();\n Pattern pattern = Pattern.compile(\"As seen on|\"\n + \"Buy|Meet singles|Extra income|Million dollars|Save big money|\"\n + \"Opportunity|Cash|No fees|Online degree|Work at home|Additional income|\"\n + \"Eliminate debt|Lower interest rate|Pre-approved|Consolidate your debt|\"\n + \"Avoid bankruptcy|Miracle|Satisfaction|Risk free|Free hosting|\"\n + \"You have been selected|Weekend getaway|You're a Winner!|Offer|\"\n + \"Unlimited|No obligation|Trial|Guarantee|No purchase necessary\");\n Matcher matcher = pattern.matcher(email);\n\n //Count all instances using matcher.find()\n int count = 0;\n while (matcher.find()) {\n count++;\n }\n\n //Message Dialog pop-up\n JOptionPane.showMessageDialog(null, \"The spam score for this massage is:\" + count, null, JOptionPane.INFORMATION_MESSAGE);\n\n //System.out.println(count);// For debug only\n }", "@Then(\"user verifies that {string} message is displayed\")\n public void user_verifies_that_message_is_displayed(String expectedWarningMessage) {\n\n String actualWarningMessage = loginPage.getWarningMessageText();\n Assert.assertEquals(expectedWarningMessage,actualWarningMessage);\n // Assert.assertTrue(loginPage.warningMessage.isDisplayed()); //if the webelement is setted as public\n\n\n\n }", "public static void validateTextMessage(WebElement obj, String expectedTextMsg, String objName) throws IOException {\r\n\t\tif (obj.isDisplayed()){\t\t\t\r\n\t\t\tString actualTextMsg = obj.getText().trim();\r\n\t\t\tif( actualTextMsg.equals(expectedTextMsg )){\r\n\t\t\t\t//\t\tSystem.out.println(expectedTextMsg+\" = \"+actualTextMsg);\r\n\t\t\t\tUpdate_Report( \"Pass\", \"validateTextMessage\",\"Expected message : '\" +expectedTextMsg+ \"' matched with actual message : '\" + actualTextMsg +\"'\");\r\n\t\t\t}else{\r\n\t\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", \"Expected message '\" + expectedTextMsg + \"' did not match with actual message '\" + actualTextMsg +\"'\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}", "private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }", "private boolean showConfirmationMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n ButtonType buttonTypeCancel = new ButtonType(\"Cancel\", ButtonData.CANCEL_CLOSE);\r\n ButtonType buttonTypeOK = new ButtonType(\"OK\", ButtonData.OK_DONE);\r\n alert.getButtonTypes().setAll(buttonTypeCancel, buttonTypeOK);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == buttonTypeOK)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User confirmed coin action\");\r\n return true;\r\n } else if (result.isPresent() && result.get() == buttonTypeCancel)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User canceled coin Action\");\r\n return false;\r\n }\r\n return false;\r\n\r\n }", "private void submitForm() {\n if (!validateName()) {\n return;\n }\n\n if (!validateEmail()) {\n return;\n }\n\n if (!validatePassword()) {\n return;\n }\n\n// Toast.makeText(getApplicationContext(), \"Thank You!\", Toast.LENGTH_SHORT).show();\n}", "@Then(\"^I can view \\\"([^\\\"]*)\\\" message$\")\n public void iCanViewMessage(String arg0) throws Throwable {\n String actual=addingAndDeletingAProduct.cartEmptyMessage();\n assertThat(\"Summary page message doesn't match\",actual,Matchers.equalToIgnoringWhiteSpace(\"(empty)\"));\n }", "public static boolean alert(String title, String header, String message) {\r\n Alert alert = new Alert(AlertType.CONFIRMATION);\r\n alert.setTitle(title);\r\n alert.setHeaderText(header);\r\n alert.setContentText(message);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public void resendVerificationEmail(View view) {\n current_user.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Verification email has been resent to \" +\n current_user.getEmail() + \". Please check your inbox/spam folder.\",\n Toast.LENGTH_LONG);\n\n // Centering the text\n LinearLayout toastLayout = (LinearLayout) toast.getView();\n if (toastLayout.getChildCount() > 0) {\n TextView textView = (TextView) toastLayout.getChildAt(0);\n textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);\n }\n\n toast.show();\n }\n }\n });\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "@Test\n public void RediffAlerts() \n {\n\t \n\t \n\t WebDriver driver=new ChromeDriver();\n\t \n\t driver.manage().window().maximize();\n\t driver.get(\"https://mail.rediff.com/cgi-bin/login.cgi\");\n\t driver.findElement(By.xpath(\"//input[@value='Go']\")).click();\n\t \n\t Alert alert = driver.switchTo().alert();\n\t \n\t System.out.println(\"Alert message if user is not entering user details: \"\n\t +alert.getText());\n\t\t\n\t String text = alert.getText();\n\t\t\n\t\t\n\t\tif(text.equals(\"Please enter a valid user name\"))\n\t\t{\n\t\t\tSystem.out.println(\"correct alert messg\");\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\tSystem.out.println(\"in-correct alert messg\");\n\t\t\t}\n\t\t\n\t\talert.accept(); //click on OK btn\n\t\t\n\t\t//alert.dismiss(); //click on cancel btn\n\t\t\n\t}", "private boolean confirmAlert(String title, String message) {\n\t\tStage window = new Stage();\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\n\t\twindow.setTitle(title);\n\t\twindow.setHeight(100);\n\n\t\tLabel errorMessage = new Label(message);\n\t\terrorMessage.setPrefWidth(150 + message.length() * 5);\n\t\terrorMessage.setAlignment(Pos.CENTER);\n\t\twindow.setWidth(errorMessage.getPrefWidth());\n\n\t\tButton yes = new Button(\"yes\");\n\t\tButton no = new Button(\"no\");\n\n\t\tyes.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = true;\n\t\t});\n\t\tno.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = false;\n\t\t});\n\n\n\t\tHBox answers = new HBox(yes, no);\n\t\tanswers.setSpacing(15);\n\t\tanswers.setAlignment(Pos.CENTER);\n\t\tVBox layout = new VBox();\n\t\tlayout.getChildren().addAll(errorMessage, answers);\n\t\tlayout.setAlignment(Pos.CENTER);\n\t\tlayout.setSpacing(15);\n\n\t\tScene scene = new Scene(layout);\n\t\twindow.setScene(scene);\n\t\twindow.showAndWait();\n\n\t\treturn answer;\n\t}", "@Then(\"^User is successfully navigated to the G-mail Mail Box$\")\n\tpublic void verifyGmailinbox() throws Throwable {\n\t\tSystem.out.println(\"user is able to see Gmail mail box\");\n\t}", "@Then(\"^I should see Price reminder$\")\n\tpublic void i_should_see_Price_reminder() throws Throwable {\n\t\tString msg=BrowserFactory.driver.findElement(By.xpath(\".//*[@class='cart-item-help-mod contextError']/div[@class='cart-item-error-text']\")).getText();\n\t\tassertTrue(\"price reminder is not displayed\", msg.equals(\"Please fill out the Vehicle Price field.\"));\n\t\t\n\t\t\n\t}", "static void confirm_A(Messenger messenger, Response_e response)\n {\n sendToClient(messenger, Request_e.Request_A_en.valueOf(), response, null);\n }", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public synchronized void verifyAddToWishlistMsg(WebDriver driver) throws Exception {\n\n\t\ttry {\n\n\t\t\tString elemText = utils.findElementByLocator(driver, \"WishList_Added_Msg\",\n\t\t\t\t\t\"ADDED text not displayed after clicking on Add To Wishlist\").getText();\n\t\t\tAssert.assertEquals(elemText, \"ADDED\");\n\t\t} catch (Exception e) {\n\n\t\t\tCustomException.throwExceptionError(e, \"PDP\", \"Add To WishList Modal not displayed\", driver);\n\t\t}\n\t}", "@Test\n public void basicConfirmHandlingDismissTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.dismiss();\n assertEquals(\"false\", confirmResult.getText());\n }", "public boolean verifyChargesRow(){\n\t\tboolean isPatientResponsible=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"fraCharges_Frame\");\n\t\tString textval=SeleniumUtil.getElementWithFluentWait(responsibleValue).getText();\n\t\tif(textval.equalsIgnoreCase(\"Patient\")){\n\t\t\tSystem.out.println(\"patient is responsible for charges\");\n\t\t\tisPatientResponsible=true;\n\t\t}\n\t\treturn isPatientResponsible;\t\n\t}", "public String termsValidation() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"termsnotmet\");\n this.scrollBy(submit);\n submit.click();\n helperMethods.waitForWebElement(termsError, 30);\n this.scrollBy(termsError);\n return termsError.getText();\n }", "private boolean verifyInput() {\r\n double comp = 0;\r\n try {\r\n comp = Double.parseDouble(compensation.getText());\r\n } catch (NumberFormatException e) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be a number.\");\r\n return false;\r\n }\r\n\r\n if(comp < 0 || comp > MAX_COMPENSATION) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be between 0 and \" + MAX_COMPENSATION + \".\");\r\n return false;\r\n }\r\n\r\n if(reply.getText().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Reply body empty.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"No complaint selected.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().getSelectedItem().getStatus() != Complaint.Status.FILED) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Cannot reply to an already closed complaint.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "@Then(\"^verify mailSent on the SentMails Page$\")\n\n\tpublic void verify_mailSent_on_the_SentMails_Page() throws Throwable {\n\t\tLog.info(\"Verifying send mail details are visible successfully on the Sent mail page\");\n\t\tsentMailsPage.mailSentVisible();\n\t\t\n\t\tsentMailsPage.mailSentDetails();\n\t}", "@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}", "public boolean visible_AlertMsg_state() {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\t\treturn IsElementVisibleStatus(alrtmsg);\r\n\t}", "@Override\n public void onOkButtonClicked() {\n\n\n String reasonMsg1 = backToOrderView.editText.getText().toString();\n reasonMsg = reasonMsg1.trim();\n\n if (reasonMsg.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please give reason...\", Toast.LENGTH_LONG).show();\n\n } else {\n\n\n // sendNotificationToUser(\"driver_cancel\");\n updateTripStatusApi(\"driver_cancel_at_pickup\", controller.pref.getTRIP_ID(), reasonMsg);\n\n\n }\n }", "@Test\n\tvoid AlertMessageHandle() throws InterruptedException {\n\t\t\n\t\t// Invoke the web browser and navigating to the website.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"/Users/Suvarna/Downloads/chromedriver\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\t// Alert Message handling\n driver.get(\"http://demo.guru99.com/test/delete_customer.php\");\t\t\t\n \n driver.findElement(By.name(\"cusid\")).sendKeys(\"567876\");\t\t\t\t\t\n driver.findElement(By.name(\"submit\")).submit();\t\t\t\n \t\t\n // Switch to Alert \n Alert alert = driver.switchTo().alert();\t\n \n // Capture the alert message. \n String alertMessage= driver.switchTo().alert().getText();\t\t\n \t\t\n // Display the alert message\t\t\n System.out.println(alertMessage);\t\n Thread.sleep(5000);\n \t\t\n // Accepting alert\t\t\n alert.accept();\t\n \n // Close the window\n driver.close();\n\t}", "public void ValidateDuplicateMessage() {\n\t\tAssert.assertEquals(NEVERMIND_OPTION.getText(), \"Nevermind\", \"Wrong page!!!\");\n\n\t}", "private boolean areYouSure(String text) {\n return JOptionPane.showConfirmDialog(null, text, \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;\n }", "boolean hasUserMessage();", "public void PaymentSuccess(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Payment success message - '\"+Text+\"' should be displayed\");\r\n\t\ttry{\r\n\t\t\tif(getText(locator_split(\"txtPaymentsuccess\")).equalsIgnoreCase(Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The Payment success message - '\"+Text+\"' is displayed\");\r\n\t\t\t\tSystem.out.println(\"Verified the Text -\"+Text);\r\n\t\t\t}else {\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success message - '\"+Text+\"' is not displayed\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- The Payment success message - '\"+Text+\"' is not displayed\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtPaymentsuccess\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "public String getTextToVerify(){\n Reporter.log(\" verify message \"+ getMessage+\"<br>\");\n return getTextFromElement(getMessage);\n }", "public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }", "public void assertErrorMsgCheck() {\r\n\t\t\tassertEquals(errorMsg.getText().substring(0,52), \"Warning: Please check the form carefully for errors!\");\r\n\t\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ errorMsg.getText().substring(0,52));\r\n\t\t}", "protected boolean Confirm(String message) {\n String line = inputLine(message);\n if (line.length() == 0 || line.toUpperCase().charAt(0) == 'Y') {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic void notifyCustomer() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"Customer Credit has been Charged more than $400\", \"Warning\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}" ]
[ "0.6877599", "0.6800925", "0.66253066", "0.6437473", "0.6412183", "0.64101887", "0.6396532", "0.63629484", "0.6348592", "0.62060124", "0.6192606", "0.6150602", "0.6095555", "0.6058879", "0.6055063", "0.605182", "0.60498303", "0.6046615", "0.6039108", "0.60303825", "0.60294604", "0.5958919", "0.59554577", "0.5936219", "0.5918853", "0.59159255", "0.5913656", "0.5909149", "0.5905098", "0.58985394", "0.58971876", "0.5891034", "0.586523", "0.5859028", "0.5855173", "0.5841406", "0.58346677", "0.5815597", "0.5809572", "0.579333", "0.5785094", "0.5775988", "0.5750803", "0.57220393", "0.5695004", "0.5689537", "0.5681306", "0.5678873", "0.5673861", "0.5661955", "0.5660975", "0.5648347", "0.56381726", "0.56377405", "0.5637393", "0.5636746", "0.5631429", "0.56271696", "0.56082284", "0.56022626", "0.558976", "0.5587739", "0.55694455", "0.55638367", "0.5558365", "0.55347884", "0.55306256", "0.55300003", "0.5528975", "0.55274516", "0.5522776", "0.55218387", "0.55173147", "0.55168915", "0.5516566", "0.5513004", "0.5497966", "0.5492957", "0.54926765", "0.54924256", "0.54894286", "0.54791594", "0.54737544", "0.5467459", "0.5457372", "0.5456406", "0.54512227", "0.544802", "0.54422957", "0.54361206", "0.5435887", "0.5432926", "0.54323846", "0.54319024", "0.542539", "0.5417479", "0.54153115", "0.5414123", "0.54128814", "0.5390228" ]
0.75241137
0
this method verify the Product Details
public boolean VerifyOrderConfirmation_ProductDetails() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed(); if(flag){extentLogs.pass("VerifyProductDetails", "ProductDetailsareIsDisplayed"); }else{extentLogs.fail("VerifyProductDetails", "ProductDetailsareNotDisplayed");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void ValidateProductDetails(String Productname,String Productcount,Reporting report)\n\t{\n\t\tString ActProductName=ProductName.getText();\n\t\t report.extentReportPass(\"Cart Page is displayed\");\n\t\tAssert.assertTrue(ActProductName.contains(Productname), \"Product detail is wrong\");\n\t\t\n\t\tString ActProductCount =ProductCount.getText();\n\t\tAssert.assertEquals(ActProductCount, Productcount);\n\t}", "@Test\n\tpublic void getProductDetails() throws Exception {\n\n\t\tMockito.when(productService.getProductInfo(Mockito.anyLong())).thenReturn(mockProduct);\n\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.get(\"/products/\" + productID)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tSystem.out.println(result.getResponse());\n\n\t\tJSONAssert.assertEquals(expected, result.getResponse().getContentAsString(), true);\n\t\tSystem.out.println(\"UnitTestSuccessful\");\n\t}", "public static void getAssignedProduct(String productId , ITestContext context ){\n\t\t \n\t\t //SET URL\n\t\t customerId= (context.getAttribute(\"customerId\")).toString();//need to add validation for customerId\n\t\t String CONTEXT_PATH=\"mcss/ecommerce/customer/\" +customerId + \"/product/\" + productId;\n\t\t \n\t\t//Execute REST\n\t\t Response response =get( CONTEXT_PATH );\n \n\t\t \n\n\t\t //Validations:\n\t\t ResponseBody body = response.getBody();\n\t\t assertEquals( 200 ,response.getStatusCode(),\"Status Code is not as expected\");\n\t\t assertEquals( \"AC\" ,response.body().path(\"Product.status\"),\"AP status is not correct \");\n\t\t assertEquals( productId ,response.body().path(\"Product.id\"),\"AP status is not correct \");\n\t\t \n\t\t //Product validations \n\t\t assertNotEquals( null, response.body().path(\"Product.serviceId\"), \"ServiceId is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.productOfferingProductSpecID\"), \"productOfferingProductSpecID is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.productTypeX9\"), \"productTypeX9 is null\");//EQ,IPTV\n\t\t assertNotEquals( null, response.body().path(\"Product.hasPendingOrders\"), \"hasPendingOrders is null\");//optional\n\t\t assertNotEquals( null, response.body().path(\"Product.ceaseActionAllowed\"), \"ceaseActionAllowed is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.changeActionAllowed\"), \"changeActionAllowed is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.catalogOfferingId\"), \"catalogOfferingId is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.lineOfBusiness\"), \"lineOfBusiness is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.spoName\"), \"spoName is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.resumeActionAllowed\"), \"resumeActionAllowed is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.catalogItemID\"), \"catalogItemID\");\n\t\t// plan validations only if product is not Equipment for Equipment can be if it has Repeator\n\t\t if ( !(response.body().path(\"Product.productTypeX9\")).equals(\"EQ\") ){\n\t\t assertNotEquals( null, response.body().path(\"Product.plan\"), \"plan is null\"); // optional \n\t\t assertNotEquals( null, response.body().path(\"Product.plan.catalogItemName\"), \"plan.catalogItemName is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.plan.catalogItemImages\"), \"plan.catalogItemImages is null\");//optional\n\t\t assertNotEquals( null, response.body().path(\"Product.plan.planRank\"), \"plan.planRank is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.plan.catalogItemID\"), \"plan.catalogItemID is null\");\n\t\t assertNotEquals( null, response.body().path(\"Product.plan.catalogItemDescription\"), \"plan.catalogItemDescription is null\");//optional\n\t\t assertNotEquals( null, response.body().path(\"Product.plan.id\"), \"plan.id is null\");\n\t\t }\n\t\t //services validations \n\t\t assertNotEquals( null, response.body().path(\"Product.services\"), \"services are null!\"); // optional \n\t\t assertNotEquals( 0, response.body().path(\"Product.services.size()\"), \" Services Array is empty !\"); // optional \n\t\t// assertNotEquals( null, ((RestAssuredBased) response.body()).get(\"/Product\").jsonPath().getList(\"Product.services.[0].businessType\"), \"Services.businessType is null!\"); \n\t/*\t assertNotEquals( null, response.body().path(\"Product.services.[0].catalogItemID\"), \"Services.catalogItemID is null!\"); \n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].catalogItemName\"), \"Services.catalogItemName is null!\"); \n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].catalogItemDescription\"), \"catalogItemDescription is null!\"); //optional\n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].initialActivationDate\"), \"Services.initialActivationDate is null!\");// \n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].id\"), \"Services.id is null!\");// \n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].serviceType\"), \"Services.serviceType is null!\");// \n\t\t assertNotEquals( null, response.body().path(\"Product.services.[0].status\"), \"Services.status is null!\");// */\n\t\t \n\t\t \n\t\t //Savinq Info \n\t\t /*\n context.setAttribute( \"customerId\", body.path(\"ClientUserContext.customerId\" ));\n context.setAttribute( \"personId\", body.path(\"ClientUserContext.personId\" ));\n context.setAttribute( \"personId\", body.path(\"ClientUserContext.personId\" ));\n context.setAttribute( \"personObjIdX\", body.path(\"ClientUserContext.personObjIdX\" ));\n */\n\t }", "public static int verify(Product product){\n\n int verifiedId = -1;\n try {\n Connection myConnection = ConnectionFactory.getConnection();\n Statement stat = myConnection.createStatement();\n ResultSet rs = stat.executeQuery(\"SELECT * from product\");\n\n while(rs.next()){\n\n if(product.getDenumire().equals(rs.getString(\"productName\"))){\n\n verifiedId = rs.getInt(1);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return verifiedId;\n }", "public void verifyProductDetailAttribute(String Sku, String totalGemAmount, String MetalType, String height, String width,\r\n\r\n\t\t\tString MetalWeight, String Catagory, String TypeOfProduct, String DiamondShape, String NoOfDiamonds,\r\n\r\n\t\t\tString Collection, String GemstoneType, String GemstoneShape, String NoOfGemstones, String TotalGemWeight,\r\n\r\n\t\t\tString TotalDiamondWeight, Product productItms) {\n\r\n\t\tif (productItms.getTGemAmount() != null && !productItms.getTGemAmount().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualTGemAmount = utility.converPrice(productItms.getTGemAmount());\r\n\r\n\t\t\tif (!(actualTGemAmount.trim().toUpperCase().equals(totalGemAmount.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"totalGemAmount\", finalResult.get(\"totalGemAmount\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(totalGemAmount, finalResult.get(\"totalGemAmount\") & false);\r\n\r\n\t\t\ttotalGemAmount = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Metal type\r\n\r\n\t\tif (productItms.getmetalPurity() != null && !productItms.getmetalPurity().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualmetalPurity = productItms.getmetalPurity();\r\n\r\n\t\t\tif (!(actualmetalPurity.trim().toUpperCase().equals(MetalType.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"MetalType\", finalResult.get(\"MetalType\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(MetalType, finalResult.get(\"MetalType\") & false);\r\n\r\n\t\t\tMetalType = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// Verification of height of the product page\r\n\r\n\t\tif (productItms.getHeight() != null && !productItms.getHeight().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualHeight = utility.convertDecimal(productItms.getHeight());\r\n\r\n\t\t\tString expectedHeight = utility.convertDecimal(height);\r\n\r\n\t\t\tif (!(actualHeight.trim().toUpperCase().equals(expectedHeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"height\", finalResult.get(\"height\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse if (height == \"0\")\r\n\r\n\t\t{\r\n\r\n\t\t\theight = \"N/A\";\r\n\r\n\t\t\tfinalResult.put(height, finalResult.get(\"height\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of width of the product page\r\n\r\n\t\tif (productItms.getWidth() != null && !productItms.getWidth().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualWidth = utility.convertDecimal(productItms.getWidth());\r\n\r\n\t\t\tString expectedWidth = utility.convertDecimal(width);\r\n\r\n\t\t\tif (!(actualWidth.trim().toUpperCase().equals(expectedWidth.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"width\", finalResult.get(\"width\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse if (width == \"0\")\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"width\", finalResult.get(\"width\") & false);\r\n\r\n\t\t\twidth = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of gold weight\r\n\r\n if((Sku.contains(\"RG\")||Sku.contains(\"BR\")))\r\n {\r\n MetalWeight=\"N/A\";\r\n \r\n }\r\n else {\r\n \r\n if(productItms.getGoldWeight() != null && !productItms.getGoldWeight().trim().equals(\"N/A\")){\r\n\r\n\r\n\t\t\tString actualGoldWeight = utility.convertDecimal(productItms.getGoldWeight().split(\" \")[0].toString());\r\n\r\n\t\t\tString expectedGoldWeight = utility.convertDecimal(MetalWeight);\r\n\r\n\t\t\tif (!(actualGoldWeight.trim().toUpperCase().equals(expectedGoldWeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"MetalWeight\", finalResult.get(\"MetalWeight\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"MetalWeight\", finalResult.get(\"MetalWeight\") & false);\r\n\r\n\t\t\tMetalWeight = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Design Type\r\n\r\n\t\tif (productItms.getDesignType() != null && !productItms.getDesignType().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tString actualDesignType = productItms.getDesignType();\r\n\r\n\t\t\tif (!(actualDesignType.trim().toUpperCase().equals(Catagory.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"Catagory\", finalResult.get(\"Catagory\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"Catagory\", finalResult.get(\"Catagory\") & false);\r\n\r\n\t\t\tCatagory = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// Verification of style of the product in Product Page. String\r\n\r\n\t\tif (productItms.getstyle() != null && !productItms.getstyle().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getstyle(), TypeOfProduct)))\r\n\r\n\t\t\t\tfinalResult.put(\"TypeOfProduct\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"TypeOfProduct\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t\tTypeOfProduct = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Diamond shape\r\n\r\n\t\tif (productItms.getDshape() != null && !productItms.getDshape().trim().equals(\"N/A\")) {\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getDshape(), DiamondShape)))\r\n\r\n\t\t\t\tfinalResult.put(\"DiamondShape\", finalResult.get(\"DiamondShape\") & false);\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\r\n\t\t{\r\n\r\n\t\t\tfinalResult.put(\"DiamondShape\", finalResult.get(\"TypeOfProduct\") & false);\r\n\r\n\t\t\tDiamondShape = \"N/A\";\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Total number of Diamonds\r\n\r\n\t\tString actualTotalnoDiamonds = productItms.getTotalnoDiamonds();\r\n\r\n\t\tif (!(actualTotalnoDiamonds.trim().toUpperCase().equals(NoOfDiamonds.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"NoOfDiamonds\", finalResult.get(\"NoOfDiamonds\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Diamond total Weight\r\n\r\n\t\tString actualDtotalWeight = utility.convertDecimal(productItms.getDtotalWeight().split(\"ct\")[0].toString());\r\n\r\n\t\tString expetedDtotalWeight1 = utility.convertDecimal(TotalDiamondWeight.trim());\r\n\r\n\t\tif (!(actualDtotalWeight.trim().toUpperCase().equals(expetedDtotalWeight1.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"TotalDiamondWeight\", finalResult.get(\"TotalDiamondWeight\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Collections\r\n\r\n\t\tif (!(utility.matchTwoString(productItms.getCollections(), Collection)))\r\n\r\n\t\t\tfinalResult.put(\"Collection\", finalResult.get(\"Collection\") & false);\r\n\r\n\t\t// verification of Gemstone Type\r\n\r\n\t\tif (GemstoneType.length() > 0)\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getGemType(), GemstoneType)))\r\n\r\n\t\t\t\tfinalResult.put(\"GemstoneType\", finalResult.get(\"GemstoneType\") & false);\r\n\r\n\t\t// verification of Gemstone shape\r\n\r\n\t\tif (GemstoneShape.length() > 0)\r\n\r\n\t\t\tif (!(utility.matchTwoString(productItms.getGemShape(), GemstoneShape)))\r\n\r\n\t\t\t\tfinalResult.put(\"GemstoneShape\", finalResult.get(\"GemstoneShape\") & false);\r\n\r\n\t\t// verification of Number of Gemstones\r\n\r\n\t\tif (!(NoOfGemstones.equals(\"0\"))) {\r\n\r\n\t\t\tString actualTotalNoGem = productItms.getTotalNoGem();\r\n\r\n\t\t\tif (!(actualTotalNoGem.trim().toUpperCase().equals(NoOfGemstones.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"NoOfGemstones\", finalResult.get(\"NoOfGemstones\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// verification of Total Gemstone weight\r\n\r\n\t\tif (!(TotalGemWeight.equals(\"0\"))) {\r\n\r\n\t\t\tString actualTotalGemWeight = utility\r\n\r\n\t\t\t\t\t.convertDecimal(productItms.getTotalGemWeight().split(\"ct\")[0].toString());\r\n\r\n\t\t\tString expectedTotalGemWeight = utility.convertDecimal(TotalGemWeight);\r\n\r\n\t\t\tif (!(actualTotalGemWeight.trim().toUpperCase().equals(expectedTotalGemWeight.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"TotalGemWeight\", finalResult.get(\"TotalGemWeight\") & false);\r\n\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\t\t\r\n\r\n\t}", "@Test\n public void testFindProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "public boolean verifyCartItem()\n\t{ if (einKaufswagenBtn.isDisplayed())\n\t{\n\t\teinKaufswagenBtn.click();\n\t}\n\tfor (int j=0;j<collectnToStorePrdktIdLst.size();j++)\n\t{\n\t\tString expectedProduct1=collectnToStorePrdktIdLst.get(j);\n\t\tList<WebElement> fndProduct=driver.findElements(By.xpath(\"//form[@id='activeCartViewForm']//div[@class='a-section a-spacing-mini sc-list-body sc-java-remote-feature']//div[@class='a-row sc-list-item sc-list-item-border sc-java-remote-feature']\"));\n\t\tfor (int e=0;e<=fndProduct.size();e++)\n\t\t{\n\t\t\tString actProdkt=fndProduct.get(e).getAttribute(\"data-asin\");\n\t\t\tif (actProdkt.contains(expectedProduct1))\n\t\t\t{\n\t\t\t\tcnt++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (cnt==2)\n\t{\n\t\treturn true;\n\t}\n\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "@Test\n public void testCreateProductShouldCorrect() throws Exception {\n when(productRepository.existsByName(productRequest.getName())).thenReturn(false);\n when(productRepository.save(any(Product.class))).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\n public void getProductDetailTest() throws ApiException {\n String productId = null;\n ResponseBankingProduct response = api.getProductDetail(productId);\n\n // TODO: test validations\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "@Override\r\n\tpublic void validate(Product p) throws CustomBadRequestException {\r\n\t\tif(p.getName() == null || p.getName().equals(\"\") || p.getBarcode() == null || p.getBarcode().equals(\"\") || p.getMeasure_unit() == null ||\r\n\t\t\t\tp.getMeasure_unit().equals(\"\") || p.getQuantity() == null || p.getQuantity().equals(\"\")|| p.getBrand() == null || p.getBrand().equals(\"\")){\r\n\t\t\tthrow new CustomBadRequestException(\"Incomplete Information about the product\");\r\n\t\t}\r\n\r\n\t\tString eanCode = p.getBarcode();\r\n\t\tString ValidChars = \"0123456789\";\r\n\t\tchar digit;\r\n\t\tfor (int i = 0; i < eanCode.length(); i++) { \r\n\t\t\tdigit = eanCode.charAt(i); \r\n\t\t\tif (ValidChars.indexOf(digit) == -1) {\r\n\t\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add five 0 if the code has only 8 digits\r\n\t\tif (eanCode.length() == 8 ) {\r\n\t\t\teanCode = \"00000\" + eanCode;\r\n\t\t}\r\n\t\t// Check for 13 digits otherwise\r\n\t\telse if (eanCode.length() != 13) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\t// Get the check number\r\n\t\tint originalCheck = Integer.parseInt(eanCode.substring(eanCode.length() - 1));\r\n\t\teanCode = eanCode.substring(0, eanCode.length() - 1);\r\n\r\n\t\t// Add even numbers together\r\n\t\tint even = Integer.parseInt((eanCode.substring(1, 2))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(3, 4))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(5, 6))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(7, 8))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(9, 10))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(11, 12))) ;\r\n\t\t// Multiply this result by 3\r\n\t\teven *= 3;\r\n\r\n\t\t// Add odd numbers together\r\n\t\tint odd = Integer.parseInt((eanCode.substring(0, 1))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(2, 3))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(4, 5))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(6, 7))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(8, 9))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(10, 11))) ;\r\n\r\n\t\t// Add two totals together\r\n\t\tint total = even + odd;\r\n\r\n\t\t// Calculate the checksum\r\n\t\t// Divide total by 10 and store the remainder\r\n\t\tint checksum = total % 10;\r\n\t\t// If result is not 0 then take away 10\r\n\t\tif (checksum != 0) {\r\n\t\t\tchecksum = 10 - checksum;\r\n\t\t}\r\n\r\n\t\t// Return the result\r\n\t\tif (checksum != originalCheck) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\tif(Float.parseFloat(p.getQuantity()) <= 0){\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Quantity\");\r\n\t\t}\r\n\r\n\r\n\t}", "@Test\n public void getProductDetailTest() throws ApiException {\n String productId = null;\n \n ResponseBankingProductById response = api.getProductDetail( productId );\n response.toString();\n // TODO: test validations\n }", "public synchronized void verifyActualProdTitle(String productName) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(actualProdTitle, \"cart product title\", 30);\n\t\t\tString actProdTitle= actualProdTitle.getAttribute(\"value\");\n\t\t\tif(productName.equals(actProdTitle))\n\t\t\t{\n\t\t\t\tWebActionUtil.info(\"Product title is verified\");\n\t\t\t}\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to verify actual title of the product\");\n\t\t\tAssert.fail(\"Unable to verify actual title of the product\");\n\t\t}\n\t}", "private void validateApiProductInfo(APIProduct product) throws APIManagementException {\n String apiName = product.getId().getName();\n if (apiName == null) {\n handleException(\"API Name is required.\");\n } else if (containsIllegals(apiName)) {\n handleException(\"API Name contains one or more illegal characters \" +\n \"( \" + APIConstants.REGEX_ILLEGAL_CHARACTERS_FOR_API_METADATA + \" )\");\n }\n //version is not a mandatory field for now\n if (!hasValidLength(apiName, APIConstants.MAX_LENGTH_API_NAME)\n || !hasValidLength(product.getId().getVersion(), APIConstants.MAX_LENGTH_VERSION)\n || !hasValidLength(product.getId().getProviderName(), APIConstants.MAX_LENGTH_PROVIDER)\n || !hasValidLength(product.getContext(), APIConstants.MAX_LENGTH_CONTEXT)) {\n throw new APIManagementException(\"Character length exceeds the allowable limit\",\n ExceptionCodes.LENGTH_EXCEEDS);\n }\n }", "@Override\n\tpublic void productDetails(String productId) {\n\t\t//creating local variable\n\t\tint eq = 0;\n\t\tint ct = 0;\n\t\tint dif = 0;\n\t\t//creating the display to print out the product details of the tv sets class\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ================================================================================================================\" );\n\t\tSystem.out.println(\" Type ProductId Product Name Price Display Size \" );\n\t\tSystem.out.println(\" ================================================================================================================\" );\n\t\tSystem.out.println(\" \");\n\t\t//Create the for loop to verify all the products in the arrayLIst\n\t\tfor(int i = 0; i < Driver.products.size(); i++) {\n\t\t\t//if the productId inserted by the user is equal an any productId from this class tv sets\n\t\t\tif(Driver.products.get(i).getProductId().equals(productId)) {\n\t\t\t\tSystem.out.println(\" Eletronic Device \" + Driver.products.get(i).getProductId() + \" \" +\n\t\t\t\t\t\tDriver.products.get(i).getName() + \" \" + Driver.products.get(i).getPrice() + \" \" + \n\t\t\t\t\t\tDriver.products.get(i).getDisplaySize() );\t\n\t\t\t\teq += 1;\n\t\t\t//if the productId inserted by the user is not equal an any productId, but similar to the name from this class tv sets\n\t\t\t}else if (Driver.products.get(i).getProductId().contains(productId) && eq == 0) {\n\t\t\t\tSystem.out.println(\" Eletronic Device \" + Driver.products.get(i).getProductId() + \" \" +\n\t\t\t\t\t\tDriver.products.get(i).getName() + \" \" + Driver.products.get(i).getPrice() + \" \" + \n\t\t\t\t\t\tDriver.products.get(i).getDisplaySize() );\t\n\t\t\t\tct += 1;\n\t\t\t}//close if statement\n\t\t}//close for loop\n\t\t//if the productId inserted by the user was not found in the stoque\n\t\tfor(int i = 0; i < Driver.products.size(); i++) {\n\t\t\tif (eq == 0 && ct == 0 && dif == 0 ){\n\t\t\t\tSystem.out.println(\" The search \" + productId + \" was not found in our Stoque. Try changing the productId name. \");\n\t\t\t\tdif += 1;\n\t\t\t}//close if statement\n\t\t}//close for loop\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" ================================================================================================================\" );\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" \");\n\n\t\tSystem.out.println();\n\t}", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Then(\"the product has following attributes:\")\n public void the_product_has_following_attributes(List<String> productAttributes) {\n boolean isEverythingOk = false;\n try{\n productPage.getProductAttributes();\n isEverythingOk = true;\n }catch(Exception e){\n //ignore\n }\n Assert.assertTrue(isEverythingOk);\n\n }", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public ProductDetails getProductDetails(Long productId) {\n\t\t// TODO Auto-generated method stub\t\t\n\t\t//do http get call\n ResponseEntity<String> productDetails = doRestTemplateCall(ConstantsUtil.BASE_URL+productId+ConstantsUtil.URL_ENDPOINT);\n ProductDetails pdtDetailsResponse = new ProductDetails();\n //To handle redirect from http to https\n HttpHeaders httpHeaders = productDetails.getHeaders();\n HttpStatus statusCode = productDetails.getStatusCode();\n if (statusCode.equals(HttpStatus.MOVED_PERMANENTLY) || statusCode.equals(HttpStatus.FOUND) || statusCode.equals(HttpStatus.SEE_OTHER)) {\n if (httpHeaders.getLocation() != null) {\n \tproductDetails = doRestTemplateCall(httpHeaders.getLocation().toString());\n } else {\n throw new RuntimeException();\n }\n }\n if(null!= productDetails) { //to check if productdetail response is received \n log.info(\"product details found:\"+productDetails.getBody());\n \n JsonNode node;\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n\t\t\tnode = objectMapper.readValue(productDetails.getBody(), JsonNode.class);\n\t\t\tif(!myRetailAppDao.isProductDetailsPresent(productId))\t //check if product data is present in MongoDB\n\t\t\t\tmyRetailAppDao.saveToMongoDB(productDetails.getBody()); // if not, save product data to MongoDB\n\t\t\telse\n\t\t\t\tlog.info(\"Data for prductId \"+productId+\" is already present in DB, skipping insert\");\n\t\t\tJsonNode title = null;\n\t\t\t//get product title from the nested json\n\t\t\ttitle = node.get(ConstantsUtil.PRODUCT).get(ConstantsUtil.ITEM).get(ConstantsUtil.PDT_DESC).get(ConstantsUtil.TITLE);\n\t\t\tlog.info(\"title:\"+title.asText());\n\t\t\t//set the product details response\n\t\t\tpdtDetailsResponse.setName(title.asText());\n\t\t\tpdtDetailsResponse.setId(productId);\n\t\t\tCurrentPrice currentPrice = new CurrentPrice();\n\t\t\tPriceAndCurrency priceAndCurr = myRetailAppDao.getPriceAndCurrency(productId); //get price and currency details\n\t\t\tcurrentPrice.setCurrency_code(CurrencyMap.getCurrencyCode(priceAndCurr.getCurrency()));\n\t\t\tcurrentPrice.setValue(priceAndCurr.getPrice()); \n\t\t\tpdtDetailsResponse.setCurrentPrice(currentPrice);\n\t\t\t\n\t\t\tlog.info(\"pdtDetailsResponse:\"+pdtDetailsResponse.toString());\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error while calling external api for title\",e);\n\t\t}\n }\n \n \treturn pdtDetailsResponse;\n\t}", "@Test\n\tpublic void test_get_product_by_id_return_200() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.GET, \"/1\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\t// Setup when\n\t\twhen(productService.findProductById(1l)).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$.color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$.name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).findProductById(ArgumentMatchers.any());\n\t}", "public void verifyToCart() {\n if (priceText.getText().equalsIgnoreCase(\"$0.00\")) {\n Assert.fail();\n System.out.println(\"No products have been added to your cart.\");\n\n\n } else\n System.out.println(\"\\n\" +\n \"The product has been successfully added to the Cart.\" + \"\\n\" + \"Total Price: \" + priceText.getText());\n\n }", "@Step\n public void verifyToProductListAreEquals(List<CartProduct> expectedProducts,List<CartProduct> actualProducts ){\n\n for (CartProduct expectedProduct: expectedProducts) {\n CartProduct actualProduct = findProductInList(expectedProduct, actualProducts);\n Assert.assertTrue(\"Prices are not correct\",expectedProduct.getPrice() == actualProduct.getPrice());\n Assert.assertTrue(\"Sizes are not correct\",expectedProduct.getSize() == actualProduct.getSize());\n Assert.assertTrue(\"Names are not correct\",expectedProduct.getName() == actualProduct.getName());\n Assert.assertTrue(\"Colors are not correct\",expectedProduct.getColor() == actualProduct.getColor());\n Assert.assertTrue(\"Qty are not correct\",expectedProduct.getQty() == actualProduct.getQty());\n }\n }", "@Test\n\tpublic void test_update_product_return_200() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.PUT, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.update(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$.color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$.name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).update(ArgumentMatchers.any());\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "@SuppressWarnings(\"unchecked\")\n@Test\n public void testProductSelection() {\n\t \n\t\tRestAssured.baseURI = baseURL;\n\t\tRequestSpecification request = RestAssured.given();\n\t\t\n\t\t\n\t\trequest.header(\"Content-Type\", \"application/json\");\n\t\t\n\n\t\tJSONObject jobj = new JSONObject();\n\t\t\n\t\tjobj.put(\"product_id\",\"56c815cc56685df2014df1fb\"); //Fetching the product ID from the Login API response\n\t\t\n\t\trequest.body(jobj.toJSONString());\n\n\t\tResponse resp = request.post(\"/product_selection\");\n\t\t\n\t\t\n\t\tint statusCode = resp.getStatusCode();\n\t\tAssert.assertEquals(statusCode,200, \"Status Code is not 200\");\n }", "private void checking() {\n\n System.out.println(cart);\n\n for (Order o : cart) {\n if (o.getOrderedProduct().getPrice()!= productRepository.getOne(o.getOrderedProduct().getId()).getPrice()){\n System.out.println(\"product will be updated\");\n deleteFromCart(o.getOrderedProduct().getId());\n addToCart(o.getOrderedProduct().getId(),o.getCount());\n }\n }\n }", "@Test\r\n\tpublic void createProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"id\", \"7\"); // Cast\r\n\t\trequestParams.put(\"name\", \"Mangao\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.post(\"\");\r\n\t\tSystem.out.println(\"POST Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 201);\r\n\r\n\t}", "@Test\n public void testValidateNewOrderProduct() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderProduct(order3));\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public static boolean updateProductDetails(Product product) {\r\n\t\tdbConnect();\r\n\t\tPreparedStatement stmt = null;\r\n\t\tboolean saveStatus = true;\r\n\t\tfinal String UPDATE_PRODUCT = \"UPDATE product SET product_code='\" + product.getProductCode()\r\n\t\t\t\t+ \"', product_name=UPPER('\" + product.getProductName().replace(\"'\", \"\\\\'\") + \"'), product_unit=UPPER('\"\r\n\t\t\t\t+ product.getProductUnit() + \"'), product_description=UPPER('\"\r\n\t\t\t\t+ product.getProductDescription().replace(\"'\", \"\\\\'\") + \"'), product_purprice=\"\r\n\t\t\t\t+ product.getPriceForPurchase() + \", product_retprice=\" + product.getPriceForSales()\r\n\t\t\t\t+ \", product_quantity=\" + product.getStockQuantity() + \" WHERE product_code=\"\r\n\t\t\t\t+ product.getProductCode();\r\n\t\ttry {\r\n\t\t\tstmt = conn.prepareStatement(UPDATE_PRODUCT);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t\tstmt.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tsaveStatus = false;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn saveStatus;\r\n\t}", "@Test\n\tpublic void productValidation() throws IOException, InterruptedException {\n\t\tservice=startServer();\n\t\tAndroidDriver<AndroidElement> driver=AndroidCapabilities(\"app.under.test\");\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tProductScreen productScreen=new ProductScreen(driver);\n\t\t\n\t\tdriver.findElementByAccessibilityId(\"test-Username\").sendKeys(\"standard_user\");\n\t\tdriver.findElementByAccessibilityId(\"test-Password\").sendKeys(\"secret_sauce\");\n\t\tdriver.hideKeyboard();\n\t\tdriver.findElementByAccessibilityId(\"test-LOGIN\").click();\n\n\t\t//product listing\n\n\t\t//int count=driver.findElementsByXPath(\"//android.widget.ScrollView//android.view.ViewGroup\").size();\n\t\tint count=productScreen.getProductGroup().size();\n\t\tSystem.out.println(count);\n\n\t\tString expectedProduct=\"Sauce Labs Backpack\";\n\t\tString displayedProduct=\"\";\n\n\t\tfor(int i=0;i<count;i++)\n\n\t\t{\n\t\t\t\n\t\t\t//String text=driver.findElementsByXPath(\"//android.widget.ScrollView//android.view.ViewGroup//android.widget.TextView\").get(i).getText();\n\t\t\tString text=productScreen.getProductText().get(i).getText();\n\t\t\tSystem.out.println(text);\n\t\t\tif(text.equalsIgnoreCase(expectedProduct))\n\n\t\t\t{\n\n\t\t\t\tproductScreen.getProductText().get(i).click();\n\t\t\t\t\n\t\t\t\tdisplayedProduct=productScreen.getProductText().get(i).getText();\n\t\t\t\tSystem.out.println(displayedProduct);\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tAssert.assertEquals(expectedProduct, displayedProduct);\n\t\tstopServer();\n\n}", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "private void productValidate(ProductDTO product) throws ApiException {\n\n if (product.getName() != null) {\n if (!product.getName().equals(\"\")) {\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Name invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Name invalido.\");\n }\n if (product.getCategory() != null) {\n if (!product.getCategory().equals(\"\")) {\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Category invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Category invalido.\");\n }\n if (product.getBrand() != null) {\n if (!product.getBrand().equals(\"\")) {\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Brand invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Brand invalido.\");\n }\n if (product.getPrice() != null) {\n if (product.getPrice() >= 0.0) {\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Price invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Price invalido.\");\n }\n if (product.getQuantity() != null) {\n if (product.getQuantity() >= 0) {\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Quantity invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Quantity invalido.\");\n }\n if (product.getPrestige() != null) {\n if (!product.getPrestige().equals(\"\")) {\n\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Prestige invalido.\");\n }\n } else {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Campo Prestige invalido.\");\n }\n }", "@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isProductAvailavle(String productId) {\n\t\treturn true;\n\t}", "@Test(priority = 5)\n\tpublic void validateContents() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the content of the product\");\n\t\tHeroImageProductPageFlow.clickHeroImage(locator);\n\t\theroImg.validateDescriptionContent(locator, validate);\n\t\t;\n\t\tlog.info(\"Content validation is correct\");\n\t\tHeroImageProductPageFlow.clickProductSpecification(locator);\n\t\theroImg.validateSpecificationContent(locator, validate);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}", "@Test\r\n\tpublic void testProductSuccess() {\r\n\r\n\t\tProductBean product = new ProductBean();\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\tHomeService service = (HomeService) ctx.getBean(\"homeservice\");\r\n\t\tproduct = service.getProductDesc(2);\r\n\t\tSystem.out.println(product.getProductBrand());\r\n\t\tSystem.out.println(product.getProductName());\r\n\r\n\t}", "@Test\n\tpublic void testAddproductNotName() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = ProductDTO.builder()\n\t\t\t\t.brand(\"GUCCI\")\n\t\t\t\t.color(\"blue and ivory GG denim\")\n\t\t\t\t.price(new BigDecimal(\"1000.50\"))\n\t\t\t\t.build();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.POST, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.addProduct(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isBadRequest())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.error\", containsString(\"Name must be not blank\")));\n\n\t\t// verify\n\t\tverify(productService, times(0)).addProduct(ArgumentMatchers.any());\n\t}", "@Test\n public void testUpdateProductShouldSuccessWhenProductNotUpdateName() throws Exception {\n product.setName(productRequest.getName());\n when(productRepository.findOne(product.getId())).thenReturn(product);\n when(productRepository.save(product)).thenReturn(product);\n\n Map<String, Object> jsonMap = new HashMap<>();\n jsonMap.put(\"$.url\", productRequest.getUrl());\n testResponseData(RequestInfo.builder()\n .request(put(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .jsonMap(jsonMap)\n .build());\n }", "protected boolean verifyDeveloperPayload(final Purchase purchase) {\n\t\tString payload = purchase.getDeveloperPayload();\n\t\tLog.w(TAG, \"Payload: \" + payload);\n\n\t\tHandler handler = new Handler() {\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tif (msg != null) {\n\t\t\t\t\tif (msg.what == Constants.OK) {\n\t\t\t\t\t\tafterVerify(purchase, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.makeError(PurchaseActivity.this, getResources()\n\t\t\t\t\t\t\t.getString(R.string.comm_error));\n\t\t\t\t}\n\n\t\t\t\tafterVerify(purchase, false);\n\t\t\t};\n\t\t};\n\n\t\tMessenger messenger = new Messenger(handler);\n\n\t\tIntent intent = new Intent(PurchaseActivity.this, WebService.class);\n\t\tintent.putExtra(WebService.PARAM_OPERATION,\n\t\t\t\tWebService.OPERATION_VALIDATE_TOKEN);\n\t\tintent.putExtra(WebService.PARAM_TOKEN, purchase.getDeveloperPayload());\n\t\tintent.putExtra(WebService.PARAM_PURCHASE_TOKEN, purchase.getToken());\n\t\tintent.putExtra(WebService.PARAM_MESSENGER_SERVICE, messenger);\n\t\tstartService(intent);\n\n\t\treturn true;\n\t}", "public boolean VerifyProductDisplayed_OrderConfirmation() {\n\t\t\n\t\tboolean flag = false;\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.pass(\"VerifyProductImageDisplayedInConfirmationPage\", \"Displayed\");\n\t\t}else{extentLogs.fail(\"VerifyProductImageDisplayedInConfirmationPage\", \"NotDisplayed\");\t\t}\n\treturn flag;\n\t\t}", "@Test\n\tpublic void testFindProductByProductIdSuccess() {\n\n\t\tMockito.when(productDao.findById(1)).thenReturn(Optional.of(product));\n\n\t\tResponseEntity<Product> expected = productServiceImpl.findProductByProductId(1);\n\n\t\tAssertions.assertEquals(expected, ResponseEntity.ok(product));\n\t}", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "public void VerifyViewCartandPrintinCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- View Cart and Print Cart should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkViewPrintCart\"));\r\n\t\t\tif(ele.size()==2){\r\n\t\t\t\tSystem.out.println(\"View Cart -\"+ele.get(1).getText()+\" and print Cart -\"+ele.get(0).getText()+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- View Cart \"+ele.get(1).getText()+\" and print Cart \"+ele.get(0).getText()+\" is present\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"View cart or Print or both is not present\");\r\n\t\t\t}\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View cart or Print or both is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkViewPrintCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testGetProductInfo() throws Exception {\n }", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "@Test\n\tpublic void testAddproductPriceWrong() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = ProductDTO.builder()\n\t\t\t\t.brand(\"GUCCI\")\n\t\t\t\t.color(\"blue and ivory GG denim\")\n\t\t\t\t.price(new BigDecimal(\"-100\"))\n\t\t\t\t.name(\"Dionysus mini bag\")\n\t\t\t\t.build();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.POST, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.addProduct(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isBadRequest())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.error\", containsString(\"Min price is 0.0\")));\n\n\t\t// verify\n\t\tverify(productService, times(0)).addProduct(ArgumentMatchers.any());\n\t}", "@Test\n public void test3_updateProductToOrder() {\n ProductDTO productDTO= new ProductDTO();\n productDTO.setSKU(UUID.randomUUID().toString());\n productDTO.setName(\"TOMATOES\");\n productDTO.setPrice(new BigDecimal(30));\n productService.saveProduct(productDTO,\"test\");\n\n //get id from product and order\n long productId = productService.getIdForTest();\n long orderId = orderService.getIdForTest();\n long orderDetailId = orderService.getIdForTestOrderDetail();\n\n OrderDetailDTO orderDetailDTO = new OrderDetailDTO();\n orderDetailDTO.setId(orderDetailId);\n orderDetailDTO.setOrderId(orderId);\n orderDetailDTO.setProductId(productId);\n String res = orderService.updateProductToOrder(orderDetailDTO,\"test\");\n assertEquals(null,res);\n }", "@Test(priority = 2)\r\n\tpublic void verify_ProductName() throws InterruptedException {\r\n\t\tAssert.assertEquals(DetailPage.getProduct_name(), DetailPage.strName, \"Product name is different selected one\");\r\n\t}", "public void doCheck(String productNum) {\n\t\tpn = productNum.trim(); // Product no.\n\t}", "@Override\r\n\tpublic boolean reviewWriteCheck(String memberId, String productId)\r\n\t{\n\t\tList<String> list = dao.selectOrderNo(memberId);\r\n\t\tHashMap<String, Object> map = new HashMap<>();\r\n\t\tfor(int i = 0; i < list.size(); i++)\r\n\t\t{\r\n\t\t\tmap.put(\"ordersNo\", list.get(i));\r\n\t\t\tmap.put(\"productId\", productId);\r\n\t\t\tif(dao.selectOrderProduct(map) > 0)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasProduct() {\n return product_ != null;\n }", "public void VerifyDetailsin_Cart_inCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Image, ItemDesc, ItemNum, Price, Quantity, Inc/Exec tax, Remove and change in Cart in Checkout\");\r\n\r\n\t\ttry{\r\n\t\t\tString image= getPropertyValue(locator_split(\"imgCartinCheckout\"), \"src\");\r\n\t\t\tString ItemDesc = getText(locator_split(\"txtItemDescCartinCheckout\"));\r\n\t\t\tString ItemNum = getText(locator_split(\"txtitemNumCartinCheckout\"));\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkRemChanCartinCheckout\"));\r\n\t\t\tString Remove = getText(ele.get(0));\r\n\t\t\tString change = getText(ele.get(1));\r\n\t\t\tString Price = getText(locator_split(\"txtpriceCartinCheckout\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtIncExctaxinCartinCheckout\"));\r\n\t\t\tString Tax= getText(ele1.get(0));\r\n\t\t\tString Quantity = getText(locator_split(\"txtQuantityCartinCheckout\"));\r\n\t\t\tString UnitofMeasure= getText(locator_split(\"txtUnitofmeasureCartinCheckout\"));\r\n\t\t\tSystem.out.println(\"Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkRemChanCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtIncExctaxinCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void fetchProductInformation() {\n // Query the App Store for product information if the user is is allowed\n // to make purchases.\n // Display an alert, otherwise.\n if (SKPaymentQueue.canMakePayments()) {\n // Load the product identifiers fron ProductIds.plist\n String filePath = NSBundle.getMainBundle().findResourcePath(\"ProductIds\", \"plist\");\n NSArray<NSString> productIds = (NSArray<NSString>) NSArray.read(new File(filePath));\n\n StoreManager.getInstance().fetchProductInformationForIds(productIds.asStringList());\n } else {\n // Warn the user that they are not allowed to make purchases.\n alert(\"Warning\", \"Purchases are disabled on this device.\");\n }\n }", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "Product updateProductDetails(ProductDTO productDTO, Authentication authentication);", "public synchronized void verifySizeofTheProd(String size) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(actualSize, \"cart button\", 30);\n\t\t\tString actProdSize= actualSize.getAttribute(\"value\");\n\t\t\tif(size.equals(actProdSize))\n\t\t\t{\n\t\t\t\tWebActionUtil.info(\"Product size is verified\");\n\t\t\t}\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to verify actual size of the product\");\n\t\t\tAssert.fail(\"Unable to verify actual size of the product\");\n\t\t}\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "@Test\n\tpublic void testAddproductNotColor() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = ProductDTO.builder()\n\t\t\t\t.brand(\"GUCCI\")\n\t\t\t\t.price(new BigDecimal(\"1000.50\"))\n\t\t\t\t.name(\"Dionysus mini bag\")\n\t\t\t\t.build();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.POST, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.addProduct(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isBadRequest())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.error\", containsString(\"Color must be not blank\")));\n\n\t\t// verify\n\t\tverify(productService, times(0)).addProduct(ArgumentMatchers.any());\n\t}", "public static void verifyPlaceStoreOrderResponse(Response response, long expectedId, long expectedPetId, int expectedQuantity, String expectedShipDate, String expectedStatus, boolean expectedCompleted) {\n verifySuccessStatusCodeInPlaceStoreOrderResponse(response);\n\n StoreOrderResponse storeOrderResponse = response.as(StoreOrderResponse.class);\n\n long actualId = storeOrderResponse.getId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - id, Actual: \" + actualId + \" , Expected: \" + expectedId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualId, expectedId, \"Place Store Order service response - id field error\");\n\n long actualPetId = storeOrderResponse.getPetId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - pet id, Actual: \" + actualPetId + \" , Expected: \" + expectedPetId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualPetId, expectedPetId, \"Place Store Order service response - pet id field error\");\n\n int actualQuantity = storeOrderResponse.getQuantity();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - quantity, Actual: \" + actualQuantity + \" , Expected: \" + expectedQuantity);\n MicroservicesEnvConfig.softAssert.assertEquals(actualQuantity, expectedQuantity, \"Place Store Order service response - quantity field error\");\n\n String actualShipDate = storeOrderResponse.getShipDate().substring(0,23);\n expectedShipDate = expectedShipDate.replace(\"Z\", \"\");\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - ship date, Actual: \" + actualShipDate + \" , Expected: \" + expectedShipDate);\n MicroservicesEnvConfig.softAssert.assertEquals(actualShipDate, expectedShipDate, \"Place Store Order service response - ship date field error\");\n\n String actualStatus = storeOrderResponse.getStatus();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - status, Actual: \" + actualStatus + \" , Expected: \" + expectedStatus);\n MicroservicesEnvConfig.softAssert.assertEquals(actualStatus, expectedStatus, \"Place Store Order service response - status field error\");\n\n boolean actualCompleted = storeOrderResponse.isComplete();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - complete, Actual: \" + actualCompleted + \" , Expected: \" + expectedCompleted);\n MicroservicesEnvConfig.softAssert.assertEquals(actualCompleted, expectedCompleted, \"Place Store Order service response - complete field error\");\n }", "@Test\n\tpublic void testAddProduct() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.POST, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.addProduct(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$.color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$.name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).addProduct(ArgumentMatchers.any());\n\t}", "boolean isCartValid();", "@Test(priority = 4)\n\tpublic void validateCartAfterAdd() {\n\t\tCss = read.readPropertiesFile(\"loc.validate.clickoncart.afteradd.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// click view cart\n\t\tCss = read.readPropertiesFile(\"loc.viewcartbtn.click.css\", ConstantPaths.LOCATORS_FILE);\n\t\tPageActions.clickElement(driver, Css);\n\t\t// validate each cart items-product 1\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.iphone.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct1 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct1 = read.readPropertiesFile(\"exppro1\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct1, exptproduct1, \"No match\");\n\t\tlog.info(\"Product1\");\n\t\t// product 2\n\t\tXpath = read.readPropertiesFile(\"loc.verify.nameaftradd.mac.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actproduct2 = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptproduct2 = read.readPropertiesFile(\"exppro2\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actproduct2, exptproduct2, \"No match\");\n\t\tlog.info(\"Product2\");\n\t\t// grand total after adding products\n\t\tXpath = read.readPropertiesFile(\"loc.verify.grandtotal.aftradd.xpath\", ConstantPaths.LOCATORS_FILE);\n\t\tString actgrandadd = driver.findElement(By.xpath(Xpath)).getText();\n\t\tString exptgrandadd = read.readPropertiesFile(\"expgrandadd\", ConstantPaths.LOCATORS_FILE);\n\t\tvalidate.validateData(actgrandadd, exptgrandadd, \"No match\");\n\t\tlog.info(\"Grand total after adding products\");\n\n\t}", "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "public void validateProduct(Object o, Errors errors){\n \tValidationUtils.rejectIfEmpty(errors, \"name\", \"NotEmptyNameProduct\");\n \tValidationUtils.rejectIfEmpty(errors, \"description\", \"NotEmptyDescription\");\n \tValidationUtils.rejectIfEmpty(errors, \"image\", \"NotEmptyImage\");\n \tValidationUtils.rejectIfEmpty(errors, \"price\", \"NotEmptyPrice\");\n }", "@Test(priority = 1)\r\n\tpublic void verify_ProdDetailCaption() throws InterruptedException {\r\n\t\t//System.out.println(\"Caption\" + DetailPage.getProduct_Caption());\r\n\t\tAssert.assertEquals(DetailPage.getProduct_Caption(), DetailPage.strName, \"This is not Product Detail page\");\r\n\t}", "private void saveProduct() {\n Product product;\n String name = productName.getText().toString();\n if (name.isEmpty()) {\n productName.setError(getResources().getText(R.string.product_name_error));\n return;\n }\n String brandStr = brand.getText().toString();\n String brandOwnerStr = brandOwner.getText().toString();\n if (dbProduct == null) {\n product = new Product();\n product.setGtin(gtin);\n product.setLanguage(language);\n } else {\n product = dbProduct;\n }\n if (!name.isEmpty()) {\n product.setName(name);\n }\n if (!brandStr.isEmpty()) {\n product.setBrand(brandStr);\n }\n if (!brandOwnerStr.isEmpty()) {\n product.setBrandOwner(brandOwnerStr);\n }\n product.setCategory(selectedCategoryKey);\n LoadingIndicator.show();\n // TODO enable/disable save button\n PLYCompletion<Product> completion = new PLYCompletion<Product>() {\n @Override\n public void onSuccess(Product result) {\n Log.d(\"SavePDetailsCallback\", \"Product details saved\");\n dbProduct = result;\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_saved, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productCreate(result);\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.product_edited, Snackbar\n .LENGTH_LONG).show();\n DataChangeListener.productUpdate(result);\n }\n }\n\n @Override\n public void onPostSuccess(Product result) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"SavePDetailsCallback\", error.getMessage());\n if (isNewProduct || !error.isHttpStatusError() || !error.hasInternalErrorCode\n (PLYStatusCodes.OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar.LENGTH_LONG)\n .show();\n }\n LoadingIndicator.hide();\n }\n\n @Override\n public void onPostError(PLYAndroid.QueryError error) {\n if (!isNewProduct && error.isHttpStatusError() && error.hasInternalErrorCode(PLYStatusCodes\n .OBJECT_NOT_UPDATED_NO_CHANGES_CODE)) {\n FragmentActivity activity = getActivity();\n if (activity != null) {\n activity.onBackPressed();\n }\n }\n }\n };\n if (dbProduct == null) {\n ProductService.createProduct(sequentialClient, product, completion);\n } else {\n ProductService.updateProduct(sequentialClient, product, completion);\n }\n }", "public boolean productsTabVerification() {\r\n\t\t\r\n\t\t\r\n\t\twaitUntilPresenceOfElementLocated(ourProductsTab);\r\n\r\n\t\tList<WebElement> list = driver.findElements(By.xpath(\"//a[text()='OUR PRODUCTS']\"));\r\n\t\tif (list != null && !list.isEmpty()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Test\n\tpublic void testFindAllReviewByProduct() {\n\t\tProduct savedProduct = productRepository.save(testProduct);\n\t\ttestReview.setProduct(savedProduct);\n\t\t\n\t\tReview expectedReview = reviewRepository.save(testReview);\n\t\tassertThat(expectedReview).isNotNull();\n\t\t\n\t\tList<Review> actualList = (List<Review>) reviewRepository.findAll();\n\t\tassertFalse(actualList.size() == 0);\n\t\tassertTrue(actualList.size() == 1);\n\t\t\n\t\tReview actualReview = actualList.get(0);\n\t\tassertThat(expectedReview.getId().equals(actualReview.getId()));\n\t}", "@Test\n public void verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }", "@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }", "@Override\n\tpublic boolean checkUniqueSupplierProduct(Integer productId , Integer supplierId ) {\n\t\tloggerService\n\t\t\t\t.logServiceInfo(\"Start checkUniqueSupplierProduct Method with productId and supplierId\"\n\t\t\t\t\t\t+ productId + supplierId);\n\t\ttry {\n\n\t\t\t// SELECT * from PRODUCT_TYPE where NAME like '%s%' and SERVICE_ID =\n\t\t\t// 1;\n\t\t\tString query = \"select model FROM SupplierProduct model where lower(model.productId.id) = \"\n\t\t\t\t\t+ productId + \"and lower ( model.supplierId.id ) = \" + supplierId ;\n\n\t\t\t\n\t\t\tList<ProductType> list = baseDao.findListByQuery(query);\n\t\t\tloggerService\n\t\t\t\t\t.logServiceInfo(\"End checkUniqueSupplierProduct Method\");\n\t\t\treturn list.size() > 0 ? false : true;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tloggerService.logServiceError(\n\t\t\t\t\t\"can't checkUniqueProductWithService\", e);\n\t\t\treturn false;\n\t\t}\n\t}", "@Test(expected = IndexOutOfBoundsException.class)\r\n\tpublic void testProductFailure() {\r\n\r\n\t\tProductBean product = new ProductBean();\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\tHomeService service = (HomeService) ctx.getBean(\"homeservice\");\r\n\t\tproduct = service.getProductDesc(3);\r\n\t\tSystem.out.println(product.getProductBrand());\r\n\t\tSystem.out.println(product.getProductName());\r\n\r\n\t}", "@Test\n\tpublic void testAddproductNotBrand() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = ProductDTO.builder()\n\t\t\t\t.color(\"blue and ivory GG denim\")\n\t\t\t\t.price(new BigDecimal(\"1000.50\"))\n\t\t\t\t.name(\"Dionysus mini bag\")\n\t\t\t\t.build();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.POST, \"/\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.content(ObjectMapperHelper.asJsonString(expected));\n\n\t\t// Setup when\n\t\twhen(productService.addProduct(ArgumentMatchers.any())).thenReturn(expected);\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isBadRequest())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$.error\", containsString(\"Brand must be not blank\")));\n\n\t\t// verify\n\t\tverify(productService, times(0)).addProduct(ArgumentMatchers.any());\n\t}", "@Test\r\n\tpublic void deleteProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Almond\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.delete(\"/7\");\r\n\t\tSystem.out.println(\"DELETE Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }", "@PostMapping\n public ResponseEntity<Map<String, Object>> newProduct(\n @Valid @RequestBody Product product,\n @RequestParam(value = \"id_token\", defaultValue = \"N/A\") String id_token) {\n String uid = verifyToken(id_token);\n users = userService.getAllUsers();\n Map<String, Object> response = new LinkedHashMap<>();\n for (User user: users) {\n if (user.getUserUID().equals(uid)) {\n if (product.getUser().getUserUID().equals(uid)) {\n System.out.println(\"DEBUG: User is authorized:)\");\n Product newProduct = new Product(user, product.getProductName(), product.getState());\n newProduct.setPrice(product.getPrice());\n newProduct.setDescription(product.getDescription());\n String categoryName = product.getCategory();\n newProduct.setCategory(categoryName);\n newProduct.setImageUrls(product.getImageUrls());\n newProduct.setLocation(product.getLat(), product.getLon(), product.getCity());\n newProduct.setAvailability(product.isAvailability());\n Product saveResponse = productService.save(newProduct);\n\n if (saveResponse != null) {\n responseHeaders.set(\"status\", \"PRODUCT ENTITY SUCCESSFULLY CREATED AND SAVED:)\");\n response.put(\"status\", \"OK\");\n response.put(\"product\", saveResponse);\n return new ResponseEntity<>(response, responseHeaders, HttpStatus.OK);\n } else {\n responseHeaders.set(\"status\", \"PRODUCT ENTITY ALREADY PRESENTS:(\");\n response.put(\"status\", \"CONFLICT\");\n response.put(\"description\", \"Product with the same name already exists in the database, \" +\n \"consider using a new product name.\");\n return new ResponseEntity<>(response, responseHeaders, HttpStatus.CONFLICT);\n }\n } else {\n responseHeaders.set(\"status\", \"PRODUCT USER UID MUST MATCH WITH THE AUTHORIZED USER:(\");\n response.put(\"status\", \"FORBIDDEN\");\n response.put(\"description\", \"The userUID given does not match the seller of the product, \" +\n \"modification is prohibited.\");\n return new ResponseEntity<>(response, responseHeaders, HttpStatus.FORBIDDEN);\n }\n }\n }\n\n responseHeaders.set(\"status\", \"USER AUTHORIZATION IS REQUIRED TO CREATE POSTS:(\");\n response.put(\"status\", \"USER NOT AUTHORIZED\");\n response.put(\"description\", \"Please check if the userUID corresponds to the \" +\n \"given id_token exists in the backend database.\");\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.UNAUTHORIZED);\n }", "public void testUpdateProduct() {\n\t\tProduct product=productDao.selectProducts(33);\n\t\tproduct.setPrice(100.0);\n\t\tproduct.setQuantity(1);\n\t\tproductDao.updateProduct(product);//product has updated price and update quantity\n\t\tassertTrue(product.getPrice()==100.0);\n\t\tassertTrue(product.getQuantity()==1);\n\t}", "@Test\n public void testUpdateProductShouldThrowForbiddenWhenMemberUserAccess() throws Exception {\n testResponseData(RequestInfo.builder()\n .request(put(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(memberToken)\n .body(productRequest)\n .httpStatus(HttpStatus.FORBIDDEN)\n .build());\n }", "@Test\n public void testSaveProduct() throws Exception {\n when(mockProductService.createOrUpdateProduct(any(ProductRequest.class))).thenReturn(productResponse);\n String requestPayload = objectMapper.writeValueAsString(productRequest);\n RequestBuilder requestBuilder = MockMvcRequestBuilders.post(basePath + \"/product\")\n .content(requestPayload).contentType(MediaType.APPLICATION_JSON);\n MvcResult result = mockMvc.perform(requestBuilder).andReturn();\n MockHttpServletResponse response = result.getResponse();\n assertEquals(\"Status code must be same as expected\", HttpStatus.NOT_FOUND.value(), response.getStatus());\n }", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "@Test\n public void testCheckForProduct() throws Exception {\n }", "public boolean insertCart(ProductDetail productDetail) {\n\n db = helper.getWritableDatabase();\n ContentValues v = new ContentValues();\n v.put(DatabaseConstant.TABLE_CART_ID, productDetail.getId());\n v.put(DatabaseConstant.TABLE_CART_TITLE, productDetail.getTitle());\n v.put(DatabaseConstant.TABLE_CART_PRICE, productDetail.getPrice());\n v.put(DatabaseConstant.TABLE_CART_ORDER_QUANTITY, productDetail.getOrder_quantity());\n v.put(DatabaseConstant.TABLE_CART_QUANTITY_TYPE, productDetail.getQuantity_type());\n v.put(DatabaseConstant.TABLE_CART_MIN_QUAITITY, productDetail.getMin_quantity());\n v.put(DatabaseConstant.TABLE_CART_AVAILABILITY, productDetail.getAvailability());\n v.put(DatabaseConstant.TABLE_CART_DISCOUNT, productDetail.getDiscount());\n v.put(DatabaseConstant.TABLE_CART_IMAGE, productDetail.getImage());\n v.put(DatabaseConstant.TABLE_CART_RATING, productDetail.getRating());\n v.put(DatabaseConstant.TABLE_CART_DESCRIPTION, productDetail.getDescription());\n v.put(DatabaseConstant.TABLE_CART_TYPE, productDetail.getType());\n v.put(DatabaseConstant.TABLE_CART_QUANTITY, productDetail.getQuantity());\n long isCheck = db.insert(DatabaseConstant.TABLE_NAME_CART, null, v);\n if (isCheck > 0) {\n return true;\n } else {\n return false;\n }\n }", "@Test\n public void productSpecificationTest() {\n // TODO: test productSpecification\n }", "Product getProductDetails(int idproduct) throws DataBaseException;", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}", "@Override\n\tpublic boolean doVerify(ProdIterator iterator, Map<String, String> map) {\n\t\treturn false;\n\t}", "public boolean verify();", "@Test\n\tpublic void testFindProductByProductIdFailure() {\n\n\t\tMockito.when(productDao.findById(1)).thenReturn(Optional.of(product));\n\n\t\tResponseEntity<Product> expected = productServiceImpl.findProductByProductId(1);\n\n\t\tAssertions.assertNotSame(expected, ResponseEntity.noContent().build());\n\t}", "public void v_Verify_Guest3_Displayed(){\n\t}" ]
[ "0.7351959", "0.686737", "0.67898166", "0.6683166", "0.66279596", "0.6586145", "0.6562931", "0.6523211", "0.64704376", "0.6429001", "0.6287754", "0.6214866", "0.6153097", "0.6116875", "0.6113755", "0.61127853", "0.6112196", "0.6081254", "0.59985906", "0.59960586", "0.59905845", "0.5989032", "0.5968764", "0.5967121", "0.59558994", "0.5935734", "0.59324884", "0.59232235", "0.59021544", "0.5896788", "0.5884962", "0.5869027", "0.5863976", "0.5856621", "0.58285856", "0.5823363", "0.5805815", "0.5803093", "0.5781824", "0.5775609", "0.5770395", "0.5759601", "0.574306", "0.5742347", "0.5717503", "0.5714861", "0.57071435", "0.5698068", "0.5695891", "0.56916887", "0.5686612", "0.5682347", "0.5678515", "0.567419", "0.5659851", "0.5657672", "0.56493056", "0.563113", "0.5622002", "0.56183624", "0.5600271", "0.559967", "0.55993855", "0.55946964", "0.5591408", "0.55873406", "0.5585864", "0.5582675", "0.5581069", "0.5579773", "0.5577152", "0.55752707", "0.5570214", "0.5566502", "0.5558953", "0.55581653", "0.55452144", "0.5537945", "0.5536473", "0.55334663", "0.5533051", "0.5522834", "0.55196005", "0.5518212", "0.55074805", "0.5507248", "0.5506922", "0.55037576", "0.5499797", "0.54951876", "0.5494961", "0.54904455", "0.5489171", "0.54834944", "0.5481675", "0.5478544", "0.54762375", "0.54657507", "0.5465671", "0.54569393" ]
0.70915884
1
this method verify the What's Next Section
public boolean VerifyOrderConfirmation_WhatIsNextSection() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyWhat'sNextSection", "What'sNextSectionIsDisplayed"); }else{extentLogs.fail("VerifyWhat'sNextSection", "What'sNextSectionIsNotDisplayed");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkPairsAndNextStep() {\r\n\t\tsetPairs();\r\n\t\tif (this.criticalPairs != null || this.criticalPairGraGra != null) {\r\n\t\t\tthis.stepPanel.setStep(StepPanel.STEP_FINISH);\r\n\t\t\tthis.nextButton.setText(\"Finish\");\r\n\t\t\tif (this.criticalPairs != null) {\r\n\t\t\t\tthis.criticalPairGraGra = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "boolean nextStep();", "protected void catchNextSection (int position) {\r\n \t\tfinal int delta = 1;\r\n\t\tfinal boolean isNextSection = mAdapter.isHeader(position + delta);\r\n \t\tif (isNextSection) {\r\n \t\t\tmNextSectionChild = delta;\r\n \t\t} else {\r\n \t\t\tmNextSectionChild = INVALID_POSITION;\r\n \t\t}\r\n \t}", "void goToNext(boolean isCorrect);", "public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}", "public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}", "public void validateFooters() {\n\t}", "public void testHasNext() {\r\n System.out.println(\"hasNext\");\r\n // tested in testNext()\r\n }", "@Test\r\n public void startNextOptionTest()\r\n {\r\n presenter.onClickNext();\r\n\r\n Assert.assertEquals(stub.getNextCounter(), 1);\r\n }", "public Boolean isNextOk() {\n if (!isInputValid()) {\n return Boolean.FALSE;\n }\n createReservations();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n } else {\n switch (extractFeatureSet()) {\n case FREE:\n createGuestProfile();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n }\n break;\n case PREMIUM:\n break;\n default:\n throw Assert.createUnreachable(\"Unknown feature set {0}.\",\n extractFeatureSet());\n }\n }\n return Boolean.TRUE;\n }", "@Test void addNextRow() {\n\t\tcheckAddNextRow(false,5,4);\n\n\t\t// X X X X\n\t\t// X X X X X\n\t\tcheckAddNextRow(true,4,5);\n\n\t\t// X\n\t\t// x\n\t\tcheckAddNextRow(false,1,1);\n\n\n\n\t\t// X\n\t\t// x\n\t\tcheckAddNextRow(true,1,1);\n\t}", "@Test\n\tpublic void section1DisplaysParagraph() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraph());\n\t}", "private boolean checkNextField () {\n lineHasLabel = false;\n if (! endOfText()) {\n labelEnd = blockIn.indexOf (LABEL_SUFFIX, lineStart);\n if (labelEnd >= 0) {\n label = blockIn.substring (lineStart, labelEnd).trim();\n labelStart = labels.indexOf (label);\n if (labelStart >= 0) {\n lineHasLabel = true;\n }\n }\n }\n return lineHasLabel;\n }", "private final void m75324a(SectionResponse sectionResponse) {\n int i = 0;\n if (!sectionResponse.paging.hasPrevious) {\n this.f53730h = false;\n }\n if (!sectionResponse.paging.hasNext) {\n this.f53731i = false;\n }\n switch (C15272b.f53896a[this.f53741t.ordinal()]) {\n case 1:\n this.f53730h = sectionResponse.paging.hasPrevious;\n this.f53731i = sectionResponse.paging.hasNext;\n this.f53728f.clear();\n this.f53733k = false;\n List<Section> list = sectionResponse.sectionList;\n C32569u.m150513a((Object) list, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n int i2 = 0;\n for (T t : list) {\n if (!this.f53730h && i2 == 0) {\n t.chapter.isFirst = true;\n }\n C32569u.m150513a((Object) t, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n m75323a((Section) t, sectionResponse);\n i2++;\n }\n m75349e().notifyDataSetChanged();\n Iterator<T> it = this.f53728f.iterator();\n int i3 = 0;\n while (true) {\n if (it.hasNext()) {\n T next = it.next();\n if (!(!C32569u.m150517a((Object) this.f53727e, (Object) C6969H.m41409d(\"G6E8FDA18BE3C9420E216\")))) {\n if (!(next instanceof Section) || !next.learningRecord.isLastLearned) {\n i3++;\n } else {\n i = i3;\n }\n }\n }\n }\n ((RecyclerView) mo78146a(R.id.recyclerView)).scrollToPosition(i);\n break;\n case 2:\n ArrayList arrayList = new ArrayList();\n List<Section> list2 = sectionResponse.sectionList;\n C32569u.m150513a((Object) list2, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n int i4 = 0;\n for (T t2 : list2) {\n if (!this.f53730h && i4 == 0) {\n t2.chapter.isFirst = true;\n }\n Boolean bool = t2.isFirst;\n C32569u.m150513a((Object) bool, C6969H.m41409d(\"G7A86D60EB63FA567EF1DB641E0F6D7\"));\n if (bool.booleanValue() && sectionResponse.extra.showChapterName) {\n Chapter chapter = t2.chapter;\n C32569u.m150513a((Object) chapter, C6969H.m41409d(\"G7A86D60EB63FA567E5069158E6E0D1\"));\n arrayList.add(chapter);\n }\n C32569u.m150513a((Object) t2, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n arrayList.add(t2);\n i4++;\n }\n this.f53728f.addAll(0, arrayList);\n m75349e().notifyItemRangeInserted(0, arrayList.size());\n break;\n case 3:\n int size = this.f53728f.size();\n List<Section> list3 = sectionResponse.sectionList;\n C32569u.m150513a((Object) list3, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n for (T t3 : list3) {\n C32569u.m150513a((Object) t3, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n m75323a((Section) t3, sectionResponse);\n }\n m75349e().notifyItemRangeInserted(size, this.f53728f.size() - size);\n break;\n }\n if (!(TextUtils.isEmpty(sectionResponse.extra.updateText) || C32569u.m150517a((Object) this.f53735m, (Object) C6969H.m41409d(\"G7A8FDC19BA\")) || this.f53733k)) {\n if (!sectionResponse.paging.hasNext) {\n List<Object> list4 = this.f53728f;\n String str = sectionResponse.extra.updateText;\n C32569u.m150513a((Object) str, C6969H.m41409d(\"G7B86C60AB03EB82CA80B885CE0E48DC27987D40EBA04AE31F2\"));\n list4.add(str);\n this.f53733k = true;\n }\n m75349e().notifyItemRangeInserted(this.f53728f.size(), 1);\n }\n }", "@RelatedIssue(issueID = \"DE-4379\", comment = \"If fails, notify DE team.\")\n @Test\n public void wam_003_verifyPaginationByNextButton() {\n wam.verifyWamIndexPageFirstColumnInOrder(1, wam.DEFAULT_WAM_INDEX_ROWS);\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 2 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n 2 * wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 3 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n 3 * wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 4 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n }", "public void verifyAverageResponseTimeMessageTextAfterEndingAboutContentStructure()\r\n\t {\r\n\t\t isTextDisplay(each_question_structure_end_average_response_time_message.get(1));\r\n\t }", "@Test\n public void nextTest() {\n this.it.next();\n this.it.next();\n assertThat(\"work3\", is(this.it.next()));\n }", "boolean contributesContent() {\n return includedInLastStep() && end >= start;\n }", "public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer first\n\t\tif(correctFlag){\n\t\t\t// set it to false initially for the next question\n\t\t\tcorrectFlag = false;\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t}\n\n\t}", "@Test\n public void testHasNext_middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = true;\n instance.next();\n\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }", "@Test\n\tpublic void section1DisplaysParagraphTab2() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab2());\n\t}", "public abstract boolean isNextVisited();", "@Override\n\tpublic void loadNextPage() {\n\t\tif(curr_content.isLastPage){\n\t\t\tPigAndroidUtil.showToast(mContext, \"以是最后一页:\", 3000);\n\t\t}else{\n\t\t\texchangeNext(m_bookFactory.getNextPageContent(next_content));\n\t\t}\n\t}", "public synchronized void verifyMayWeSuggestSection(WebDriver driver)\n\t\t\tthrows Exception, InterruptedException, AssertionError, IOException {\n\t\tStringBuffer errorBuffer = new StringBuffer();\n\n\t\t// Verification : May We Suggest section on PDP\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVSection\",\n\t\t\t\t\t\"People like you also viewed : Section not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : section showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : May We Suggest Header\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVHeader\",\n\t\t\t\t\t\"People like you also viewed : Header not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : Header showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Price\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t}\n\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Name\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\t// redirecting to PDP\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tWebElement elProduct = utils.findElementByLocator(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\telProduct.click();\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tWebElement e2Product = utils.findElementByLocator(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te2Product.click();\n\n\t\t\t} else {\n\t\t\t\tWebElement e3Product = utils.findElementByLocator(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te3Product.click();\n\t\t\t}\n\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t\taddToBag(driver, 0, 0);\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t} catch (AssertionError e) {\n\t\t\tReporter.log(Constants.DELIMITER + Constants.FAIL\n\t\t\t\t\t+ \"| People like you also viewed : Product Image not redirecting to PDP\");\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t}", "public void verifyEngagementOverviewToDoIsComplete() {\n String strStepSuccess = \"Verify engagement overview ToDo is complete\";\n String strStepFail = \"TestScript Failed: Verify engagement overview ToDo is complete\";\n try {\n boolean result;\n String strEngagementOverViewToDo = eleEngagementOverViewToDoText.getText().trim().split(\"%\")[0];\n result = ENGAGEMENT_OVER_VIEW_TODO_COMPLETE.toLowerCase().equals(strEngagementOverViewToDo.toLowerCase());\n Assert.assertTrue(result, \"Engagement overview ToDo does not change\");\n NXGReports.addStep(strStepSuccess, LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(strStepFail, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public boolean hasNextStep();", "@Test\n public void TestNextAppNoUpcoming () {\n onView(withId(R.id.noUpcoming)).check(matches(withText(containsString(\"No Upcoming Appointments\"))));\n }", "void completedSection(TestResult tr, Section section);", "private boolean setNext() throws IOException {\n final String line = mIn.readLine();\n if (line == null) {\n mCurrent = null;\n return false;\n }\n try {\n mCurrent = mParser.parseLine(line);\n if (mCurrent.getNumberOfSamples() != mNumSamples) {\n throw new VcfFormatException(\"Expected \" + mNumSamples + \" samples, but there were \" + mCurrent.getNumberOfSamples());\n }\n } catch (final VcfFormatException e) {\n throw new VcfFormatException(\"Invalid VCF record. \" + e.getMessage() + \" on line:\" + line); // Add context information\n }\n return true;\n }", "@Test\n public void testHasNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n instance.next();\n instance.next();\n\n boolean result = instance.hasNext();\n\n assertEquals(expResult, result);\n }", "@Override\n\tpublic EnrollmentStatus isSatisfiedBy(Section section) {\n\t\tfor(Course c : palnOfStudy.getCourses()){\n\t\t\tSystem.out.println(\"section:\"+section.getRepresentedCourse().getCourseNo());\n\t\t\tSystem.out.println(\"courseNo:\"+c.getCourseNo());\n\t\t\tif(section.getRepresentedCourse().getCourseNo().equals(c.getCourseNo())){\n\t\t\t\treturn EnrollmentStatus.success;\n\t\t\t}\n\t\t}\n\t\treturn EnrollmentStatus.notInPlan;\n\t}", "@Test\n public void whenGetNextUnitThenReturnResult() {\n MenuUnit expected = underTestSub.getNextUnit();\n assertThat(expected, is(underTestSubNext));\n }", "@Test\n\tpublic void section1DisplaysParagraphTab3() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab3());\n\t}", "public abstract boolean Verifypage();", "public void testGetNextFinishButtonEnabled() {\n System.out.println(\"getNextFinishButtonEnabled\");\n Wizard instance = new Wizard();\n boolean expResult = false;\n boolean result = instance.getNextFinishButtonEnabled();\n assertEquals(expResult, result);\n }", "@Override\n public void testConsumeFooterLine() {\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 static void verifySectionToClickAdd() throws InterruptedException, MalformedURLException {\n\t\t// check if section fields exist by scrolling and then click on it\n\t\ttry {\n\t\t\tCommonUtils.getdriver().findElementByAndroidUIAutomator(\n\t\t\t\t\t\"new UiScrollable(new UiSelector()).scrollIntoView(text(\\\"ADD\\\"));\").click();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\" **** Section with Add button is not found **** \");\n\t\t}\n\t}", "java.lang.String getNextStep();", "private void ifExistNextScenario(HttpServletRequest request, HttpServletResponse response) throws QueryExecutionException, ClassNotFoundException, IOException {\n response.getWriter().write(Boolean.toString(SimApi.ifNextScenario()));\n }", "public void verifyMoreInfoPage() throws Throwable{\r\n\t\twdlib.verify(getMoreInfoPage().getText(),flib.getPropKeyValue(PROP_PATH, \"MoreInfo\"), \"More Information page\");\r\n\t}", "boolean nextItem();", "private static void check (int expected) {\n\t\tif (sym == expected) scan(); // if verified,read next\n\t\telse error(TokenCodes.tokenName[expected]+\"expected\" );\n\t\t}", "public void VerifyCartCheckout_Coupon_OrderSumamrysections(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- cartcheckout, coupon and Order summary should be present in checkout page\");\r\n\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"boxCheckoutCartCheckout\")) & isElementPresent(locator_split(\"boxCheckoutCoupon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"boxCheckoutOrderSummary\"))){\r\n\t\t\t\tSystem.out.println(\"cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCartCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCoupon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutOrderSummary\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public boolean isNextPage() {\n return nextPage;\n }", "public Question nextQuestion() throws TestEndException\n {\n try {\n return test.getQuestions().get(questionNumber++);\n } catch (IndexOutOfBoundsException e) {\n throw new TestEndException();\n }\n }", "@Test\n\tpublic void firstPage() throws Exception {\n\t\tpostRequest(1, 0).andExpect(content().string(CoreMatchers.containsString(\"Answered\")))\n\t\t\t\t.andExpect(content().string(IsNot.not(CoreMatchers.containsString(\"prevBtn\"))));\n\t}", "public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}", "private static boolean isAllowedNext(final ITranslator<?, ?, ?, ?, ?, ?> current,\r\n\t\t\tfinal ITranslator<?, ?, ?, ?, ?, ?> next) {\n\t\treturn current.getSourceExpressionClass() == next.getTargetExpressionClass()\r\n\t\t\t\t&& current.getSourceTraceElementClass() == next.getTargetTraceElementClass();\r\n\t}", "protected abstract boolean computeHasNext();", "private boolean checkMoveNext(PositionTracker tracker) {\n\t\t \n\t\t GeneralUtility generalTool = new GeneralUtility();\n\t\t \n\t\t if((tracker.getExactRow() + 1) == tracker.getMaxRows()) { //initiate if statement\n\t\t\t if((tracker.getExactColumn() + 1) == tracker.getMaxColumns()) //initiate if statement\n\t\t\t\t generalTool.beatGame();\n\t\t }\n\t\t \n\t\t return true; //returns the value true\t\n\t }", "public boolean checkWalkStep(int lastX, int lastY, int nextX, int nextY) {\n return true;\n }", "public String nextStep();", "public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}", "boolean usesNext() {\n return next != null;\n }", "@Test\n\tpublic void advanceDayTest_Succes(){\n\t\temptyAssemblyLineTest();\n\t\tTimestamp oldTime = assemblyLine.getCurrentTime();\n\t\tassemblyLine.startNextDay();\n\t\tassertEquals(assemblyLine.getCurrentTime().compareTo(oldTime.getNextDay()),0);\n\t\t\n\t}", "private boolean isThereMoreData() {\n return nextUrl != null;\n }", "@Test //ExSkip\n public void fieldNext() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create a data source for our mail merge with 3 rows.\n // A mail merge that uses this table would normally create a 3-page document.\n DataTable table = new DataTable(\"Employees\");\n table.getColumns().add(\"Courtesy Title\");\n table.getColumns().add(\"First Name\");\n table.getColumns().add(\"Last Name\");\n table.getRows().add(\"Mr.\", \"John\", \"Doe\");\n table.getRows().add(\"Mrs.\", \"Jane\", \"Cardholder\");\n table.getRows().add(\"Mr.\", \"Joe\", \"Bloggs\");\n\n insertMergeFields(builder, \"First row: \");\n\n // If we have multiple merge fields with the same FieldName,\n // they will receive data from the same row of the data source and display the same value after the merge.\n // A NEXT field tells the mail merge instantly to move down one row,\n // which means any MERGEFIELDs that follow the NEXT field will receive data from the next row.\n // Make sure never to try to skip to the next row while already on the last row.\n FieldNext fieldNext = (FieldNext) builder.insertField(FieldType.FIELD_NEXT, true);\n\n Assert.assertEquals(\" NEXT \", fieldNext.getFieldCode());\n\n // After the merge, the data source values that these MERGEFIELDs accept\n // will end up on the same page as the MERGEFIELDs above. \n insertMergeFields(builder, \"Second row: \");\n\n // A NEXTIF field has the same function as a NEXT field,\n // but it skips to the next row only if a statement constructed by the following 3 properties is true.\n FieldNextIf fieldNextIf = (FieldNextIf) builder.insertField(FieldType.FIELD_NEXT_IF, true);\n fieldNextIf.setLeftExpression(\"5\");\n fieldNextIf.setRightExpression(\"2 + 3\");\n fieldNextIf.setComparisonOperator(\"=\");\n\n Assert.assertEquals(\" NEXTIF 5 = \\\"2 + 3\\\"\", fieldNextIf.getFieldCode());\n\n // If the comparison asserted by the above field is correct,\n // the following 3 merge fields will take data from the third row.\n // Otherwise, these fields will take data from row 2 again.\n insertMergeFields(builder, \"Third row: \");\n\n doc.getMailMerge().execute(table);\n\n // Our data source has 3 rows, and we skipped rows twice. \n // Our output document will have 1 page with data from all 3 rows.\n doc.save(getArtifactsDir() + \"Field.NEXT.NEXTIF.docx\");\n testFieldNext(doc); //ExSKip\n }", "public boolean verifyMentorRequestContinue(){\n\t\treturn mentorConnectRequestObjects.almostDoneText.isDisplayed();\n\t}", "public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }", "private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }", "private void check(int expectedKind) {\n if (nextToken.kind == expectedKind) {\n scan();\n } else {\n error(expectedKind + \" expected, found \" + nextToken.kind);\n }\n }", "public void testNext() {\r\n System.out.println(\"next\");\r\n \r\n PartialCombinationIterator instance = null;\r\n Iterator<int[]> iterator = null;\r\n try {\r\n iterator = new PartialCombinationIterator(TestConstants.twoThreeFourValidReactionScheme, TestConstants.twoThreeFourNumRGroups, TestConstants.twoThreeFourNumLinkers, TestConstants.twoThreeFourNumBuildingBlocks);\r\n } catch (ReactionSchemeException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n } catch (SmiLibIOException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n } catch (SmiLibException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n }\r\n \r\n int counter = 0;\r\n while (iterator.hasNext()) {\r\n int[] virtualReaction = iterator.next();\r\n assertTrue(counter + \": \" + Arrays.toString(expectedVirtualReactions[counter]) + \" == \" + Arrays.toString(virtualReaction), Arrays.equals(expectedVirtualReactions[counter], virtualReaction));\r\n counter++;\r\n }\r\n \r\n assertEquals(expectedVirtualReactions.length, counter);\r\n }", "private boolean nextWorkorder() {\n\t\treturn Console.readString(\" Any other workorder? (y/n) \").equalsIgnoreCase(\"y\");\n\t}", "boolean hasStep();", "boolean hasStep();", "boolean hasStep();", "@Test(description = \"Check for KnockPagePage when user enters conflicting Answers in the RTQ\")\n public void VerifyRTQKnockOutPage() throws Exception{\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n DetermineInvestmentStrategyPage displayPage = signupAndOnboard(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n DetermineInvestmentGoalPage displayGoalPage = displayPage.clickOnStartQuestionnaireBtn();\n //Sign-in and complete RTQ with Conflicting Answer Triggering KnockOut Page\n RTQPage RiskToleranceQuestionPage = displayGoalPage.navigateToRTQ();\n KnockOutTwo knockOutPage = RTQKnockOutSelection(RiskToleranceQuestionPage);\n //Verify that appropriate KnockOut Header and Advisor Info is presented\n softAssert.assertTrue(knockOutPage.isContactAdvisorPageDisplayed());\n softAssert.assertTrue(knockOutPage.verifyBlockedHeaderText());\n }", "int getNextStep() {\n if (!includedInLastStep()) {\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter;\n } else {\n start = end + 1;\n if (knuthIter.hasNext()) {\n goToNextLegalBreak();\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter; \n } else {\n return -1;\n }\n }\n }", "public boolean moveToNextQuestion() {\n\n this.setGameState(GameState.AWAITING_ANSWER);\n if ((currentQuestionIndex + 1) < this.quiz.getQuestions().size()) {\n currentQuestionIndex++;\n return true;\n } else {\n logger.debug(\"no more questions... ending quiz.\");\n this.setGameState(GameState.COMPLETE);\n return false;\n }\n }", "@Override\n public boolean hasMoreQuestions() {\n return !(done);\n }", "private void presentShowcaseSequence() {\n }", "@Test(groups={TestGroups.SMOKE,TestGroups.REGRESSION},testName=\"Ineligibility_Reason_Edit_By_Adding_ValidData\")\n\t\tpublic void verifyEditByAddingValidData(){\n\t\tExtentTestManager.getTest().getTest().setName(\"Ineligibility_Reason_Edit_By_Adding_ValidData\");\n\t\tExtentTestManager.getTest().assignCategory(\"Module:ABL\");\n\t\tLoginPage loginPage=new LoginPage(driver);\n\t\tCyncHomePage cyncHomePage=loginPage.doLogin();\n\t\tAssert.assertEquals(cyncHomePage.getSuccessfulMessage(), \"Signed in Successfully\");\n\n\t\t//Step1:click on Ineligibility Reason to open page\n\t\tIneligibilityReasonsPage IneligibilityReasonsPage = cyncHomePage.getCyncMenus().openIneligibilityReasons();\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step1:click on Ineligibility Reasons to open page\");\n\n\t\t//Step2:First Check box selected on Ineligibility Reason screen\n\t\tAssert.assertTrue(IneligibilityReasonsPage.checkBoxSelection());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step2:Successfully Selected first record on the Ineligibility reasons screen\");\n\n\t\t//Step2:Click on edit button\n\t\tAssert.assertTrue(IneligibilityReasonsPage.clickOnEditButton());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step3:Successfully clicked on the edit button on the Ineligibility reasons screen\");\n\n\t\tString IneligibilityReasonEdit=\"Ineligibility Reasons - Edit\";\n\t\t//Step3:verify the Ineligibility Reason page header\n\t\tAssert.assertTrue(IneligibilityReasonsPage.IneligibilityReasonsEditHeader(IneligibilityReasonEdit));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step4:Successfully verified Ineligibility-Reasons Edit page header\");\n\t\t\t\n\t\tString codeData=\"aaaa\";\n\t\t//Step3:add the data to the Code text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToCodeTextBox(codeData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step5:Successfully passing data to the code text box\");\n\n\t\tString descriptionData=\"bbbb\";\n\t\t//Step4:add data to the Description text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToDescriptionTextBox(descriptionData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step6:Successfully passing data to the Description text box\");\n\n\t\t//step5:click on save\n\t\tAssert.assertTrue(IneligibilityReasonsPage.saveonEditScreen());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step7:clicked on save button on Ineligibility Reason add screen sucessfully\");\n\n\n\t\tString SuccessMsgData=\"Record Updated Successfully\";\n\t\t//Step6:Verifying of message is done successfully.\n\t\tAssert.assertTrue(IneligibilityReasonsPage.verifyMessageOnAfterSave1(SuccessMsgData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step8:Verifying of Success message is done successfully.\");\n\n\t}", "boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\n }", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "@Test(expected = NoSuchElementException.class)\n public void testNext_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n }", "@Test\n public void testGetNext()\n {\n System.out.println(\"getNext\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertEquals(Syntax.LABEL, token.getSyntax());\n assertTrue(token.getNext() != null);\n final Token next = token.getNext();\n assertEquals(\"{\", next.getValue());\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n }", "@Override\r\n public boolean hasPrevious() {\n return returned.prev != header;\r\n }", "protected boolean hasNextStep() {\n\t\treturn iteration == 0;\n\t}", "private boolean _seqHasNext() {\n // If the ISPSeqComponent's builder has a next configuration, then the\n // observation has a next sequence too.\n if (_seqBuilder == null)\n return false;\n\n // Does the current seq builder have next\n if (_seqBuilder.hasNext())\n return true;\n\n // The current seq builder has no more are there more seqbuilders?\n _seqBuilder = _getTopLevelBuilder(_seqBuilderIndex + 1);\n if (_seqBuilder == null)\n return false;\n _seqBuilderIndex++;\n\n // Now reset the new seq builder run\n _doReset(_options);\n\n // Now that it has been moved, try again\n return _seqHasNext();\n }", "private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }", "public void CheckIfContinued() {\n\t\tString IsContinued = getIntent().getStringExtra(\"Continue\");\n\t\t/*\n\t\t * If IsContinued is null that means that its a new game\n\t\t */\n\t\tif (IsContinued == null) {\n\t\t}\n\t\t/*\n\t\t * If it isnt null that means the game is being Continued. The values of\n\t\t * Question, Score and Correct and then updated to the last save\n\t\t */\n\t\tif (IsContinued != null) {\n\t\t\tQuestion = getPreferences(MODE_PRIVATE).getInt(\"WhatQuestion\", 0);\n\t\t\tScore = getPreferences(MODE_PRIVATE).getInt(\"WhatScore\", 0);\n\t\t\tCorrect = getPreferences(MODE_PRIVATE).getInt(\"HowManyCorrect\", 0);\n\t\t}\n\t\tTextView SetQuestionText = (TextView) findViewById(R.id.textView5);\n\t\tSetQuestionText.setText(\"\" + Question);\n\t}", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "@Override\n\tpublic boolean canMoveToNext() {\n\t\treturn true;\n\t}", "public ElementHeader getNextStep()\n {\n return nextStep;\n }", "public boolean nextConditionMet() {\n return true;\n }", "private void checkPage() {\n Assert.assertTrue(\"Electric cars button not displayed.\",electricCars.isDisplayed());\n }", "@Test(priority = 2)\n public void testVerifyQuestionOne() {\n\t\tassertTrue(true);\n }", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "public void showNextQuestion() {\n currentQuiz++;\n gui.setUp();\n if (currentQuiz <= VocabularyQuizList.MAX_NUMBER_QUIZ) {\n showQuestion(currentQuiz);\n } else {\n result();\n }\n gui.getFrame().setVisible(true);\n }", "protected boolean wizardhook_validateFinish() {\n return true;\n }", "@Test\n public final void testMakePageSecondaryStart() throws IOException{\n \tshouldBe(\"foo='no';:sStart = 'yes';\", \"yes\", \"/ss/sStart/1\");\n \tshouldBe(\"foo='no';:sStart = 'yes';\", \"no\");\n \tshouldBe(\"harder = \\\"not this one\\\";:newStart = 'hello' \\\" there\\\";\", \"hello there\",\n \t\t\t\"/ss/newStart/a\");\n \tshouldBe(\"foo ='correct';:sStart= 'no';\" , \"correct\", \"/ss/sStartdsdf/\");\n \tshouldBe(\"foo ='correct';:sStart= 'no';\" , \"correct\", \"/ss/sSta/\");\n \tshouldBe(\"foo ='correct';:sStart= 'no';\" , \"correct\", \"/ss/sStart\");\n \tshouldBe(\"foo ='correct';sStart= 'no';\" , \"correct\", \"/ss/sStart/\");\n }", "public int assertEvents(SerializedObserverTest.TestConcurrencySubscriberEvent expectedEndingEvent) throws IllegalStateException {\n int nextCount = 0;\n boolean finished = false;\n for (SerializedObserverTest.TestConcurrencySubscriberEvent e : events) {\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onNext)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onNext but we're already finished.\");\n }\n nextCount++;\n } else\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onError)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onError but we're already finished.\");\n }\n if ((expectedEndingEvent != null) && ((SerializedObserverTest.TestConcurrencySubscriberEvent.onError) != expectedEndingEvent)) {\n throw new IllegalStateException((\"Received onError ending event but expected \" + expectedEndingEvent));\n }\n finished = true;\n } else\n if (e == (SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete)) {\n if (finished) {\n // already finished, we shouldn't get this again\n throw new IllegalStateException(\"Received onComplete but we're already finished.\");\n }\n if ((expectedEndingEvent != null) && ((SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete) != expectedEndingEvent)) {\n throw new IllegalStateException((\"Received onComplete ending event but expected \" + expectedEndingEvent));\n }\n finished = true;\n }\n\n\n }\n return nextCount;\n }", "@Test\n public void testNext_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 4, 6));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 4;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "public static void checkEnterQuestionHeading() {\r\n\t\tcheckNoSuchElementExceptionByID(\"questhead\", \"\\\"Enter question\\\" heading\");\r\n\t}", "@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }", "private boolean isNextReady()\n {\n return __m_NextReady;\n }", "private static boolean Scenario_12_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Scenario_12_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = Scenario_12_0_0(b, l + 1);\n r = r && Scenario_12_0_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }" ]
[ "0.6057777", "0.6050942", "0.5941453", "0.587101", "0.58028", "0.5777757", "0.5687827", "0.5635674", "0.56158215", "0.55923843", "0.5572561", "0.55491364", "0.5544951", "0.5502862", "0.54917145", "0.5476489", "0.5435033", "0.54326046", "0.541935", "0.5415547", "0.54096425", "0.54032636", "0.5389636", "0.53733826", "0.536921", "0.5352435", "0.5347743", "0.5336593", "0.5322209", "0.53208196", "0.53130305", "0.5308759", "0.5302937", "0.5296389", "0.5281557", "0.5279729", "0.52790105", "0.52717197", "0.52705085", "0.52683204", "0.5264554", "0.5262848", "0.52584696", "0.52584124", "0.52583134", "0.52533084", "0.5251744", "0.5250011", "0.5241146", "0.5238118", "0.52311194", "0.52125514", "0.52100533", "0.5194805", "0.5189141", "0.518634", "0.516639", "0.5164397", "0.51634026", "0.51601005", "0.5152916", "0.51511437", "0.5150686", "0.5146699", "0.5142831", "0.5141771", "0.5141771", "0.5141771", "0.5133375", "0.51304173", "0.5127633", "0.51269317", "0.51242685", "0.51229954", "0.5119673", "0.51050836", "0.5101753", "0.50994223", "0.50941813", "0.5091039", "0.5086076", "0.5077858", "0.5074794", "0.5072531", "0.5058251", "0.50545216", "0.5053926", "0.5052568", "0.5043943", "0.5043025", "0.50411046", "0.50405926", "0.50394654", "0.50394046", "0.5037402", "0.5037221", "0.5036342", "0.5035633", "0.5031968", "0.50312793" ]
0.76195574
0
this method verify the Upon Delivery Section
public boolean VerifyOrderConfirmation_UponDeliverySection() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyUponDeliverySection", "UponDeliverySectionIsDisplayed"); }else{extentLogs.fail("VerifyUponDeliverySection", "UponDeliverySectionIsNotDisplayed");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void showGuaranteedDeliverySection() {\n\n\t}", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "@java.lang.Override\n public boolean hasDeliver() {\n return stepInfoCase_ == 12;\n }", "@java.lang.Override\n public boolean hasDeliver() {\n return stepInfoCase_ == 12;\n }", "public void verifyAuDisclaimerReservationPage() {\n\t\treadFile.readDataFromExcel();\n\t\tString expecteddiscText = (String) readFile.data[23][21];\n\t\tlogger.info(expecteddiscText);\n\t\tutil.scrollTo(\"Disclaimers\");\n\t\tutil.click(reservationDetailPage_DisclaimerHeader);\n\t\tDriverWait.waitById(\"com.ihg.apps.android:id/disclaimers_content\");\n\t\tutil.singleScroll();\n\t\tString disclaimerContent = reservationDetailPage_DisclaimerMsg.getAttribute(\"text\");\n\t\tlogger.info(disclaimerContent);\n\t\tString[] contentSplit = disclaimerContent.split(\"Check with hotel for details.\");\n\t\tString actualDiscText = contentSplit[1].trim();\n\t\tlogger.info(actualDiscText);\n\t\tAssert.assertEquals(expecteddiscText, actualDiscText);\n\t}", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "boolean isBillingSectionPresent();", "public void verifyBillingWithDeliveryAddress(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Both Billing and Delivery address should be same\");\r\n\t\ttry{\r\n\t\t\tString BillingAddress = driver.findElement(locator_split(\"txtBillingAddress\")).getText().toString();\r\n\t\t\tclick(locator_split(\"btnDeliverytab\"));\r\n\t\t\tString DeliveryAddress = driver.findElement(locator_split(\"txtDeliveryAddress\")).getText().toString();\r\n\t\t\tif(BillingAddress.equals(DeliveryAddress)){\r\n\t\t\t\tSystem.out.println(\"Both Billing and Delivery address are same\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Both Billing and Delivery address are same\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Billing and Delivery address are not same\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Element \"+elementProperties.getProperty(\"txtBillingAddress\")+\" \"+elementProperties.getProperty(\"txtDeliveryAddress\")+\" \"+elementProperties.getProperty(\"btnDeliverytab\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtAddtoCartPage\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testDeliveryChuteFull() {\r\n\t\tdcListen.chuteFull(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "private void ThenPaymentIsProcessed() throws Exception {\n assert true;\n }", "if(true==adhocTicket.isPaid()){\n System.out.println(\"isPaid() is passed\");\n }", "public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "public boolean VerifyOrderConfirmation_MyStoreSection() {\n\t\t\tboolean flag = false;\n\t\t\t\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyMyStoreSection\", \"MyStoreSectionIsDisplayed\");\n\t\t }else{extentLogs.fail(\"VerifyMyStoreSection\", \"MyStoreSectionIsNotDisplayed\");}\n\t\t\t\n\t\t\treturn flag;\n\t\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "boolean hasBillingSetup();", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\r\n\tpublic void testDeliveryChuteEnable() {\r\n\t\tdcListen.doorOpened(vend.getDeliveryChute());\r\n\t\tdcListen.doorClosed(vend.getDeliveryChute());\r\n\t\tassertFalse(vend.getDeliveryChute().isDisabled());\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "public abstract boolean isDelivered();", "@java.lang.Override\n public boolean hasEmail() {\n return deliveryMethodCase_ == 1;\n }", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "@java.lang.Override\n public boolean hasDidUri() {\n return deliveryMethodCase_ == 2;\n }", "public boolean hasEmail() {\n return deliveryMethodCase_ == 1;\n }", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "public void verifyPassivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "public void verifyNzDisclaimerReservationPage() {\n\t\treadFile.readDataFromExcel();\n\t\tString expecteddiscText = (String) readFile.data[24][21];\n\t\tlogger.info(expecteddiscText);\n\t\tutil.scrollTo(\"Disclaimers\");\n\t\tutil.click(reservationDetailPage_DisclaimerHeader);\n\t\tDriverWait.waitById(\"com.ihg.apps.android:id/disclaimers_content\");\n\t\tutil.singleScroll();\n\t\tString disclaimerContent = reservationDetailPage_DisclaimerMsg.getAttribute(\"text\");\n\t\tlogger.info(disclaimerContent);\n\t\tString[] contentSplit = disclaimerContent.split(\"Check with hotel for details.\");\n\t\tString actualDiscText = contentSplit[1].trim();\n\t\tlogger.info(actualDiscText);\n\t\tAssert.assertEquals(expecteddiscText, actualDiscText);\n\t}", "private void AndOrderIsSentToKitchen() throws Exception {\n assert true;\n }", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "public boolean isAmDelivery() {\r\n return amDelivery;\r\n }", "@Override\n\tpublic void hideGuaranteedDeliverySection() {\n\n\t}", "public void verifyEmailSended(PushRecord pushRecord) throws Exception {\n Plan plan = (Plan) pushRecord.getPayLoad().get(\"plan\");\n Person person = pushRecord.getPerson();\n person = personService.findById(person);\n String email = person.getEmail();\n PushRecordType pushType = pushRecord.getType();\n String templateId = null;\n if (pushType == PushRecordType.PLAN_THREE_DAYS) {\n templateId = SendGridEmailTemplate.INSPECTION_THREE_DAYS();\n } else {\n templateId = SendGridEmailTemplate.INSPECTION_TODAY();\n }\n Address address = addressDao.findById(plan.getAddress());\n Map<String, Object> data = new HashMap<>();\n data.put(\"inspectionLocation\", address.getContent());\n int day = plan.getDay();\n LocalDateTime now = LocalDateTime.now(ZoneId.of(\"UTC\"));\n int nowDay = now.getDayOfMonth();\n Month month = now.getMonth();\n int year = now.getYear();\n if (nowDay > day) {\n LocalDateTime nextMonth = now.plusMonths(1);\n month = nextMonth.getMonth();\n year = nextMonth.getYear();\n }\n String dateInfo = month.toString() + \" \" + day + \"st,\" + year;\n data.put(\"inspectionDate\", dateInfo);\n String subject = \"Scheduled inspection reminder\";\n Mockito.verify(mockSendEmailUitl).sendByTemplate(email, subject, templateId, data);\n }", "@Test\n\tpublic void onholdToConfirmSEPA() throws Exception {\n\t\ttry {\n\t\t\t// Launch the browser and load the default URL\n\t\t\tUtility.initConfiguration();\n\t\t\tThread.sleep(3000);\n\t\t\t// Login to back end and check payment method is enabled or disabled\n\t\t\tUtility.wooCommerceBackEndLogin();\n\t\t\tThread.sleep(3000);\n\t\t\tElementLocators element = PageFactory.initElements(driver, ElementLocators.class);\n\t\t\t// Title for HTML report\n\t\t\ttest = extend.createTest(\"Vendor script execution for 'DIRECT_DEBIT_SEPA' onhold to confirm\");\n\t\t\t// Steps\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\tThread.sleep(3000);\n\t\t\telement.WooCommerce_Settings.click();\n\t\t\telement.Payment_Tab.click();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Display.click();\n\t\t\tif (!element.Sepa_Enable_Payment_Method_Checkbox.isSelected()) {\n\t\t\t\telement.Sepa_Enable_Payment_Method_Checkbox.click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t\t// Read the order completion status\n\t\t\tString OrderCompletionStatus = element.Sepa_Order_Completion_Status_Selectbox.getText();\n\t\t\tThread.sleep(3000);\t\t\t\n\t\t\t// On-hold enabled\n\t\t\tActions action = new Actions(driver);\n\t\t\tThread.sleep(3000);\n\t\t\tWebElement onhold = element.Sepa_Onhold_Payment_Action_Selectbox;\n\t\t\tThread.sleep(5000);\n\t\t\taction.click(onhold).sendKeys(\"Authorize\", Keys.DOWN, Keys.ENTER).build().perform();\n\t\t\tThread.sleep(2000);\n\t\t\telement.Sepa_Payment_Save_Changes.click();\n\t\t\tThread.sleep(3000);\n\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\tThread.sleep(3000);\n\t\t\tUtility.wooCommerceCheckOutProcess();\n\t\t\tThread.sleep(4000);\n\t\t\t// Read the data from excel sheet\n\t\t\tMap<String, String> UserData = new HashMap<String, String>();\n\t\t\tUserData = Data.ExcelReader_PaymentMethods();\n\t\t\t// Check whether payment method is displayed in checkout page\n\t\t\tif (element.Sepa_Label.isDisplayed() == true) {\n\t\t\t\tif (element.Sepa_Radio_button.isDisplayed()) {\n\t\t\t\t\telement.Sepa_Radio_button.click();\n\t\t\t\t}\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\telement.Sepa_Iban_TextBox.sendKeys(UserData.get(\"SEPAIBAN\"));\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);\n\t\t\t\telement.Place_Order.click();\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\t\t\t\t// After order placed successfully verify Thank you message displayed\n\t\t\t\tString thankyoumessage = element.FE_Thank_You_Page_Text.getText();\n\t\t\t\tif (thankyoumessage.equals(\"Thank you. Your order has been received.\")) {\n\t\t\t\t\tSystem.out.println(\"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.INFO, \"Order placed successfully using Direct Debit SEPA\");\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t// Get the amount from order success page front end\n\t\t\t\t\tString totalOrderAmount = element.OrderDetails_TotalAmount.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\t// Get the TID from order success page front end\n\t\t\t\t\tString TID = element.OrderDetails_Note_TID.getText().replaceAll(\"[^0-9]\", \"\");\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\t\t\t// Go to card portal and check the tid_status\n\t\t\t\t\tdriver.navigate().to(Constant.novalnetcardportalurl);\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\telement.Cardportal_TID_Textbox.sendKeys(TID);\n\t\t\t\t\telement.Cardportal_Submit.click();\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\tString tid_status_value = element.Status_Code.getText();\n\t\t\t\t\tint tid_status = Integer.parseInt(tid_status_value);\n\t\t\t\t\t// Check whether the Tid is 99\n\t\t\t\t\tif (tid_status == 99) {\n\t\t\t\t\t\t// Go to callback execution site and enter vendor script URL\n\t\t\t\t\t\tdriver.navigate().to(Constant.vendorscripturl);\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t\telement.Vendor_Script_Url.sendKeys((Constant.shopfrontendurl) + \"?wc-api=novalnet_callback\");\n\t\t\t\t\t\t// Enter required parameter\n\t\t\t\t\t\telement.Vendor_Id.clear();\n\t\t\t\t\t\telement.Vendor_Id.sendKeys(\"4\");\n\t\t\t\t\t\telement.Vendor_Auth_Code.clear();\n\t\t\t\t\t\telement.Vendor_Auth_Code.sendKeys(\"JyEtHUjjbHNJwVztW6JrafIMHQvici\");\n\t\t\t\t\t\telement.Product_Id.clear();\n\t\t\t\t\t\telement.Product_Id.sendKeys(\"14\");\n\t\t\t\t\t\telement.Tariff_Id.clear();\n\t\t\t\t\t\telement.Tariff_Id.sendKeys(\"30\");\n\t\t\t\t\t\telement.Payment_Type_Edit_Button.click();\n\t\t\t\t\t\tSelect selectpaymenttype = new Select(element.Payment_Type_Selectbox);\n\t\t\t\t\t\tselectpaymenttype.selectByVisibleText(\"DIRECT_DEBIT_SEPA\");\n\t\t\t\t\t\telement.Test_Mode.clear();\n\t\t\t\t\t\telement.Test_Mode.sendKeys(\"1\");\n\t\t\t\t\t\telement.Tid_Payment.clear();\n\t\t\t\t\t\telement.Amount.clear();\n\t\t\t\t\t\telement.Amount.sendKeys(totalOrderAmount);\n\t\t\t\t\t\telement.Currency.clear();\n\t\t\t\t\t\telement.Currency.sendKeys(\"EUR\");\n\t\t\t\t\t\telement.Status.clear();\n\t\t\t\t\t\telement.Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid_Status.clear();\n\t\t\t\t\t\telement.Tid_Status.sendKeys(\"100\");\n\t\t\t\t\t\telement.Tid.clear();\n\t\t\t\t\t\telement.Tid.sendKeys(TID);\n\t\t\t\t\t\telement.Execute_Button.click();\n\t\t\t\t\t\tString callback_message = element.callback_message.getText();\n\t\t\t\t\t\tString callback_message_updated = callback_message.substring(9, callback_message.length());\t\t\t\t\t\t\n\t\t\t\t\t\tif (callback_message\n\t\t\t\t\t\t\t\t.contains(\"Novalnet callback received. The transaction has been confirmed\")) {\n\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopbackendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tactions.moveToElement(element.WooCommerce).perform();\n\t\t\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\t\t\telement.WooCommerce_Orders.click();\n\t\t\t\t\t\t\tString BEOrderStatus = element.Backend_Order_Status.getText();\n\t\t\t\t\t\t\telement.Backend_Order_Number.click();\n\t\t\t\t\t\t\tString BEOrderNotesMessage = element.BE_OrderNotes_Message.getText();\n\t\t\t\t\t\t\t// Verify order completion status is updated in shop back end after the execution\n\t\t\t\t\t\t\tSystem.out.println(\"Order completion status: \" + OrderCompletionStatus);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order status: \" + BEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(BEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop back end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated successfully in shop back end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Verify order completion status is updated in front after the execution\n\t\t\t\t\t\t\tdriver.navigate().to(Constant.shopfrontendurl);\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\telement.MyAccount_Menu.click();\n\t\t\t\t\t\t\telement.MyAccount_Orders.click();\n\t\t\t\t\t\t\tString FEOrderStatus = element.Frontend_Order_Status.getText();\n\t\t\t\t\t\t\tSystem.out.println(\"Front end order status: \" + FEOrderStatus);\n\t\t\t\t\t\t\tif (OrderCompletionStatus.equals(FEOrderStatus)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: Direct Debit SEPA order completion status is updated successfully in shop front end\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: Direct Debit SEPA order completion status is not updated in shop front end\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(\"callback execution message: \" + callback_message_updated);\n\t\t\t\t\t\t\tSystem.out.println(\"Back end order note: \" + BEOrderNotesMessage);\n\t\t\t\t\t\t\tif (callback_message_updated.equals(BEOrderNotesMessage)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t\ttest.log(Status.PASS,\n\t\t\t\t\t\t\t\t\t\t\"TC PASSED: DIRECT_DEBIT_SEPA execution message and back end order note message text was matched successfully\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t\ttest.log(Status.FAIL,\n\t\t\t\t\t\t\t\t\t\t\"TC FAILED: DIRECT_DEBIT_SEPA execution message and back end order note message text was not matched\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t\ttest.log(Status.ERROR, \"ERROR: Callback response message is displayed wrongly\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Transaction is already confirmed or not in pending status\");\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t\ttest.log(Status.FAIL, \"TC FAILED: Order was not placed successfully using Direct Debit SEPA\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close browser\n\t\t\tUtility.closeBrowser();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t\ttest.log(Status.ERROR, \"ERROR: Unexpected error from 'onholdToConfirmSEPA' method\");\n\t\t}\n\t}", "boolean hasDeliveryDateAfter();", "public void verifyActivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "@Then(\"the Booking page shows correct booking details\")\n public void bookingpage_verify_booking_details(){\n }", "boolean hasPayment();", "boolean hasPayment();", "public synchronized void verifyMayWeSuggestSection(WebDriver driver)\n\t\t\tthrows Exception, InterruptedException, AssertionError, IOException {\n\t\tStringBuffer errorBuffer = new StringBuffer();\n\n\t\t// Verification : May We Suggest section on PDP\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVSection\",\n\t\t\t\t\t\"People like you also viewed : Section not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : section showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : May We Suggest Header\n\t\ttry {\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVHeader\",\n\t\t\t\t\t\"People like you also viewed : Header not showing up on PDP\"));\n\t\t\tReporter.log(\n\t\t\t\t\tConstants.DELIMITER + Constants.PASS + \"| People like you also viewed : Header showing up on PDP\");\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"People like you also viewed : Product Image not showing up on PDP\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Image showing up on PDP\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Price\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductPrice\",\n\t\t\t\t\t\t\"People like you also viewed : Product Price not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Price showing up for People like you also viewed\");\n\t\t\t}\n\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t\t// Verification : People like you also viewed : Product Name\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"AT_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"LO_PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t} else {\n\t\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDPRVProductName\",\n\t\t\t\t\t\t\"People like you also viewed : Product Name not showing up for People like you also viewed\"));\n\t\t\t\tReporter.log(Constants.DELIMITER + Constants.PASS\n\t\t\t\t\t\t+ \"| People like you also viewed : Product Name showing up for People like you also viewed\");\n\t\t\t}\n\t\t} catch (AssertionError e) {\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\t\t// Verification : People like you also viewed : Product Image\n\t\t// redirecting to PDP\n\t\ttry {\n\t\t\tif (Utils.brand.equals(\"ATFP\")) {\n\t\t\t\tWebElement elProduct = utils.findElementByLocator(driver, \"AT_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\telProduct.click();\n\t\t\t} else if (Utils.brand.equals(\"LOFP\")) {\n\t\t\t\tWebElement e2Product = utils.findElementByLocator(driver, \"LO_PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te2Product.click();\n\n\t\t\t} else {\n\t\t\t\tWebElement e3Product = utils.findElementByLocator(driver, \"PDPRVProductImage\",\n\t\t\t\t\t\t\"| May We Suggest | Product Image \");\n\n\t\t\t\te3Product.click();\n\t\t\t}\n\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t\taddToBag(driver, 0, 0);\n\t\t\tUtils.waitForPageLoaded(driver);\n\n\t\t} catch (AssertionError e) {\n\t\t\tReporter.log(Constants.DELIMITER + Constants.FAIL\n\t\t\t\t\t+ \"| People like you also viewed : Product Image not redirecting to PDP\");\n\t\t\terrorBuffer.append(e.getMessage() + \"\\n\");\n\t\t}\n\n\t}", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "boolean checkVerification();", "public void verifyHhsLink() {\n dhhsFooterLink.assertState().enabled();\n dhhsFooterLink.assertContains().text(\"Department of Health & Human Services\");\n }", "boolean hasPaymentDetailsVersion();", "boolean collectiveDeliveryPolicyHasEntry(Message msg){\n\t\treturn collectiveDatastruct.containsKey(new DeliveryPolicyDataStructureKey(msg.getId(), msg.getSenderId()));\r\n\t}", "boolean hasInvoice();", "int verify(Requirement o);", "public void verifyAccessibilityLink() {\n accessibilityFooterLink.assertState().enabled();\n accessibilityFooterLink.assertContains().text(\"Accessibility\");\n }", "public boolean hasDidUri() {\n return deliveryMethodCase_ == 2;\n }", "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}", "public void VerifyCartCheckout_Coupon_OrderSumamrysections(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- cartcheckout, coupon and Order summary should be present in checkout page\");\r\n\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"boxCheckoutCartCheckout\")) & isElementPresent(locator_split(\"boxCheckoutCoupon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"boxCheckoutOrderSummary\"))){\r\n\t\t\t\tSystem.out.println(\"cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCartCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCoupon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutOrderSummary\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public boolean isGuaranteedDelivery() {\r\n return guaranteedDelivery;\r\n }", "private boolean isCompleted(OBWSHIPShipping shipping) {\n return shipping.getDocumentStatus().equals(\"CO\");\n }", "@Test\n public void loanWithCahargesAndUpfrontAccrualAccountingEnabled() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n Integer percentageDisbursementCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanDisbursementJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\"));\n addCharges(charges, percentageDisbursementCharge, \"1\", null);\n\n Integer percentageSpecifiedDueDateCharge = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", false));\n addCharges(charges, percentageSpecifiedDueDateCharge, \"1\", \"29 September 2011\");\n\n Integer percentageInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", false));\n addCharges(charges, percentageInstallmentFee, \"1\", \"29 September 2011\");\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanProductID = createLoanProduct(false, ACCRUAL_UPFRONT, assetAccount, incomeAccount, expenseAccount,\n overpaymentAccount);\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"12,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n verifyLoanRepaymentSchedule(loanSchedule);\n\n List<HashMap> loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n validateCharge(percentageSpecifiedDueDateCharge, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"120.00\", \"0.0\", \"0.0\");\n\n // check for disbursement fee\n HashMap disbursementDetail = loanSchedule.get(0);\n validateNumberForEqual(\"120.00\", String.valueOf(disbursementDetail.get(\"feeChargesDue\")));\n\n // check for charge at specified date and installment fee\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"149.11\", String.valueOf(firstInstallment.get(\"feeChargesDue\")));\n\n // check for installment fee\n HashMap secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"29.70\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 September 2011\", assetAccountInitialEntry);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, \"20 September 2011\",\n new JournalEntry(Float.parseFloat(\"605.94\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"120.00\"), JournalEntry.TransactionType.CREDIT));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"0.0\", \"120.00\", \"0.0\");\n\n LOG.info(\"-------------Make repayment 1-----------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"3300.60\"), loanID);\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageDisbursementCharge, loanCharges, \"1\", \"0.00\", \"120.00\", \"0.0\");\n validateCharge(percentageSpecifiedDueDateCharge, loanCharges, \"1\", \"0.00\", \"120.0\", \"0.0\");\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"90.89\", \"29.11\", \"0.0\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.CREDIT));\n\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentageSpecifiedDueDateCharge), \"29 October 2011\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"149.70\", String.valueOf(secondInstallment.get(\"feeChargesDue\")));\n LOG.info(\"----------- Waive installment charge for 2nd installment ---------\");\n LOAN_TRANSACTION_HELPER.waiveChargesForLoan(loanID, (Integer) getloanCharge(percentageInstallmentFee, loanCharges).get(\"id\"),\n LoanTransactionHelper.getWaiveChargeJSON(String.valueOf(2)));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentageInstallmentFee, loanCharges, \"1\", \"61.19\", \"29.11\", \"29.70\");\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"29.7\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"29.7\"), JournalEntry.TransactionType.DEBIT));\n\n LOG.info(\"----------Make repayment 2------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3271.49\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3271.49\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3271.49\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"--------------Waive interest---------------\");\n LOAN_TRANSACTION_HELPER.waiveInterest(\"20 December 2011\", String.valueOf(61.79), loanID);\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"60.59\", String.valueOf(thirdInstallment.get(\"interestOutstanding\")));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForExpenseAccount(expenseAccount, \"20 December 2011\",\n new JournalEntry(Float.parseFloat(\"61.79\"), JournalEntry.TransactionType.DEBIT));\n\n Integer percentagePenaltySpecifiedDueDate = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_PERCENTAGE_AMOUNT, \"1\", true));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentagePenaltySpecifiedDueDate), \"29 September 2011\", \"1\"));\n loanCharges.clear();\n loanCharges = LOAN_TRANSACTION_HELPER.getLoanCharges(loanID);\n validateCharge(percentagePenaltySpecifiedDueDate, loanCharges, \"1\", \"0.00\", \"120.0\", \"0.0\");\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"120\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // checking the journal entry as applied penalty has been collected\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 October 2011\",\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3300.60\"), JournalEntry.TransactionType.CREDIT));\n\n LOG.info(\"----------Make repayment 3 advance------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 November 2011\", Float.parseFloat(\"3301.78\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 November 2011\",\n new JournalEntry(Float.parseFloat(\"3301.78\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3301.78\"), JournalEntry.TransactionType.CREDIT));\n LOAN_TRANSACTION_HELPER.addChargesForLoan(loanID, LoanTransactionHelper\n .getSpecifiedDueDateChargesForLoanAsJSON(String.valueOf(percentagePenaltySpecifiedDueDate), \"10 January 2012\", \"1\"));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"120\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3240.58\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Pay applied penalty ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"120\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"120\"), JournalEntry.TransactionType.CREDIT));\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"0\", String.valueOf(fourthInstallment.get(\"penaltyChargesOutstanding\")));\n validateNumberForEqual(\"3120.58\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n\n LOG.info(\"----------Make over payment for repayment 4 ------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 January 2012\", Float.parseFloat(\"3220.58\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"3220.58\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"3120.58\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForLiabilityAccount(overpaymentAccount, \"20 January 2012\",\n new JournalEntry(Float.parseFloat(\"100.00\"), JournalEntry.TransactionType.CREDIT));\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.getLoanDetail(REQUEST_SPEC, RESPONSE_SPEC, loanID, \"status\");\n LoanStatusChecker.verifyLoanAccountIsOverPaid(loanStatusHashMap);\n }", "boolean hasMerchantData();", "boolean hasMerchantData();", "@Test\n public void testLoanForeclosure() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n final Integer loanProductID = createLoanProduct(false, NONE);\n\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatAmountChargeOne = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatAmountChargeOne, \"50\", \"01 October 2011\");\n Integer flatAmountChargeTwo = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"100\", true));\n addCharges(charges, flatAmountChargeTwo, \"100\", \"15 December 2011\");\n\n List<HashMap> collaterals = new ArrayList<>();\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"10,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- APPROVE LOAN -----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- DISBURSE LOAN ----------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID, \"10,000.00\",\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LOG.info(\"DISBURSE {}\", loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n LOG.info(\"---------------------------------- Make repayment 1 --------------------------------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"2676.24\"), loanID);\n\n LOG.info(\"---------------------------------- FORECLOSE LOAN ----------------------------------------\");\n LOAN_TRANSACTION_HELPER.forecloseLoan(\"08 November 2011\", loanID);\n\n // retrieving the loan status\n loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan status is closed\n LoanStatusChecker.verifyLoanAccountIsClosed(loanStatusHashMap);\n // retrieving the loan sub-status\n loanStatusHashMap = LoanStatusChecker.getSubStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan sub-status is foreclosed\n LoanStatusChecker.verifyLoanAccountForeclosed(loanStatusHashMap);\n\n }", "@When(\"^I check whether to show a notification for license$\")\n public void i_check_whether_to_show_a_notification_for_license() throws Throwable {\n result = driverUser.showExpiryNotification();\n }", "@Test\n public void addAdvertisementSuccessfullyNonExistingRealEstate() {\n LoginUtil.login(ADVERTISER_USERNAME, ADVERTISER_PASSWORD, driver, wait);\n\n final WebElement addAnnouncementLink = driver.findElement(ADD_ANNOUNCEMENT_LINK);\n addAnnouncementLink.click();\n\n // Check if we're on right URL (Adding Announcement Form)\n wait.until(ExpectedConditions.urlToBe(ADDING_ANNOUNCEMENT_URL));\n\n assertThat(driver.getCurrentUrl()).isEqualTo(ADDING_ANNOUNCEMENT_URL);\n\n // Get elements\n final WebElement announcementName = driver.findElement(ANNOUNCEMENT_NAME);\n final WebElement announcementPrice = driver.findElement(ANNOUNCEMENT_PRICE);\n final WebElement announcementPhone = driver.findElement(ANNOUNCEMENT_PHONE);\n final WebElement announcementDateExp = driver.findElement(DATE_PICKER_BUTTON);\n final WebElement annoucementTypeSale = driver.findElement(ANNOUNCEMENT_TYPE);\n\n final WebElement realEstateArea = driver.findElement(REAL_ESTATE_AREA);\n final WebElement realEstateType = driver.findElement(REAL_ESTATE_TYPE);\n final WebElement realEstateCountry = driver.findElement(REAL_ESTATE_CONUTRY);\n final WebElement realEstateCity = driver.findElement(REAL_ESTATE_CITY);\n final WebElement realEstateRegion = driver.findElement(REAL_ESTATE_REGION);\n final WebElement realEstateStreet = driver.findElement(REAL_ESTATE_STREET);\n final WebElement realEstateStreetNo = driver.findElement(REAL_ESTATE_STREET_NO);\n final Select realEstateHeatingType = new Select(driver.findElement(REAL_ESTATE_HEATING));\n\n // Assert that elements are presented\n assertThat(announcementName).isNotNull();\n assertThat(announcementPrice).isNotNull();\n assertThat(announcementPhone).isNotNull();\n assertThat(announcementDateExp).isNotNull();\n //assertThat(announcementDescription).isNotNull();\n assertThat(annoucementTypeSale).isNotNull();\n\n assertThat(realEstateArea).isNotNull();\n assertThat(realEstateCountry).isNotNull();\n assertThat(realEstateCity).isNotNull();\n assertThat(realEstateRegion).isNotNull();\n assertThat(realEstateStreet).isNotNull();\n assertThat(realEstateStreetNo).isNotNull();\n\n // Populate data\n announcementName.sendKeys(ANN_NAME_VALUE);\n // Set Announcement Type to 'SALE'\n annoucementTypeSale.click();\n announcementPrice.sendKeys(ANN_PRICE_VALUE);\n announcementPhone.sendKeys(ANN_PHONE_VALUE);\n announcementDateExp.click();\n\n realEstateArea.sendKeys(RE_AREA_VALUE);\n realEstateHeatingType.selectByValue(RE_HEATING_TYPE);\n // Set Real Estate type to 'HOUSE'\n realEstateType.click();\n realEstateCountry.sendKeys(RE_COUNTRY_VALUE);\n realEstateCity.sendKeys(RE_CITY_VALUE);\n realEstateRegion.sendKeys(RE_REGION_VALUE);\n realEstateStreet.sendKeys(RE_STREET_VALUE);\n realEstateStreetNo.sendKeys(RE_STREET_NO_VALUE);\n\n final WebElement continueButton = driver.findElement(CONTINUE_BUTTON);\n continueButton.click();\n\n // Second part of adding announcement\n final WebElement dropZone = driver.findElement(IMAGES_DROP_ZONE);\n final WebElement progress = driver.findElement(IMAGES_UPLOAD_PROGRESS);\n\n assertThat(dropZone).isNotNull();\n assertThat(progress).isNotNull();\n\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_1);\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_2);\n\n final WebElement finishButton = driver.findElement(FINISH_BUTTON);\n finishButton.click();\n\n // Wait to redirect to added announcement page\n wait.until(ExpectedConditions.urlContains(ADDED_ANNOUNCEMENT_URL));\n\n LoginUtil.logout(driver, wait);\n }", "public boolean verify();", "boolean hasPlainRedeem();", "public void VerifyDeliveryLinkPopup(String title){\r\n\t\tString Title = getValue(title);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Pop up should come when delivery link is clicked in order summary\");\r\n\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"lnkDeliverylinkinOrderSummary\"));\r\n\t\t\tHashMap<String, String> windowids=getWindowID();\r\n\t\t\tdriver.switchTo().window(windowids.get(\"childID\"));\r\n\t\t\tverifyPage(Title);\r\n\t\t\tcloseBrowser();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ship to Store image is not present for country -\"+countries.get(countrycount));\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkAp() {\n\t\tboolean flag = oTest.checkAp();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }", "@Override\n public void sure(OrderDetail orderDetail) {\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "@Test\n\tpublic void testCheckSufficientCredits_OverdraftFacility() {\n\n\t\tint creditsRequired = 11;\n\n\t\tSmsMessage msg = new SmsMessage();\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSmsAccountId(account.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.getSmsMessages().add(msg);\n\t\tsmsTask.setCreditEstimate(creditsRequired);\n\t\tmsg.setSmsTask(smsTask);\n\n\t\tboolean sufficientCredits = smsBillingImpl.checkSufficientCredits(\n\t\t\t\taccount.getId(), creditsRequired);\n\t\tAssert.assertFalse(\"Expected insufficient credit\", sufficientCredits);\n\t\thibernateLogicLocator.getSmsAccountLogic().persistSmsAccount(account);\n\t\tsufficientCredits = smsBillingImpl.checkSufficientCredits(account\n\t\t\t\t.getId(), creditsRequired);\n\t\tAssert.assertTrue(\"Expected insufficient credit\", !sufficientCredits);\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating On Demand DMCA Restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-252\" })\n\tpublic void verifyonDemanddmcaRestrictedAlbumArt() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying On Demand DMCA restricted Album Art MOBANDEVER-252\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getdmca().verifyOnDemandDMCA();\n\t\t\tgetPageFactory().getCategory().nowPlayingArt();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }", "void purchaseMade();", "@Override\n public void deliveryComplete(IMqttDeliveryToken imdt) {\n System.out.println(\"在完成消息传递并收到所有确认后调用。\");\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderShipmentReleaseForAlwaysAvailable() {\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.ALWAYS_AVAILABLE);\n\t\tproductSku.setProduct(product);\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(productSkuService).findBySkuCode(SKU_CODE); will(returnValue(productSku));\n\t\t\t}\n\t\t});\n\n\t\tInventoryDto inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\n\t\t// No DAO operations expected.\n\t\tproductInventoryManagementService.processInventoryUpdate(inventoryDto, buildInventoryAudit(InventoryEventType.STOCK_ALLOCATE, 1));\n\t\t// No DAO operations expected.\n\t\tproductInventoryManagementService.processInventoryUpdate(inventoryDto, buildInventoryAudit(InventoryEventType.STOCK_RELEASE, 1));\n\n\t}", "@Test\r\n\tpublic void testDeliveryChuteDisable() {\r\n\t\tdcListen.doorOpened(vend.getDeliveryChute());\r\n\t\tassertTrue(vend.getDeliveryChute().isDisabled());\r\n\t}", "public static void verifyPlaceStoreOrderResponse(Response response, long expectedId, long expectedPetId, int expectedQuantity, String expectedShipDate, String expectedStatus, boolean expectedCompleted) {\n verifySuccessStatusCodeInPlaceStoreOrderResponse(response);\n\n StoreOrderResponse storeOrderResponse = response.as(StoreOrderResponse.class);\n\n long actualId = storeOrderResponse.getId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - id, Actual: \" + actualId + \" , Expected: \" + expectedId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualId, expectedId, \"Place Store Order service response - id field error\");\n\n long actualPetId = storeOrderResponse.getPetId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - pet id, Actual: \" + actualPetId + \" , Expected: \" + expectedPetId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualPetId, expectedPetId, \"Place Store Order service response - pet id field error\");\n\n int actualQuantity = storeOrderResponse.getQuantity();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - quantity, Actual: \" + actualQuantity + \" , Expected: \" + expectedQuantity);\n MicroservicesEnvConfig.softAssert.assertEquals(actualQuantity, expectedQuantity, \"Place Store Order service response - quantity field error\");\n\n String actualShipDate = storeOrderResponse.getShipDate().substring(0,23);\n expectedShipDate = expectedShipDate.replace(\"Z\", \"\");\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - ship date, Actual: \" + actualShipDate + \" , Expected: \" + expectedShipDate);\n MicroservicesEnvConfig.softAssert.assertEquals(actualShipDate, expectedShipDate, \"Place Store Order service response - ship date field error\");\n\n String actualStatus = storeOrderResponse.getStatus();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - status, Actual: \" + actualStatus + \" , Expected: \" + expectedStatus);\n MicroservicesEnvConfig.softAssert.assertEquals(actualStatus, expectedStatus, \"Place Store Order service response - status field error\");\n\n boolean actualCompleted = storeOrderResponse.isComplete();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - complete, Actual: \" + actualCompleted + \" , Expected: \" + expectedCompleted);\n MicroservicesEnvConfig.softAssert.assertEquals(actualCompleted, expectedCompleted, \"Place Store Order service response - complete field error\");\n }", "public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "public abstract boolean verify();", "public void v_Verify_Guest4_Displayed(){\n\t}", "@Override\n\tpublic boolean verifySegment(CASIdentifier identifierToVerify)\n\t{\n\t\treturn true;\n\t}", "@When(\"je verifie les informations et clique sur Submit Order\")\n\tpublic void je_verifie_les_informations_et_clique_sur_Submit_Order() {\n\t throw new PendingException();\n\t}", "@Test\n\tpublic void madeOfferHasPendingStatus() {\n\t}", "@Test(priority=23)\n\tpublic void verifyPublishedAdisDisplayingBelowPopularAds() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t\t/*waitTill(3000);\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tclick(loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, overviewPage.sellerLogoonHeader);\n\t\twaitTill(3000);*/\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t waitTill(2000);\n\t jsClick(driver,overviewPage.myStockOptioninSiderBar);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.allMyStockOptioninSiderBar);\n\t jsClick(driver,overviewPage.allMyStockOptioninSiderBar);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.allStockPageVerificationElement);\n\t verifyElementPresent(overviewPage.activeAdinStockListing);\n waitTill(2000);\n explicitWaitFortheElementTobeVisible(driver,overviewPage.overviewOptioninSiderBar);\n jsClick(driver,overviewPage.overviewOptioninSiderBar);\n explicitWaitFortheElementTobeVisible(driver,overviewPage.overviewPageVerificationElement);\n waitTill(3000);\n Assert.assertTrue(verifyElementPresent(overviewPage.activeAdsunderPopularAds), \"Published Ad is not displaying in Popular Ads section.\");\n \n\t}", "private boolean allocateInvoice() {\n //\tcalculate actual allocation\n BigDecimal allocationAmt = getPayAmt();\t\t\t//\tunderpayment\n\n //\t\tDANIEL -- 2do.\n float pay = getPayAmt().floatValue();\n //\n\n if (getOverUnderAmt().signum() < 0 && getPayAmt().signum() > 0) {\n allocationAmt = allocationAmt.add(getOverUnderAmt());\t//\toverpayment (negative)\n }\n /**\n *\n * \t\tModificación para diferenciar\n *\tcobros/pagos en Consulta de Asignación\n *\n */\n MAllocationHdr alloc;\n\n if (isReceipt()) {\n alloc = new MAllocationHdr(getCtx(), false, getDateTrx(), getC_Currency_ID(),\n Msg.translate(getCtx(), \"IsReceipt\") + \": \" + getDocumentNo() + \" [1]\", get_TrxName());\n } else {\n alloc = new MAllocationHdr(getCtx(), false, getDateTrx(), getC_Currency_ID(),\n Msg.translate(getCtx(), \"C_Payment_ID\") + \": \" + getDocumentNo() + \" [1]\", get_TrxName());\n }\n\n alloc.setAD_Org_ID(getAD_Org_ID());\n if (!alloc.save()) {\n log.log(Level.SEVERE, \"Could not create Allocation Hdr\");\n return false;\n }\n MAllocationLine aLine = null;\n if (isReceipt()) {\n aLine = new MAllocationLine(alloc, allocationAmt,\n getDiscountAmt(), getWriteOffAmt(), getOverUnderAmt());\n } else {\n aLine = new MAllocationLine(alloc, allocationAmt.negate(),\n getDiscountAmt().negate(), getWriteOffAmt().negate(), getOverUnderAmt().negate());\n }\n aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID());\n aLine.setC_Payment_ID(getC_Payment_ID());\n if (!aLine.save(get_TrxName())) {\n log.log(Level.SEVERE, \"Could not create Allocation Line\");\n return false;\n }\n //\tShould start WF\n alloc.processIt(DocAction.ACTION_Complete);\n alloc.save(get_TrxName());\n m_processMsg = \"@C_AllocationHdr_ID@: \" + alloc.getDocumentNo();\n\n //\tGet Project from Invoice\n int C_Project_ID = DB.getSQLValue(get_TrxName(),\n \"SELECT MAX(C_Project_ID) FROM C_Invoice WHERE C_Invoice_ID=?\", getC_Invoice_ID());\n if (C_Project_ID > 0 && getC_Project_ID() == 0) {\n setC_Project_ID(C_Project_ID);\n } else if (C_Project_ID > 0 && getC_Project_ID() > 0 && C_Project_ID != getC_Project_ID()) {\n log.warning(\"Invoice C_Project_ID=\" + C_Project_ID\n + \" <> Payment C_Project_ID=\" + getC_Project_ID());\n }\n return true;\n }", "public void v_Verify_Guest12_Displayed(){\n\t}", "private void validaCheckoutDestaqueDoAnuncio() {\n\t\tHttpServletRequest req = cmsUtilsIliketoo.getMyrequest().getRequest();\n\t\tif(req.getRequestURI().contains(\"CheckoutFeatured\")){\n\t\t\t//operacao de checkout para comprar destaque de anuncios\n\t\t\tDB db = (DB) req.getAttribute(Str.CONNECTION_DB);\n\t\t\tString idAnuncio = req.getParameter(\"id_announce\");\n\t\t\tif(idAnuncio != null && !idAnuncio.isEmpty()){\n\t\t\t\tAnnounce anuncio = (Announce) new AnnounceDAO(db, req).readById(idAnuncio, Announce.class);\n\t\t\t\tif(anuncio != null){\n\t\t\t\t\treq.getSession().setAttribute(\"anuncioDestaqueCheckout\", anuncio);\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para anuncio - Processo de compra de destaque do anuncio... idAnuncio=\" + idAnuncio);\n\t\t\t\t}else{\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para destaque de anuncios - registro do anuncio nao encontrado no bd... idAnuncio=\" + idAnuncio);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean confirmInsurance(WebDriver webDriver) {\n WebDriverUtils wdUtils = new WebDriverUtils(webDriver);\n System.out.println(\"Confirming Insurance for flight travel.\");\n try {\n wdUtils.clickElement(insuranceCheckbox);\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "@Override\n\tpublic EnrollmentStatus isSatisfiedBy(Section section) {\n\t\tfor(Course c : palnOfStudy.getCourses()){\n\t\t\tSystem.out.println(\"section:\"+section.getRepresentedCourse().getCourseNo());\n\t\t\tSystem.out.println(\"courseNo:\"+c.getCourseNo());\n\t\t\tif(section.getRepresentedCourse().getCourseNo().equals(c.getCourseNo())){\n\t\t\t\treturn EnrollmentStatus.success;\n\t\t\t}\n\t\t}\n\t\treturn EnrollmentStatus.notInPlan;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public void validateDeliveryInfo(HashMap<String, String> info) throws InterruptedException, IOException {\n\t\t\n\t}", "@Test\n public void addAdvertisementSuccessfullySkipExistingRealEstate() {\n LoginUtil.login(ADVERTISER_USERNAME, ADVERTISER_PASSWORD, driver, wait);\n\n final WebElement addAnnouncementLink = driver.findElement(ADD_ANNOUNCEMENT_LINK);\n addAnnouncementLink.click();\n\n // Check if we're on right URL (Adding Announcement Form)\n wait.until(ExpectedConditions.urlToBe(ADDING_ANNOUNCEMENT_URL));\n\n assertThat(driver.getCurrentUrl()).isEqualTo(ADDING_ANNOUNCEMENT_URL);\n\n // Get elements\n final WebElement announcementName = driver.findElement(ANNOUNCEMENT_NAME);\n final WebElement announcementPrice = driver.findElement(ANNOUNCEMENT_PRICE);\n final WebElement announcementPhone = driver.findElement(ANNOUNCEMENT_PHONE);\n final WebElement announcementDateExp = driver.findElement(DATE_PICKER_BUTTON);\n final WebElement announcementTypeSale = driver.findElement(ANNOUNCEMENT_TYPE);\n\n // We need to populate same address for our real estate because our 'algorithm' works on that way.\n final WebElement realEstateArea = driver.findElement(REAL_ESTATE_AREA);\n final WebElement realEstateType = driver.findElement(REAL_ESTATE_TYPE);\n final WebElement realEstateCountry = driver.findElement(REAL_ESTATE_CONUTRY);\n final WebElement realEstateCity = driver.findElement(REAL_ESTATE_CITY);\n final WebElement realEstateRegion = driver.findElement(REAL_ESTATE_REGION);\n final WebElement realEstateStreet = driver.findElement(REAL_ESTATE_STREET);\n final WebElement realEstateStreetNo = driver.findElement(REAL_ESTATE_STREET_NO);\n final Select realEstateHeatingType = new Select(driver.findElement(REAL_ESTATE_HEATING));\n\n // Assert that elements are presented\n assertThat(announcementName).isNotNull();\n assertThat(announcementPrice).isNotNull();\n assertThat(announcementPhone).isNotNull();\n assertThat(announcementDateExp).isNotNull();\n assertThat(announcementTypeSale).isNotNull();\n\n assertThat(realEstateArea).isNotNull();\n assertThat(realEstateCountry).isNotNull();\n assertThat(realEstateCity).isNotNull();\n assertThat(realEstateRegion).isNotNull();\n assertThat(realEstateStreet).isNotNull();\n assertThat(realEstateStreetNo).isNotNull();\n\n // Populate data\n announcementName.sendKeys(ANN_NAME_VALUE);\n // Set Announcement Type to 'SALE'\n announcementTypeSale.click();\n announcementPrice.sendKeys(ANN_PRICE_VALUE);\n announcementPhone.sendKeys(ANN_PHONE_VALUE);\n announcementDateExp.click();\n\n realEstateArea.sendKeys(EXISTING_RE_AREA_VALUE);\n realEstateHeatingType.selectByValue(RE_HEATING_TYPE);\n // Set Real Estate type to 'HOUSE'\n realEstateType.click();\n realEstateCountry.sendKeys(EXISTING_RE_COUNTRY_VALUE);\n realEstateCity.sendKeys(EXISTING_RE_CITY_VALUE);\n realEstateRegion.sendKeys(EXISTING_RE_REGION_VALUE);\n realEstateStreet.sendKeys(EXISTING_RE_STREET_VALUE);\n realEstateStreetNo.sendKeys(EXISTING_RE_STREET_NO_VALUE);\n\n final WebElement continueButton = driver.findElement(CONTINUE_BUTTON);\n continueButton.click();\n\n wait.until(ExpectedConditions.presenceOfElementLocated(SIMILAR_REAL_ESTATE));\n\n wait.until(ExpectedConditions.visibilityOfElementLocated(SIMILAR_RE_CONTINUE));\n final WebElement continueRealEstateButton = driver.findElement(SIMILAR_RE_CONTINUE);\n continueRealEstateButton.click();\n\n // Last part of adding announcement\n final WebElement dropZone = driver.findElement(IMAGES_DROP_ZONE);\n final WebElement progress = driver.findElement(IMAGES_UPLOAD_PROGRESS);\n\n assertThat(dropZone).isNotNull();\n assertThat(progress).isNotNull();\n\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_1);\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_2);\n\n final WebElement finishButton = driver.findElement(FINISH_BUTTON);\n finishButton.click();\n\n // Wait to redirect to added announcement page\n wait.until(ExpectedConditions.urlContains(ADDED_ANNOUNCEMENT_URL));\n LoginUtil.logout(driver, wait);\n }", "@Override\n\tpublic void fileDeliveryServiceInitializeConfirmation() {\n\t\t\n\t}", "private void validaCheckoutParaAnuncio(Map<String, String> checkoutDetails) {\n\n\t\tHttpServletRequest req = cmsUtilsIliketoo.getMyrequest().getRequest();\n\t\tHttpServletResponse res = cmsUtilsIliketoo.getMyresponse().getResponse();\n\t\tModelILiketo model = new ModelILiketo(req, res);\n\t\tAnnounce anuncio = (Announce) cmsUtilsIliketoo.getObjectOfParameter(Announce.class);\n\t\ttry {\n\t\t\tif(req.getRequestURI().contains(\"CheckoutAd\")){\n\t\t\t\t\n\t\t\t\t//operacao de checkout para criar novo anuncio e fazer upload da imagem\n\t\t\t\tDB db = (DB) req.getAttribute(Str.CONNECTION_DB);\n\t\t\t\t\n\t\t\t\tif(!anuncio.getTypeAnnounce().equals(\"Purchase\")){\n\t\t\t\t\tif(anuncio.getIdItem() != null && !anuncio.getIdItem().isEmpty()){\n\t\t\t\t\t\t//anuncio do item que foi adicionado na colecao - copia imagem do item existente\n\t\t\t\t\t\tString imagemItem = cmsUtilsIliketoo.processFileuploadCopiarImagemAnuncio(anuncio.getPathPhotoAd());\n\t\t\t\t\t\tanuncio.setPathPhotoAd(imagemItem);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//anuncio de um item que nao foi adicionado na colecao - salva nova imagem\n\t\t\t\t\t\tcmsUtilsIliketoo.processFileuploadImagemAnuncio(anuncio);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tanuncio.setStatus(\"Pending pay\");\n\t\t\t\tanuncio.setFeatured(\"no\");\n\t\n\t\t\t\tAnnounceDAO dao = new AnnounceDAO(db, req);\n\t\t\t\tString idRegistro = dao.create(anuncio);\n\t\t\t\tanuncio.setIdAnnounce(idRegistro);\n\t\t\t\tanuncio.setId(idRegistro);\n\t\t\t\tcheckoutDetails.put(\"L_PAYMENTREQUEST_0_NUMBER0\", idRegistro);\t//put no map o id do novo registro do anuncio\n\t\t\t\t\n\t\t\t\treq.getSession().setAttribute(\"anuncioCheckout\", anuncio);\n\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para anuncio - Anuncio salvo como Pendente pagamento... id=\" + idRegistro);\n\t\t\t\t\n\t\t\t}else if(req.getRequestURI().contains(\"CheckoutContinueAd\")){\n\t\t\t\t\n\t\t\t\t//operacao de checkout para continuar um anuncio pendente com pagamento\tnao concluido\t\t\n\t\t\t\tDB db = (DB) req.getAttribute(Str.CONNECTION_DB);\n\t\t\t\tAnnounceDAO dao = new AnnounceDAO(db, req);\n\n\t\t\t\tString idAnuncio = req.getParameter(\"id_announce\");\n\t\t\t\tAnnounce anuncioContinuar = (Announce) dao.readById(idAnuncio, Announce.class);\n\t\t\t\t\n\t\t\t\treq.getSession().setAttribute(\"anuncioCheckout\", anuncioContinuar);\t\n\t\t\t\tlog.info(\"Servlet Paypal Continuar Checkout do anuncio - Anuncio salvo como Pendente pagamento... id=\"+idAnuncio);\n\t\t\t}\n\t\t\t\n\t\t} catch (StorageILiketoException e) {\n\t\t\tlog.error(e);\n\t\t} catch (ImageILiketoException e) {\n\t\t\tmodel.addMessageError(\"imageFormat\", \"Upload only Image in jpg format.\");\n\t\t\t//trata pagina retorno\n\t\t\tif(req.getRequestURI().contains(\"particularItem\")){\t\t\t\t\n\t\t\t\tmodel.redirectError(\"/ilt/registerAnnounce/collector/particularItem\");\n\t\t\t}else if(req.getRequestURI().contains(\"itemOfCollection\")){\n\t\t\t\tmodel.redirectError(\"/ilt/registerAnnounce/collector/\" +anuncio.getIdItem()+ \"/itemOfCollection\");\n\t\t\t}else if(req.getRequestURI().contains(\"purchase\")){\n\t\t\t\tmodel.redirectError(\"/ilt/registerAnnounce/collector/purchase\");\n\t\t\t}else if(req.getRequestURI().contains(\"hobbby\")){\n\t\t\t\tmodel.redirectError(\"/ilt/registerAnnounce/hobby/\" +anuncio.getIdHobby()+ \"/item\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e);\n\t\t}\n\t}", "boolean isSetCapitalPayed();", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "@Test\n public void addAdvertisementSuccessfullyExistingRealEstate() {\n LoginUtil.login(ADVERTISER_USERNAME, ADVERTISER_PASSWORD, driver, wait);\n\n final WebElement addAnnouncementLink = driver.findElement(ADD_ANNOUNCEMENT_LINK);\n addAnnouncementLink.click();\n\n // Check if we're on right URL (Adding Announcement Form)\n wait.until(ExpectedConditions.urlToBe(ADDING_ANNOUNCEMENT_URL));\n\n assertThat(driver.getCurrentUrl()).isEqualTo(ADDING_ANNOUNCEMENT_URL);\n\n // Get elements\n final WebElement announcementName = driver.findElement(ANNOUNCEMENT_NAME);\n final WebElement announcementPrice = driver.findElement(ANNOUNCEMENT_PRICE);\n final WebElement announcementPhone = driver.findElement(ANNOUNCEMENT_PHONE);\n final WebElement announcementDateExp = driver.findElement(DATE_PICKER_BUTTON);\n //final WebElement announcementDescription = driver.findElement(ANNOUNCEMENT_DESCRIPTION);\n final WebElement annoucementTypeSale = driver.findElement(ANNOUNCEMENT_TYPE);\n\n // We need to populate same address for our real estate because our 'algorithm' works on that way.\n final WebElement realEstateArea = driver.findElement(REAL_ESTATE_AREA);\n final WebElement realEstateType = driver.findElement(REAL_ESTATE_TYPE);\n final WebElement realEstateCountry = driver.findElement(REAL_ESTATE_CONUTRY);\n final WebElement realEstateCity = driver.findElement(REAL_ESTATE_CITY);\n final WebElement realEstateRegion = driver.findElement(REAL_ESTATE_REGION);\n final WebElement realEstateStreet = driver.findElement(REAL_ESTATE_STREET);\n final WebElement realEstateStreetNo = driver.findElement(REAL_ESTATE_STREET_NO);\n final Select realEstateHeatingType = new Select(driver.findElement(REAL_ESTATE_HEATING));\n\n // Assert that elements are presented\n assertThat(announcementName).isNotNull();\n assertThat(announcementPrice).isNotNull();\n assertThat(announcementPhone).isNotNull();\n assertThat(announcementDateExp).isNotNull();\n assertThat(annoucementTypeSale).isNotNull();\n\n assertThat(realEstateArea).isNotNull();\n assertThat(realEstateCountry).isNotNull();\n assertThat(realEstateCity).isNotNull();\n assertThat(realEstateRegion).isNotNull();\n assertThat(realEstateStreet).isNotNull();\n assertThat(realEstateStreetNo).isNotNull();\n\n // Populate data\n announcementName.sendKeys(ANN_NAME_VALUE);\n // Set Announcement Type to 'SALE'\n annoucementTypeSale.click();\n announcementPrice.sendKeys(ANN_PRICE_VALUE);\n announcementPhone.sendKeys(ANN_PHONE_VALUE);\n announcementDateExp.click();\n\n realEstateArea.sendKeys(EXISTING_RE_AREA_VALUE);\n realEstateHeatingType.selectByValue(RE_HEATING_TYPE);\n // Set Real Estate type to 'HOUSE'\n realEstateType.click();\n realEstateCountry.sendKeys(EXISTING_RE_COUNTRY_VALUE);\n realEstateCity.sendKeys(EXISTING_RE_CITY_VALUE);\n realEstateRegion.sendKeys(EXISTING_RE_REGION_VALUE);\n realEstateStreet.sendKeys(EXISTING_RE_STREET_VALUE);\n realEstateStreetNo.sendKeys(EXISTING_RE_STREET_NO_VALUE);\n\n final WebElement continueButton = driver.findElement(CONTINUE_BUTTON);\n continueButton.click();\n\n wait.until(ExpectedConditions.presenceOfElementLocated(SIMILAR_REAL_ESTATE));\n\n // We choose similar real estate\n wait.until(ExpectedConditions.visibilityOfElementLocated(SIMILAR_REAL_ESTATE));\n final WebElement firstSimilarRealEstate = driver.findElement(SIMILAR_REAL_ESTATE);\n firstSimilarRealEstate.click();\n\n final WebElement continueRealEstateButton = driver.findElement(SIMILAR_RE_CONTINUE);\n wait.until(ExpectedConditions.presenceOfElementLocated(SIMILAR_RE_CONTINUE));\n continueRealEstateButton.click();\n\n // Last part of adding announcement\n final WebElement dropZone = driver.findElement(IMAGES_DROP_ZONE);\n final WebElement progress = driver.findElement(IMAGES_UPLOAD_PROGRESS);\n\n assertThat(dropZone).isNotNull();\n assertThat(progress).isNotNull();\n\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_1);\n DragAndDropUtil.dropFile(driver, wait, dropZone, IMAGE_PATH_2);\n\n final WebElement finishButton = driver.findElement(FINISH_BUTTON);\n finishButton.click();\n\n // Wait to redirect to added annoucement page\n wait.until(ExpectedConditions.urlContains(ADDED_ANNOUNCEMENT_URL));\n\n LoginUtil.logout(driver, wait);\n }" ]
[ "0.62875354", "0.61882323", "0.61134785", "0.6109822", "0.610845", "0.60741574", "0.6061516", "0.59854555", "0.59517324", "0.5899606", "0.5799548", "0.57889044", "0.57512033", "0.5716176", "0.5715462", "0.571002", "0.5654914", "0.5638849", "0.5625508", "0.5623772", "0.5611686", "0.56029844", "0.55822814", "0.5552744", "0.5529468", "0.5528473", "0.5511643", "0.5497156", "0.54939", "0.54890305", "0.54756665", "0.5469146", "0.54636407", "0.5459304", "0.545492", "0.54547024", "0.5452772", "0.5447377", "0.54472864", "0.5442976", "0.5416794", "0.5416794", "0.541021", "0.5403937", "0.5394929", "0.53904694", "0.53886384", "0.5381775", "0.5381436", "0.53762674", "0.53758544", "0.53687257", "0.5361435", "0.53532237", "0.53429437", "0.5332167", "0.5326787", "0.53077114", "0.53077114", "0.53067976", "0.5293495", "0.52925783", "0.528577", "0.528381", "0.5268361", "0.5267651", "0.5265841", "0.5249524", "0.5245077", "0.52422273", "0.52384734", "0.5234491", "0.5234039", "0.52338606", "0.5229296", "0.5227843", "0.52262294", "0.5224953", "0.5219718", "0.52167606", "0.5213055", "0.52104056", "0.5208059", "0.52063376", "0.52031976", "0.5202823", "0.5195655", "0.51955706", "0.5194753", "0.519241", "0.51906264", "0.51887095", "0.51855516", "0.51853305", "0.51839054", "0.5182624", "0.51748043", "0.51744217", "0.5165924", "0.5165149" ]
0.7054715
0
this method verify the My Store Section
public boolean VerifyOrderConfirmation_MyStoreSection() { boolean flag = false; flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed(); if(flag){extentLogs.pass("VerifyMyStoreSection", "MyStoreSectionIsDisplayed"); }else{extentLogs.fail("VerifyMyStoreSection", "MyStoreSectionIsNotDisplayed");} return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Store verifyStore(int storeId) throws NoSuchElementException {\n\t\tStore store = storeRepository.findOne(storeId);\n\t\tif (store == null) {\n\t\t\tthrow new NoSuchElementException(\"Store does not exist \" + storeId);\n\t\t}\n\t\treturn store;\n\t}", "boolean hasCreateStore();", "boolean hasCompleteStore();", "public void assertSavedListingAndSavedSearchesSection() {\r\n\t\tprint(\"Assert Saved Listing Section\");\r\n\t\tlocator = Locator.MyTrader.Saved_Listings_Section.value;\r\n\t\tAssert.assertTrue(isElementPresent(locator));\r\n\t\tprint(\"Assert Saved Searches Section\");\r\n\t\tString SavedSearches_locator = Locator.MyTrader.Saved_Searches_Section.value;\r\n\t\tAssert.assertTrue(isElementPresent(SavedSearches_locator));\r\n\t}", "public boolean isStore() { return _store; }", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "boolean hasStoreAttribute();", "public void testStore() {\n\t\tSearchDocument sdocument = new SearchDocument();\r\n\t\tsdocument.setLuceneId(2);\r\n\t\t/**\r\n\t\t * Pay particular attenction: the property menuId is a foreign key. \r\n\t\t * FOREIGN KEY(co_menuid) REFERENCES co_menus(co_menuid)\r\n\t\t */\t\t\r\n\t\tsdocument.setMenuId(Menu.MENUID_PERSONAL);\r\n\t\tsdocument.setIndex(\"testIndex\");\r\n\t\tassertTrue(\"Unable to store\", dao.store(sdocument));\r\n\r\n\t\t// Check database status\r\n\t\tsdocument = dao.findByMenuId(Menu.MENUID_PERSONAL);\r\n\t\tassertNotNull(sdocument);\r\n\t\tassertEquals(Menu.MENUID_PERSONAL, sdocument.getMenuId());\r\n\t}", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "@Test\n public void testStoreAlreadyExistsInDatabaseCheck() {\n window.textBox(\"storeNameTFld\").setText(\"store1\");\n window.textBox(\"numOfSeatsTFld\").setText(\"155\");\n window.textBox(\"storeAddressTFld\").setText(\"storeAddress1\");\n window.textBox(\"storeCityTFld\").setText(\"city\");\n window.textBox(\"storePhoneTFld\").setText(\"123123\");\n window.textBox(\"emailTFld\").setText(\"hlias.karasyahoo.gr\");\n window.textBox(\"fromOpenHoursTFld\").setText(\"18:00\");\n window.textBox(\"toOpenHoursTFld\").setText(\"23:00\"); \n window.checkBox(\"mondayCBx\").check();\n window.button(\"addStoreBtn\").click();\n window.optionPane().requireInformationMessage().requireMessage(\"Store already exists in the database!\");\n window.optionPane().okButton().click();\n window.optionPane().okButton().click();\n }", "public void verifyEntrySet() {\n }", "boolean hasItemStorage();", "boolean hasDeleteStore();", "public boolean hasStoreId() {\n return genClient.cacheHasKey(CacheKey.storeId);\n }", "public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void handleStore()\r\n {\r\n //\r\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t String payload = p.getDeveloperPayload();\n\n\t return true;\n\t }", "public void verify() {\n lblTheDatabaseNameIsEmpty();\n lblDatabaseName();\n lblUserName();\n lblPassword();\n lblDatabaseLocation();\n txtPassword();\n txtUserName();\n txtDatabaseLocation();\n btSettings();\n txtDatabaseName();\n btCancel();\n btOK();\n }", "private void validateRegistryStore(CohortMembership newRegistryStoreProperties)\n {\n if (newRegistryStoreProperties != null)\n {\n Map<String, MemberRegistration> metadataCollectionIdTestMap = new HashMap<>();\n Map<String, MemberRegistration> serverNameTestMap = new HashMap<>();\n Map<String, MemberRegistration> endpointAddressTestMap = new HashMap<>();\n\n /*\n * It is ok for the local registration to be null\n */\n if (newRegistryStoreProperties.getLocalRegistration() != null)\n {\n /*\n * Add the local member to each of the test maps\n */\n mapMember(newRegistryStoreProperties.getLocalRegistration(),\n metadataCollectionIdTestMap,\n serverNameTestMap,\n endpointAddressTestMap);\n }\n\n if (newRegistryStoreProperties.getRemoteRegistrations() != null)\n {\n /*\n * The remote members should not be null/empty\n */\n for (MemberRegistration remoteMember : newRegistryStoreProperties.getRemoteRegistrations())\n {\n mapMember(remoteMember,\n metadataCollectionIdTestMap,\n serverNameTestMap,\n endpointAddressTestMap);\n }\n }\n }\n }", "@Override\n\tpublic boolean verifySegment(CASIdentifier identifierToVerify)\n\t{\n\t\treturn true;\n\t}", "public boolean isSetStoreName() {\r\n return storeName != null;\r\n }", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "boolean hasMerchantData();", "boolean hasMerchantData();", "private void validateBeforeMerge()\n {\n Assert.assertTrue(!isProductInfo() || type == TTransactionType.simple);\n }", "public abstract boolean verify();", "public boolean verify();", "@Test\n public void testFailedStoreCreationCheck() {\n window.textBox(\"storeNameTFld\").setText(\"store1\");\n window.textBox(\"numOfSeatsTFld\").setText(\"155\");\n window.textBox(\"storeAddressTFld\").setText(\"address\");\n window.textBox(\"storeCityTFld\").setText(\"city\");\n window.textBox(\"storePhoneTFld\").setText(\"123123\");\n window.textBox(\"emailTFld\").setText(\"hlias.karasyahoo.gr\");\n window.textBox(\"fromOpenHoursTFld\").setText(\"00:00\");\n window.textBox(\"toOpenHoursTFld\").setText(\"00:00\"); \n window.button(\"addStoreBtn\").click();\n window.optionPane().requireInformationMessage().requireMessage(\"Store Creation Failed\\n\");\n }", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "public boolean isNotNullStoreId() {\n return genClient.cacheValueIsNotNull(CacheKey.storeId);\n }", "@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\t/*String payload = */p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase and\n * verifying it here might seem like a good approach, but this will fail in the\n * case where the user purchases an item on one device and then uses your app on\n * a different device, because on the other device you will not have access to the\n * random string you originally generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different between them,\n * so that one user's purchase can't be replayed to another user.\n *\n * 2. The payload must be such that you can verify it even when the app wasn't the\n * one who initiated the purchase flow (so that items purchased by the user on\n * one device work on other devices owned by the user).\n *\n * Using your own server to store and verify developer payloads across app\n * installations is recommended.\n */\n\n return true;\n }", "public boolean isAlive(String storeName);", "@Override\n\tpublic boolean doVerify(ProdIterator iterator, Map<String, String> map) {\n\t\treturn false;\n\t}", "public boolean verifyPolicyHolderSection(String CustName, ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\n\t\t\treturn GenericUtils.verifyWebElementTextContains(fld_policyHolderName, CustName);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Throws exception, unable to fetch the policy holder name from getquote page :\" + e);\n\t\t}\n\n\t}", "@Override\n\tpublic boolean verify(RowStruct row) {\n\t\treturn true;\n\t}", "public abstract boolean Verifypage();", "private static void checkTrustStore(KeyStore store, Path path) throws GeneralSecurityException {\n Enumeration<String> aliases = store.aliases();\n while (aliases.hasMoreElements()) {\n String alias = aliases.nextElement();\n if (store.isCertificateEntry(alias)) {\n return;\n }\n }\n throw new SslConfigException(\"the truststore [\" + path + \"] does not contain any trusted certificate entries\");\n }", "@Override\n public boolean validate()\n {\n return inRSArea(TUTORIAL_ISLAND_ACC_CREATOR);\n }", "public boolean mo22304a(boolean storeDetails) {\n return super.mo22321a(\"storeDetails\", storeDetails);\n }", "@Test\n\tpublic void testAddBook() {\n\t\t//System.out.println(\"Adding book to bookstore...\");\n\t\tstore.addBook(b5);\n\t\tassertTrue(store.getBooks().contains(b5));\n\t\t//System.out.println(store);\n\t}", "public boolean hasCreateStore() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "public boolean verifyCartItem()\n\t{ if (einKaufswagenBtn.isDisplayed())\n\t{\n\t\teinKaufswagenBtn.click();\n\t}\n\tfor (int j=0;j<collectnToStorePrdktIdLst.size();j++)\n\t{\n\t\tString expectedProduct1=collectnToStorePrdktIdLst.get(j);\n\t\tList<WebElement> fndProduct=driver.findElements(By.xpath(\"//form[@id='activeCartViewForm']//div[@class='a-section a-spacing-mini sc-list-body sc-java-remote-feature']//div[@class='a-row sc-list-item sc-list-item-border sc-java-remote-feature']\"));\n\t\tfor (int e=0;e<=fndProduct.size();e++)\n\t\t{\n\t\t\tString actProdkt=fndProduct.get(e).getAttribute(\"data-asin\");\n\t\t\tif (actProdkt.contains(expectedProduct1))\n\t\t\t{\n\t\t\t\tcnt++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (cnt==2)\n\t{\n\t\treturn true;\n\t}\n\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "public boolean isStoreIBEligibilityInd() {\n return storeIBEligibilityInd;\n }", "public abstract boolean store();", "boolean hasStoreChunkLocation();", "public boolean exists(Datastore store) {\n return store.exists(getKey());\n }", "boolean verifyDeveloperPayload(Purchase p) {\n\t\tString payload = p.getDeveloperPayload();\n\n\t\t/*\n\t\t * TODO: verify that the developer payload of the purchase is correct.\n\t\t * It will be the same one that you sent when initiating the purchase.\n\t\t * \n\t\t * WARNING: Locally generating a random string when starting a purchase\n\t\t * and verifying it here might seem like a good approach, but this will\n\t\t * fail in the case where the user purchases an item on one device and\n\t\t * then uses your app on a different device, because on the other device\n\t\t * you will not have access to the random string you originally\n\t\t * generated.\n\t\t * \n\t\t * So a good developer payload has these characteristics:\n\t\t * \n\t\t * 1. If two different users purchase an item, the payload is different\n\t\t * between them, so that one user's purchase can't be replayed to\n\t\t * another user.\n\t\t * \n\t\t * 2. The payload must be such that you can verify it even when the app\n\t\t * wasn't the one who initiated the purchase flow (so that items\n\t\t * purchased by the user on one device work on other devices owned by\n\t\t * the user).\n\t\t * \n\t\t * Using your own server to store and verify developer payloads across\n\t\t * app installations is recommended.\n\t\t */\n\n\t\treturn true;\n\t}", "public String saveStore() {\n\t\tsuper.setPageTitle(\"label.menu.group.store\");\n\n\t\tMerchantStore store = null;\n\t\ttry {\n\n\t\t\tContext ctx = (Context) super.getServletRequest().getSession()\n\t\t\t\t\t.getAttribute(ProfileConstants.context);\n\t\t\tInteger merchantid = ctx.getMerchantid();\n\n\t\t\tMerchantService mservice = (MerchantService) ServiceFactory\n\t\t\t\t\t.getService(ServiceFactory.MerchantService);\n\t\t\tstore = mservice.getMerchantStore(merchantid.intValue());\n\t\t\t\n\t\t\t//validation\n/*\t\t\tif (StringUtils.isBlank(merchantProfile.getTemplateModule())) {\n\t\t\t\tsuper.setErrorMessage(\"errors.store.emptytemplate\");\n\t\t\t\treturn INPUT;\n\t\t\t} */\n\n\t\t\tif (store == null) {\n\t\t\t\tstore = new MerchantStore();\n\t\t\t\tstore.setTemplateModule(CatalogConstants.DEFAULT_TEMPLATE);\n\t\t\t}else {\n\t\t\t\tstore.setTemplateModule(merchantProfile.getTemplateModule());\n\t\t\t}\n\t\t\t\n\n\n\t\t\tjava.util.Date dt = new java.util.Date();\n\n\t\t\tStringBuffer languages = new StringBuffer();\n\t\t\tList langs = this.getSupportedLanguages();\n\t\t\tif (langs != null && langs.size() > 0) {\n\t\t\t\tint sz = 0;\n\t\t\t\tIterator i = langs.iterator();\n\n\t\t\t\twhile (i.hasNext()) {\n\t\t\t\t\tString lang = (String) i.next();\n\t\t\t\t\tlanguages.append(lang);\n\n\t\t\t\t\tif (sz < langs.size() - 1) {\n\t\t\t\t\t\tlanguages.append(\";\");\n\t\t\t\t\t}\n\t\t\t\t\tsz++;\n\n\t\t\t\t}\n\t\t\t\tstore.setSupportedlanguages(languages.toString());\n\t\t\t} else {\n\t\t\t\tMessageUtil.addErrorMessage(super.getServletRequest(),\n\t\t\t\t\t\tLabelUtil.getInstance().getText(\n\t\t\t\t\t\t\t\t\"message.confirmation.languagerequired\"));\n\t\t\t\tstore.setSupportedlanguages(Constants.ENGLISH_CODE);\n\t\t\t\treturn SUCCESS;\n\t\t\t}\n\n\t\t\tstore.setStorename(merchantProfile.getStorename());\n\t\t\tstore.setStoreemailaddress(merchantProfile.getStoreemailaddress());\n\t\t\tstore.setStoreaddress(merchantProfile.getStoreaddress());\n\t\t\tstore.setStorecity(merchantProfile.getStorecity());\n\t\t\tstore.setStorepostalcode(merchantProfile.getStorepostalcode());\n\t\t\tstore.setCountry(merchantProfile.getCountry());\n\t\t\tstore.setZone(merchantProfile.getZone());\n\t\t\tstore.setCurrency(merchantProfile.getCurrency());\n\t\t\t\n\n\t\t\tif (!StringUtils.isBlank(merchantProfile.getWeightunitcode())) {\n\t\t\t\tstore.setWeightunitcode(merchantProfile.getWeightunitcode()\n\t\t\t\t\t\t.trim());\n\t\t\t}\n\t\t\tif (!StringUtils.isBlank(merchantProfile.getSeizeunitcode())) {\n\t\t\t\tstore.setSeizeunitcode(merchantProfile.getSeizeunitcode()\n\t\t\t\t\t\t.trim());\n\t\t\t}\n\t\t\tstore.setStorelogo(merchantProfile.getStorelogo());\n\t\t\tstore.setStorephone(merchantProfile.getStorephone());\n\t\t\tstore.setBgcolorcode(merchantProfile.getBgcolorcode());\n\t\t\tstore.setContinueshoppingurl(merchantProfile\n\t\t\t\t\t.getContinueshoppingurl());\n\t\t\tstore.setUseCache(merchantProfile.isUseCache());\n\t\t\tstore.setDomainName(merchantProfile.getDomainName());\n\n\t\t\tstore.setMerchantId(merchantid.intValue());\n\t\t\tstore.setLastModified(new java.util.Date(dt.getTime()));\n\n\t\t\tif (!StringUtils.isNumeric(merchantProfile.getZone())) {\n\t\t\t\tstore.setStorestateprovince(merchantProfile\n\t\t\t\t\t\t.getStorestateprovince());\n\t\t\t\tctx.setZoneid(0);\n\t\t\t} else {// get the value from zone\n\t\t\t\tctx.setZoneid(Integer.parseInt(merchantProfile.getZone()));\n\t\t\t\tMap zones = RefCache.getInstance().getAllZonesmap(\n\t\t\t\t\t\tLanguageUtil.getLanguageNumberCode(ctx.getLang()));\n\t\t\t\tZone z = (Zone) zones.get(Integer.parseInt(merchantProfile\n\t\t\t\t\t\t.getZone()));\n\t\t\t\tif (z != null) {\n\t\t\t\t\tstore.setStorestateprovince(z.getZoneName());// @todo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// localization\n\t\t\t\t} else {\n\t\t\t\t\tstore.setStorestateprovince(\"N/A\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!StringUtils.isBlank(this.getInBusinessSince())) {\n\t\t\t\tDate businessDate = DateUtil.getDate(this.getInBusinessSince());\n\t\t\t\tstore.setInBusinessSince(businessDate);\n\t\t\t}\n\n\t\t\tsuper.prepareSelections(store.getCountry());\n\t\t\tmservice.saveOrUpdateMerchantStore(store);\n\n\t\t\tsuper.getContext().setExistingStore(true);\n\n\t\t\t// refresh context\n\n\t\t\tctx.setCountryid(merchantProfile.getCountry());\n\t\t\tctx.setSizeunit(merchantProfile.getSeizeunitcode());\n\t\t\tctx.setWeightunit(merchantProfile.getWeightunitcode());\n\t\t\tLanguageHelper.setLanguages(languages.toString(), ctx);\n\t\t\tctx.setCurrency(merchantProfile.getCurrency());\n\n\t\t\t// refresh the locale\n\t\t\tMap countries = RefCache.getAllcountriesmap(LanguageUtil\n\t\t\t\t\t.getLanguageNumberCode(ctx.getLang()));\n\t\t\tCountry c = (Country) countries.get(merchantProfile.getCountry());\n\t\t\tLocale locale = new Locale(\"en\", c.getCountryIsoCode2());\n\t\t\tActionContext.getContext().setLocale(locale);\n\t\t\tMap sessions = ActionContext.getContext().getSession();\n\t\t\tsessions.put(\"WW_TRANS_I18N_LOCALE\", locale);\n\n\n\t\t\tMessageUtil.addMessage(super.getServletRequest(), LabelUtil\n\t\t\t\t\t.getInstance().getText(\"message.confirmation.success\"));\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t\tsuper.setTechnicalMessage();\n\t\t}\n\n\t\treturn SUCCESS;\n\n\t}", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "@Given(\"^user is logged in My Store$\")\n public void userIsLoggedInMyStore() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/main/resources/chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n // Maximize the browser window\n driver.manage().window().maximize();\n\n //login correctly to my store\n driver.get(\"https://prod-kurs.coderslab.pl/index.php?controller=authentication&back=my-account\");\n loginPage = new LoginPage(driver);\n loginPage.loginAs(EMAIL, PASSWORD);\n Assert.assertEquals(LOGGED_USER, loginPage.getLoggedUsername());\n }", "boolean hasStoreChunk();", "public void testLDAPStore2(LDAPStore<LDAPEntry> ldapStore, ClientStore clientStore) throws Exception {\n OA2Client oa2Client = (OA2Client) clientStore.create();\n LDAPConfiguration ldap = createLDAP();\n LDAPEntry ldapEntry = ldapStore.create();\n ldapEntry.setClientID(oa2Client.getIdentifier());\n ldapEntry.setConfiguration(ldap);\n ldapStore.save(ldapEntry);\n LDAPEntry ldapEntry1 = ldapStore.getByClientID(ldapEntry.getClientID());\n assert ldapEntry.equals(ldapEntry1);\n\n }", "private boolean doVerify(boolean completeOnly) {\n\n if (status == DataStatus.VERIFIED) {\n return true;\n } else if (completeOnly && status != DataStatus.COMPLETE) {\n return false;\n }\n\n // if any of this chunk's storage units doesn't exist,\n // then it's neither complete nor verified\n for (StorageUnit unit : units) {\n if (unit.size() == 0) {\n return false;\n }\n }\n\n Range allData = getRange(0, size);\n MessageDigest digest;\n try {\n digest = MessageDigest.getInstance(\"SHA-1\");\n } catch (NoSuchAlgorithmException e) {\n // not going to happen\n throw new BtException(\"Unexpected error\", e);\n }\n\n // do not block readers when checking data integrity\n readWriteLock.readLock().lock();\n try {\n if (status == DataStatus.VERIFIED) {\n return true;\n }\n\n allData.visitFiles((unit, off, lim) -> {\n\n int step = 2 << 22; // 8 MB\n long remaining = lim - off;\n if (remaining > Integer.MAX_VALUE) {\n throw new BtException(\"Too much data -- can't read to buffer\");\n }\n do {\n digest.update(unit.readBlock(off, Math.min(step, (int) remaining)));\n remaining -= step;\n off += step;\n } while (remaining > 0);\n });\n\n boolean verified = Arrays.equals(checksum, digest.digest());\n if (verified) {\n status = DataStatus.VERIFIED;\n }\n // TODO: reset the piece if verification is unsuccessful?\n return verified;\n\n } finally {\n readWriteLock.readLock().unlock();\n }\n }", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "private void retrieve() {\r\n\t\ttry {\r\n\t\t\tif (store == null) {\r\n\t\t\t\tstore = Store.retrieve();\r\n\t\t\t\tif (store != null) {\r\n\t\t\t\t\tSystem.out.println(\" The store has been successfully retrieved from the file StoreData. \\n\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstore = Store.instance();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception cnfe) {\r\n\t\t\tcnfe.printStackTrace();\r\n\t\t}\r\n\t}", "public boolean hasStoreChunk() {\n return msgCase_ == 1;\n }", "public boolean hasCreateStore() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "boolean verifyJobDatabase();", "public boolean hasStoreChunkLocation() {\n return msgCase_ == 7;\n }", "boolean isStoreInGroup(String code) throws ServiceException;", "public boolean hasStoreChunk() {\n return msgCase_ == 1;\n }", "public void verifyData() {\n\n saveDay();\n\n }", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "private boolean openStore(StoreConfig config)\n throws Exception {\n\n config.setTransactional(true);\n config.setMutations(caseObj.getMutations());\n\n EntityModel model = new AnnotationModel();\n config.setModel(model);\n caseObj.configure(model, config);\n\n String expectException = caseObj.getStoreOpenException();\n try {\n store = new EntityStore(env, EvolveCase.STORE_NAME, config);\n if (expectException != null) {\n fail(\"Expected: \" + expectException);\n }\n } catch (Exception e) {\n if (expectException != null) {\n String actualMsg = e.getMessage();\n if (e instanceof IncompatibleClassException) {\n actualMsg = actualMsg.substring\n (0, actualMsg.lastIndexOf(\"\\n---\\n(Note that\"));\n }\n actualMsg = e.getClass().getName() + \": \" + actualMsg;\n if (!expectException.equals(actualMsg)) {\n e.printStackTrace();\n }\n EvolveCase.checkEquals(expectException, actualMsg);\n return false;\n } else {\n throw e;\n }\n }\n return true;\n }", "boolean verifyDeveloperPayload(Purchase p) {\n return DEVELOPER_PAYLOAD.equals(p.getDeveloperPayload());\n }", "public boolean hasCompleteStore() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public boolean hasStoreChunkLocation() {\n return msgCase_ == 7;\n }", "boolean hasStorageConfig();", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDescription(\"A short description\");\n ShoppingList list = factory.validateAndCommit();\n\n // Times go on\n\n ShoppingList list2 = api.find(list.getId());\n\n // Test\n\n assertEquals(list.getId(), list2.getId());\n assertEquals(list.getName(), list2.getName());\n assertEquals(list.getDescription(), list2.getDescription());\n }", "boolean isCartValid();", "public void onStoreReady() {\n mMxEventDispatcher.dispatchOnStoreReady();\n }", "public void checkVersion() throws Exception {\n Version loadedVersion = getConfStoreVersion();\n LOG.info(\"Loaded configuration store version info \" + loadedVersion);\n if (loadedVersion != null && loadedVersion.equals(getCurrentVersion())) {\n return;\n }\n // if there is no version info, treat it as CURRENT_VERSION_INFO;\n if (loadedVersion == null) {\n loadedVersion = getCurrentVersion();\n }\n if (loadedVersion.isCompatibleTo(getCurrentVersion())) {\n LOG.info(\"Storing configuration store version info \"\n + getCurrentVersion());\n storeVersion();\n } else {\n throw new RMStateVersionIncompatibleException(\n \"Expecting configuration store version \" + getCurrentVersion()\n + \", but loading version \" + loadedVersion);\n }\n }", "boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n String messageAfterDecrypt = \"not_empty_line\";\n String password = getString(R.string.check_token);\n ;\n try {\n messageAfterDecrypt = AESCrypt.decrypt(password, payload);\n //Log.e(TAG, \"messageAfterDecrypt \" + messageAfterDecrypt);\n //Log.e(TAG, \"email \" + email);\n } catch (GeneralSecurityException e) {\n e.printStackTrace();\n //handle error - could be due to incorrect password or tampered encryptedMsg\n }\n// if (messageAfterDecrypt.equals(email)){\n// return true;\n// }\n if (Utils.isEmailValid(messageAfterDecrypt)) {\n return true;\n }\n\n return false;\n }", "@Test\n public void shoppingListSavesLocally() throws Exception {\n }", "@Test\n\tpublic void addRegistrationDetails() {\n\t\tRegistrationDetails registrationDetailsForHappyPath = RegistrationHelper.getRegistrationDetailsForHappyPath();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tRegistrationDetails addRegistrationDetails = registrationDAO\n\t\t\t\t\t.addRegistrationDetails(registrationDetailsForHappyPath);\n\t\t\tem.getTransaction().commit();\n\t\t\tassertTrue(addRegistrationDetails.getId() != 0l);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t}", "public boolean isStoreLeaseEligibilityInd() {\n return storeLeaseEligibilityInd;\n }", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n \n }", "public boolean isDBValid(){\r\n return noInduk != null && !noInduk.isEmpty();\r\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "public int getStoreID() { return storeID; }", "public boolean validateMenuItems(CwSession cwSession){\n idAnyNonExistingCpMenuItem(cwSession)\n .ifPresent(id -> {throw new RecordNotFoundException(String.format(MENU_ITEM_NOT_FOUND_WITH_ID,id));});\n return true;\n }", "public boolean hasCompleteStore() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "@Given(\"User is logging on MyStore\")\r\n public void searchingForProduct() {\n LoginPageNew login = new LoginPageNew(driver);\r\n MainPage main = new MainPage(driver);\r\n AccountPage accPage = new AccountPage(driver);\r\n AddingAnAddressForm addressForm = new AddingAnAddressForm(driver);\r\n login.loginAs(\"[email protected]\", \"123456\");\r\n main.goToAccPage();\r\n accPage.goToAddAddressForm();\r\n addressForm.fillingAddressForm(\"12\",\"Street Fighting Man\",\"02-223\",\"Sandia\",\"112322031\");\r\n accPage.goToMainPage();\r\n }", "@Then(\"^verify order is placed successfully in Order History$\")\r\n\tpublic void verifyOrderHistory() throws Exception {\n\t assertTrue(new ProductCheckout(driver).isOrderPlaced());\r\n\t}", "@Override\n\tpublic void initVerify() {\n\t\t\n\t}", "@Test\n\tpublic void verifyLeaveList()\n\t{\n\t}", "public String verify()\n\t{\n\t\t\treturn null;\n\t}", "boolean hasSerializedPaymentDetails();", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "boolean isSetKeyBox();", "public boolean initStore(String dbname) {\n return true;\n }", "public static boolean persistSection (Enroll enr) {\n SessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n Session session = null;\n\n //Adding Enroll object to table\n try {\n //opening the Hibernate session\n session = sessionFactory.openSession();\n session.beginTransaction();\n session.save(enr);\n session.getTransaction().commit();\n } catch (Exception e) {\n if (session != null) {\n session.getTransaction().rollback();\n }\n } finally {\n session.close();\n }\n return true;\n }", "public boolean enter (Student me)\r\n {\r\n boolean studentHasBook = false;\r\n \r\n if ((me.myLocker) == null)\r\n {\r\n me.sentToOffice (\"does not have a locker.\");\r\n me.myLocker = new Locker (me);\r\n me.myLocker.putJacket (new Jacket (me));\r\n return false;\r\n }\r\n else if (me.myJacket != null)\r\n {\r\n me.myLocker.putJacket (me.myJacket);\r\n return false;\r\n }\r\n for (int i = 0; i < me.books.length; i++)\r\n {\r\n if (me.books[i] != null)\r\n { \r\n if (me.books[i].course.equals (\"ICS4U0\"))\r\n return true;\r\n }\r\n }\r\n me.sentToOffice (\"does not have the correct book.\");\r\n for (int i = 0; i < me.books.length; i++)\r\n {\r\n if (me.books[i] == null)\r\n me.books[i] = me.myLocker.getABook (\"ICS4U0\");\r\n }\r\n for (int i = 0; i < me.books.length; i++)\r\n {\r\n if (me.books[i] != null)\r\n {\r\n if (me.books[i].course.equals (\"ICS4U0\"))\r\n studentHasBook = true;\r\n }\r\n }\r\n if (!studentHasBook)\r\n {\r\n me.books [0] = new Book ();\r\n me.books [0].course = \"ICS4U0\";\r\n me.books[0].title = \"AP Prep - Computer Science A\";\r\n }\r\n return false;\r\n }", "private boolean isStoreIdentityClaimsInUserStoreEnabled(UserStoreManager userStoreManager) {\n\n return Boolean.parseBoolean(userStoreManager.getRealmConfiguration().\n getUserStoreProperty(STORE_IDENTITY_CLAIMS));\n }", "@Suppress\n public void testFileStore () throws Throwable {\n for (final AndroidFileStore store : fs.getAndroidFileStores()) {\n Log.i(getName(), store.toString());\n Log.i(getName(), \" state=\"+store.state());\n Log.i(getName(), \" read-only=\"+store.isReadOnly());\n Log.i(getName(), \" removable=\"+store.isRemovable());\n Log.i(getName(), \" emulated=\"+store.isEmulated());\n Log.i(getName(), \" total-space=\"+store.getTotalSpace());\n Log.i(getName(), \" usable-space=\"+store.getUsableSpace());\n Log.i(getName(), \" unallocated-space=\"+store.getUnallocatedSpace());\n }\n }", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;" ]
[ "0.64814544", "0.63762414", "0.62120354", "0.59811455", "0.59330803", "0.59091043", "0.5908494", "0.5906756", "0.5880941", "0.57983994", "0.5777736", "0.57335895", "0.569237", "0.56713396", "0.5637304", "0.5564905", "0.5523292", "0.5492654", "0.547007", "0.5453426", "0.5426559", "0.539336", "0.5378412", "0.5378412", "0.5360591", "0.535349", "0.53513676", "0.5345352", "0.53409344", "0.5339468", "0.53392917", "0.5326175", "0.5315485", "0.53063077", "0.5303851", "0.5303672", "0.5301647", "0.5297561", "0.5294338", "0.5292951", "0.5283948", "0.5283783", "0.5282084", "0.52577573", "0.52513164", "0.52429676", "0.524197", "0.5212238", "0.52111727", "0.5205451", "0.51926017", "0.5190442", "0.5188979", "0.5182956", "0.5179721", "0.5174144", "0.51588047", "0.51495594", "0.5149133", "0.5148269", "0.5145064", "0.51357573", "0.51274997", "0.51189643", "0.5117224", "0.5108006", "0.50996166", "0.50985503", "0.50981164", "0.5088853", "0.5078608", "0.50772804", "0.50763255", "0.5074928", "0.5068338", "0.5066489", "0.5057492", "0.50372994", "0.5036721", "0.50358117", "0.5030966", "0.50197566", "0.5018572", "0.50182855", "0.50164855", "0.5014086", "0.5013549", "0.50120056", "0.50101596", "0.5009087", "0.50088185", "0.50058097", "0.5001376", "0.4999531", "0.4995757", "0.49917233", "0.49916437", "0.49728188", "0.49695513", "0.4959354" ]
0.7028336
0
Attempts to acquire a permit to perform an execution against the rate limiter, waiting until one is available or the thread is interrupted.
default void acquirePermit() { acquirePermits(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void runOrWait(Runnable task, RateLimiter rateLimiter)\n {\n if (rateLimiter != null)\n task.run();\n else\n FBUtilities.sleepQuietly(durationMillis);\n }", "public void acquire(PriorityQueue waitQueue) \n {\n waitQueue = null;\n donation = 0;\n lastEffectivePriority = -1; //Need to recalculate the effectivePriority as the leaving thread might take off its donation effects or \n //the thread is acquiring the resource and needs to calculate the effective priority for the first time.\n }", "public void triggerMutex() {\n if (mutex.availablePermits() == 0) {\n mutex.release();\n } else {\n try {\n mutex.acquire();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void triggerMutex() {\n if (mutex.availablePermits() == 0) {\n mutex.release();\n } else {\n try {\n mutex.acquire();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void acquire() throws InterruptedException {\n\t\tsynchronized (this) {\n\t\t\twhile (count == 0) {\n\t\t\t\tthis.wait();\n\t\t\t}\n\t\t\tcount--;\n\t\t}\n\t}", "void requestRateLimited();", "public void acquire() {\r\n return;\r\n }", "public void acquire() throws InterruptedException {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n synchronized (this) {\n try {\n if (!m_available) {\n wait();\n }\n m_available = false;\n }\n catch (InterruptedException ie) {\n notify();\n throw ie;\n }\n }\n }", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "protected void acquireDeliberationLock(){\n synchronized(deliberationMutex){\n while(deliberationInProgress){\n try {\n deliberationMutex.wait();\n } catch (InterruptedException ex) {\n logger.warn(\"Waiting for deliberation mutex interrupted.\");\n break;\n }\n }\n deliberationInProgress = true;\n }\n }", "public void acquire(PriorityQueue waitQueue) {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (waitQueue.owner != null)\n waitQueue.owner.ownedQueues.remove(waitQueue);\n\n waitQueue.owner = this;\n ownedQueues.add(waitQueue);\n\n if (waitQueue.pickNextThread() == null)\n return;\n\n if (waitQueue.pickNextThread().getEffectivePriority() > this.getEffectivePriority() && waitQueue.transferPriority)\n {\n this.effectivePriority = waitQueue.pickNextThread().getEffectivePriority();\n recalculateThreadScheduling();\n update();\n }\n\n }", "public Locks acquire(int millis ) throws Exception {\n\t\tSemaphore waitHere = new Semaphore(0);\n\t\tthreadPark.put( lockId, waitHere);\t\n\t\ttry {\n\t\t\tproxy.tell( new RequestLock( this), ActorRef.noSender());\n\t\t\tboolean success = waitHere.tryAcquire(millis, TimeUnit.MILLISECONDS );\n\t\t\tif( !success) throw new Exception();\n\t\t\tthis.acquired = new Date();\n\t\t} catch(Exception e){\n\t\t\t// I don't hold the lock ...\n\t\t\t// it could happen that there is a second release send for this lock, this should not \n\t\t\t// be a problem\n\t\t\tproxy.tell( new ReleaseLock(lockId), ActorRef.noSender());\n\t\t\t\n\t\t\tlog.info( \"Exception while waiting for lock\", e );\n\t\t\tthrow new Exception( \"Failed to get the lock!!\");\n\t\t\t\n\t\t} finally {\n\t\t\t// thread not parked any more\n\t\t\t\tthreadPark.remove(lockId);\t\t\n\t\t}\n\t\treturn this;\n\t}", "private Runnable pollSubmission() {\n StealingPool p = pool;\n while (p.hasQueuedSubmissions()) {\n Runnable t;\n if (tryActivate() && (t = p.pollSubmission()) != null)\n return t;\n }\n return null;\n }", "@Override\n public void run()\n {\n active = true;\n try\n {\n try\n {\n lock.acquire();\n }\n catch (InterruptedException e)\n {\n return;\n }\n guardedRun();\n }\n finally\n {\n lock.release();\n }\n }", "public void acquire(KThread thread) {\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n\t\t\tLib.assertTrue(waitQueue.size()==0); //Can acquire resourse only if the waitQueue is empty\n\t\t\towner = thread; //Set the owner of this priority queue to this thread\n\t\t\tgetThreadState(owner).acquire(this); //Call the acquire method of ThreadState of this thread\n\t\t}", "protected void acquireReplicaOperationPermit(\n final IndexShard replica,\n final ReplicaRequest request,\n final ActionListener<Releasable> onAcquired,\n final long primaryTerm,\n final long globalCheckpoint,\n final long maxSeqNoOfUpdatesOrDeletes\n ) {\n replica.acquireReplicaOperationPermit(primaryTerm, globalCheckpoint, maxSeqNoOfUpdatesOrDeletes, onAcquired, executor, request);\n }", "public synchronized void acquire(int id) throws InterruptedException\r\n\t{\r\n\t\twhile (avail1 == 0) {\r\n\t\t\tSystem.out.println(\"+Process_\" + id + \" is waiting for SR1\");\r\n\t\t\twait();\r\n\t\t}\r\n\t\tSystem.out.println(\"Process_\" + id + \" acquired SR1.\");\r\n\t\t//assigns one of the available instances\r\n\t\tavail1--;\r\n\t}", "public synchronized void acquire(int id) throws InterruptedException\r\n\t{\r\n\t\twhile (avail2 == 0) {\r\n\t\t\tSystem.out.println(\"+Process_\" + id + \" is waiting for SR2.\");\r\n\t\t\twait();\r\n\t\t}\r\n\t\tSystem.out.println(\"Process_\" + id + \" acquired SR2.\");\r\n\t\t//assigns one of the available instances\r\n\t\tavail2--;\r\n\t}", "synchronized void askForCritical() {\n\nSC=true;\n\nwhile(!Jeton){\n\ttry{\nthis.wait();\n\t}catch( InterruptedException ie ){\n\t\t\n\t}\n}\n}", "public Locks acquire() throws Exception {\n\t\t\n\t\tif( DB.getConf().getBoolean(\"locks.disabled\")) return this;\n\t\tSemaphore waitHere = new Semaphore(0);\n\t\tthreadPark.put( lockId, waitHere);\t\n\t\ttry {\n\t\t\tproxy.tell( new RequestLock( this), ActorRef.noSender());\n\t\t\twaitHere.acquire();\n\t\t\tthis.acquired = new Date();\n\t\t} catch(Exception e){\n\t\t\tlog.info( \"Exception while waiting for lock\", e );\n\t\t\tthrow new Exception( \"Failed to get the lock!!\");\n\t\t} finally {\n\t\t\t// thread not parked any more\n\t\t\tthreadPark.remove(lockId);\n\t\t}\n\t\treturn this;\n\t}", "protected boolean tryToAcquireDeliberationLock(long maxDelay){\n synchronized(deliberationMutex){\n if(deliberationInProgress){\n try {\n deliberationMutex.wait(maxDelay);\n } catch (InterruptedException ex) {\n //We don't care\n }\n }\n \n if(!deliberationInProgress){\n deliberationInProgress = true;\n return true;\n } else {\n return false;\n }\n }\n }", "private static void grant( String lockId ) {\n\t\tSemaphore s = threadPark.get( lockId );\n\t\tif( s != null ) {\n\t\t\ts.release();\n\t\t} else {\n\t\t\tlog.warn( \"Got a lock that nobody wanted ... \");\n\t\t\t// need to release it\n\t\t\tproxy.tell( new ReleaseLock(lockId), ActorRef.noSender());\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\tif (this.getName().equals(\"A\")) {\n\t\t\tSystem.out.println(\"Starting \" + threadName);\n\t\t\ttry {\n\t\t\t\t// First, get a permit.\n\t\t\t\tSystem.out.println(threadName + \" is waiting for a permit.\");\n\n\t\t\t\t// acquiring the lock\n\t\t\t\tsem.acquire();\n\n\t\t\t\tSystem.out.println(threadName + \" gets a permit.\");\n\n\t\t\t\t// Now, accessing the shared resource.\n\t\t\t\t// other waiting threads will wait, until this\n\t\t\t\t// thread release the lock\n\t\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\t\tShared.count++;\n\t\t\t\t\tSystem.out.println(threadName + \": \" + Shared.count);\n\n\t\t\t\t\t// Now, allowing a context switch -- if possible.\n\t\t\t\t\t// for thread B to execute\n\t\t\t\t\tThread.sleep(10);\n\t\t\t\t}\n\t\t\t} catch (InterruptedException exc) {\n\t\t\t\tSystem.out.println(exc);\n\t\t\t}\n\n\t\t\t// Release the permit.\n\t\t\tSystem.out.println(threadName + \" releases the permit.\");\n\t\t\tsem.release();\n\t\t}\n\n\t\t// run by thread B\n\t\telse {\n\t\t\tSystem.out.println(\"Starting \" + threadName);\n\t\t\ttry {\n\t\t\t\t// First, get a permit.\n\t\t\t\tSystem.out.println(threadName + \" is waiting for a permit.\");\n\n\t\t\t\t// acquiring the lock\n\t\t\t\tsem.acquire();\n\n\t\t\t\tSystem.out.println(threadName + \" gets a permit.\");\n\n\t\t\t\t// Now, accessing the shared resource.\n\t\t\t\t// other waiting threads will wait, until this\n\t\t\t\t// thread release the lock\n\t\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\t\tShared.count--;\n\t\t\t\t\tSystem.out.println(threadName + \": \" + Shared.count);\n\n\t\t\t\t\t// Now, allowing a context switch -- if possible.\n\t\t\t\t\t// for thread A to execute\n\t\t\t\t\tThread.sleep(10);\n\t\t\t\t}\n\t\t\t} catch (InterruptedException exc) {\n\t\t\t\tSystem.out.println(exc);\n\t\t\t}\n\t\t\t// Release the permit.\n\t\t\tSystem.out.println(threadName + \" releases the permit.\");\n\t\t\tsem.release();\n\t\t}\n\t}", "public Semaphore() {\n m_available = true;\n }", "public void doWait(){\n\t\tsynchronized(m){\n\t\t\ttry{\n\t\t\t\tm.wait(32000,0);\n\t\t\t} catch(InterruptedException e){}\n\t\t}\n\t}", "private void acc(int ticket) throws InterruptedException {\n trackStatus[ticket].acquire();\n if (DEBUG) System.err.printf(\"Train: %d\\tAcquired: %d\\n\", this.id, ticket);\n }", "public void waitForAccess(KThread thread) \n\t\t{\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n ThreadState waiterState = getThreadState(thread);\n waiterState.waitForAccess(this); //Call waitForAccess of ThreadState class\n waitQueue.add(thread); //Add this thread to this waitQueue \n if(owner != null)\n\t\t\t{\n\t\t\t getThreadState(owner).donatePriority(waiterState.getPriority()-getThreadState(owner).getPriority()); //See if the incoming thread has to donate priority to the owner\n\t\t\t}\n\t\t}", "private boolean tryAcc(int ticket) {\n int old = trackStatus[ticket].availablePermits();\n boolean r = trackStatus[ticket].tryAcquire();\n if (DEBUG) System.err.printf(\"Train: %d\\tTried: %d=%b:%d->%d\\n\", this.id, ticket, r, old, (trackStatus[ticket].availablePermits()));\n return r;\n }", "public void run() {\n\t\t\tsynchronized (lock) {\n\t\t\t\tfor(int i=0;i<10;i++) {\n\t\t\t\t\twhile(startSemaphore.availablePermits()!=0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Manager:\\t\"+i);\n\t\t\t\t\tstartSemaphore.release(3);\n\t\t\t\t\tlock.notifyAll();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlock.wait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int await() throws InterruptedException {\n\t\tnumAcquiredSemaphore.acquire();\n\t\t\n\t\t// grab my result index\n\t\tint result = numAcquired;\n\t\t\n\t\t// increment the index for the next guy to read\n\t\tnumAcquired++;\n\t\t\n\t\t// let others read shared var\n\t\tnumAcquiredSemaphore.release();\n\n\t\t// we'll use an IF here because we're going to reset numAcquired after we get through.\n\t\tif (numAcquired != parties){\n\t\t\t// if we're not the last party here, acquire a lock\n\t\t\t//System.out.println(\"Acquiring...\");\n\t\t\tgateSemaphore.acquire();\n\t\t}\n\t\t// sanity check: the first one we see here should ALWAYS be the largest index.\n\t\t//System.out.println(\"I'm through, result: \" + result);\n\t\t\n\t\t// once we get here, ALL parties except the active one should be acquired (waiting)\n\t\t\n\t\tif (numAcquired == parties) {\n\t\t\t// reset numAcquired so the gate is cyclical\n\t\t\tnumAcquired = 0;\n\t\t\t\n\t\t\t// release the lock for ready parties.\n\t\t\tgateSemaphore.release(parties - 1);\n\t\t}\n\t\t\n\t\t// return the original order we acquired the lock in\n\t\treturn result;\n\t}", "public void queueEstimationRequest(Request req) {\n queue.add(req);\n\n if (queueNotEmpty.availablePermits() <= 0) {\n // try to not issue too many permits (>1 make the worker spin needlessly)\n queueNotEmpty.release();\n }\n }", "public E takeUninterruptible(){\r\n\twhile(true){\r\n\t\ttry{\r\n\t\t\treturn buf.take();\r\n\t\t} catch(InterruptedException ignored){\r\n\t\t}\r\n\t}\r\n}", "void lockGranted(LockHandle lockHandle);", "public int askpermitToUse(String[] permits);", "public void acquireDeferredLock() {\r\n return;\r\n }", "void acquireReadLock() throws InterruptedException;", "void rateLimitReset();", "public boolean acquire()\n {\n if (!paused && !running) {\n return false;\n }\n\n// if (delay > 0)\n// try {\n// //#debug debug\n// System.out.println(\"Intentional sleeping for \" + delay + \" ms\");\n//\n// Thread.sleep(delay);\n// } catch (InterruptedException e) {\n// //#debug debug\n// System.out.println(\"Interrupted.\");\n//\n// return acquire();\n// }\n\n //#mdebug debug\n if (services.isBusy()) {\n System.out.println(\"Model is buzy.\");\n }\n //#enddebug\n\n /* Be a bit lazier if the Model is busy */\n while (running && careAboutBusy && services.isBusy()) {\n //#debug debug\n System.out.println(\"Buzy-Waiting \" + BUZY_WAIT_TIMER + \" ms\");\n\n try {\n Thread.sleep(BUZY_WAIT_TIMER);\n }\n catch (InterruptedException e) {\n //#debug error\n System.out.println(\"Interrupted. \" + e);\n\n return acquire();\n }\n }\n\n if (!paused) {\n \treturn running;\n }\n\n synchronized (pauseMonitor) {\n try {\n //#debug debug\n System.out.println(\"Pause-Wait\");\n\n pauseMonitor.wait();\n }\n catch (InterruptedException e) {\n //#debug error\n \tSystem.out.println(\"Interrupted. \" + e);\n\n \treturn acquire();\n }\n }\n\n return running;\n }", "public void waitForAccess(PriorityQueue waitQueue) {\n Lib.assertTrue(Machine.interrupt().disabled());\n Lib.assertTrue(waitingQueue == null);\n\n time = Machine.timer().getTime();\n waitQueue.threadStates.add(this);\n waitingQueue = waitQueue;\n\n if(placement == 0)\n placement = placementInc++;\n\n update();\n }", "protected abstract long waitOnQueue();", "public void unlock() {\n if(semaphore != null && semaphore.availablePermits() == 0) {\n semaphore.release();\n }\n }", "public boolean acquireNoWait() {\r\n return true;\r\n }", "public void CondWait(){\n try {\r\n trainCond.await();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Area.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n public void acquireExclusive( Locks.ResourceType resourceType, long resourceId ) throws AcquireLockTimeoutException\n {\n\n ConcurrentMap<Long, ForsetiLockManager.Lock> lockMap = lockMaps[resourceType.typeId()];\n PrimitiveLongIntMap heldLocks = exclusiveLockCounts[resourceType.typeId()];\n\n int heldCount = heldLocks.get( resourceId );\n if(heldCount != -1)\n {\n // We already have a lock on this, just increment our local reference counter.\n heldLocks.put( resourceId, heldCount + 1 );\n return;\n }\n\n // Grab the global lock\n ForsetiLockManager.Lock existingLock;\n int tries = 0;\n while( (existingLock = lockMap.putIfAbsent( resourceId, myExclusiveLock )) != null)\n {\n // If this is a shared lock:\n // Given a grace period of tries (to try and not starve readers), grab an update lock and wait for it\n // to convert to an exclusive lock.\n if( tries > 50 && existingLock instanceof SharedLock)\n {\n // Then we should upgrade that lock\n SharedLock sharedLock = (SharedLock) existingLock;\n if ( tryUpgradeSharedToExclusive( resourceType, lockMap, resourceId, sharedLock ) )\n {\n break;\n }\n }\n\n waitStrategies[resourceType.typeId()].apply( tries++ );\n markAsWaitingFor( existingLock, resourceType, resourceId );\n }\n\n clearWaitList();\n heldLocks.put( resourceId, 1 );\n }", "public synchronized Request getNextRequestToExecute() throws InterruptedException\n {\n do\n {\n if (requests.size() == 0)\n wait();\n\n needsReorder |= removeMissedRequests();\n\n if (needsReorder)\n {\n reorderRequests();\n needsReorder = false;\n }\n\n } while (requests.size() == 0);\n\n Request result = requests.get(0);\n requests.remove(0);\n return result;\n }", "@SuppressWarnings(\"BooleanMethodIsAlwaysInverted\")\n protected boolean acquireCapacity(Limit endpointReserve, Limit globalReserve, int bytes, long currentTimeNanos, long expiresAtNanos)\n {\n ResourceLimits.Outcome outcome = acquireCapacity(endpointReserve, globalReserve, bytes);\n\n if (outcome == ResourceLimits.Outcome.INSUFFICIENT_ENDPOINT)\n ticket = endpointWaitQueue.register(this, bytes, currentTimeNanos, expiresAtNanos);\n else if (outcome == ResourceLimits.Outcome.INSUFFICIENT_GLOBAL)\n ticket = globalWaitQueue.register(this, bytes, currentTimeNanos, expiresAtNanos);\n\n if (outcome != ResourceLimits.Outcome.SUCCESS)\n throttledCount++;\n\n return outcome == ResourceLimits.Outcome.SUCCESS;\n }", "void await( long millis ) throws UnavailableException;", "public void waitForAccess(PriorityQueue waitQueue) \n {\n this.waitQueue = waitQueue; //Assign the waitQueue in the ThreadState object to the passed PriorityQueue\n\t\t\tsleepTime=Machine.timer().getTime(); //Record the time at which the thread sleeps\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "public void run() {\n\t\t\tfinal double IDLE_PERIOD = workloadConfiguration.getPaymentPeriod();\n\n\t\t\ttry {\n\t\t\t\t// Initial payment cycle time is the time since workload startup.\n\t\t\t\tdouble lastCycleTime = Utilities.getTime() - startTime;\n\n\t\t\t\t// Pay until interrupted\n\t\t\t\twhile (!Thread.interrupted()) {\n\t\t\t\t\tdouble cycleStartTime = Utilities.getTime();\n\n\t\t\t\t\t// Distributes quota (tokens) to the builders.\n\t\t\t\t\tpayAllBuilders(lastCycleTime);\n\n\t\t\t\t\t// Idle for the specified period\n\t\t\t\t\tUtilities.idle(IDLE_PERIOD - (Utilities.getTime() - cycleStartTime));\n\n\t\t\t\t\t// Measure the time taken by the cycle just completed, including any idle time.\n\t\t\t\t\tlastCycleTime = Utilities.getTime() - cycleStartTime;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\treturn;\n\t\t\t} catch (Throwable e) {\n\t\t\t\tEvent.RUNTIME_EXCEPTION.issue(e, \"Failure in payer thread.\");\n\t\t\t}\n\t\t}", "Future_<V> take() throws InterruptedException;", "protected void execute() {\n \t// TODO check the limit switches FIRST!!!\n\n double encoderPos = Math.abs(Robot.liftSubsystem.readEncoderInInches());\n\t if(encoderPos > requestedEncoderPos || Robot.liftSubsystem.isTopLimitDepressed() == true) {\n\t \tweAreDoneSenor = true;\n\t \tSystem.out.println(\"We're done\");\n\t } else if((encoderPos <= (speedUpPoint) && encoderPos < slowDownPoint) || Robot.liftSubsystem.isBottomLimitDepressed()){\n \t\tRobot.liftSubsystem.autoMoveElevatorUp(\n \t\t\t\tRobot.liftSubsystem.calculatePowerHyperbolic(desiredStartingPower, encoderPos, startingEncoderPos, speedUpPoint, maxPower));\n\n \t\tSystem.out.println(Robot.liftSubsystem.calculatePowerHyperbolic(desiredStartingPower, encoderPos, startingEncoderPos, speedUpPoint, maxPower));\n\n \t} else if(encoderPos > speedUpPoint && encoderPos < slowDownPoint){\n \t\tRobot.liftSubsystem.setElevatorVelocity(maxPower);\n \t\tSystem.out.println(\"We're set to maximum overdrive.\");\n \t} else if(encoderPos >= slowDownPoint) {\n \t\tRobot.liftSubsystem.autoMoveElevatorUp(\n \t\t\t\tRobot.liftSubsystem.calculatePowerHyperbolic(desiredEndingPower, encoderPos, requestedEncoderPos, slowDownPoint, maxPower));\n \t\t// System.out.println(Robot.liftSubsystem.calculatePowerHyperbolic(desiredEndingPower, encoderPos, requestedEncoderPos, speedUpPoint, maxPower));\n\n \t}\n \t\n }", "public void testOfferInExecutor() {\n final SynchronousQueue q = new SynchronousQueue();\n ExecutorService executor = Executors.newFixedThreadPool(2);\n final Integer one = new Integer(1);\n\n executor.execute(new Runnable() {\n public void run() {\n threadAssertFalse(q.offer(one));\n try {\n threadAssertTrue(q.offer(one, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS));\n threadAssertEquals(0, q.remainingCapacity());\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n executor.execute(new Runnable() {\n public void run() {\n try {\n Thread.sleep(SMALL_DELAY_MS);\n threadAssertEquals(one, q.take());\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n joinPool(executor);\n\n }", "public void wbbarrierWait()\n {\n try{\n waitLock.lock();\n while(wbbarrierTag != -1){\n \t wbbarrier.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "public Semaphore(boolean isAvailable) {\n m_available = isAvailable;\n }", "private void waitToRetry()\n {\n final int sleepTime = 2000000;\n\n if (keepTrying)\n {\n try\n {\n Thread.sleep(sleepTime);\n }\n catch (Exception error)\n {\n log.error(\"Ignored exception from sleep - probably ok\", error);\n }\n }\n }", "public void run() {\n\t\t\ttry {\n\t\t\t\t//System.out.println(\"Before acquire\");\n\t\t\t\tsem.acquire();\n\t\t\t\tsemUsed = true;\n\t\t\t\t//System.out.println(\"After acquire\");\n\t\t\t\t\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Revise your semaphore math\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tfor (int i = start; i < maxInt && ! cancel; i = (int) (i + numAvailableThreads)) {\n\t\t\t\t//System.out.println(i);\n\t\t\tif (isPrime(i)){\n\t\t\t\t\tset.add(i);\n\t\t\t\t\tprimeCount.getAndIncrement();\n\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"dumping semaphore\");\n\t\t\tsem.release();\n\t\t}", "public RateLimiter getRateLimiter() {\n return rateLimiter;\n }", "public static boolean bankerRequest(Instruction currInstruction){\n Task currTask = taskList.get(currInstruction.taskNumber - 1);\n int resourceType = currInstruction.resourceType;\n int amountRequested = currInstruction.resourceAmount;\n if(currTask.claimsArr[resourceType - 1] < currTask.resourceHoldings[resourceType - 1] + amountRequested ){\n System.out.println(\"During Cycle \" + time + \"-\" + (time + 1) + \" of Banker's algorithm, Task \" + currTask.taskNumber + \" request exceeds its claim; aborted \");\n for(int j = 0 ; j < currTask.resourceHoldings.length; j ++){\n System.out.println(currTask.resourceHoldings[j] + \" units of resource \" + (j+ 1) +\" available next cycle\");\n }\n currTask.isAborted = true;\n terminatedCount ++;\n releaseAll(currTask);\n return false;\n }\n\n if(resourceArr[resourceType - 1] >= amountRequested){\n currTask.resourceHoldings[resourceType - 1] += amountRequested;\n resourceArr[resourceType - 1] -= amountRequested;\n\n if(isSafe(currTask)){\n return true;\n }else{\n currTask.resourceHoldings[resourceType - 1] -= amountRequested;\n resourceArr[resourceType - 1] += amountRequested;\n\n if(!waitingList.contains(currInstruction)){\n currInstruction.arrivalTime = time;\n waitingList.add(currInstruction);\n }\n currTask.waitingCount += 1;\n\n return false;\n }\n }else{\n\n if(!waitingList.contains(currInstruction)){\n currInstruction.arrivalTime = time;\n waitingList.add(currInstruction);\n }\n currTask.waitingCount += 1;\n }\n return false;\n }", "public static void blockRequests() {\n\t\tsynchronized (isRunning) {\n\t\t\ttry {\n\t\t\t\tisRunning.set(false);\n\t\t\t\tisRunning.wait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisRunning.set(true);\n\t\t\t}\n\t\t}\n\t}", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "void lock(String resourceName) throws InterruptedException;", "private void await() {\n try {\n game.getBarrier().await();\n } catch (InterruptedException | BrokenBarrierException e) {\n e.printStackTrace();\n }\n }", "private void await() {\n try {\n Thread.sleep(10 * 1000L);\n } catch (InterruptedException e) {\n // ignore\n }\n }", "public void testFairTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "@Override\n protected int tryAcquireShared(int ignored) {\n if (isSignalled()) {\n return 1;\n }\n\n return -1;// check in AbstractQueuedSynchronizer.doAcquireSharedInterruptibly() why -1 returned here.\n }", "public boolean tryAcquire(String key, String owner, long timeout, TimeUnit timeUnit);", "public interface RateLimiter {\n\n String rateLimiterId();\n\n boolean isRateLimited(String identity);\n\n}", "protected void acquirePrimaryOperationPermit(\n final IndexShard primary,\n final Request request,\n final ActionListener<Releasable> onAcquired\n ) {\n primary.acquirePrimaryOperationPermit(onAcquired, executor, request, forceExecutionOnPrimary);\n }", "interface Condition {\n\n long PARK_TIMEOUT = 50L;\n\n int MAX_PROG_YIELD = 2000;\n\n // return true if the queue condition is satisfied\n boolean test();\n\n // wake me when the condition is satisfied, or timeout\n void awaitNanos(final long timeout) throws InterruptedException;\n\n // wake if signal is called, or wait indefinitely\n void await() throws InterruptedException;\n\n // tell threads waiting on condition to wake up\n void signal();\n\n /*\n * progressively transition from spin to yield over time\n */\n static int progressiveYield(final int n) {\n if(n > 500) {\n if(n<1000) {\n // \"randomly\" yield 1:8\n if((n & 0x7) == 0) {\n LockSupport.parkNanos(PARK_TIMEOUT);\n } else {\n onSpinWait();\n }\n } else if(n<MAX_PROG_YIELD) {\n // \"randomly\" yield 1:4\n if((n & 0x3) == 0) {\n Thread.yield();\n } else {\n onSpinWait();\n }\n } else {\n Thread.yield();\n return n;\n }\n } else {\n onSpinWait();\n }\n return n+1;\n }\n\n static void onSpinWait() {\n\n // Java 9 hint for spin waiting PAUSE instruction\n\n //http://openjdk.java.net/jeps/285\n // Thread.onSpinWait();\n }\n\n /**\n * Wait for timeout on condition\n *\n * @param timeout - the amount of time in units to wait\n * @param unit - the time unit\n * @param condition - condition to wait for\n * @return boolean - true if status was detected\n * @throws InterruptedException - on interrupt\n */\n static boolean waitStatus(final long timeout, final TimeUnit unit, final Condition condition) throws InterruptedException {\n // until condition is signaled\n\n final long timeoutNanos = TimeUnit.NANOSECONDS.convert(timeout, unit);\n final long expireTime = System.nanoTime() + timeoutNanos;\n // the queue is empty or full wait for something to change\n while (condition.test()) {\n final long now = System.nanoTime();\n if (now > expireTime) {\n return false;\n }\n\n condition.awaitNanos(expireTime - now - PARK_TIMEOUT);\n\n }\n\n return true;\n }\n\n}", "@Override\n public void run() {\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n\n PausibleTX pauseTXRunnable = new PausibleTX();\n pauseTXRunnable.rgnName = rgnName;\n pauseTXRunnable.myCache = getCache();\n pauseTXRunnable.key = \"key\";\n pauseTXRunnable.value = \"val3\";\n new Thread(pauseTXRunnable, \"PausibleTX Thread\").start();\n synchronized (PausibleTX.class) {\n while (!pauseTXRunnable.getIsRunning()) {\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n }", "public void rushToSecurity() {\n int priority = Thread.currentThread().getPriority();\n Thread.currentThread().setPriority(priority + 1);\n\n //sleep for a random time\n try {\n Thread.sleep((long) Math.random() * 50000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //setPriority back to default\n Thread.currentThread().setPriority(priority);\n }", "public void run() {\n\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//Acquires a permit blocking until one is available, or the thread is interrupted.\n\t\t\t\t//View if there is some space f the buffer to produce data\n\t\t\t\tempty.acquire();\n\t\t\t\t\n\t\t\t\t//Acquires a permit blocking until one is available, or the thread is interrupted.\n\t\t\t\t//Semaphore for mutual exclusion, acquires the lock to into critical section\n\t\t\t\tmutex.acquire();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Produciendo un recurso (PRODUCTOR)\");\n\t\t\t\t//Produce data in the buffer\n\t\t\t\tbuffer.fill();\n\t\t\t\tSystem.out.println(\"Liberación (PRODUCTOR)\");\n\t\t\t\t\n\t\t\t\t// sleep the Consumidor to work in different time\n\t\t\t\tsleep((long) ((Math.random())%1000));\n\t\t\t\t\n\t\t\t\t//releases the lock\n\t\t\t\tmutex.release();\n\t\t\t\t\n\t\t\t\t//Releases a permit, increasing the number of available permits by one\n\t\t\t\tfull.release();\n\n\t\t\t\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void waitUntil(long x){\n\n Machine.interrupt().disable(); //disable interrupts\n\n\t long wakeTime; \n wakeTime = Machine.timer().getTime() ;\n wakeTime = wakeTime + x; //calculate wakeTime\n\n //pass through wakeTime and current thread as instance variables for a\n ThreadWait a;\n a = new ThreadWait(wakeTime, KThread.currentThread());\n\n waitingQueue.add(a); //add a to the waitingQueue \n\n KThread.currentThread().sleep(); //sleep current thread\n\n Machine.interrupt().enable(); //enable interrupts\n }", "@Test\n public void testTakeBlocksWhenEmpty() throws InterruptedException {\n final int capacity = 10;\n final BoundedBuffer<Integer> bb = new BoundedBuffer<Integer>(capacity);\n\n Runnable task = new Runnable() {\n public void run() {\n try {\n bb.take();\n } catch (InterruptedException e) {\n assertEquals(InterruptedException.class, e.getClass());\n //e.printStackTrace();\n }\n }\n };\n\n Thread thread = new Thread(task);\n thread.start();\n\n\n Thread.sleep(LOCKUP_DETECT_TIMEOUT);\n try{\n thread.interrupt();\n thread.join();\n\n }\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n\n\n }", "public void m3980iv() {\n Process.setThreadPriority(10);\n while (!this.mClosed) {\n try {\n this.f3568qK = this.f3566Tz.mo7564ix();\n Thread.sleep(this.f3562Tv);\n } catch (InterruptedException e) {\n C1401bh.m4076u(\"sleep interrupted in AdvertiserDataPoller thread; continuing\");\n }\n }\n }", "public void testFairTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public RateLimiter getRateLimiter() {\n return rateLimiter;\n }", "@Override\n public CardAccessNumber call() throws Exception {\n return queue.take();\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "static void onSpinWait() {\n }", "@Override\n public void run() {\n if (MyDebug.LOG) {\n Log.d(TAG, \"take next continuous burst\");\n Log.d(TAG, \"continuous_burst_in_progress: \" + continuous_burst_in_progress);\n Log.d(TAG, \"n_burst: \" + n_burst);\n }\n if (n_burst >= 10 || n_burst_raw >= 10) {\n // Nokia 8 in std mode without post-processing options doesn't hit this limit (we only hit this\n // if it's set to \"n_burst >= 5\")\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as waiting for too many photos\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else if (picture_cb.imageQueueWouldBlock(n_burst_raw, n_burst + 1)) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as image queue would block\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else {\n takePictureBurst(true);\n }\n }", "public void run()\r\n/* 49: */ {\r\n/* 50:170 */ if (!TrafficCounter.this.monitorActive) {\r\n/* 51:171 */ return;\r\n/* 52: */ }\r\n/* 53:173 */ TrafficCounter.this.resetAccounting(TrafficCounter.milliSecondFromNano());\r\n/* 54:174 */ if (TrafficCounter.this.trafficShapingHandler != null) {\r\n/* 55:175 */ TrafficCounter.this.trafficShapingHandler.doAccounting(TrafficCounter.this);\r\n/* 56: */ }\r\n/* 57:177 */ TrafficCounter.this.scheduledFuture = TrafficCounter.this.executor.schedule(this, TrafficCounter.this.checkInterval.get(), TimeUnit.MILLISECONDS);\r\n/* 58: */ }", "@Override\n protected boolean tryAcquire(long value) {\n return counter.longValue() > value;\n }", "protected synchronized void acquire(long delta) {\n if (delta <= 0) {\n throw new IllegalArgumentException(\"resource counter delta must be > 0\");\n }\n long prev = count;\n count -= delta;\n if (prev > 0 && count <= 0 ) {\n turnOff();\n }\n }", "public boolean tryAcquire(long timeout) throws InterruptedException {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n synchronized (this) {\n if (m_available) {\n m_available = false;\n return true;\n }\n else if (timeout <= 0) {\n return false;\n }\n else {\n long startTime = System.currentTimeMillis();\n try {\n while (true) {\n wait(timeout);\n if (m_available) {\n m_available = false;\n return true;\n }\n else {\n timeout -= (System.currentTimeMillis() - startTime);\n if (timeout <= 0) {\n return false;\n }\n }\n }\n }\n catch (InterruptedException ie) {\n notify();\n throw ie;\n }\n }\n }\n }", "@Override\n\tpublic void sleep() {\n\t\t((Application) application()).unlockEC();\n\t\tsuper.sleep();\n\t}", "Thread getLocker();", "private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }", "void waitToRead();", "public static void main(String[] args) throws InterruptedException {\n\n Random random = new Random();\n RateLimitingVOne rateLimiter = new RateLimitingVOne();\n UUID userId = UUID.randomUUID();\n\n List<Request> allRequests = new ArrayList<>();\n\n long start = System.currentTimeMillis();\n for (int i = 1; i < 100; i++) {\n int count = random.nextInt(10);\n Request nr = new Request(count> 0 ? count : 1, System.currentTimeMillis(), i);\n allRequests.add(nr);\n rateLimiter.handleNewRequest(nr, userId);\n// sleep(random.nextInt(350));\n sleep(250);\n }\n\n long elapsed = System.currentTimeMillis() - start;\n\n System.out.println(\"Time ---- >> \"+ elapsed);\n\n for (Request tr : allRequests) {\n long since = (tr.timestamp - start);\n int count = tr.isRejected ? -tr.requestsCount : tr.requestsCount;\n System.out.println(tr.sequence+\", \"+ since + \" , \" + count);\n }\n\n\n Request r = rateLimiter.userRequestLog.get(userId);\n int count =0;\n while (r.previous != null) {\n count++;\n r = r.previous;\n }\n\n System.out.println(count);\n\n\n }", "public void doWait() {\n\t\tsynchronized(lock) {\n\t\t\twhile(!wasSignalled) {\n\t\t\t\ttry {\n\t\t\t\t\tlock.wait();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\twasSignalled = false;\n\t\t}\n\t}", "public void execute() throws InterruptedException;", "private void waitForBuyersAction() throws InterruptedException\n {\n while(waiting)\n {\n Thread.sleep(100);\n }\n waiting = true;\n }", "public Future<?> stress() throws InterruptedException, ExecutionException {\n if (future != null) {\n future.get();\n }\n return executor.submit(new Callable<Object>() {\n public Object call() throws Exception {\n stressInternal();\n return null;\n }\n });\n }", "public interface LockRequest {\n /**\n * Called by the Lock class when a lock has been granted\n * @param lock Handle used to release the lock\n * the one represented by the handle\n */\n void lockGranted(LockHandle lockHandle);\n \n /**\n * Called by the Lock class when a timeout has been reached\n * @param lock The lock key that was tried to lock\n * @param seconds The number of seconds the timeout took\n */\n void lockTimeout(String lock,int seconds);\n \n /**\n * Called by the Lock class when a granted lock is released for this request\n * @param lock\n * @param seconds \n */\n void lockReleased(String lock);\n \n /**\n * Called by the Lock class when a granted lock expires for this request\n * @param lock\n * @param seconds \n */\n void lockExpired(String lock);\n \n /**\n * Called by the Lock class to determine if a lock can be granted to this or another request.\n * This value is used for two conditions:\n * 1. If the current request does not have the lock, then this value is compared\n * against the current number of request using the lock to determine if the lock\n * can be granted\n * \n * 2. If the current request has the lock, then this value is used to prevent\n * other request with higher concurrency values to enter the lock.\n * @return Maximum number of request that can be using the requested lock\n * at the same time with the current request\n */\n int getMaxConcurrent();\n \n \n /**\n * Called by the Lock class to know whats the max number of seconds this\n * request is willing to wait for the lock to be granted.\n * Note: -1 means unlimited\n */\n int getTimeout();\n \n /**\n * Called by the Lock class to know how many seconds the lock should be granted\n * to this particular request\n */\n int getExpireTimeout();\n}", "private static void m200a() {\r\n Object obj = AuthTask.f155a;\r\n synchronized (obj) {\r\n try {\r\n obj.notify();\r\n } catch (Exception e) {\r\n }\r\n }\r\n }", "public void sleep() throws InterruptedException, IllegalArgumentException, Time.Ex_TimeNotAvailable, Time.Ex_TooLate\n {\n // The current time.\n AbsTime now;\n // The duration to wait.\n RelTime duration;\n\n // Make error if NEVER.\n if (isNEVER()) {\n throw new IllegalArgumentException(\"this == NEVER\");\n }\n\n // Don't do anything if ASAP.\n if (!isASAP()) {\n\n // Calculate the time now.\n now = new AbsTime();\n\n // Figure out how long to wait for.\n duration = Time.diff(this, now);\n\n // If duration is negative, throw the Ex_TooLate exception.\n if (duration.getValue() < 0L) {\n throw new Time.Ex_TooLate();\n }\n\n // Do the wait.\n duration.sleep();\n }\n }", "private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }" ]
[ "0.6053757", "0.586138", "0.5767446", "0.5767446", "0.57598466", "0.5658462", "0.5643317", "0.5634519", "0.56130165", "0.5506599", "0.54965144", "0.549376", "0.54772514", "0.5471044", "0.53687024", "0.52929366", "0.527087", "0.52634376", "0.5244946", "0.5237693", "0.5213876", "0.51777256", "0.5155954", "0.5144843", "0.5140374", "0.5140344", "0.5116146", "0.50761145", "0.5057791", "0.5042333", "0.5041337", "0.5040824", "0.5031384", "0.5023951", "0.5016936", "0.50067306", "0.49903136", "0.49868327", "0.4968142", "0.49594903", "0.49350205", "0.49344134", "0.49246126", "0.49180043", "0.4913307", "0.49126408", "0.48962873", "0.48847035", "0.48809323", "0.48776722", "0.4858352", "0.48575997", "0.48537117", "0.48367187", "0.48358285", "0.48328045", "0.48299316", "0.48251233", "0.4818207", "0.4817798", "0.48080096", "0.48046935", "0.47973308", "0.47941032", "0.47937438", "0.47906432", "0.4788568", "0.47773203", "0.47738093", "0.47714356", "0.47667912", "0.4764747", "0.47634557", "0.4755841", "0.47526538", "0.47478777", "0.47459576", "0.47412083", "0.47380072", "0.47312397", "0.47302333", "0.47265425", "0.472404", "0.47189775", "0.47056577", "0.470565", "0.4704396", "0.47024146", "0.46881548", "0.46796638", "0.4675813", "0.46745867", "0.4672334", "0.46685755", "0.4667266", "0.46628997", "0.4657645", "0.46519214", "0.46479502", "0.46453452" ]
0.70610046
0
Returns the value of the 'Name' attribute. If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...
String getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getName() {\n\t\treturn (String) attributes.get(\"name\");\n\t}", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}", "public final String getNameAttribute() {\n return getAttributeValue(\"name\");\n }", "public String getName()\n {\n return (String)getAttributeInternal(NAME);\n }", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { return (String)get(\"Name\"); }", "public String getName(){\n\n //returns the value of the name field\n return this.name;\n }", "public String getName() {\n return (String) getValue(NAME);\n }", "public String getName() { return this.Name; }", "public String getName()\n {\n return this.aName;\n }", "public AXValue getName() {\n return name;\n }", "public String getName() { return Name; }", "public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}", "public String getName()\n \t{\n \t\treturn name;\n \t}", "public String getName() {\r\n \t\t\treturn name;\r\n \t\t}", "public String getName() {\r\n return Name;\r\n }", "public String getName()\n\t{ return name; }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}", "public String getName() {\r\n \treturn name;\r\n }", "private String getName() {\n\t\treturn name;\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this._name;\r\n\t}", "public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }", "public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }", "@Basic @Raw\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}", "public String getName()\r\n {\r\n\treturn name;\r\n }", "public String getName() {\r\n\t\t\treturn Name;\r\n\t\t}", "public String getName() \n {\n \treturn name;\n }", "public String getName() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn null;\n\t\telse {\n\t\t\tString name = nameValue.getName();\n\t\t\tif (name == null)\n\t\t\t\treturn null;\n\t\t\telse\n\t\t\t\treturn name;\n\t\t}\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.name;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.name;\r\n\t}", "public String getName()\r\n {\r\n return name;\r\n }", "public String getName()\r\n {\r\n return name;\r\n }", "public String GetName() {\n\t\treturn this.name;\n\t}", "public String getName() \n\t{\n\t\treturn name;\n\t}", "public String getName() {\n return this.Name;\n }", "public String getName() {\n return this.Name;\n }", "public java.lang.String getName()\n {\n return name;\n }", "public java.lang.String getName()\n {\n return name;\n }", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public String getName() {\n\t\treturn Name;\n\t}", "public String getName() {\n\t\treturn this.Name;\n\t}", "public Name getName(){\r\n\t\treturn name;\r\n\t}" ]
[ "0.8552948", "0.8311485", "0.8311485", "0.8311485", "0.8164286", "0.81468123", "0.7994057", "0.7994057", "0.7994057", "0.7955556", "0.791245", "0.7835615", "0.78243345", "0.78141195", "0.780532", "0.77809924", "0.7779097", "0.7779097", "0.7779097", "0.7779097", "0.7777842", "0.77698326", "0.7769603", "0.7769187", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77674395", "0.77666014", "0.776086", "0.7759771", "0.7752436", "0.77514213", "0.77514213", "0.7745829", "0.77383506", "0.77374166", "0.7734015", "0.77339584", "0.77318406", "0.77318406", "0.7728476", "0.7728476", "0.77267", "0.7719518", "0.7716477", "0.7716477", "0.77149165", "0.77149165", "0.77130806", "0.77125084", "0.7710699", "0.77084565" ]
0.0
-1
Intractable interface... just now realized i've been spelling it wrong this whole time... ooooops...
public interface Interactable { public void interact(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Actions extends EObject\n{\n}", "public interface IPartInteractable extends IPart {\n\n /**\n * Called when the part is right-clicked. Return true if an action occoured, false if nothing happened.\n */\n public boolean onActivated(EntityPlayer player, QRayTraceResult hit, ItemStack item);\n\n /**\n * Called when the part is left-clicked.\n */\n public void onClicked(EntityPlayer player, QRayTraceResult hit, ItemStack item);\n\n}", "public interface AttributeTypeAttack extends EObject\n{\n}", "public interface Actor extends NamedElement {\r\n}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "@Override\n\tpublic void visit(EquipmentAttack e) {\n\t}", "@Override\r\n\tpublic void clickObject() {\n\r\n\t}", "public interface TElement extends HasID, THasPropertyChange, PropertyChangeListener, Serializable {\n\n /**\n * Used if a requested attribute is not a member of the TElement derived\n * Class.\n */\n public final Object NOT_DEFINED = \"ATT_NOT_DEFINED\";\n\n /**\n * return the attribute value or teal.sim.TElement.NOT_DEFINED\n **/\n public Object getProperty(String attName);\n\n /**\n * set the attribute value return value is success\n **/\n public boolean setProperty(String attName, Object value);\n\n public void addRoute(Route r);\n \n /** \n * Establish a route from this object's source attribute and the targeted \n * attribute of another TElement. \n **/\n public void addRoute(String attribute, TElement listener, String targetName);\n \n \n /** \n * Remove a route from this object's source attribute and the target's output attribute. \n **/\n public void removeRoute(String attribute, TElement listener, String targetName);\n}", "public interface ILabelPress extends IBasePress {\n\n void getLabelList();\n\n void evaluation();\n}", "public interface IOnAddedToBoardEvent extends IBoardEvent\n{\n public void onAdded(List<ItemStack> layers, ItemStack added, NBTTagCompound specialTagInfo);\n public boolean canAdd(List<ItemStack> currentLayers, ItemStack toAdd, NBTTagCompound specialTagInfo);\n\tpublic ItemStack addedToBoard(List<ItemStack> currentLayers, ItemStack added, NBTTagCompound specialTagInfo);\n\tpublic boolean decrementStackSize(List<ItemStack> currentLayers, ItemStack added, NBTTagCompound specialTagInfo);\n}", "@Override\n public void act() {\n }", "public interface MyAbstractElement extends EObject {\n}", "@Override\n public void acceptHit(boolean hit, Element target) {\n }", "public interface InteractionTarget extends org.opensourcephysics.display.Interactive {\n // Needs to extend Interactive for backwards compatibility\n\n public InteractionSource getSource ();\n\n public Point3D getHotspot (DrawingPanel _panel);\n\n public void updateHotspot (DrawingPanel _panel, Point3D _point);\n\n}", "public interface MoveBehavior {\r\n\r\n\tpublic String move();\r\n\r\n}", "public interface WalkthroughViewListener {\n}", "public interface CustomizeInteractions {\n\t/**\n\t * \n\t * @return current object iteractions\n\t */\n\tpublic Map<> getInteractions();\n}", "public interface InformationTreeSelectionListener {\r\n\t/** \r\n\t * Invoked when the specified image information is selected.\r\n\t * @param info the image information.\r\n\t */\r\n\tpublic abstract void select ( XmlInformation info );\r\n}", "public interface Element_itf {\n\n// Gestion de la position\n\t/** Obtenir la position\n\t * @return position la position\n\t */\n\tpublic Position getPosition();\n\n// Méthode estDestructible\n\t/** Renvoie vrai si l'élément est destructible a la position\n\t * @param position la position depuis laquelle on tente de détruire l'élément\n\t * @return true si on peut le detruire, false sinon\n\t */\n\tpublic boolean estDestructible (Position position);\n\n// Affichage du niveau\n\t/** afficher tous les détails de l'element\n\t * @return string détail de l'element\n\t */\n\tpublic String toString();\n\n}", "public interface Actor extends LogicalHandled\n{\t\n\t/**\n\t * This is the actors action, which will be called at each step\n\t */\n\tpublic void act();\n}", "public void userAction(ElementInstance ei) {\r\n\t\t\r\n\t}", "public interface OnEditorInteraction {\n boolean onItemLongClick(MissionItemProxy item);\n\n void onItemClick(MissionItemProxy item, boolean zoomToFit);\n\n void onMapClick(LatLong coord);\n\n void onListVisibilityChanged();\n}", "public interface Exposable\n{\n}", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "public interface GenericScenePart extends ICompositor, LNamedElement\n{\n}", "@Override\n\tpublic void visit(EquipmentToy e) {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public interface Menu2DListener {\n\n /*------------------------------------------------------------------------------------*/\n\n /** Method called when an item has been clicked on an item who is not a menu link.\n * @param e menu event generated.\n */\n public void menuItemClicked( Menu2DEvent e );\n\n /*------------------------------------------------------------------------------------*/\n\n}", "public interface ILeftClickAction {\n\t/**\n\t * The action being carried out when left clicking\n\t * @param p the position of left click\n\t */\n\tpublic void apply(Position p);\n\n}", "private void testImplementAccessible(Component comp) {\n if (testSettings.accessibleInterface && !(comp instanceof Accessible)) {\n if (testSettings.AI_showingOnly){\n if(comp.isShowing())\n noAccess.add(comp);\n } else\n noAccess.add(comp);\n }\n }", "public interface IClickableNode {\n\n\t/**\n\t * This method is invoked after clicking on this node.\n\t * \n\t * @param clickCount\n\t * determines whether it is single mouse click or double click\n\t * (or even more..)\n\t */\n\tpublic void clickAction(int clickCount);\n\n}", "public interface PoCardAction extends UseGameUnitAction {\n}", "public interface BackupViewClickListener {\n /* renamed from: a */\n void mo15854a(int i, DynamicClickInfo iVar);\n}", "public interface INestable {\n\n /**\n* Notifies this service that the component within which it exists has\n* become active. The service should modify its state as appropriate.\n*\n*/\n public void activate();\n\n /**\n* Notifies this service that the component within which it exists has\n* become inactive. The service should modify its state as appropriate.\n*/\n public void deactivate();\n}", "public interface Clickable {\n\n String getName();\n\n void initIcon(int iconSize);\n\n Bitmap getIcon();\n\n int onClick(InputManager manager, CImageView view);\n\n}", "public interface eit {\n}", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "public interface IEnemyFeature {\n\n}", "public interface IClickable {\n void onClick();\n}", "@Override\n\tpublic void anular() {\n\n\t}", "public interface ShimSelectableItem {\n\t\n\t/**\n\t * Returns the TreeItem which is selected in TreeViewer.\n\t * \n\t * @return\n\t */\n\tpublic TreeItem getSelectedItem();\n\t\n\t/**\n\t * Refreshes all controls.\n\t */\n\tpublic void refresh();\n\n}", "public interface Listener {\n void insertedElement(Cachable cachable);\n void removedElement(Cachable cachable);\n}", "public interface Action_Aspect extends Action, ExecutableNode_Aspect {\n}", "@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public interface IMovableTile {\r\n\t\r\n\t/**\r\n\t * notification that your block will be moved, called instead of invalidate, return false to prevent movement.\r\n\t * @return \r\n\t */\r\n\tboolean prepareToMove();\r\n\t\r\n\t/**\r\n\t * notification that your block was moved, called after validate.\r\n\t */\r\n\tvoid doneMoving();\r\n\t\r\n}", "public interface ConnectableElement extends TypedElement { // <-- [user code injected with eMoflon]\r\n\r\n\t// [user code injected with eMoflon] -->\r\n}", "public interface Changed extends Editable.Changed\n {\n }", "public interface UnaryTest extends DMNElement {\n}", "public interface TreeClickListener {\n\n void click(String name);\n\n}", "public interface IUnselectListener extends Serializable{\n\n /**\n * This method is called whenever a node is unselected in the tree.\n * @param node The node that was unselected.\n * @param tree The tree this node was unselected in.\n */\n public void nodeUnselected(ITreeNode node, ITree tree,boolean needNotifier);\n}", "public interface Classifier extends NamedDisplayElement {\n}", "public interface UIAction {\n}", "@Override\n\t\t\t\t\t\tpublic void onInvateComplet() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "public interface Hittable extends VisitableGameElement {\n /**\n * Defines that an object have been hit.\n * Implementations should consider the events that a hit to an object can trigger.\n *\n * @return the score the player obtained hitting the object\n */\n int hit();\n\n /**\n * Defines that a hittable object has to have a score when it is hit.\n *\n * @return the current score of the object when hit\n */\n int getScore();\n\n /**\n * Gives the object the capacity to remember if it's been hit at some point, for testing purposes.\n *\n * @author Diego Ortego Prieto\n *\n * @return true only if the hittable has been hit before.\n */\n boolean wasHit();\n}", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public interface IUserActionsManaged\n{\n void startCurving(PointF point, float pressure);\n void curving(PointF point, float pressure);\n void completeCurving(PointF point, float pressure);\n void cancelCurving(PointF point, float pressure);\n\n void startResizing();\n void resizing(PointF[] points);\n void completeResizing();\n\n void startDragging(PointF point);\n void dragging(PointF point);\n void completeDragging(PointF point);\n\n void showMenu();\n}", "public interface hp extends Menu {\n}", "public interface ImageSelectionListener {\n\n void selected (ImageActor actor);\n\n}", "protected abstract boolean actionImplementation(iNamedObject node);", "@Override\n\tpublic void e() {\n\n\t}", "@Override\r\n\tpublic void specialAbility() {\n\t}", "@Override\n protected void doAct() {\n }", "public interface WardrobeDelegateInteractor extends BaseDelegateInteractor {\n\n void onShuffleClick(int maxShirts, int maxPants);\n\n void onAddFavClick(int shirtPosition, int pantPosition);\n\n void onAddClothes(int category);\n}", "static interface ElementSelectionListener {\n \n public void selectionChanged(MultiViewDescription oldOne, MultiViewDescription newOne);\n \n public void selectionActivatedByButton(MouseEvent e);\n \n public void selectionActivatedByButton(ActionEvent e);\n \n }", "@Override\n\tpublic void fly() {\n\t\t\n\t}", "public interface AbstractC3386kV0 {\n boolean b();\n\n void d();\n\n void dismiss();\n\n ListView f();\n}", "public interface FlyBehevour {\n void fly();\n}", "public interface EventPressMenu {\r\n public void OnClickMenu(String name);\r\n}", "public interface RehaTPEventListener extends EventListener {\npublic void rehaTPEventOccurred(RehaTPEvent evt );\n/*public void RehaTPEventOccurred(TerminFenster evt );\npublic void RehaTPEventOccurred(Container evt );\npublic void RehaTPEventOccurred(Object evt );\npublic void RehaTPEventOccurred(SystemLookAndFeel evt );\n*/\n}", "public interface FlyBehavior {\n\n /**\n * 飞行的动作\n */\n void fly();\n\n}", "public interface ActiveEvent {\n\n /**\n * Dispatch the event to its target, listeners of the events source,\n * or do whatever it is this event is supposed to do.\n */\n public void dispatch();\n}", "public interface IsInventoryItem extends IsSceneSpriteObject, hasUserActions {\n\n\n\t/** KeepHeld mode - normally a item is dropped back into the inventory after use.\n\t * This mode determines if it should be kept held on certain conditions **/\n\tpublic enum KeepHeldMode {\n\t\tnever,onuse\n\t}\n\n\n\tpublic InventoryPanelCore getNativeInventoryPanel();\n\n\n\tpublic void setPopedUp(Boolean settothis);\n\n\tpublic boolean isPopedUp();\n\n\n\tpublic void setKeepHeldMode(KeepHeldMode mode);\n\tpublic KeepHeldMode getKeepHeldMode();\n\n\n\n\n\t/**\n\t * returns the name of the inventory item associated with this icon\n\t * this should be the same as .sceneobjectsstate().objectsname\n\t * @return\n\t */\n\tpublic String getName();\n\n\t/**\n\t * should trigger a popup to pop if there is one\n\t */\n\tpublic void triggerPopup();\n\n\n\tpublic IsInventoryItemPopupContent getPopup();\n\n\n\t/**\n\t * This gets the widget that represents the visuals needed for a popup\n\t * For GWT apps, this will be something that implements \"asWidget()\"\n\t * @return\n\t */\n\t//public Object getPopupImpl();\n\n\n\tpublic enum IconMode {\t\t\n\t\tImage,Text,CaptionedImage\t\t\n\t}\n\n\n\tpublic SceneObject getAssociatedSceneObject();\n\n\tvoid updateState(InventoryObjectState sceneObjectData, boolean runOnLoad, boolean repositionObjectsRelativeToThis);\n\n\n\t//subclasses have to override these to provide their own more specific types\n\t@Override\t\n\tpublic InventoryObjectState getObjectsCurrentState();\n\n\t@Override\n\tpublic InventoryObjectState getTempState();\n\n\t@Override\n\tpublic InventoryObjectState getInitialState();\n\n\n\t/**\n\t * Setws the popup to appear at a specific zindex\n\t * @param expectedZIndex\n\t */\n\tpublic void setFixedZdepth(int expectedZIndex);\n\n\n\tpublic void setPopupsBackgroundToTransparent();\n\n\n\t/**\n\t * In future inventorys might have two or more modes that visually represent them (ie, text or text and image).\n\t * This might enable gameplay such as selecting a concept from a text list\n\t * @param currentInventoryMode\n\t */\n\tpublic void setIconMode(IconMode currentInventoryMode);\n\n\n\t/**\n\t * should trigger the inventorys onItemAdded commands - first local then global\n\t */\n\tpublic void fireOnItemAddedToInventoryCommands();\n\n\n\t/**\n\t * fired if the item is picked up\n\t * @param b\n\t */\n\tpublic void triggerPickedUp(boolean b);\n\n\n\tpublic void triggerPutDown();\n\t\n\n\n\t\n\n\n\n\n}", "public interface IMachineGlasses \n{\n\t/**\n\t * Called on display ticks with the player to determine if the player can see complex machine interfaces. Return true to allow it.\n\t * @return True to allow the player to see complex machine interfaces.\n\t * @param player The player wearing the gear\n\t */\n\tpublic boolean isVisionary(EntityPlayer player);\n}", "public interface MenuCommands \n{\n public void execute( int idx, Creature c ); \n}", "public interface FlyBehavior {\n public abstract void fly();\n// public abstract void\n}", "public interface AbstractC14507a {\n void onClick(SearchSubTab searchSubTab);\n }", "@Override\r\n\tpublic void fly() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public interface FlyBehavior {\n String fly();\n}", "@Override\n public void interact(Object obj) {\n // TODO: Cave Code - Add additional Agility to the player while on this Tile\n }", "@Override\npublic void noninvesters() {\n\t\n}", "public interface FlyBehavior {\n void fly();\n}", "public interface FlyBehavior {\n void fly();\n}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public interface InterfaceReplacement {\n\n /** The ever present clone method\n */\n public Object clone(); \n\n /** This method will insert the given individual into the population\n * by replacing a individual either from the population or the given\n * subset\n * @param indy The individual to insert\n * @param pop The population\n * @param sub The subset\n */\n public void insertIndividual(AbstractEAIndividual indy, Population pop, Population sub);\n}", "@Override\n\tpublic void onHit() {\n\t\t\n\t}", "public interface IInvocation {\n void invoke();\n}", "public interface IElement extends IBaseElement, IVisible {\n\n /**\n * Get element attribute\n *\n * @param name Specify name for attribute\n * @return Returns chosen attribute\n */\n String getAttribute(String name);\n\n /**\n * @param name Specify attribute name\n * @param value Specify attribute value\n * Waits while attribute gets expected value. Return false if this not happens\n */\n void waitAttribute(String name, String value);\n\n void waitContainsAttribute(String name, String value);\n\n /**\n * @param attributeName Specify attribute name\n * @param value Specify attribute value\n * Sets attribute value for Element\n */\n void setAttribute(String attributeName, String value);\n\n void removeAttribute(String attributeName);\n\n}", "@FutureRelease(version = \"3.0.0\")//$NON-NLS-1$\r\npublic interface ATEListener extends EventListener {\r\n\r\n\t/**\r\n\t * Indicates that the list of Java classes has changed.\r\n\t */\r\n\tpublic void classListChanged();\r\n\r\n\t/**\r\n\t * Indicates that a maze has changed.\r\n\t * \r\n\t * @param maze\r\n\t * \t\t\tThe changed maze.\r\n\t */\r\n\tpublic void mazeChanged(Maze maze);\r\n\r\n\t/**\r\n\t * Indicates that a scenario has changed.\r\n\t * \r\n\t */\r\n\tpublic void scenarioChanged();\r\n\r\n}", "public interface IDetection extends IComponent {\n\t\n\t/**\n\t * Enables subscription of DetectionEvent \n\t */\n\tISubscription addEventHandler(EventType type, IEventHandler<DetectionEvent> handler);\n\t \n\t/**\n\t *Returns a DetectionResult containing (among other things) the moving objects seen in image. \n\t */\n\tDetectionResult getObjInImage(Mat image);\n\n}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public interface Flyable{\r\n\tString fly();\r\n}", "public interface ClickedPosition {\n\n public void getClickedPosition(int position);\n\n}", "public interface e {\n}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "public interface IADCarry extends ILOLRoleAction {\n}", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface AbstractC0273Ek {\n void e();\n}" ]
[ "0.6553645", "0.6309286", "0.629685", "0.6211285", "0.6187746", "0.6110179", "0.60724235", "0.6065377", "0.6040455", "0.6016794", "0.5995005", "0.5986339", "0.59522194", "0.59413815", "0.5933688", "0.59208286", "0.59030217", "0.58994126", "0.58857185", "0.5867717", "0.5861519", "0.58592385", "0.5848535", "0.5831473", "0.58282274", "0.58247876", "0.58133143", "0.58083797", "0.5805683", "0.5800852", "0.5796122", "0.5793005", "0.577345", "0.5769622", "0.5750324", "0.57440335", "0.5736335", "0.5732133", "0.573063", "0.57291985", "0.57197905", "0.5712662", "0.57107455", "0.5697384", "0.5696772", "0.56963795", "0.56961465", "0.5684213", "0.5681616", "0.56768924", "0.56698364", "0.5658639", "0.5652539", "0.564959", "0.5643529", "0.56389165", "0.562683", "0.56239176", "0.56133574", "0.56106883", "0.56098336", "0.5606894", "0.5602152", "0.5601289", "0.55990064", "0.55967045", "0.5596237", "0.55920106", "0.5591383", "0.55911404", "0.5589987", "0.5587927", "0.55837345", "0.55819285", "0.5581567", "0.55807185", "0.55784905", "0.5573218", "0.5572066", "0.557001", "0.55675614", "0.5567503", "0.5567503", "0.55658406", "0.5565781", "0.5561954", "0.5559968", "0.5558658", "0.5557878", "0.5557398", "0.5554189", "0.5554189", "0.5553162", "0.5551499", "0.5545512", "0.5543402", "0.55430114", "0.55420846", "0.5541081", "0.5538945" ]
0.61563516
5
Adding a node at the front of the list
@Test public void addNodeAtFront() { System.out.println("Adding a node at the front of the list"); dll.push(3); dll.push(2); dll.push(1); dll.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void addFront(E item) {\r\n\t\tNode<E> node = new Node<E>(item, first);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;//it would be the first node so it would be first and last\r\n\t\telse {\r\n\t\t\tfirst = node;//creates a new node and puts it in the 1st position\r\n\t\t}\r\n\t}", "public void addToFront(T value) {\n\t\tstart = new Node<T>(value, start);\n\t}", "public void addFrontNode(T a) {\r\n head = new ListNode(a, head);\r\n }", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void addToFront(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(front);\n front = node;\n // modify rear when adding to an empty list\n if (isEmpty()){\n rear = node;\n }\n count++;\n }", "public void addToFront(T elem) {\n\t\tNode newNode = new Node();\n\t\tnewNode.value = elem;\n\t\tnewNode.next = first;\n\t\tfirst = newNode;\t\n\t}", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "void pushFront(T value) throws ListException;", "@Override\n public void addToFront(T data){\n Node<T> temp = new Node<>();\n\n temp.setData(data);\n temp.setNext(head.getNext());\n\n head.setNext(temp);\n }", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void addFront(E d) {\n\t\t// make new node to contain d\n\t\tListNode<E> node = new ListNode<E>(d);\n\t\tif (this.head == null) {\n\t\t\t// the list is empty so make the head point at the node\n\t\t\tthis.head = node;\n\t\t\tthis.last = node;\n\t\t} else {\n\t\t\t// the list it not empty, so the old head's next points at the node\n\t\t\t// the head points at the node\n\t\t\tnode.next = this.head;\n\t\t\tthis.head = node;\n\t\t}\n\t\tthis.size++;\n\t}", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "public void insertAtFrontOfList(T item){\n //if (contains(item) == false){\n MyDoubleNode<T> temp = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n tail.prev = temp;\n temp.next = tail;\n }\n else {\n temp.data = item;\n temp.next = head.next;\n temp.prev = head;\n head.next = temp;\n }\n //}\n }", "public void addFront(int data) //O(1)\n\t{\n\t\tSinglyLinkedListNode node = new SinglyLinkedListNode();\n\t\tnode.setData(data);\n\t\tif(head == null)\n\t\t{\n\t\t\t head = node;\n\t\t\t node.setNext(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnode.setNext(head);\n\t\t\thead = node;\n\t\t}\n\t}", "public void insertAtFront(T data) {\n \t\n \t//create a new node\n Node<T> aNode = new Node<>(data);\n \n //if list is empty we assign a new node as First and Last node;\n if (isEmpty()) { \t\n firstNode = lastNode = aNode;\n } \n //if list is not empty we use setNext method of Node class to link this new node with first\n //other words: firtNode is not first anymore, first node is just new made\n //and AFTER this we say that first node is new node we just made\n else { \n aNode.setNext(firstNode);\n firstNode = aNode;\n }\n }", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addFront (E val) {\n\t\tNode <E> n = new Node(val, head);\n\t\thead = n;\n\t\tcount ++;\n\t}", "private void addNodeAtTheBeginning(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n newNode.next = head;\n head = newNode;\n }", "public void addFirst(E e) { // adds element e to the front of the list\n // TODO\n if (size == 0) {\n tail = new Node<>(e, null);\n tail.setNext(tail);\n } else {\n Node<E> newest = new Node<>(e, tail.getNext());\n tail.setNext(newest);\n }\n size++;\n }", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public void bringToFront(int index) {\n\t\tif (index<this.size()){\n\t\t\tNode front = this.head;\n\t\t\tNode oneBack = new Node(\"\");\n\t\t\tfor (int counter=0; counter < index; counter++){\n\t\t\t\toneBack = front;\n\t\t\t\tfront = front.next;\n\t\t\t}\n\t\t\toneBack.next=front.next;\n\t\t\tfront.next = head;\n\t\t\thead = front;\n\t\t}\n\t}", "public void addFront(int data) {\n\t\t\tNode newNode = new Node(data); \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t//check if head...\r\n\t\t\tif(head == null) {\r\n\t\t\t\thead = newNode;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Move the next pointer of new node to head\r\n\t\t\tnewNode.next = head;\r\n\t\t\t\r\n\t\t\t// assign head to new node \r\n\t\t\thead = newNode;\r\n\t\t}", "public void insertFirst(int data) { // insert at front of list\n\t\tNode newNode = new Node(data); // creation of new node.\n\t\tif (first == null) // means LinkedList is empty.\n\t\t\tlast = newNode; // newNode <--- last\n\t\telse\n\t\t\tfirst.previous = newNode; // newNode <-- old first\n\t\tnewNode.next = first; // newNode --> old first\n\t\tfirst = newNode; // first --> newNode\n\t}", "private void addFront(String x)\n {\n head = new Node(x, head);\n if (tail == null)\n tail = head;\n\n size++;\n }", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "public Node<E> addToBeginning(Node<E> node){\n node.setNext(head.getNext());\n head.getNext().setPrevious(node);\n node.setPrevious(head);\n head.setNext(node);\n size++;\n return node;\n }", "public void addToFront(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null \"\n + \"data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<T>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<T>(data);\n newnode.setNext(head);\n head.setPrevious(newnode);\n head = newnode;\n size += 1;\n }\n }", "public void add(int index, int data){\r\n if (index == 0){\r\n front = ned node(data, front){\r\n } else {\r\n node curr = front;\r\n for (int i = 0; i < index - 1; i++){\r\n curr = curr.next;\r\n }\r\n curr.next = new node(data, curr.next);\r\n }\r\n }\r\n \r\n}", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "public void addFirst(Object value)\n {\n if(last == null && first == null)\n {\n ListNode temp = new ListNode(value, null);\n last = temp;\n first = temp;\n }\n else\n {\n first = new ListNode(value, first);\n }\n \n }", "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "public void addFirst(Object e) {\n if(head == null) {\n tail = head = new Node(e, null, null);\n return;\n }\n\n Node n = new Node(e, null, head);\n head.setPrevious(n);\n head = n;\n }", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public void addfirst(Item item)\r\n {\r\n Node first = pre.next;\r\n Node x = new Node();\r\n x.item = item;\r\n x.prev = pre;\r\n x.next = first;\r\n pre.next = x;\r\n first.prev = x;\r\n n++;\r\n }", "public Node insertBefore(Node node);", "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "void prepend(int element) {\n Node newHead = new Node(element,head);\n head = newHead;\n }", "public void addFirst(Item item) {\n if (item != null) {\n if (size == 0) { // initiation for the first adding\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else { // normal front adding\n Node oldfirst = first;\n first = new Node();\n first.front = null;\n first.item = item;\n first.back = oldfirst;\n oldfirst.front = first;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public void addFirst(T item) {\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, _front, null);\n\t _front.setNext(temp);\n\t _front = temp;\n\t}\n\t_size++;\n }", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "public void addFirst(E item){\r\n\r\n //checking the precondition\r\n\tif(item == null){\r\n\t\tthrow new IllegalArgumentException(\" item cannot equal null \");\r\n\t}\r\n\t\r\n\t//creating a new front of the list\r\n\tDoubleListNode<E> firstNode = new DoubleListNode<E>(end.getPrev(), item, null);\r\n\t\r\n\t//setting the front of the list to the head\r\n\tfirstNode.setNext(head);\r\n\t\r\n\t//setting the head to new first node\r\n\thead = firstNode;\r\n\t\r\n\t//setting the headData\r\n\theadData = head.getData();\r\n\t\r\n\r\n\r\n }", "void addFirst(Key k) {\n\t\tfirstNode = new Node(k, getFirstNode()); // creates new node, pointing to the previous first node and sets it to firstNode\n\t\tif(size++==0) lastNode = firstNode;\n\t}", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "@Override\n\tpublic void insertAtFirst(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tnewNode.setNext(head);\n\t\t\tthis.head = newNode;\n\t\t}\n\t\tlistSize++;\n\t}", "public void addFirst(T item) {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\t// linking\n\t\tnn.next = head;\n\t\thead = nn;\n\n\t}", "private void prepend(T t) {\n Node<T> n = new Node<T>();\n n.data = t;\n n.next = head;\n head = n;\n }", "private void addAsFirst(LinkedList<T>.Node<T> elementZero) {\n\t\telementZero.setPriorNode(itsFirstNode.getPriorNode());\n\t\telementZero.setNextNode(itsFirstNode);\n\t\titsFirstNode.setPriorNode(elementZero);\n\t\titsFirstNode = elementZero;\n\t}", "public Node<T> addFirst(T t) { \r\n Node<T> currFirst = sentinel.next;\r\n Node<T> newNode = new Node<T>(t, sentinel, currFirst);\r\n sentinel.next = newNode;\r\n currFirst.prev = newNode;\r\n size++;\r\n return newNode; \r\n }", "public void addFirst(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n newNode.next = front;\r\n front = newNode;\r\n }\r\n numElements++;\r\n }", "public void addAtFront(double element){\r\n\t head = new DoubleNode(element, head);\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n }", "public void addAtStart(Node node) {\n if(this.head == null) {\n add(node);\n return;\n };\n\n node.next = this.head;\n this.head = node;\n this.length++;\n }", "public void addToFront(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\t\r\n\tif (header == null) {\r\n\t\theader = newNode;\r\n\t}\r\n\tif (trailer == null)\r\n\t\ttrailer = newNode;\r\n\telse {\r\n\t\tnewNode.setLink(header);\r\n\t\theader.setBack(newNode);\r\n\t\theader = newNode;\r\n\t}\r\n\tsize++;\r\n\r\n}", "public void addAtStart(T value) {\n Node<T> newNode = new Node<>();\n newNode.data = value;\n newNode.next = head;\n head = newNode;\n }", "@Override\n public void insertFirst(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node at the start\n // of the list via the head pointer.\n else {\n listHead = new Node(e, listHead);\n }\n }", "public void addFirst(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n \r\n if (size() == 0) {\r\n \r\n front = n;\r\n last = n;\r\n }\r\n \r\n else {\r\n n.next = front;\r\n front = n;\r\n }\r\n \r\n size++; \r\n }", "public void addFirst(Object element)\n {\n Node newNode = new Node();\n newNode.data = element;\n newNode.next = first;\n first = newNode; \n \n }", "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "public void insertAtBeginning(int data) {\r\n //creating node\r\n Node node = new Node(data);\r\n //setting the next reference of node to refer to head or start of list\r\n node.setNext(head);\r\n // setting the head to refer node\r\n head = node;\r\n }", "@Override\n\tpublic void preVisit(ASTNode node) {\n\t\tnodeList.add(node);\n\t}", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "public void insertAtBeginning(int data) {\r\n if(head==null) {\r\n head = new ListNode(data);\r\n return;\r\n }\r\n ListNode new_node = new ListNode(data);\r\n new_node.next=head;\r\n head=new_node;\r\n }", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "public void push_front(T element);", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addFirst() with a null argument\");\n }\n Node<Item> oldFirst = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFirst;\n if (isEmpty()) {\n last = first;\n }\n else {\n // first.prev = oldFirst;\n oldFirst.prev = first;\n }\n n++;\n }", "public void addToStart(Order ord){\n\t\tNode temp= new Node(ord, null, head);\n\t\tif(head!=null){\n\t\t\thead.previous=temp;\n\t\t}\n\t\thead=temp;\t\n\t}", "public void addAtFront(String str) {\n newNode = new Node(str);\n next = newNode.getNext();\n head = newNode;\n }", "public void addFirst(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newFirst = new Node<Item>(item);\n newFirst.next = first;\n first.prev = newFirst;\n first = newFirst;\n }\n size++;\n }", "public void addFirst(E e) {\n this.head = new Node<>(e, head);\t// create and link a new node\r\n if (this.size == 0)\r\n this.tail = this.head;\r\n this.size ++;\r\n }", "public void addFirst(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//Save old first node\n\t\t\tNode<Item> oldFirst = first;\n\t\t\t//assign first node to a new node\n\t\t\tfirst = new Node<Item>();\n\t\t\tfirst.item = item;\n\t\t\tfirst.prev = null;\n\t\t\tfirst.next = oldFirst;\n\t\t\t//link the old first to new first\n\t\t\t//if the first item to add\n\t\t\tif(oldFirst == null){\n\t\t\t\tlast = first;\n\t\t\t}else{\n\t\t\t\toldFirst.prev = first;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t}", "public void addFirst(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.prev = null;\n a.next = first;\n first.prev = a;\n first = a;\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n first = new Node<Item>();\n first.item = item;\n last = first;\n } else {\n Node<Item> oldFrist = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFrist;\n oldFrist.prev = first;\n }\n N++;\n }\n }", "@Override\n\tpublic void prepend(Object data) {\n\t\tNode newNode = new Node(data);\n\t\tnewNode.setNext(this.head);\n\t\thead = newNode;\n\t\tsize++;\n\n\t}", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void addFirst(Item item) {\n Node newNode = new Node();\n newNode.data = item;\n // if the DList was already empty:\n if(isEmpty()) {\n // set the next pointer of newNode to last\n newNode.next=last;\n last.prev = newNode;\n newNode.prev=first;\n first.next = newNode;\n }\n // no need to touch the last sentinel node, unless the list was already empty:\n else {\n // copy the old actual node that frist sentinel was point to\n Node oldFirst = first.next;\n first.next = newNode;\n newNode.next = oldFirst;\n newNode.prev=first;\n oldFirst.prev = newNode;\n }\n // update size\n size++;\n }", "public void addFirst(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(head.getNext());\n head.setNext(newNode);\n newNode.getNext().setPrevious(newNode);\n newNode.setPrevious(head); \n size++;\n }", "public void add(int value) {\n if (front == null) {\n front = new ListNode(value);\n } else {\n ListNode current = front;\n while (current.next != null) {\n current = current.next;\n }\n current.next = new ListNode(value);\n }\n }", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.next = first;\n if (first == null) {\n first = node;\n last = first;\n }\n else {\n first.pre = node;\n first = node;\n }\n len++;\n }", "public void addFirst(E e) {\n\r\n Node newNode = new Node(e,head);\r\n head = newNode;\r\n\r\n if(head.getNext() == null){\r\n tail = head;\r\n }\r\n\r\n }", "public void prepend(Integer data) {\n\t\tListNode tmp = new ListNode(data, head);\n\n\t\tif (null != this.head) {\n\t\t\t// asign new head:make tmp the new head:Step2\n\t\t\tthis.head = tmp;\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element and is new\n\t\t\t// tail as wells as head[see next statement executed]\n\t\t\tthis.tail = tmp;// tmp is new tail\n\t\t}\n\t\tthis.head = tmp;\n\t\tlength++;\n\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "public void addNodeToTheStart(int data){\n Node newNode = new Node(data);\n if(head == null){\n head = newNode;\n }else{\n Node tmp = head;\n head = newNode;\n head.next = tmp;\n }\n }", "public void addFirst(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> next = sentinel.next;\n\n node.next = next;\n next.prev = node;\n sentinel.next = node;\n node.prev = sentinel;\n\n size += 1;\n }", "public void prepend(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n newNode.next = head.next;\n head.next = newNode;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n if (oldFirst == null) {\n last = first;\n } else {\n oldFirst.previous = first;\n }\n size++;\n assert check();\n }", "public void prepend(final T data) {\n Node<T> newNode = new Node<>(data);\n if (head != null) {\n newNode.setNext(head);\n }\n head = newNode;\n numElement++;\n }", "static ListNode insertAtBeginning(ListNode head, int data) {\n\n ListNode newNode = new ListNode(data);\n\n if (head == null) {\n return newNode;\n }\n\n newNode.next = head;\n head = newNode;\n\n return head;\n }", "private void moveToHead(ListNode node) { \n\t removeFromList(node);\n\t addToFront(node);\n\t }", "public Node addfront(Node head,int val){\r\n\t \tif(head==null){\t\t\t\t//if linklist is empty then create linklist\r\n\t \t\thead=new Node(val);\r\n\t \t }\r\n\t \telse{\r\n\t \t\tNode temp=new Node(val);\r\n\t \t\ttemp.next=head;\r\n\t \t\thead=temp;\r\n\t \t}\r\n\t \treturn head;\r\n\t }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> f = first;\n final Node<Item> newNode = new Node<>(null, item, f);\n first = newNode;\n if (f == null)\n last = newNode;\n else\n f.prev = newNode;\n size++;\n }", "public void addAtStart(int item) {\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t\tthis.headNode = new_node;\n\t\t}\n\t\tthis.length++;\n\t}", "private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }" ]
[ "0.7770789", "0.7667742", "0.76114625", "0.75945973", "0.7590917", "0.7554453", "0.7546705", "0.7480215", "0.7406187", "0.7386033", "0.73851633", "0.735937", "0.7358141", "0.73023474", "0.72493416", "0.72436553", "0.72187793", "0.7217704", "0.7216778", "0.7216546", "0.7148643", "0.71307725", "0.7129478", "0.71140736", "0.70977366", "0.7095844", "0.7089712", "0.7088811", "0.7085238", "0.7066465", "0.7055946", "0.704846", "0.70438504", "0.7035724", "0.7003998", "0.70030385", "0.7001114", "0.69855255", "0.6983872", "0.6980997", "0.695949", "0.6957759", "0.695122", "0.6950183", "0.6920181", "0.6897133", "0.6882421", "0.68468297", "0.6842143", "0.6835855", "0.68288285", "0.68255854", "0.6821848", "0.68180853", "0.6812298", "0.68084973", "0.67985165", "0.6794674", "0.6785593", "0.67844266", "0.67774755", "0.6776035", "0.6773809", "0.67632556", "0.67562824", "0.6756067", "0.67532796", "0.67377543", "0.6727846", "0.67253685", "0.6719166", "0.6711966", "0.6707138", "0.6703138", "0.67007554", "0.669086", "0.66868705", "0.66835684", "0.66789913", "0.66745615", "0.6674065", "0.66703314", "0.6670016", "0.6669816", "0.6655197", "0.6653403", "0.6647075", "0.6644301", "0.6641164", "0.66394305", "0.66351473", "0.6631267", "0.6630859", "0.662327", "0.66147137", "0.66125256", "0.66084725", "0.66068715", "0.6604601", "0.6601896" ]
0.78389657
0
/ Given a node as prev_node, insert a new node after the given node
@Test public void addNodeAfterGiveNode() { System.out.println("Given a node as prev_node, insert a new node after the given node "); dll.push(4); dll.push(2); dll.push(1); dll.InsertAfter(dll.head.next, 3); dll.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertAfter(Node prev_node, int new_data) \r\n\t\t{ \r\n\t\t if (prev_node == null) \r\n\t\t { \r\n\t\t System.out.println(\"\\nThe given previous node cannot be null\"); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t new_node.next = prev_node.next; \r\n\t\t prev_node.next = new_node; \r\n\t\t}", "public Node insertAfter(Node node);", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "public void insert_after(int data, Node prev_node){\n if(prev_node == null){\n System.out.println(\"Given Node is null !\");\n return;\n }\n Node cursor = this.head;\n Node new_node = new Node(data);\n new_node.next = prev_node.next;\n prev_node.next = new_node;\n new_node.prev = prev_node;\n if(new_node.next != null){\n new_node.next.prev = new_node;\n }\n System.out.println(\"Node Added !\");\n this.print_list();\n return;\n }", "public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }", "public void insertAfter(Node prevNode, E data) {\n if (isNull(prevNode)) {\n System.out.println(\"PrevNode cannot be null\");\n return;\n }\n\n Node<E> node = new Node<>(data);\n node.previous = prevNode;\n node.next = prevNode.next;\n prevNode.next = node;\n if (nonNull(node.next)) {\n node.next.previous = node;\n }\n }", "public Node setPrevNode(Node node);", "public Node insertBefore(Node node);", "Node insertBefore(Node newChild, Node refChild);", "public void InsertAfter(Node prev_Node, int new_data) {\n\t\tif (prev_Node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\tNode new_node = new Node(new_data); //Create a new node with 8 as data.\n\t\tnew_node.next = prev_Node.next;\n\t\tprev_Node.next = new_node;\n\t\tnew_node.prev = prev_Node;\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.prev = new_node;\n\t}", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "public void insertAfter(Node node, int data) {\n\t\tif (node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\t/* 2. allocate node 3. put in the data */\n\t\tNode new_node = new Node(data);\n\n\t\t/* 4. Make next of new node as next of prev_node */\n\t\tnew_node.next = node.next;\n\n\t\t/* 5. Make the next of prev_node as new_node */\n\t\tnode.next = new_node;\n\n\t\t/* 6. Make prev_node as previous of new_node */\n\t\tnode.previous = node;\n\n\t\t/* 7. Change previous of new_node's next node */\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.previous = new_node;\n\t}", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "public void insertAfterCurrent(T aData) {\r\n\t\t// Can't insert if there is nothing at current\r\n\t\tif (curr == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tListNode newNode = new ListNode(aData, curr.link);\r\n\t\tif (curr != null && prev == null) { // at the head\r\n\t\t\thead.link = newNode; // curr.link = newNode;\r\n\t\t} else if (curr != null && prev != null) { // If it's in the middle\r\n\t\t\tcurr.link = newNode;\r\n\t\t}\r\n\r\n\t}", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "public void setPrevNode(Node<T> prevNode) {\n\t\tthis.prevNode = prevNode;\n\t}", "public native VertexList insertAfter(VertexNode target, VertexNode vertex);", "public void insert(Node newNode)\r\n {\n newNode.prev = prev;\r\n prev.next = newNode;\r\n prev = newNode;\r\n System.out.println(\"Node with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" Inserted before Node with Traffic Data \" + Arrays.toString(trafficEntry.toStringArray()));\r\n }", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "private Node insert(Node curr, Node node) {\n\t\tif(curr==null){\n\t\t\tcurr = node;\n\t\t\treturn curr;\n\t\t}\n\t\telse if(curr.getId() > node.getId()){\n\t\t\t curr.setLeft(insert(curr.getLeft(),node));\n\t\t}\n\t\telse if(curr.getId() < node.getId()){\n\t\t\t curr.setRight(insert(curr.getRight(),node));\n\t\t}\n\t\treturn curr;\n\t}", "public void insertAfter(ListNode next){\n ListNode cur = this.next;\n this.next = next;\n next.next = cur;\n }", "public void setPrev(Node<T> prev) {\n\t\tthis.prev = prev;\n\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "public Node appendNode(Node node);", "@Override\r\n\t\tpublic Node insertBefore(Node newChild, Node refChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}", "private void addNode(DLinkedNode node) {\n\t\tnode.prev = head;\n\t\tnode.next = head.next;\n\n\t\thead.next.prev = node;\n\t\thead.next = node;\n\t}", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }", "private void addBetween(E e, Node<E> previous, Node<E> after) {\n\t\tNode<E> newest = new Node<E>(e, previous, after);\n\t\tprevious.setNext(newest);\n\t\tafter.setPrev(newest);\n\t\tsize++;\n\t}", "public void setPrev(Node prev)\r\n\t{\r\n\t\tthis.prev = prev;\r\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void setPrev(DNode newPrev) { prev = newPrev; }", "void insert(ListNode pNode) {\n\t\tpPrev = pNode.pPrev;\r\n\t\tpNext = pNode;\r\n\t\tpNode.pPrev.pNext = this;\r\n\t\tpNode.pPrev = this;\r\n\t}", "public Node setNextNode(Node node);", "public void setPrev(Node prev) {\n this.prev = prev;\n }", "private Node insertNode(Node parent, Node curr, EventPair eventPair) {\n\t\tif(curr == null || curr.isNull)\n\t\t{\n\t\t\tif(parent != null)\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.RED, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.BLACK, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean toLeft = false;\n\t\t\tif(curr.ID > eventPair.ID)\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.left, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.left = n;\n\t\t\t\ttoLeft = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.right, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.right = n;\n\t\t\t\ttoLeft = false;\n\t\t\t}\n\t\t\tif(toLeft) {\n\t\t\t\tif(curr.color == Color.RED && curr.left.color == Color.RED) {\n\t\t\t\t\tNode sibling = getSibling(curr);\n\t\t\t\t\tif(sibling == null || sibling.color == Color.BLACK) {\n\t if(isLeftChild(curr)) {\n\t rotateRight(curr, true);\n\t } else {\n\t \trotateRight(curr.left, false);\n\t curr = curr.parent;\n\t rotateLeft(curr, true);\n\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t curr.parent.color = Color.RED;\n\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(curr.color == Color.RED && curr.right.color == Color.RED) {\n\t Node sibling = getSibling(curr);\n\t if(sibling == null || sibling.color == Color.BLACK) {\n\t if(!isLeftChild(curr)) {\n\t \trotateLeft(curr, true);\n\t } else {\n\t \trotateLeft(curr.right, false);\n\t \tcurr = curr.parent;\n\t rotateRight(curr, true);\n\t }\n\t } else {\n\t \tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t \tcurr.parent.color = Color.RED;\n\t }\n\t }\n\t }\n\t\t\t}\n\t\t}\n\t\treturn curr;\n\t}", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "public void addNodeBefore(CustomerNode<Customer> target, CustomerNode<Customer> c){\r\n\t\tsize++;\r\n\t\tCustomerNode<Customer> temp = new CustomerNode<Customer>(new Customer(c.getElement().getArrivalTime(), \r\n\t\t\t\tc.getElement().getID(), c.getElement().getOrderTime(), \r\n\t\t\t\tc.getElement().getPaid(), c.getElement().getPatience()));\r\n\t\tif(target == first){\r\n\t\t\ttemp.setNext(target);\r\n\t\t\ttarget.setPrev(temp);\r\n\t\t\tfirst = temp;\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttemp.setNext(target);\r\n\t\ttemp.setPrev(target.getPrev());\r\n\t\ttarget.setPrev(temp);\r\n\t\ttemp.getPrev().setNext(temp);\r\n\t}", "public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }", "private void addElementNode(BaleElement nbe,int prior)\n{\n if (nbe.getBubbleType() != BaleFragmentType.NONE) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n if (cur_parent == root_element) {\n\t int j = -1;\n\t for (int i = new_children.size() - 1; i >= 0; --i) {\n\t BaleElement celt = new_children.get(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < new_children.size()) {\n\t BaleElement celt = new_children.remove(j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n else {\n\t int j = -1;\n\t for (int i = cur_parent.getElementCount() - 1; i >= 0; --i) {\n\t BaleElement celt = cur_parent.getBaleElement(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < cur_parent.getElementCount()) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent != root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = cur_parent.getElementCount();\n prior -= 1;\t\t\t// is this what we want?\n int j = n-prior;\n for (int i = 0; i < prior; ++ i) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent == root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = new_children.size();\n int j = n-prior+1;\n for (int i = 0; i < prior-1; ++ i) {\n\t BaleElement celt = new_children.get(j);\n\t new_children.remove(j);\n\t bbe.add(celt);\n }\n }\n\n if (cur_parent == root_element) {\n new_children.add(nbe);\n }\n else {\n cur_parent.add(nbe);\n }\n}", "public void insertBefore( DLLNode<T> current, T data ){\n\t\t//UNUSED METHOD.....\n\t\t\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData(data);\n\t\t\n\t\tnewNode.setNext(current);\n\t\tcurrent.setPrev(newNode);\n\t\thead = newNode;\n\t\t\n\t\t//DL deleted\n//\t\tnewNode.setPrev(current.getPrev());\n//\t\tnewNode.setNext(current);\n//\t\tcurrent.setPrev(newNode);\n//\t\tcurrent.getPrev().setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "private void insert(Node<E> x) {\n\t\tlast = last.next = x;\n\t}", "void sortedInsert(Node newnode) {\r\n\t\tif (sorted == null || sorted.data >= newnode.data) {\r\n\t\t\tnewnode.next = sorted;\r\n\t\t\tsorted = newnode;\r\n\t\t} else {\r\n\t\t\tNode current = sorted;\r\n\t\t\t/* Locate the node before the point of insertion */\r\n\t\t\twhile (current.next != null && current.next.data < newnode.data) {\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\tnewnode.next = current.next;\r\n\t\t\tcurrent.next = newnode;\r\n\t\t}\r\n\t}", "public void insertAfterData(int data,int newData){\n Node node = head;\n Node newNode = new Node(newData);\n while (node != null && node.data != data){\n node = node.next;\n }\n\n if (node == null){\n System.out.println(\"Not possible\");\n return;\n }\n\n Node tempNode = node.next;\n if (tempNode == null){\n node.next = newNode;\n newNode.prev = node;\n }else {\n node.next = newNode;\n newNode.next = tempNode;\n newNode.prev = node;\n tempNode.prev = newNode;\n }\n }", "public void insert(Node n);", "public native VertexList insertBefore(VertexNode target, VertexNode vertex);", "public void insertAfter( DLLNode<T> current, T data ){\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t\n\t\t//DL's code\n\t\tDLLNode<T> nextNode = current.next;\n\t\t\n\t\tnewNode.setPrev( current );\n\t\t//DL's code\n\t\tnewNode.setNext( nextNode );\n\t\t\n\t\t//DL's code\n\t\tif (nextNode != null)\n\t\t\tnextNode.setPrev(newNode);\t\t\t\n\t\t\t//current.getPrev().setNext( newNode );\n\t\t\n\t\t//DL's code\n\t\tcurrent.setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "public static native Element insertBefore(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertBefore(elem, sibling);\r\n\t}-*/;", "private void recursiveInsert(eNode head_ref, eNode toInsert)\r\n {\r\n if(head_ref.getNext() == null)\r\n head_ref.setNext(toInsert);\r\n else\r\n recursiveInsert(head_ref.getNext(), toInsert);\r\n }", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "protected void linkBeforeNode(Node<U> newNode, Node<U> node) {\n\t\t\tmLength++;\n\t\t\tif (mHead == null) {\n\t\t\t\tmHead = newNode;\n\t\t\t\tmTail = newNode;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (node == null) {\n\t\t\t\tnode = mHead;\n\t\t\t}\n\t\t\tif (node == mHead) {\n\t\t\t\tmHead = newNode;\n\t\t\t}\n\n\t\t\tnewNode.setNext(node);\n\t\t\tif (node.getPrev() != null) {\n\t\t\t\tnode.getPrev().setNext(newNode);\n\t\t\t}\n\t\t\tnewNode.setPrev(node.getPrev());\n\t\t\tnode.setPrev(newNode);\n\t\t}", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "public void setPrevNode(int node) {\n\t\tthis.previousNode = node;\n\t}", "public void setPrevious(DoubleNode<T> node)\n {\n\n previous = node;\n }", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void insertBefore(int value, int newVal) {\n try {\n ListNode nodeValue = new ListNode(value);\n ListNode newValue = new ListNode(newVal);\n ListNode current = this.root;\n\n while (current.data != value) {\n current = current.next;\n }\n newValue.next = current.next;\n current.next = newValue;\n } catch (NullPointerException e) {\n System.out.println(\"You have reached the end of the list.\");\n }\n }", "public void setPrevious(Node<T> previous) {\r\n this.previous = previous;\r\n }", "public static native Element insertAfter(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(elem, sibling);\r\n\t}-*/;", "HNode getPreviousSibling();", "public Node<T> addAfter(Node<T> listNode, T t) \r\n {\r\n Node<T> afterNewNode = listNode.next;\r\n Node<T> newNode = new Node<T>(t, listNode, afterNewNode);\r\n listNode.next = newNode;\r\n afterNewNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void add(Node n){\n Node after = head.next;\n head.next = n;\n n.next = after;\n n.prev = head;\n after.prev = n;\n return;\n }", "public void insert(int x){\n Node new_node = new Node(x); \n new_node.next = head;\n new_node.prev = null;\n if(head != null)\n head.prev = new_node;\n head = new_node;\n }", "public void insertAtBack(T data) {\n \t//we create a new node\n Node<T> aNode = new Node<>(data);\n //and again if there is no node we make a new node as first and last node\n if (isEmpty()) {\n firstNode = lastNode = aNode;\n } \n //otherwise we set a new node as last node\n //and we assign to last node the next node of the last one\n //so the last node is new created node now\n else {\n lastNode.setNext(aNode);\n lastNode = lastNode.getNext();\n }\n }", "public void recInsertNode(TriLinkNode curNode)\r\n {\r\n if(curNode.i1==true&&curNode.i2==true)\r\n {\r\n if(temp.v1<curNode.v1)\r\n {\r\n if(curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else\r\n {\r\n curNode.left=temp;\r\n curNode.left.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v2)\r\n {\r\n if(curNode.right!=null)\r\n {\r\n recInsertNode(curNode.right);\r\n }else\r\n {\r\n curNode.right=temp;\r\n curNode.right.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v1&&temp.v1<curNode.v2)\r\n {\r\n if(curNode.down!=null)\r\n {\r\n recInsertNode(curNode.down);\r\n }else\r\n {\r\n curNode.down=temp;\r\n curNode.down.up=curNode;\r\n }\r\n }\r\n }else if(temp.v1>curNode.v1)\r\n {\r\n curNode.v2=temp.v1;\r\n curNode.d2=false;\r\n curNode.i2=true;\r\n }else if(temp.v1<curNode.v1&&curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else if(temp.v1<curNode.v1&&curNode.left==null)\r\n {\r\n curNode.left=temp;\r\n }\r\n }", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "private void addBetween(E e, Node<E> predecessor, Node<E> successor) {\n Node<E> newest = new Node<>(e, predecessor, successor);\n predecessor.setNext(newest);\n successor.setPrev(newest);\n size++;\n }", "public void insert(SplayNode n) {\n\t\t\t SplayNode y = null;\n\t\t\t SplayNode temp = this.root;\n\t\t while(temp != null) {\n\t\t y = temp;\n\t\t if(n.data < temp.data)\n\t\t temp = temp.left;\n\t\t else\n\t\t temp = temp.right;\n\t\t }\n\t\t n.parent = y;\n\n\t\t if(y == null) //newly added node is root\n\t\t this.root = n;\n\t\t else if(n.data < y.data)\n\t\t y.left = n;\n\t\t else\n\t\t y.right = n;\n\n\t\t this.splay(n);\n\t\t }", "public void setPrevious(Node p) {\n previous = p;\n }", "public void addBeforeLastChild(Element parent, Element child) {\r\n\t\tNode lastChild = parent.getLastChild();\r\n\t\tNode beforeLastChild = lastChild.getPreviousSibling();\r\n\t\tif (child.getNodeName() == beforeLastChild.getNodeName()) {\r\n\t\t\tparent.replaceChild(child, beforeLastChild);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tparent.insertBefore(child, lastChild);\t\t\t\r\n\t\t}\t\t\r\n\t}", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "void before(final Node currentNode);", "public void addNode(Node newNode){\r\n\t\t\tNode temp = this.head;\r\n\t\t\tnewNode.prev = null;\r\n\t\t\tif(this.head == null){\r\n\t\t\t\tthis.head = newNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twhile(temp.next!=null){\r\n\t\t\t\t\ttemp = temp.next;\r\n\t\t\t\t}\r\n\t\t\t\ttemp.next = newNode;\r\n\t\t\t\tnewNode.prev = temp;\r\n\t\t\t}\r\n\t\t}", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public void setPrev(Node p)\n {\n p.next = this.prev.next;\n p.prev = this.prev;\n this.prev.next = p;\n this.prev = p;\n }", "public void addToStart(Order ord){\n\t\tNode temp= new Node(ord, null, head);\n\t\tif(head!=null){\n\t\t\thead.previous=temp;\n\t\t}\n\t\thead=temp;\t\n\t}", "public abstract Position<E> insertLeftSibling(Position<E> p, E e);", "public abstract Position<E> insertRightSibling(Position<E> p, E e);", "static Node push(Node head_ref, Node new_node) {\n // since we are adding at the beginning,\n // prev is always null\n new_node.prev = null;\n\n // link the old list off the new node\n new_node.next = (head_ref);\n\n // change prev of head node to new node\n if ((head_ref) != null) (head_ref).prev = new_node;\n\n // move the head to point to the new node\n (head_ref) = new_node;\n return head_ref;\n }", "private void insert(Node node) {\n//\t\t//A*\n\t\topen.add(node);\n\t\tCollections.sort(open);\n//\t\t\n//\t\t//dfs\n//\t\topen.add(0, node);\n\t\t\n\t\t//bfs\n//\t\topen.add(node);\n\t}", "public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "public void append(Node newNode)\r\n {\n newNode.prev = this;\r\n newNode.next = next;\r\n if (next != null)\r\n {\r\n next.prev = newNode;\r\n }\r\n next = newNode;\r\n System.out.println(\"Node added with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" added ontop of \" \r\n + prev.trafficEntry.convertToString());\r\n \r\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "private static void insertAtHead(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=head;\n\tnewnode.prev=null;\n\tif(head!=null)\n\t\thead.prev=newnode;\n\thead=newnode;\n\t\n}", "public void addSiblingAfterNode(Node siblingNode, String nodeToAdd) throws Exception {\n if (siblingNode == null || nodeToAdd == null)\n return;\n if (fileContents == null) {\n fileContents = convertFileToStringArray(m_file);\n }\n\n Integer endTagLineNumber = getEndTagLineNumber(siblingNode);\n\n String endLine = fileContents[endTagLineNumber - 1];\n String newLine = endLine + getIndentation(siblingNode) + nodeToAdd + FILE_NEW_LINE;\n if (bDebug) {\n System.out.println(\"Old line: \" + endLine);\n System.out.println(\"New line: \" + newLine);\n }\n fileContents[endTagLineNumber - 1] = newLine;\n\n }", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}" ]
[ "0.788065", "0.78140384", "0.7654028", "0.75912696", "0.75235796", "0.751474", "0.74724954", "0.74656206", "0.734163", "0.7149875", "0.69374275", "0.6922505", "0.6723341", "0.6654801", "0.66070926", "0.6583837", "0.65777594", "0.6563741", "0.6539221", "0.6523541", "0.65184194", "0.65055627", "0.65044665", "0.64716357", "0.64592755", "0.6457938", "0.64574856", "0.6444346", "0.6418444", "0.6406898", "0.6378122", "0.637167", "0.63184226", "0.6311048", "0.63055634", "0.629959", "0.62978196", "0.62920135", "0.6287772", "0.62872463", "0.6258357", "0.62549514", "0.62427074", "0.624018", "0.62385166", "0.6206575", "0.6201634", "0.61912555", "0.61455894", "0.61439574", "0.61433333", "0.6140439", "0.613423", "0.6123864", "0.6098802", "0.6091089", "0.60908586", "0.608175", "0.6072389", "0.60621953", "0.6060076", "0.60554135", "0.60550004", "0.60483897", "0.60478175", "0.6017596", "0.60090387", "0.60057974", "0.6005324", "0.5992876", "0.5980462", "0.5973772", "0.5969823", "0.5968845", "0.5956496", "0.59551245", "0.5950748", "0.59421355", "0.59345406", "0.5927524", "0.5925951", "0.5921799", "0.5911054", "0.5902518", "0.5899796", "0.58977026", "0.5896488", "0.58874196", "0.58749455", "0.5854706", "0.5843619", "0.5840879", "0.5839735", "0.58391565", "0.5825724", "0.5824206", "0.58116406", "0.5806951", "0.57995135", "0.5797457" ]
0.77529293
2
/ Given a node as prev_node, insert a new node after the given node
@Test public void addNodeBeforeGiveNode() { System.out.println("Given a node as prev_node, insert a new node Before the given node "); dll.push(4); dll.push(3); dll.push(1); dll.InsertBefore(dll.head.next, 2); dll.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertAfter(Node prev_node, int new_data) \r\n\t\t{ \r\n\t\t if (prev_node == null) \r\n\t\t { \r\n\t\t System.out.println(\"\\nThe given previous node cannot be null\"); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t new_node.next = prev_node.next; \r\n\t\t prev_node.next = new_node; \r\n\t\t}", "public Node insertAfter(Node node);", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "public void insert_after(int data, Node prev_node){\n if(prev_node == null){\n System.out.println(\"Given Node is null !\");\n return;\n }\n Node cursor = this.head;\n Node new_node = new Node(data);\n new_node.next = prev_node.next;\n prev_node.next = new_node;\n new_node.prev = prev_node;\n if(new_node.next != null){\n new_node.next.prev = new_node;\n }\n System.out.println(\"Node Added !\");\n this.print_list();\n return;\n }", "public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }", "public void insertAfter(Node prevNode, E data) {\n if (isNull(prevNode)) {\n System.out.println(\"PrevNode cannot be null\");\n return;\n }\n\n Node<E> node = new Node<>(data);\n node.previous = prevNode;\n node.next = prevNode.next;\n prevNode.next = node;\n if (nonNull(node.next)) {\n node.next.previous = node;\n }\n }", "public Node setPrevNode(Node node);", "public Node insertBefore(Node node);", "Node insertBefore(Node newChild, Node refChild);", "public void InsertAfter(Node prev_Node, int new_data) {\n\t\tif (prev_Node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\tNode new_node = new Node(new_data); //Create a new node with 8 as data.\n\t\tnew_node.next = prev_Node.next;\n\t\tprev_Node.next = new_node;\n\t\tnew_node.prev = prev_Node;\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.prev = new_node;\n\t}", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "public void insertAfter(Node node, int data) {\n\t\tif (node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\t/* 2. allocate node 3. put in the data */\n\t\tNode new_node = new Node(data);\n\n\t\t/* 4. Make next of new node as next of prev_node */\n\t\tnew_node.next = node.next;\n\n\t\t/* 5. Make the next of prev_node as new_node */\n\t\tnode.next = new_node;\n\n\t\t/* 6. Make prev_node as previous of new_node */\n\t\tnode.previous = node;\n\n\t\t/* 7. Change previous of new_node's next node */\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.previous = new_node;\n\t}", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "public void insertAfterCurrent(T aData) {\r\n\t\t// Can't insert if there is nothing at current\r\n\t\tif (curr == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tListNode newNode = new ListNode(aData, curr.link);\r\n\t\tif (curr != null && prev == null) { // at the head\r\n\t\t\thead.link = newNode; // curr.link = newNode;\r\n\t\t} else if (curr != null && prev != null) { // If it's in the middle\r\n\t\t\tcurr.link = newNode;\r\n\t\t}\r\n\r\n\t}", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }", "void reorderNode(LinkedEntries.LinkNode insert, LinkedEntries.LinkNode before) {\n removeNode(insert);\n if (before == null) {\n addNode(insert, getHeader());\n } else {\n addNode(insert, before);\n }\n }", "public void setPrevNode(Node<T> prevNode) {\n\t\tthis.prevNode = prevNode;\n\t}", "public native VertexList insertAfter(VertexNode target, VertexNode vertex);", "public void insert(Node newNode)\r\n {\n newNode.prev = prev;\r\n prev.next = newNode;\r\n prev = newNode;\r\n System.out.println(\"Node with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" Inserted before Node with Traffic Data \" + Arrays.toString(trafficEntry.toStringArray()));\r\n }", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "private Node insert(Node curr, Node node) {\n\t\tif(curr==null){\n\t\t\tcurr = node;\n\t\t\treturn curr;\n\t\t}\n\t\telse if(curr.getId() > node.getId()){\n\t\t\t curr.setLeft(insert(curr.getLeft(),node));\n\t\t}\n\t\telse if(curr.getId() < node.getId()){\n\t\t\t curr.setRight(insert(curr.getRight(),node));\n\t\t}\n\t\treturn curr;\n\t}", "public void insertAfter(ListNode next){\n ListNode cur = this.next;\n this.next = next;\n next.next = cur;\n }", "public void setPrev(Node<T> prev) {\n\t\tthis.prev = prev;\n\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "public Node appendNode(Node node);", "@Override\r\n\t\tpublic Node insertBefore(Node newChild, Node refChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}", "private void addNode(DLinkedNode node) {\n\t\tnode.prev = head;\n\t\tnode.next = head.next;\n\n\t\thead.next.prev = node;\n\t\thead.next = node;\n\t}", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }", "private void addBetween(E e, Node<E> previous, Node<E> after) {\n\t\tNode<E> newest = new Node<E>(e, previous, after);\n\t\tprevious.setNext(newest);\n\t\tafter.setPrev(newest);\n\t\tsize++;\n\t}", "public void setPrev(Node prev)\r\n\t{\r\n\t\tthis.prev = prev;\r\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void setPrev(DNode newPrev) { prev = newPrev; }", "void insert(ListNode pNode) {\n\t\tpPrev = pNode.pPrev;\r\n\t\tpNext = pNode;\r\n\t\tpNode.pPrev.pNext = this;\r\n\t\tpNode.pPrev = this;\r\n\t}", "public Node setNextNode(Node node);", "public void setPrev(Node prev) {\n this.prev = prev;\n }", "private Node insertNode(Node parent, Node curr, EventPair eventPair) {\n\t\tif(curr == null || curr.isNull)\n\t\t{\n\t\t\tif(parent != null)\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.RED, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlastInsertedNode = createNode(eventPair, Color.BLACK, parent);\n\t\t\t\treturn lastInsertedNode;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean toLeft = false;\n\t\t\tif(curr.ID > eventPair.ID)\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.left, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.left = n;\n\t\t\t\ttoLeft = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tNode n = insertNode(curr, curr.right, eventPair);\n\t\t\t\tif (n == curr.parent)\n\t\t\t\t\treturn n;\n\t\t\t\tcurr.right = n;\n\t\t\t\ttoLeft = false;\n\t\t\t}\n\t\t\tif(toLeft) {\n\t\t\t\tif(curr.color == Color.RED && curr.left.color == Color.RED) {\n\t\t\t\t\tNode sibling = getSibling(curr);\n\t\t\t\t\tif(sibling == null || sibling.color == Color.BLACK) {\n\t if(isLeftChild(curr)) {\n\t rotateRight(curr, true);\n\t } else {\n\t \trotateRight(curr.left, false);\n\t curr = curr.parent;\n\t rotateLeft(curr, true);\n\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t curr.parent.color = Color.RED;\n\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(curr.color == Color.RED && curr.right.color == Color.RED) {\n\t Node sibling = getSibling(curr);\n\t if(sibling == null || sibling.color == Color.BLACK) {\n\t if(!isLeftChild(curr)) {\n\t \trotateLeft(curr, true);\n\t } else {\n\t \trotateLeft(curr.right, false);\n\t \tcurr = curr.parent;\n\t rotateRight(curr, true);\n\t }\n\t } else {\n\t \tcurr.color = Color.BLACK;\n\t sibling.color = Color.BLACK;\n\t if(curr.parent.parent != null) {\n\t \tcurr.parent.color = Color.RED;\n\t }\n\t }\n\t }\n\t\t\t}\n\t\t}\n\t\treturn curr;\n\t}", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "public void addNodeBefore(CustomerNode<Customer> target, CustomerNode<Customer> c){\r\n\t\tsize++;\r\n\t\tCustomerNode<Customer> temp = new CustomerNode<Customer>(new Customer(c.getElement().getArrivalTime(), \r\n\t\t\t\tc.getElement().getID(), c.getElement().getOrderTime(), \r\n\t\t\t\tc.getElement().getPaid(), c.getElement().getPatience()));\r\n\t\tif(target == first){\r\n\t\t\ttemp.setNext(target);\r\n\t\t\ttarget.setPrev(temp);\r\n\t\t\tfirst = temp;\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttemp.setNext(target);\r\n\t\ttemp.setPrev(target.getPrev());\r\n\t\ttarget.setPrev(temp);\r\n\t\ttemp.getPrev().setNext(temp);\r\n\t}", "public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }", "private void addElementNode(BaleElement nbe,int prior)\n{\n if (nbe.getBubbleType() != BaleFragmentType.NONE) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n if (cur_parent == root_element) {\n\t int j = -1;\n\t for (int i = new_children.size() - 1; i >= 0; --i) {\n\t BaleElement celt = new_children.get(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < new_children.size()) {\n\t BaleElement celt = new_children.remove(j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n else {\n\t int j = -1;\n\t for (int i = cur_parent.getElementCount() - 1; i >= 0; --i) {\n\t BaleElement celt = cur_parent.getBaleElement(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < cur_parent.getElementCount()) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent != root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = cur_parent.getElementCount();\n prior -= 1;\t\t\t// is this what we want?\n int j = n-prior;\n for (int i = 0; i < prior; ++ i) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent == root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = new_children.size();\n int j = n-prior+1;\n for (int i = 0; i < prior-1; ++ i) {\n\t BaleElement celt = new_children.get(j);\n\t new_children.remove(j);\n\t bbe.add(celt);\n }\n }\n\n if (cur_parent == root_element) {\n new_children.add(nbe);\n }\n else {\n cur_parent.add(nbe);\n }\n}", "public void insertBefore( DLLNode<T> current, T data ){\n\t\t//UNUSED METHOD.....\n\t\t\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData(data);\n\t\t\n\t\tnewNode.setNext(current);\n\t\tcurrent.setPrev(newNode);\n\t\thead = newNode;\n\t\t\n\t\t//DL deleted\n//\t\tnewNode.setPrev(current.getPrev());\n//\t\tnewNode.setNext(current);\n//\t\tcurrent.setPrev(newNode);\n//\t\tcurrent.getPrev().setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "private void insert(Node<E> x) {\n\t\tlast = last.next = x;\n\t}", "void sortedInsert(Node newnode) {\r\n\t\tif (sorted == null || sorted.data >= newnode.data) {\r\n\t\t\tnewnode.next = sorted;\r\n\t\t\tsorted = newnode;\r\n\t\t} else {\r\n\t\t\tNode current = sorted;\r\n\t\t\t/* Locate the node before the point of insertion */\r\n\t\t\twhile (current.next != null && current.next.data < newnode.data) {\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\tnewnode.next = current.next;\r\n\t\t\tcurrent.next = newnode;\r\n\t\t}\r\n\t}", "public void insertAfterData(int data,int newData){\n Node node = head;\n Node newNode = new Node(newData);\n while (node != null && node.data != data){\n node = node.next;\n }\n\n if (node == null){\n System.out.println(\"Not possible\");\n return;\n }\n\n Node tempNode = node.next;\n if (tempNode == null){\n node.next = newNode;\n newNode.prev = node;\n }else {\n node.next = newNode;\n newNode.next = tempNode;\n newNode.prev = node;\n tempNode.prev = newNode;\n }\n }", "public void insert(Node n);", "public native VertexList insertBefore(VertexNode target, VertexNode vertex);", "public void insertAfter( DLLNode<T> current, T data ){\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t\n\t\t//DL's code\n\t\tDLLNode<T> nextNode = current.next;\n\t\t\n\t\tnewNode.setPrev( current );\n\t\t//DL's code\n\t\tnewNode.setNext( nextNode );\n\t\t\n\t\t//DL's code\n\t\tif (nextNode != null)\n\t\t\tnextNode.setPrev(newNode);\t\t\t\n\t\t\t//current.getPrev().setNext( newNode );\n\t\t\n\t\t//DL's code\n\t\tcurrent.setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "public static native Element insertBefore(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertBefore(elem, sibling);\r\n\t}-*/;", "private void recursiveInsert(eNode head_ref, eNode toInsert)\r\n {\r\n if(head_ref.getNext() == null)\r\n head_ref.setNext(toInsert);\r\n else\r\n recursiveInsert(head_ref.getNext(), toInsert);\r\n }", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "protected void linkBeforeNode(Node<U> newNode, Node<U> node) {\n\t\t\tmLength++;\n\t\t\tif (mHead == null) {\n\t\t\t\tmHead = newNode;\n\t\t\t\tmTail = newNode;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (node == null) {\n\t\t\t\tnode = mHead;\n\t\t\t}\n\t\t\tif (node == mHead) {\n\t\t\t\tmHead = newNode;\n\t\t\t}\n\n\t\t\tnewNode.setNext(node);\n\t\t\tif (node.getPrev() != null) {\n\t\t\t\tnode.getPrev().setNext(newNode);\n\t\t\t}\n\t\t\tnewNode.setPrev(node.getPrev());\n\t\t\tnode.setPrev(newNode);\n\t\t}", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "public void setPrevNode(int node) {\n\t\tthis.previousNode = node;\n\t}", "public void setPrevious(DoubleNode<T> node)\n {\n\n previous = node;\n }", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void insertBefore(int value, int newVal) {\n try {\n ListNode nodeValue = new ListNode(value);\n ListNode newValue = new ListNode(newVal);\n ListNode current = this.root;\n\n while (current.data != value) {\n current = current.next;\n }\n newValue.next = current.next;\n current.next = newValue;\n } catch (NullPointerException e) {\n System.out.println(\"You have reached the end of the list.\");\n }\n }", "public void setPrevious(Node<T> previous) {\r\n this.previous = previous;\r\n }", "public static native Element insertAfter(Element elem, Element sibling)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(elem, sibling);\r\n\t}-*/;", "HNode getPreviousSibling();", "public Node<T> addAfter(Node<T> listNode, T t) \r\n {\r\n Node<T> afterNewNode = listNode.next;\r\n Node<T> newNode = new Node<T>(t, listNode, afterNewNode);\r\n listNode.next = newNode;\r\n afterNewNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void add(Node n){\n Node after = head.next;\n head.next = n;\n n.next = after;\n n.prev = head;\n after.prev = n;\n return;\n }", "public void insert(int x){\n Node new_node = new Node(x); \n new_node.next = head;\n new_node.prev = null;\n if(head != null)\n head.prev = new_node;\n head = new_node;\n }", "public void insertAtBack(T data) {\n \t//we create a new node\n Node<T> aNode = new Node<>(data);\n //and again if there is no node we make a new node as first and last node\n if (isEmpty()) {\n firstNode = lastNode = aNode;\n } \n //otherwise we set a new node as last node\n //and we assign to last node the next node of the last one\n //so the last node is new created node now\n else {\n lastNode.setNext(aNode);\n lastNode = lastNode.getNext();\n }\n }", "public void recInsertNode(TriLinkNode curNode)\r\n {\r\n if(curNode.i1==true&&curNode.i2==true)\r\n {\r\n if(temp.v1<curNode.v1)\r\n {\r\n if(curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else\r\n {\r\n curNode.left=temp;\r\n curNode.left.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v2)\r\n {\r\n if(curNode.right!=null)\r\n {\r\n recInsertNode(curNode.right);\r\n }else\r\n {\r\n curNode.right=temp;\r\n curNode.right.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v1&&temp.v1<curNode.v2)\r\n {\r\n if(curNode.down!=null)\r\n {\r\n recInsertNode(curNode.down);\r\n }else\r\n {\r\n curNode.down=temp;\r\n curNode.down.up=curNode;\r\n }\r\n }\r\n }else if(temp.v1>curNode.v1)\r\n {\r\n curNode.v2=temp.v1;\r\n curNode.d2=false;\r\n curNode.i2=true;\r\n }else if(temp.v1<curNode.v1&&curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else if(temp.v1<curNode.v1&&curNode.left==null)\r\n {\r\n curNode.left=temp;\r\n }\r\n }", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "private void addBetween(E e, Node<E> predecessor, Node<E> successor) {\n Node<E> newest = new Node<>(e, predecessor, successor);\n predecessor.setNext(newest);\n successor.setPrev(newest);\n size++;\n }", "public void insert(SplayNode n) {\n\t\t\t SplayNode y = null;\n\t\t\t SplayNode temp = this.root;\n\t\t while(temp != null) {\n\t\t y = temp;\n\t\t if(n.data < temp.data)\n\t\t temp = temp.left;\n\t\t else\n\t\t temp = temp.right;\n\t\t }\n\t\t n.parent = y;\n\n\t\t if(y == null) //newly added node is root\n\t\t this.root = n;\n\t\t else if(n.data < y.data)\n\t\t y.left = n;\n\t\t else\n\t\t y.right = n;\n\n\t\t this.splay(n);\n\t\t }", "public void setPrevious(Node p) {\n previous = p;\n }", "public void addBeforeLastChild(Element parent, Element child) {\r\n\t\tNode lastChild = parent.getLastChild();\r\n\t\tNode beforeLastChild = lastChild.getPreviousSibling();\r\n\t\tif (child.getNodeName() == beforeLastChild.getNodeName()) {\r\n\t\t\tparent.replaceChild(child, beforeLastChild);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tparent.insertBefore(child, lastChild);\t\t\t\r\n\t\t}\t\t\r\n\t}", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void insertAtFront(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // firstNode refers to new node\n\t\t\tnode.nextNode = firstNode;\n\t\t\tfirstNode = node;\n\t\t\t// you can replace the two previous lines with this line: firstNode\n\t\t\t// = new ListNode( insertItem, firstNode );\n\t\t}\n\t\tsize++;\n\t}", "void before(final Node currentNode);", "public void addNode(Node newNode){\r\n\t\t\tNode temp = this.head;\r\n\t\t\tnewNode.prev = null;\r\n\t\t\tif(this.head == null){\r\n\t\t\t\tthis.head = newNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twhile(temp.next!=null){\r\n\t\t\t\t\ttemp = temp.next;\r\n\t\t\t\t}\r\n\t\t\t\ttemp.next = newNode;\r\n\t\t\t\tnewNode.prev = temp;\r\n\t\t\t}\r\n\t\t}", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "public void setPrev(Node p)\n {\n p.next = this.prev.next;\n p.prev = this.prev;\n this.prev.next = p;\n this.prev = p;\n }", "public void addToStart(Order ord){\n\t\tNode temp= new Node(ord, null, head);\n\t\tif(head!=null){\n\t\t\thead.previous=temp;\n\t\t}\n\t\thead=temp;\t\n\t}", "public abstract Position<E> insertLeftSibling(Position<E> p, E e);", "public abstract Position<E> insertRightSibling(Position<E> p, E e);", "static Node push(Node head_ref, Node new_node) {\n // since we are adding at the beginning,\n // prev is always null\n new_node.prev = null;\n\n // link the old list off the new node\n new_node.next = (head_ref);\n\n // change prev of head node to new node\n if ((head_ref) != null) (head_ref).prev = new_node;\n\n // move the head to point to the new node\n (head_ref) = new_node;\n return head_ref;\n }", "private void insert(Node node) {\n//\t\t//A*\n\t\topen.add(node);\n\t\tCollections.sort(open);\n//\t\t\n//\t\t//dfs\n//\t\topen.add(0, node);\n\t\t\n\t\t//bfs\n//\t\topen.add(node);\n\t}", "public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "public void append(Node newNode)\r\n {\n newNode.prev = this;\r\n newNode.next = next;\r\n if (next != null)\r\n {\r\n next.prev = newNode;\r\n }\r\n next = newNode;\r\n System.out.println(\"Node added with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" added ontop of \" \r\n + prev.trafficEntry.convertToString());\r\n \r\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "private static void insertAtHead(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=head;\n\tnewnode.prev=null;\n\tif(head!=null)\n\t\thead.prev=newnode;\n\thead=newnode;\n\t\n}", "public void addSiblingAfterNode(Node siblingNode, String nodeToAdd) throws Exception {\n if (siblingNode == null || nodeToAdd == null)\n return;\n if (fileContents == null) {\n fileContents = convertFileToStringArray(m_file);\n }\n\n Integer endTagLineNumber = getEndTagLineNumber(siblingNode);\n\n String endLine = fileContents[endTagLineNumber - 1];\n String newLine = endLine + getIndentation(siblingNode) + nodeToAdd + FILE_NEW_LINE;\n if (bDebug) {\n System.out.println(\"Old line: \" + endLine);\n System.out.println(\"New line: \" + newLine);\n }\n fileContents[endTagLineNumber - 1] = newLine;\n\n }", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}" ]
[ "0.788065", "0.78140384", "0.77529293", "0.75912696", "0.75235796", "0.751474", "0.74724954", "0.74656206", "0.734163", "0.7149875", "0.69374275", "0.6922505", "0.6723341", "0.6654801", "0.66070926", "0.6583837", "0.65777594", "0.6563741", "0.6539221", "0.6523541", "0.65184194", "0.65055627", "0.65044665", "0.64716357", "0.64592755", "0.6457938", "0.64574856", "0.6444346", "0.6418444", "0.6406898", "0.6378122", "0.637167", "0.63184226", "0.6311048", "0.63055634", "0.629959", "0.62978196", "0.62920135", "0.6287772", "0.62872463", "0.6258357", "0.62549514", "0.62427074", "0.624018", "0.62385166", "0.6206575", "0.6201634", "0.61912555", "0.61455894", "0.61439574", "0.61433333", "0.6140439", "0.613423", "0.6123864", "0.6098802", "0.6091089", "0.60908586", "0.608175", "0.6072389", "0.60621953", "0.6060076", "0.60554135", "0.60550004", "0.60483897", "0.60478175", "0.6017596", "0.60090387", "0.60057974", "0.6005324", "0.5992876", "0.5980462", "0.5973772", "0.5969823", "0.5968845", "0.5956496", "0.59551245", "0.5950748", "0.59421355", "0.59345406", "0.5927524", "0.5925951", "0.5921799", "0.5911054", "0.5902518", "0.5899796", "0.58977026", "0.5896488", "0.58874196", "0.58749455", "0.5854706", "0.5843619", "0.5840879", "0.5839735", "0.58391565", "0.5825724", "0.5824206", "0.58116406", "0.5806951", "0.57995135", "0.5797457" ]
0.7654028
3
Adding a node at the end of the list
@Test public void addNodeAtEnd() { System.out.println("Adding a node at the End of the list"); dll.append(1); dll.append(2); dll.append(3); dll.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "private void addNodeAtTheEnd(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n ListNode current = head;\n while (current.next != null) {\n current = current.next;\n }\n current.next = newNode;\n }", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "public void addANodeToEnd(E addData)\n\n\t{\n\t\tNode position = head;\n\t\t// when the link is null, stop the loop and add a node \n\t\twhile (position.link != null) {\n\t\t\t// get next node\n\t\t\tposition = position.link;\n\t\t}\n\t\t// add a new node to the end\n\t\tposition.link = new Node(addData, null);\n\n\t}", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "@Override\n public void addToEnd(T data){\n Node<T> dataNode = new Node<>();\n\n dataNode.setData(data);\n dataNode.setNext(null);\n\n Node<T> tempHead = this.head;\n while(tempHead.getNext() != null) {\n tempHead = tempHead.getNext();\n }\n\n tempHead.setNext(dataNode);\n }", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "public void addLastNode(E e){\r\n ListNode n = new ListNode(e, null);\r\n if(head == null) head = n;\r\n else {\r\n ListNode c = head;\r\n while(c.getLink() != null){\r\n c = c.getLink();\r\n }\r\n c.setLink(n);\r\n }\r\n }", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "public void addNodeToTheEnd(int data){\n Node newNode = new Node(data);\n if(head == null){\n head = newNode;\n }else{\n // Very Important!\n Node last = head;\n while(last.next != null){\n last = last.next;\n }\n // Make iteration with while loop first, find the last node and add the new Node out of While loop!\n last.next=newNode;\n }\n }", "public void addToTheLast(Node node) \n\t{\n\t\tif (head == null) \n\t\t{\n\t\t\thead = node;\n\t\t} else \n\t\t{\n\t\t Node temp = head;\n\t\t while (temp.next != null)\n\t\t temp = temp.next;\n\t\t temp.next = node;\n\t\t}\n }", "public void addLast(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> prev = sentinel.prev;\n\n node.prev = prev;\n prev.next = node;\n sentinel.prev = node;\n node.next = sentinel;\n\n size += 1;\n }", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public void addLast(Object e) {\n if(head == null) {\n addFirst(e);\n return;\n }\n\n Node n = new Node(e, tail, null);\n tail.setNext(n);\n tail = n;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "public void addEnd(int data) {\n\t\tNode newNode = new Node(data);\n\n\t\tif(head == null) {\n\t\t\thead = newNode;\n\t\t} else {\n\t\t\tNode temp = head;\n\n\t\t\twhile(temp.next != null) {\n\t\t\t\ttemp = temp.next;\n\t\t\t}\n\t\t\ttemp.next = newNode;\n\t\t}\n\t}", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "public void addAtEnd( int d ) {\n\t\tif( head == null ) {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\thead = tail = temp;\n\n\t\t} else {\n\t\t\tNode temp = new Node();\n\t\t\ttemp.data = d;\n\n\t\t\ttail.next = temp;\n\t\t\ttail = tail.next;\n\t\t}\n\t}", "public void appendNodeToEnd(Node n){\n\t Node end = n;\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "public void addLast(Object data) {\n Node newNode = new Node(data);\n if(isEmpty()) {\n addFirst(data);\n } else {\n tail.next = newNode;\n tail = newNode;\n size ++;\n }\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "@Override\n\tpublic void insertAtLast(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tNode<T> tmpNode = this.head;\n\t\t\twhile (tmpNode.getNext() != null) {\n\t\t\t\ttmpNode = tmpNode.getNext();\n\t\t\t}\n\t\t\ttmpNode.setNext(newNode);\n\t\t}\n\t\tlistSize++;\n\t}", "public Node<T> addAfter(Node<T> listNode, T t) \r\n {\r\n Node<T> afterNewNode = listNode.next;\r\n Node<T> newNode = new Node<T>(t, listNode, afterNewNode);\r\n listNode.next = newNode;\r\n afterNewNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addLast(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newLast = new Node<Item>(item);\n last.next = newLast;\n newLast.prev = last;\n last = newLast;\n }\n size++;\n }", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public void addLastNode(int data)\n {\n if (tail == null)\n head = tail = new Node(data); //empty list\n else\n {\n tail.next = new Node(data); //link new node as last node\n tail = tail.next; //make tail pointer points to last node\n }\n }", "public Node<T> addLast(T t) { \r\n Node<T> currLast = sentinel.prev;\r\n Node<T> newNode = new Node<T>(t, currLast, sentinel);\r\n currLast.next = newNode;\r\n sentinel.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addLast(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(tail);\n tail.getPrevious().setNext(newNode);\n newNode.setPrevious(tail.getPrevious());\n tail.setPrevious(newNode);\n size++;\n }", "public Node appendNode(Node node);", "public void addLast(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//save old last node\n\t\t\tNode<Item> oldLast = last;\n\t\t\t//assign last node to a new node\n\t\t\tlast = new Node<Item>();\n\t\t\tlast.item = item;\n\t\t\tlast.next = null;\n\t\t\tlast.prev = oldLast;\n\t\t\t//if the first item to add\n\t\t\tif(oldLast == null){\n\t\t\t\tfirst = last;\n\t\t\t}else{\n\t\t\t\toldLast.next = last;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t\t\t\n\t}", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "private void addEnd(String x)\n {\n if (tail == null)\n {\n tail = new Node(x, null);\n head = tail;\n }\n else\n {\n tail.next = new Node(x, null);\n tail = tail.next;\n }\n size++;\n }", "public final void addLast(Node n) {\n this.tail.set(n);\n this.tail = n;\n this.size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addLast() with a null argument\");\n }\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if (isEmpty()) {\n first = last;\n }\n else {\n oldLast.next = last;\n last.prev = oldLast;\n }\n n++;\n }", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (tail == null) {\n\t\t\thead = node;\n\t\t} else {\n\t\t\ttail.next = node;\n\t\t\tnode.prev = tail;\n\t\t}\n\t\ttail = node;\n\t\tnode.next = null;\n\t\tN++;\n\t}", "public void addEnd(Type value){\n if( !this.isEmpty() ){\n this.end = new MyDoubleNode(value, this.end, null);\n this.end.prev.next = this.end;\n }else{\n this.start = this.end = new MyDoubleNode(value);\n }\n this.size++;\n }", "public void addLast(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = last;\n last.next = a;\n last = a;\n\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n\n }", "public void addLast(E e) {\n\r\n if(head == null){\r\n addFirst(e);\r\n } else {\r\n\r\n Node newNode = new Node(e);\r\n tail.setNext(newNode);\r\n tail = newNode;\r\n\r\n }\r\n\r\n }", "@Override\n public boolean add(ListNode e) {\n if (this.size() != 0){\n ListNode last = this.getLast();\n last.setNext(e);\n }\n return super.add(e);\n }", "public void addLast(Item x);", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "public void append(int nodeValue)\n {\n ListNode newNode = new ListNode(nodeValue);\n\n // Check if the head is null\n if(this.head == null && this.tail == null)\n {\n this.head = newNode;\n this.tail = newNode;\n } else {\n\n ListNode currNode = this.head;\n ListNode prevNode = this.head;\n\n // Traverse the list\n while(currNode.getNextNode() != null)\n {\n // System.out.println(\"STUCK\");\n // System.out.println(\"CURRENT NODE VALUE: \" + currNode.getValue());\n // System.out.println(\"NEXT NODE FROM CURRENT: \" + currNode.getNextNode().getValue());\n prevNode = currNode;\n currNode = currNode.getNextNode();\n \n }\n\n // Wire the two nodes together\n currNode.setNextNode(newNode);\n newNode.setPrevNode(currNode);\n this.tail = newNode;\n }\n\n this.size = size + 1;\n\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null item\");\n\t\t}\n\n\t\tNode node = new Node(item);\n\t\tif (last == null) {\n\t\t\tfirst = last = node;\n\t\t} else {\n\t\t\tnode.previous = last;\n\t\t\tlast.next = node;\n\t\t\tlast = node;\n\t\t}\n\t\tsize++;\n\n\t}", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "public void addlast(Item item)\r\n {\r\n Node last = post.prev;\r\n Node x = new Node();\r\n x.item = item;\r\n x.next = post;\r\n x.prev = last;\r\n post.prev = x;\r\n last.next = x;\r\n n++;\r\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldlast = last;\n last = new Node<>();\n last.item = item;\n last.previous = oldlast;\n if (oldlast == null) {\n first = last;\n } else {\n oldlast.next = last;\n }\n size++;\n assert check();\n }", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "public void addLast(Object item){\n //Using the getNode() method to retrieve the reference and then call addAfter()\n MovieNode target = getNode(size);\t//yo retreive the last MovieNode\n addAfter(target, item);\t\t\t//call the addAfter method \n }", "public void addLast(E item);", "public void addLast(Item item) {\n\t\tif (item == null) throw new NullPointerException();\n\n\t\tcount++;\n\n\t\tNode lastNode = new Node();\n\t\tlastNode.item = item;\n\t\tif (count > 1) {\n\t\t\tlastNode.previous = last;\n\t\t\tlast.next = lastNode;\n\t\t} else {\n\t\t\tfirst = lastNode;\n\t\t}\n\t\tlast = lastNode;\t\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = node;\n } else {\n tail.next = node;\n node.prev = tail;\n tail = node;\n }\n size++;\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n\n if (this.last == null) {\n this.last = new Node();\n this.last.item = item;\n this.first = this.last;\n } else {\n Node newlast = new Node();\n newlast.item = item;\n newlast.prev = this.last;\n this.last.next = newlast;\n this.last = newlast;\n }\n this.n++;\n }", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "private void addNode(Node<AnyType> t) {\n \n if ( isEmpty() ) {\n \n headNode = t;\n tailNode = headNode;\n \n } else { \n \n Node<AnyType> node = getNode( size-1 );\n node.setNextNode( t );\n t.setPreviousNode( node );\n \n tailNode = t;\n \n }\n \n size++;\n \n }", "public synchronized void addLast(DoubleLinkedListNodeInt node) {\n\t\tnode.setNext(tail);\n\t\tnode.setPrev(tail.getPrev());\n\t\tnode.getPrev().setNext(node);\n\t\ttail.setPrev(node);\n\t\tnode.setOwnerList(this);\n\t\tsize++;\n\t}", "void addNode()\n {\n Node newNode = new Node(this.numNodes);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n }", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "public void addLast(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldlast = last;\n last = new Node(item);\n\n if (isEmpty()) {\n first = last;\n } else {\n oldlast.next = last;\n last.prev = oldlast;\n }\n size++;\n }", "public void addLast(Item item) {\n this.doublyLinkedList.addLast(item);\n\n }", "public Node addAtEnd(Node head, int data) {\n if (head == null) {\n head = new Node(data);\n } else {\n Node currentNode = head;\n //traverse till end of linked list\n while (currentNode.next != null) {\n currentNode = currentNode.next;\n }\n currentNode.next = new Node(data);\n }\n return head;\n }", "public void addBack(E data) {\r\n\t\tNode<E> node = new Node<E>(data);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;\r\n\t\telse {\r\n\t\t\tlast = last.next = node;//the last node's next node will be the new node - at the end\r\n\t\t}\r\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n if (this.size == 0) {\n addFirst(item);\n } else {\n this.last.next = new Node(item, null, this.last);\n this.last = this.last.next;\n this.size++;\n }\n }", "public Node insertAfter(Node node);", "public void addLast(Item item) { // initiation\n if (item != null) {\n if (size == 0) {\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else {\n Node oldlast = last;\n last = new Node();\n last.back = null;\n last.item = item;\n last.front = oldlast;\n oldlast.back = last;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void insertEnd(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = new Node(item, head, head.before); // creates a new node\n head.before.next = temp;\n head.before = temp;\n }\n size++;\n }", "public void addToEnd( int newdata ) {\t\t\r\n\t\tif( link == null )\r\n\t\t\tlink = new IntNode( newdata, null );\r\n\t\telse {\r\n\t\t\tIntNode current = link;\r\n\t\t\twhile( current.link != null ) {\r\n\t\t\t\tcurrent = current.link;\r\n\t\t\t} // end while\r\n\t\t\tIntNode newNode = new IntNode( newdata, null );\r\n\t\t\tcurrent.link = newNode;\r\n\t\t} // end else\r\n\t}", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public Node<E> append(Node<E> node){\n this.addToEnd(node);\n return node;\n }", "public void addLast(Item x) {\n StuffNode last = new StuffNode(x, sentinel, null);\n if (this.isEmpty()) {\n last.prev = sentinel;\n sentinel.next = last;\n } else {\n StuffNode oldlast = sentinel.prev;\n last.prev = oldlast;\n oldlast.next = last; // SO MUCH PAIN!!!\n }\n this.sentinel.prev = last;\n size += 1;\n\n }", "public void addToLast(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\tnewNode.setLink(null);\r\n\t\r\n\tif (trailer == null) {\r\n\t\ttrailer = newNode;\r\n\t\theader = newNode;\r\n\t}\r\n\telse {\r\n\t\ttrailer.setLink(newNode);\r\n\t\tnewNode.setBack(trailer);\r\n\t\ttrailer = newNode;\t\t\r\n\t}\r\n\t\r\n\tsize++;\r\n}", "public PersistentLinkedList<T> addLast(T data) {\n return add(this.treeSize, data);\n }", "public void addLast(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n rear.next = newNode;\r\n rear = newNode;\r\n }\r\n numElements++;\r\n }", "public void appendToEnd(T data){\n\t Node end = new Node(data);\n\t Node current = this;\n\t \n\t while(current.next != null){\n\t current = current.next;\n\t }\n\t \n\t current.next = end;\n\t //System.out.println(current.next.data);\n\t }", "void addLast(Key key) {\n\t\tlastNode.next = new Node(key, null);\n\t\tlastNode = lastNode.next;\n\t\tsize++;\n\t}", "@Override\n public void insertLast(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node to the end\n // of the list via the tail pointer.\n else {\n listTail.next = new Node(e, listTail.next);\n listTail = listTail.next;\n }\n }", "@Override\n\tpublic boolean add(E e) {\n\t\tNode<E> element = new Node<E>(e);\n\t\t// 2. Traverse to end of list\n\t\tif (root == null) {\n\t\t\troot = element;\n\t\t} else {\n\t\t\ttail.setNext(element);\n\t\t\telement.setBefore(tail);\n\t\t}\n\t\ttail = element;\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void addLast(E item){\r\n }", "static ListNode insertAtEnding(ListNode head, int data) {\n\n ListNode newNode = new ListNode(data);\n\n if (head == null) {\n return newNode;\n }\n\n ListNode current = head;\n\n while (current.next != null) {\n\n current = current.next;\n }\n current.next = newNode;\n\n return head;\n }", "void append(E data) {\n Node<E> node = new Node<>(data);\n if (isNull(head)) {\n head = node;\n return;\n }\n\n Node<E> last = head;\n while (nonNull(last.next)) {\n last = last.next;\n }\n\n last.next = node;\n node.previous = last;\n }", "void append(SNode node);", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "void append(int new_data) {\n\t\tNode new_node = new Node(new_data);\n\t\tNode last = head;\n\t\tnew_node.next = null;\n\t\tif (head == null) {\n\t\t\tnew_node.prev = null;\n\t\t\thead = new_node;\n\t\t\treturn;\n\t\t}\n\t\twhile (last.next != null)\n\t\t\tlast = last.next;\n\t\tlast.next = new_node;\n\t\tnew_node.prev = last;\n\t}", "public void addLast(MemoryBlock block) {\n\t\tNode clone = head.previous; \n\t\tNode newNode = new Node(block);\n\t\tnewNode.previous = clone;\n\t\tnewNode.next = head;\n\t\thead.previous = newNode;\n\t\tclone.next = newNode;\n\t\tsize++;\n\t}", "public void addLast(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n n.element = element;\r\n \r\n if (size == 0) {\r\n front = n;\r\n last = n;\r\n }\r\n \r\n else {\r\n last.next = n;\r\n last = n;\r\n }\r\n \r\n size++;\r\n }", "@Override\n public void insertAtEnd(T value) {\n Node<T> new_node = new Node<T>(value);\n if (start == null) {\n start = new_node;\n }\n if (end == null) {\n end = new_node;\n } else {\n end.next = new_node;\n end = new_node;\n }\n\n }", "public void append(int new_data) \r\n\t\t{ \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t \r\n\t\t if (head == null) \r\n\t\t { \r\n\t\t head = new Node(new_data); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t new_node.next = null; \r\n\t\t \r\n\t\t Node last = head; \r\n\t\t while (last.next != null) \r\n\t\t last = last.next; \r\n\t\t \r\n\t\t last.next = new_node; \r\n\t\t return; \r\n\t\t}", "public void addLast(T listItem) {\n add(listItem);\n }", "public void addLast(String data){\n tail = new Node(data, null, tail);\n Node second = tail.prev;\n if(second!=null)\n second.next = tail;\n else\n head = tail;\n size++;\n }", "public void addLast(T element);", "public void appendNode(ListNode<E> node) {\r\n\t\tif (last != null) {\r\n\t\t\tlast.next = node;\r\n\t\t\tlast = last.next;\r\n\t\t} else {\r\n\t\t\theader.next = node;\r\n\t\t\tlast = node;\r\n\t\t\t;\r\n\t\t}\r\n\t}", "public void addLast(String item) {\r\n\t\tNode next = header;\r\n\t\twhile (next.next != null) {\r\n\t\t\tnext = next.next;\r\n\t\t}\r\n\t\tNode n = new Node();\r\n\t\tn.value = item;\r\n\t\tnext.next = n;\r\n\t\tn.previous = next;\r\n\r\n\t}" ]
[ "0.76207745", "0.7517215", "0.7479667", "0.74223226", "0.7372176", "0.7329301", "0.7274425", "0.72684", "0.72423476", "0.72237116", "0.7214414", "0.71976346", "0.7190773", "0.7174107", "0.71496135", "0.71072966", "0.71023077", "0.70947087", "0.7079569", "0.70744956", "0.7074292", "0.70678586", "0.70667714", "0.7060954", "0.7038347", "0.7036473", "0.7028377", "0.70227575", "0.7016774", "0.7009276", "0.70051116", "0.7001534", "0.6999775", "0.6998755", "0.69983244", "0.6987947", "0.69769657", "0.69646597", "0.6961675", "0.6961058", "0.6960715", "0.6956914", "0.69532144", "0.69484335", "0.6947118", "0.694709", "0.6935756", "0.69267255", "0.6921814", "0.691576", "0.6910299", "0.6902512", "0.6900611", "0.6895387", "0.688997", "0.6888326", "0.68831176", "0.68822634", "0.6873111", "0.68686455", "0.68599147", "0.6832581", "0.6823544", "0.6802929", "0.6799796", "0.6790482", "0.6788398", "0.6784382", "0.67756176", "0.6773958", "0.6763617", "0.6760461", "0.6731378", "0.67255765", "0.67248595", "0.67219865", "0.6718074", "0.67158145", "0.6708575", "0.67064166", "0.6696297", "0.6693936", "0.6693542", "0.6693047", "0.6691347", "0.6689628", "0.66892666", "0.66835684", "0.66794395", "0.6669516", "0.6665488", "0.6664309", "0.66596395", "0.6651242", "0.6646699", "0.66383874", "0.66239107", "0.66236657", "0.6622623", "0.6605351" ]
0.7955855
0
/ There isn't enough memory to open up more than a couple camera photos / So prescale the target bitmap into which the file is decoded / Get the size of the ImageView
private void setPic() { int targetW = Constant.sRealWidth; int targetH = Constant.sRealHeight; /* Get the size of the image */ BitmapFactory.Options bmOptions = new BitmapFactory.Options(); bmOptions.inJustDecodeBounds = true; BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions); int photoW = bmOptions.outWidth; int photoH = bmOptions.outHeight; /* Figure out which way needs to be reduced less */ int scaleFactor = 1; if ((targetW > 0) || (targetH > 0)) { scaleFactor = Math.min(photoW/targetW, photoH/targetH); } /* Set bitmap options to scale the image decode target */ bmOptions.inJustDecodeBounds = false; bmOptions.inSampleSize = scaleFactor; bmOptions.inPurgeable = true; /* Decode the JPEG file into a Bitmap */ Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions); int rotate = ViewUtils.handleRotateBitmap(mCurrentPhotoPath); if (rotate != 0) { bitmap = ViewUtils.rotaingBitmap( rotate, bitmap); } /* Associate the Bitmap to the ImageView */ mPictureView.setImageBitmap(bitmap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getBitmapSize(Uri uri) {\n InputStream is = null;\n try {\n\n is = getInputStream(uri);\n\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(is, null, options);\n\n width = options.outWidth;\n height = options.outHeight;\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException ignored) {\n }\n }\n }\n }", "private void resizePhoto() {\n if (photoPath.length() == 0) {\n return;\n }\n Log.d(LOG_TAG, \"Path dell' immagine: \" + photoPath);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoPath, options);\n\n options = new BitmapFactory.Options();\n\n options.inJustDecodeBounds = true;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n Log.d(LOG_TAG, \"Width:\" + bitmapWidth + \" height:\" + bitmapHeight);\n\n options.inSampleSize = calculateInSampleSize(options, bitmapWidth, bitmapHeight);\n\n options.inJustDecodeBounds = false;\n //halfHorizontal = bitmapWidth / 2;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n\n }", "private void setPic() {\n int targetW = imageView.getMaxWidth();\n int targetH = imageView.getMaxHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n bitmap = Bitmap.createScaledBitmap(bitmap, 1280, 960,false);\n Log.d(\"demo\", \"setPic: \"+ bitmap.getWidth()+\" \"+bitmap.getHeight());\n Log.d(\"demo\", \"setPic: \"+ bitmap.getByteCount()/1000);\n imageView.setImageBitmap(bitmap);\n }", "@Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = getBitmapSize(bitmap) / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }", "private Bitmap getScaledBitmap(ImageView imageView) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n\n int scaleFactor = Math.min(\n options.outWidth / imageView.getWidth(),\n options.outHeight / imageView.getHeight()\n );\n options.inJustDecodeBounds = false;\n options.inSampleSize = scaleFactor;\n options.inPurgeable = true;\n return BitmapFactory.decodeFile(currentImagePath, options);\n }", "@Override\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getByteCount() / 1024;\n }", "public static Bitmap decodeBitmapSize(Bitmap bm, int IMAGE_BIGGER_SIDE_SIZE) {\n Bitmap b = null;\r\n\r\n\r\n //convert Bitmap to byte[]\r\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);\r\n byte[] byteArray = stream.toByteArray();\r\n\r\n //We need to know image width and height, \r\n //for it we create BitmapFactory.Options object and do BitmapFactory.decodeByteArray\r\n //inJustDecodeBounds = true - means that we do not need load Bitmap to memory\r\n //but we need just know width and height of it\r\n BitmapFactory.Options opt = new BitmapFactory.Options();\r\n opt.inJustDecodeBounds = true;\r\n BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt);\r\n int CurrentWidth = opt.outWidth;\r\n int CurrentHeight = opt.outHeight;\r\n\r\n\r\n //there is function that can quick scale images\r\n //but we need to give in scale parameter, and scale - it is power of 2\r\n //for example 0,1,2,4,8,16...\r\n //what scale we need? for example our image 1000x1000 and we want it will be 100x100\r\n //we need scale image as match as possible but should leave it more then required size\r\n //in our case scale=8, we receive image 1000/8 = 125 so 125x125, \r\n //scale = 16 is incorrect in our case, because we receive 1000/16 = 63 so 63x63 image \r\n //and it is less then 100X100\r\n //this block of code calculate scale(we can do it another way, but this way it more clear to read)\r\n int scale = 1;\r\n int PowerOf2 = 0;\r\n int ResW = CurrentWidth;\r\n int ResH = CurrentHeight;\r\n if (ResW > IMAGE_BIGGER_SIDE_SIZE || ResH > IMAGE_BIGGER_SIDE_SIZE) {\r\n while (1 == 1) {\r\n PowerOf2++;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n if (Math.max(ResW, ResH) < IMAGE_BIGGER_SIDE_SIZE) {\r\n PowerOf2--;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n\r\n\r\n //Decode our image using scale that we calculated\r\n BitmapFactory.Options opt2 = new BitmapFactory.Options();\r\n opt2.inSampleSize = scale;\r\n //opt2.inScaled = false;\r\n b = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt2);\r\n\r\n\r\n //calculating new width and height\r\n int w = b.getWidth();\r\n int h = b.getHeight();\r\n if (w >= h) {\r\n w = IMAGE_BIGGER_SIDE_SIZE;\r\n h = (int) ((double) b.getHeight() * ((double) w / b.getWidth()));\r\n } else {\r\n h = IMAGE_BIGGER_SIDE_SIZE;\r\n w = (int) ((double) b.getWidth() * ((double) h / b.getHeight()));\r\n }\r\n\r\n\r\n //if we lucky and image already has correct sizes after quick scaling - return result\r\n if (opt2.outHeight == h && opt2.outWidth == w) {\r\n return b;\r\n }\r\n\r\n\r\n //we scaled our image as match as possible using quick method\r\n //and now we need to scale image to exactly size\r\n b = Bitmap.createScaledBitmap(b, w, h, true);\r\n\r\n\r\n return b;\r\n }", "@Override\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getByteCount() / 1024;\n }", "@Override\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getByteCount() / 1024;\n }", "@Override\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getByteCount() / 1024;\n }", "public MyBmpInfo getThumbnail(Uri uri) {\n int w = 1280;\n int h = 960;\n double TARGETTED_WIDTH = 1920.0;\n\n try {\n InputStream input = this.getContentResolver().openInputStream(uri);\n\n BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();\n onlyBoundsOptions.inJustDecodeBounds = true;\n onlyBoundsOptions.inDither = true;//optional\n onlyBoundsOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//optional\n BitmapFactory.decodeStream(input, null, onlyBoundsOptions);\n input.close();\n\n if ((onlyBoundsOptions.outWidth == -1) || (onlyBoundsOptions.outHeight == -1)) {\n return null;\n }\n\n int originalWidth = onlyBoundsOptions.outWidth;\n\n double ratio = 1.0;\n if (originalWidth > TARGETTED_WIDTH){\n\n /*\n * Ratio Sample Size:\n * if 1 , means bitmap is exactly stay as orginal.\n * if 2 or above, means 1/2 or smaller from the ori image.*/\n ratio = originalWidth / TARGETTED_WIDTH;\n }\n\n BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();\n bitmapOptions.inSampleSize = (int)Math.round(ratio);\n\n Log.d(\"bitmap scaled info\", \"ratio = \"+ratio+\" , poweredRatio = \"+bitmapOptions.inSampleSize+\", originalWidth = \"+originalWidth+\" , TARGETTED_WIDTH = \"+TARGETTED_WIDTH);\n\n bitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//\n input = this.getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(input, null, bitmapOptions);\n// bitmap.compress(Bitmap.CompressFormat.JPEG, 100, )\n input.close();\n Log.d(\"elliot\", \"bitmap before resize: SIZE = \" + bitmap.getWidth() + \" x \" + bitmap.getHeight());\n if (bitmap.getWidth() < w || bitmap.getHeight() < h) {\n return new MyBmpInfo(bitmap, \"Image is too small\", true);\n } else {\n return new MyBmpInfo(Bitmap.createScaledBitmap(bitmap, w, h, true), \"\", false);\n }\n\n } catch (Exception e) {\n return null;\n }\n }", "private static Bitmap getImageResized(Context context, Uri imageUri) {\r\n if (context == null || imageUri == null) {\r\n return null;\r\n }\r\n\r\n Bitmap bitmap;\r\n int[] sampleSizes = new int[]{5, 3, 2, 1};\r\n int i = 0;\r\n do {\r\n bitmap = decodeBitmap(context, imageUri, sampleSizes[i]);\r\n Log.d(\"Resizer\", \"new bitmap width = \" + bitmap.getWidth());\r\n i++;\r\n } while (bitmap.getWidth() < DEFAULT_MIN_WIDTH_QUALITY && i < sampleSizes.length);\r\n\r\n return bitmap;\r\n }", "private void getImgSize(){\n imgSizeX = 1080; //mAttacher.getDisplayRect().right - mAttacher.getDisplayRect().left;\n imgSizeY = 888.783f; //mAttacher.getDisplayRect().bottom - mAttacher.getDisplayRect().top;\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)\n @Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = bitmap.getByteCount() / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }", "private void previewCapturedImage(){\n \ttry{\n \t\timgPreview.setVisibility(View.VISIBLE);\n \t\t\n \t\t//Bitmap Factory\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t\t\n \t\t//Downsizing image as it throws OutOfMemory Exception for large images\n \t\toptions.inSampleSize = 4;\n \t\t\n \t\tfinal Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);\n \t\t\n \t\timgPreview.setImageBitmap(bitmap);\n \t}catch(NullPointerException e){\n \t\te.printStackTrace();\n \t}catch(OutOfMemoryError e){\n \t\te.printStackTrace();\n \t}\n }", "@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n float a = (float) viewHolder.img2.getWidth() / (float) loadedImage.getWidth();\n viewHolder.img2.setImageBitmap(resize(loadedImage, a));\n }", "private Bitmap decodeBitmapImage(int image) {\n int targetW = 300;\n int targetH = 300;\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n\n BitmapFactory.decodeResource(getResources(), image,\n bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n return BitmapFactory.decodeResource(getResources(), image,\n bmOptions);\n }", "@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n float a = (float) viewHolder.img2.getWidth() / (float) loadedImage.getWidth();\n viewHolder.img2.setImageBitmap(resize(loadedImage, a));\n }", "public void updateParametersPictureSize() {\n if (this.mCameraDevice == null) {\n Log.w(TAG, \"attempting to set picture size without camera device\");\n return;\n }\n String pictureSizeKey;\n this.mCameraSettings.setSizesLocked(false);\n SettingsManager settingsManager = this.mActivity.getSettingsManager();\n if (isCameraFrontFacing()) {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_FRONT;\n } else {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_BACK;\n }\n String pictureSize = settingsManager.getString(SettingsManager.SCOPE_GLOBAL, pictureSizeKey, SettingsUtil.getDefaultPictureSize(isCameraFrontFacing()));\n Size size = new Size(960, MotionPictureHelper.FRAME_HEIGHT_9);\n if (isDepthEnabled()) {\n size = SettingsUtil.getBokehPhotoSize(this.mActivity, pictureSize);\n } else {\n size = SettingsUtil.sizeFromString(pictureSize);\n }\n this.mCameraSettings.setPhotoSize(size);\n if (ApiHelper.IS_NEXUS_5) {\n if (ResolutionUtil.NEXUS_5_LARGE_16_BY_9.equals(pictureSize)) {\n this.mShouldResizeTo16x9 = true;\n } else {\n this.mShouldResizeTo16x9 = false;\n }\n }\n if (size != null) {\n Size optimalSize;\n Tag tag;\n Size optimalSize2 = CameraUtil.getOptimalPreviewSize(this.mActivity, this.mCameraCapabilities.getSupportedPreviewSizes(), ((double) size.width()) / ((double) size.height()));\n Size original = this.mCameraSettings.getCurrentPreviewSize();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Photo module Set preview size \");\n stringBuilder.append(size);\n stringBuilder.append(\" calculate size \");\n stringBuilder.append(optimalSize2);\n stringBuilder.append(\" original size \");\n stringBuilder.append(original);\n android.util.Log.e(\"===++++++=====\", stringBuilder.toString());\n if (isDepthEnabled()) {\n optimalSize = SettingsUtil.getBokehPreviewSize(pictureSize, false);\n } else {\n if ((size.width() == 4160 && size.height() == 1970) || (size.width() == 3264 && size.height() == 1546)) {\n optimalSize2 = new Size(1440, MotionPictureHelper.FRAME_HEIGHT_9);\n }\n optimalSize = optimalSize2;\n this.mActivity.getCameraAppUI().setSurfaceHeight(optimalSize.height());\n this.mActivity.getCameraAppUI().setSurfaceWidth(optimalSize.width());\n }\n this.mUI.setCaptureSize(optimalSize);\n Log.w(TAG, String.format(\"KPI original size is %s, optimal size is %s\", new Object[]{original.toString(), optimalSize.toString()}));\n if (!optimalSize.equals(original)) {\n tag = TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"setting preview size. optimal: \");\n stringBuilder2.append(optimalSize);\n stringBuilder2.append(\"original: \");\n stringBuilder2.append(original);\n Log.v(tag, stringBuilder2.toString());\n this.mCameraSettings.setPreviewSize(optimalSize);\n this.mCameraDevice.applySettings(this.mCameraSettings);\n this.mCameraSettings = this.mCameraDevice.getSettings();\n if (this.mCameraSettings == null) {\n Log.e(TAG, \"camera setting is null ?\");\n }\n }\n if (!(optimalSize.width() == 0 || optimalSize.height() == 0)) {\n Log.v(TAG, \"updating aspect ratio\");\n this.mUI.updatePreviewAspectRatio(((float) optimalSize.width()) / ((float) optimalSize.height()));\n }\n this.mCameraSettings.setSizesLocked(true);\n tag = TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"Preview size is \");\n stringBuilder3.append(optimalSize);\n Log.d(tag, stringBuilder3.toString());\n }\n }", "@Override\r\n protected int sizeOf(String key, Bitmap b) {\n return b.getHeight() * b.getWidth() * 4;\r\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n Log.i(\"sampleImage\", \"Displaying img at \" + reqWidth + \"px x \" + reqHeight + \"px (\" + inSampleSize + \" SampleSize)\");\n\n return inSampleSize;\n }", "public static Bitmap loadPicture( String photoPath,int targetW,int targetH) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n // bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(photoPath, bmOptions);\n\n return bitmap;\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n}", "@SuppressLint(\"NewApi\")\n\t\t\t\t@Override\n\t\t\t\tprotected int sizeOf(String key, Bitmap bitmap) {\n\t\t\t\t\treturn bitmap.getByteCount() / 1024;\n\t\t\t\t}", "private Parameters setSize(Parameters parameters) {\n\n\t\tLog.d(\"<<picture>>\", \"W:\"+parameters.getPictureSize().width+\"H:\"+parameters.getPictureSize().height);\n\t\tLog.d(\"<<preview>>\", \"W:\"+parameters.getPreviewSize().width+\"H:\"+parameters.getPreviewSize().height);\n\n\t\tint tempWidth = parameters.getPictureSize().width;\n\t\tint tempHeight = parameters.getPictureSize().height;\n\t\tint Result = 0;\n\t\tint Result2 = 0;\n\t\tint picSum = 0;\n\t\tint picSum2 = 0;\n\t\tint soin = 2;\n\n\t\twhile(tempWidth >= soin && tempHeight >= soin){\n\t\t\tResult = tempWidth%soin;\n\t\t\tResult2 = tempHeight%soin;\n\t\t\tif(Result == 0 && Result2 == 0){\n\t\t\t\tpicSum = tempWidth/soin;\n\t\t\t\tpicSum2 = tempHeight/soin;\n\t\t\t\tSystem.out.println(\"PictureWidth :\"+tempWidth+\"/\"+soin+\"���:\"+picSum+\"������:\"+Result);\n\t\t\t\tSystem.out.println(\"PictureHeight :\"+tempHeight+\"/\"+soin+\"���:\"+picSum2+\"������:\"+Result2);\n\t\t\t\ttempWidth = picSum;\n\t\t\t\ttempHeight = picSum2;\n\t\t\t}else {\n\t\t\t\tsoin++;\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"������� \"+picSum+\":\"+picSum2);\n\n\t\tList<Camera.Size> previewSizeList = parameters.getSupportedPreviewSizes();\n\t\tfor (Size size : previewSizeList){\n\t\t\ttempWidth = size.width;\n\t\t\ttempHeight = size.height;\n\t\t\tResult = 0;\n\t\t\tResult2 = 0;\n\t\t\tint preSum = 0;\n\t\t\tint preSum2 = 0;\n\t\t\tsoin = 2;\n\n\t\t\twhile(tempWidth >= soin && tempHeight >= soin){\n\t\t\t\tResult = tempWidth%soin;\n\t\t\t\tResult2 = tempHeight%soin;\n\t\t\t\tif(Result == 0 && Result2 == 0){\n\t\t\t\t\tpreSum = tempWidth/soin;\n\t\t\t\t\tpreSum2 = tempHeight/soin;\n\t\t\t\t\tSystem.out.println(\"PreviewWidth :\"+tempWidth+\"/\"+soin+\"���:\"+preSum+\"������:\"+Result);\n\t\t\t\t\tSystem.out.println(\"PreviewHeight :\"+tempHeight+\"/\"+soin+\"���:\"+preSum2+\"������:\"+Result2);\n\t\t\t\t\ttempWidth = preSum;\n\t\t\t\t\ttempHeight = preSum2;\n\t\t\t\t}else {\n\t\t\t\t\tsoin++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(\"������� \"+preSum+\":\"+preSum2);\n\t\t\tif(picSum == preSum && picSum2 == preSum2){\n\t\t\t\tparameters.setPreviewSize(size.width, size.height);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn parameters;\n\t}", "@Override\n\t \tprotected int sizeOf(Object key, Object value) {\n\t\t\t\tBitmap bitmap = (Bitmap) value;\n\t return bitmap.getRowBytes() * bitmap.getHeight();\n\t \t}", "static int m61449a(Bitmap bitmap) {\n return bitmap.getByteCount();\n }", "public static long getBitmapResolution(String filename) {\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(filename, options);\n final int height = options.outHeight;\n final int width = options.outWidth;\n return height * width;\n }", "private ImageSize getImageViewSize(ImageView imageView) {\r\n ImageSize imageSize=new ImageSize();\r\n\r\n DisplayMetrics displayMetrics = imageView.getContext().getResources().getDisplayMetrics();\r\n ViewGroup.LayoutParams lp = imageView.getLayoutParams();\r\n //Get the actual with of the imageView.\r\n int width = imageView.getWidth();\r\n if (width <=0){\r\n //Get the imageView and declare the width of the layout.\r\n width=lp.width;\r\n }\r\n if (width<=0){\r\n //Check the maximum width of the imageView.\r\n width= getImageViewFieldValue(imageView,\"mMaxWidth\");\r\n }\r\n if (width<=0){\r\n width=displayMetrics.widthPixels;\r\n }\r\n //Get the actual height of the imageView.\r\n int height = imageView.getHeight();\r\n\r\n if (height <=0){\r\n //Get the imageView and declare the height of the layout.\r\n height=lp.height;\r\n }\r\n if (height<=0){\r\n //Check the maximum height of the imageView.\r\n height=getImageViewFieldValue(imageView,\"mMaxHeight\");\r\n }\r\n if (height<=0){\r\n height=displayMetrics.heightPixels;\r\n }\r\n imageSize.width=width;\r\n imageSize.height=height;\r\n return imageSize;\r\n }", "private Bitmap setPic() {\n int targetH = 0; //mImageView.getHeight();\n int targetW = 0; //mImageView.getWidth();\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n if( photoH > photoW ){\n /*Se definen las dimensiones de la imagen que se desea generar*/\n targetH = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.heigh; // 640;\n targetW = Const.MedidasReduccionImagen.PEQUENA_PORTRAIT.width; //480;\n }else{\n targetH = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.heigh; //480;\n targetW = Const.MedidasReduccionImagen.PEQUENA_LANDSCAPE.width; //640;\n }\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 0;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n return bitmap;\n }", "@Override\r\n\t protected Bitmap doInBackground(Integer... params) {\r\n\t \trowid = params[0];\r\n\t\t\tString imageInSD = Environment.getExternalStorageDirectory().getPath()\r\n\t\t\t\t\t+ \"/Pictures/MyCameraApp/\" + rowid + \".jpg\";\r\n\r\n\r\n\t\t\t// First decode with inJustDecodeBounds=true to check dimensions\r\n\t\t\tfinal BitmapFactory.Options options = new BitmapFactory.Options();\r\n\t\t\toptions.inJustDecodeBounds = true;\r\n\t\t\tBitmapFactory.decodeFile(imageInSD, options);\r\n\r\n\t\t\t// Calculate inSampleSize\r\n\t\t\toptions.inSampleSize = calculateInSampleSize(options, 200,\r\n\t\t\t\t\t200);\r\n\r\n\t\t\t// Decode bitmap with inSampleSize set\r\n\t\t\toptions.inJustDecodeBounds = false;\r\n\t\t\treturn BitmapFactory.decodeFile(imageInSD, options);\r\n\t }", "private int caculateInSampleSize(BitmapFactory.Options options, int width, int height) {\r\n int outWidth = options.outWidth;\r\n int outHeight = options.outHeight;\r\n int inSampleSize=1;\r\n if (outWidth>width||outHeight>height){\r\n int widthRadio= Math.round(outWidth*1.0f/width);\r\n int heightRadio= Math.round(outHeight*1.0f/height);\r\n inSampleSize= Math.max(widthRadio,heightRadio);\r\n }\r\n\r\n return inSampleSize;\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == 1) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n String txt = getTextFromImage(bitmap);\n searchByPhoto(txt);\n }else if(requestCode == 2){\n Bitmap bm=null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String txt = getTextFromImage(bm);\n searchByPhoto(txt);\n }\n }\n }", "public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n // Tamaño original del mapa de bits (width 3300 x height 1650).\n // Tamaño deseado (reqWidth 330 x reqHeight 200).\n\n if (height > reqHeight || width > reqWidth) {\n\n // Calculate ratios of height and width to requested height and width\n final int heightRatio = Math.round((float) height / (float) reqHeight); // Res: 8\n final int widthRatio = Math.round((float) width / (float) reqWidth); // Res: 10.\n\n // Choose the smallest ratio as inSampleSize value, this will guarantee\n // a final image with both dimensions larger than or equal to the\n // requested height and width.\n inSampleSize = Math.max(heightRatio, widthRatio);\n }\n return inSampleSize;\n }", "@Override\n\t\t\t\t\tprotected int sizeOf(BareJID key, Bitmap bitmap) {\n\t\t\t\t\t\treturn bitmap == mPlaceHolderBitmap ? 0 : (bitmap.getRowBytes() * bitmap.getHeight());\n\t\t\t\t\t}", "public static int getBitmapSize(Bitmap bitmap){\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n return bitmap.getByteCount();\n }\n // Pre HC-MR1\n return bitmap.getRowBytes() * bitmap.getHeight();\n\n }", "private Bitmap decodeFile(File f)\n {\n try \n {\n //decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(new FileInputStream(f),null,o);\n \n //Find the correct scale value. It should be the power of 2.\n int width_tmp=o.outWidth, height_tmp=o.outHeight;\n int scale=1;\n while(true)\n {\n if(width_tmp/2<REQUIRED_WIDTH || height_tmp/2<REQUIRED_HEIGHT)\n break;\n width_tmp/=2;\n height_tmp/=2;\n scale++;\n }\n \n //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize=scale;\n o2.inPreferredConfig = Bitmap.Config.RGB_565;\n o2.inDither = true;\n \n o2.inPurgeable=true; //Tell to gc that whether it needs free memory, the Bitmap can be cleared\n o2.inInputShareable=true; //Which kind of reference will be used to recover the Bitmap data after being clear, when it will be used in the future\n\n Bitmap bitmap = null;\n\t\t try\n\t\t {\n\t\t\t bitmap = BitmapFactory.decodeFileDescriptor(new FileInputStream(f).getFD(), null, o2);\n\t\t }\n\t\t catch (IOException e)\n\t\t {\n\t\t\t stopThread();\n\t\t\t photoLoaderThread.start();\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t catch (OutOfMemoryError e)\n\t\t {\n\t\t\t stopThread();\n\t\t\t photoLoaderThread.start();\n\t\t\t e.printStackTrace();\n\t\t }\n \n return bitmap;\n } \n catch (FileNotFoundException e) \n {\n \tstopThread();\n \tphotoLoaderThread.start();\n }\n catch(OutOfMemoryError e)\n {\n \tstopThread();\n \tphotoLoaderThread.start();\n }\n return null;\n }", "@Override\n\tpublic int getCount() {\n\t\tLog.d(\"GALLERY VIEW GETCOUNT() MEYHOD\", \"Bitmap size : \" +bitmapArray.size() );\n\t\treturn bitmapArray.size();\n\t}", "static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n // Raw height and width of image\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n || (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "private static int calculateInSampleSize(BitmapFactory.Options options,\n int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n // Calculate ratios of height and width to requested height and\n // width\n final int heightRatio = Math.round((float) height\n / (float) reqHeight);\n final int widthRatio = Math.round((float) width / (float) reqWidth);\n\n // Choose the smallest ratio as inSampleSize value, this will\n // guarantee\n // a final image with both dimensions larger than or equal to the\n // requested height and width.\n inSampleSize = heightRatio < widthRatio ? widthRatio : heightRatio;\n }\n\n return inSampleSize;\n }", "public Uri getImageFromCamera() {\n String[] projection = {\n MediaStore.Images.Thumbnails._ID, // The columns we want\n MediaStore.Images.Thumbnails.IMAGE_ID,\n MediaStore.Images.Thumbnails.KIND,\n MediaStore.Images.Thumbnails.DATA};\n String selection = MediaStore.Images.Thumbnails.KIND + \"=\" + // Select only mini's\n MediaStore.Images.Thumbnails.MINI_KIND;\n\n String sort = MediaStore.Images.Thumbnails._ID + \" DESC\";\n\n//At the moment, this is a bit of a hack, as I'm returning ALL images, and just taking the latest one. There is a better way to narrow this down I think with a WHERE clause which is currently the selection variable\n Cursor myCursor = getActivity().managedQuery(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, selection, null, sort);\n\n long imageId = 0l;\n long thumbnailImageId = 0l;\n String thumbnailPath = \"\";\n\n try {\n myCursor.moveToFirst();\n imageId = myCursor.getLong(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.IMAGE_ID));\n thumbnailImageId = myCursor.getLong(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID));\n thumbnailPath = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.DATA));\n } finally {\n myCursor.close();\n }\n\n //Create new Cursor to obtain the file Path for the large image\n\n String[] largeFileProjection = {\n MediaStore.Images.ImageColumns._ID,\n MediaStore.Images.ImageColumns.DATA\n };\n\n String largeFileSort = MediaStore.Images.ImageColumns._ID + \" DESC\";\n myCursor = getActivity().managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, largeFileProjection, null, null, largeFileSort);\n String largeImagePath = \"\";\n\n try {\n myCursor.moveToFirst();\n\n//This will actually give yo uthe file path location of the image.\n largeImagePath = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.DATA));\n } finally {\n myCursor.close();\n }\n // These are the two URI's you'll be interested in. They give you a handle to the actual images\n Uri uriLargeImage = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, String.valueOf(imageId));\n Uri uriThumbnailImage = Uri.withAppendedPath(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, String.valueOf(thumbnailImageId));\n\n// I've left out the remaining code, as all I do is assign the URI's to my own objects anyways...\n return uriLargeImage;\n }", "public static int calculateInSampleSize( BitmapFactory.Options options, int reqWidth, int reqHeight) {\n int inSampleSize = 1;\t//Default subsampling size\n // See if image raw height and width is bigger than that of required view\n if (options.outHeight > reqHeight || options.outWidth > reqWidth) {\n //bigger\n final int halfHeight = options.outHeight / 2;\n final int halfWidth = options.outWidth / 2;\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case CAMERA_APP:\n if (resultCode == Activity.RESULT_OK) {\n //Accedemos al contenido de la imagen\n ContentResolver contRes = getContentResolver();\n contRes.notifyChange(this.pictureId, null);\n Bitmap picture;\n try {\n picture = android.provider.MediaStore.Images.Media\n .getBitmap(contRes, pictureId);\n //Reducimos la imagen\n int height = (int) (picture.getHeight() * 800 / picture.getWidth());\n Bitmap resized = Bitmap.createScaledBitmap(picture, 800, height, true);\n //Guardamos el mapa de bits\n FileOutputStream stream = new FileOutputStream(pictureId.toString().replace(\"file://\", \"\"));\n resized.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n stream.flush();\n stream.close();\n //Lo asignamos al imageview\n ivProfileImage.setImageBitmap(resized);\n } catch (Exception e) {\n Log.i(\"Photo\", \"Something were wrong!\");\n }\n }\n }\n }", "private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n // Raw height and width of image\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "public static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n}", "public int calculateInSampleSize(\r\n\r\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\r\n final int width = options.outWidth;\r\n int inSampleSize = 1;\r\n\r\n if (height > reqHeight || width > reqWidth) {\r\n if (width > height) {\r\n inSampleSize = Math.round((float)height / (float)reqHeight);\r\n } else {\r\n inSampleSize = Math.round((float)width / (float)reqWidth);\r\n }\r\n }\r\n\r\n return inSampleSize;\r\n }", "public static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n // Raw height and width of image\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n if (width > height) {\n inSampleSize = Math.round((float)height / (float)reqHeight);\n } else {\n inSampleSize = Math.round((float)width / (float)reqWidth);\n }\n }\n return inSampleSize;\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == 1 && resultCode == getActivity().RESULT_OK && data != null && data.getData() != null) {\n\n Uri uri = data.getData();\n\n try {\n ByteArrayOutputStream boas = new ByteArrayOutputStream();\n\n\n Bitmap btmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);\n\n btmap.compress(Bitmap.CompressFormat.JPEG, 70, boas); //bm is the bitmap object\n byte[] byteArrayImage = boas.toByteArray();\n\n\n BitmapFactory.Options opt;\n\n opt = new BitmapFactory.Options();\n opt.inTempStorage = new byte[16 * 1024];\n opt.inSampleSize = 2;\n Bitmap bitmap = BitmapFactory.decodeByteArray(byteArrayImage, 0, byteArrayImage.length, opt);\n\n ImageView imageView = (ImageView) getActivity().findViewById(R.id.profile_back);\n CircleImageView dp = (CircleImageView) getActivity().findViewById(R.id.dp1);\n dp.setImageBitmap(bitmap);\n Bitmap bitmap1=grayscale(bitmap);\n Bitmap blurred = blurRenderScript(bitmap1, 25);\n imageView.setImageBitmap(blurred);\n } catch (OutOfMemoryError a) {\n Toast.makeText(getActivity().getApplicationContext(), \"Image size high\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static int calculateInSampleSize(BitmapFactory.Options options, \n \t\t\tint reqWidth, int reqHeight) {\n \t\t// Raw height and width of image\n \t\tfinal int height = options.outHeight;\n \t\tfinal int width = options.outWidth;\n \t\tint inSampleSize = 1;\n \n \t\tif (height > reqHeight || width > reqWidth) {\n \t\t\tif (width > height) {\n \t\t\t\tinSampleSize = Math.round((float)height / (float)reqHeight); \n \t\t\t} else {\n \t\t\t\tinSampleSize = Math.round((float)width / (float)reqWidth); \n \t\t\t} \n \t\t}\n \n \t\treturn inSampleSize; \n \t}", "protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getByteCount();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case PICK_FROM_GALLERY_REQUEST_CODE:\n if (resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n String path = ImageFilePath.getPath(this, data.getData());\n Bitmap bitmap;\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), targetUri);\n Bitmap finalBitmap = BitmapMods.modifyOrientation(bitmap, path);\n mImages.add(BitmapMods.getResizedBitmap(finalBitmap, 400));\n initializeRecyclerView();\n } catch (Exception e) {\n onPhotoError();\n e.printStackTrace();\n }\n }\n break;\n\n case PICK_FROM_CAMERA_REQUEST_CODE:\n if (resultCode == RESULT_OK) {\n try {\n @SuppressWarnings(\"ConstantConditions\") Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n mImages.add(photo);\n initializeRecyclerView();\n } catch (Exception e) {\n onPhotoError();\n e.printStackTrace();\n }\n }\n }\n }", "@TargetApi(12)\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected int sizeOf(BareJID key, Bitmap bitmap) {\n\t\t\t\t\t\treturn bitmap == mPlaceHolderBitmap ? 0 : bitmap.getByteCount();\n\t\t\t\t\t}", "@Test public void inJustDecodeBoundsIfResizing() {\n final Request requiresResize = new Request.Builder(TestUtils.URI_1).resize(20, 15).build();\n final BitmapFactory.Options resizeOptions = createBitmapOptions(requiresResize);\n assertThat(resizeOptions).isNotNull();\n assertThat(resizeOptions.inJustDecodeBounds).isTrue();\n }", "private void refreshDimensions() {\n //tamano del canvas\n targetWidth = canvasWidth;\n targetHeight = canvasHeight;\n//de las imagenes\n sourceWidth = bitmap.getWidth();\n sourceHeight = bitmap.getHeight();\n\n double targetRatio = (double) targetWidth / (double) targetHeight;\n double sourceRatio = (double) sourceWidth / (double) sourceHeight;\n\n targetOffsetX = 0;\n targetOffsetY = 0;\n\n if(sourceRatio > targetRatio)\n {\n int newTargetHeight = (int) (targetWidth / sourceRatio);\n int delta = targetHeight - newTargetHeight;\n targetOffsetY = delta / 2;\n targetHeight = newTargetHeight;\n }\n else if(sourceRatio < targetRatio)\n {\n int newTargetWidth = (int) (targetHeight * sourceRatio);\n int delta = targetWidth - newTargetWidth;\n targetOffsetX = delta / 2;\n targetWidth = newTargetWidth;\n }\n\n puzzleWidth = slidePuzzle.getWidth();\n puzzleHeight = slidePuzzle.getHeight();\n\n targetColumnWidth = targetWidth / puzzleWidth;\n targetRowHeight = targetHeight / puzzleHeight;\n sourceColumnWidth = sourceWidth / puzzleWidth;\n sourceRowHeight = sourceHeight / puzzleHeight;\n }", "@Override\n\t\t\tprotected int sizeOf(String key, Bitmap value) {\n\t\t\t\treturn value.getRowBytes()*value.getHeight();\n\t\t\t}", "public String getSize() {\n return fullPhoto.getSize();\n }", "public static byte[] getResizedImageData(int width, int height,\n\t\t\tint widthLimit, int heightLimit, int byteLimit, Uri uri,\n\t\t\tContext context) {\n\t\tint outWidth = width;\n\t\tint outHeight = height;\n\n\t\tfloat scaleFactor = 1.F;\n\t\twhile ((outWidth * scaleFactor > widthLimit)\n\t\t\t\t|| (outHeight * scaleFactor > heightLimit)) {\n\t\t\tscaleFactor *= .75F;\n\t\t}\n\n\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t// Log.v(TAG, \"getResizedBitmap: wlimit=\" + widthLimit +\n\t\t// \", hlimit=\" + heightLimit + \", sizeLimit=\" + byteLimit +\n\t\t// \", width=\" + width + \", height=\" + height +\n\t\t// \", initialScaleFactor=\" + scaleFactor +\n\t\t// \", uri=\" + uri);\n\t\t// }\n\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tByteArrayOutputStream os = null;\n\t\t\tint attempts = 1;\n\t\t\tint sampleSize = 1;\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\t\tint quality = IMAGE_COMPRESSION_QUALITY;\n\t\t\tBitmap b = null;\n\n\t\t\t// In this loop, attempt to decode the stream with the best possible\n\t\t\t// subsampling (we\n\t\t\t// start with 1, which means no subsampling - get the original\n\t\t\t// content) without running\n\t\t\t// out of memory.\n\t\t\tdo {\n\t\t\t\tinput = context.getContentResolver().openInputStream(uri);\n\t\t\t\toptions.inSampleSize = sampleSize;\n\t\t\t\ttry {\n\t\t\t\t\tb = BitmapFactory.decodeStream(input, null, options);\n\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\treturn null; // Couldn't decode and it wasn't because of\n\t\t\t\t\t\t\t\t\t\t// an exception,\n\t\t\t\t\t\t\t\t\t\t// bail.\n\t\t\t\t\t}\n\t\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedBitmap: img too large to decode (OutOfMemoryError), \"\n\t\t\t\t\t// +\n\t\t\t\t\t// \"may try with larger sampleSize. Curr sampleSize=\" +\n\t\t\t\t\t// sampleSize);\n\t\t\t\t\tsampleSize *= 2; // works best as a power of two\n\t\t\t\t\tattempts++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} finally {\n\t\t\t\t\tif (input != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\n\t\t\tif (b == null) {\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)\n\t\t\t\t// && attempts >= NUMBER_OF_RESIZE_ATTEMPTS) {\n\t\t\t\t// Log.v(TAG,\n\t\t\t\t// \"getResizedImageData: gave up after too many attempts to resize\");\n\t\t\t\t// }\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tboolean resultTooBig = true;\n\t\t\tattempts = 1; // reset count for second loop\n\t\t\t// In this loop, we attempt to compress/resize the content to fit\n\t\t\t// the given dimension\n\t\t\t// and file-size limits.\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif (options.outWidth > widthLimit\n\t\t\t\t\t\t\t|| options.outHeight > heightLimit\n\t\t\t\t\t\t\t|| (os != null && os.size() > byteLimit)) {\n\t\t\t\t\t\t// The decoder does not support the inSampleSize option.\n\t\t\t\t\t\t// Scale the bitmap using Bitmap library.\n\t\t\t\t\t\tint scaledWidth = (int) (outWidth * scaleFactor);\n\t\t\t\t\t\tint scaledHeight = (int) (outHeight * scaleFactor);\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: retry scaling using \" +\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap: w=\" + scaledWidth +\n\t\t\t\t\t\t// \", h=\" + scaledHeight);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tb = Bitmap.createScaledBitmap(b, scaledWidth,\n\t\t\t\t\t\t\t\tscaledHeight, false);\n\t\t\t\t\t\t// if (b == null) {\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap returned NULL!\");\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t// return null;\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\t// Compress the image into a JPG. Start with\n\t\t\t\t\t// IMAGE_COMPRESSION_QUALITY.\n\t\t\t\t\t// In case that the image byte size is still too large\n\t\t\t\t\t// reduce the quality in\n\t\t\t\t\t// proportion to the desired byte size.\n\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\tint jpgFileSize = os.size();\n\t\t\t\t\tif (jpgFileSize > byteLimit) {\n\t\t\t\t\t\tquality = (quality * byteLimit) / jpgFileSize; // watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// int\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division!\n\t\t\t\t\t\tif (quality < MINIMUM_IMAGE_COMPRESSION_QUALITY) {\n\t\t\t\t\t\t\tquality = MINIMUM_IMAGE_COMPRESSION_QUALITY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: compress(2) w/ quality=\" +\n\t\t\t\t\t\t// quality);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\t}\n\t\t\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedImageData - image too big (OutOfMemoryError), will try \"\n\t\t\t\t\t// + \" with smaller scale factor, cur scale factor: \" +\n\t\t\t\t\t// scaleFactor);\n\t\t\t\t\t// fall through and keep trying with a smaller scale factor.\n\t\t\t\t}\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t// Log.v(TAG, \"attempt=\" + attempts\n\t\t\t\t// + \" size=\" + (os == null ? 0 : os.size())\n\t\t\t\t// + \" width=\" + outWidth * scaleFactor\n\t\t\t\t// + \" height=\" + outHeight * scaleFactor\n\t\t\t\t// + \" scaleFactor=\" + scaleFactor\n\t\t\t\t// + \" quality=\" + quality);\n\t\t\t\t// }\n\t\t\t\tscaleFactor *= .75F;\n\t\t\t\tattempts++;\n\t\t\t\tresultTooBig = os == null || os.size() > byteLimit;\n\t\t\t} while (resultTooBig && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\t\t\tb.recycle(); // done with the bitmap, release the memory\n\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE) && resultTooBig) {\n\t\t\t// Log.v(TAG,\n\t\t\t// \"getResizedImageData returning NULL because the result is too big: \"\n\t\t\t// +\n\t\t\t// \" requested max: \" + byteLimit + \" actual: \" + os.size());\n\t\t\t// }\n\n\t\t\treturn resultTooBig ? null : os.toByteArray();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n\n //photo taken from cam\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {\n if (_mImageUri != null) {\n showTakenPhoto();\n }\n }\n\n //photo chosen\n if (requestCode == REQUEST_IMAGE_PICK && resultCode == RESULT_OK) {\n _mImageUri = intent.getData();\n\n\n try {\n _bitmap = MediaStore.Images.Media.getBitmap(\n getContentResolver(), _mImageUri);\n ImageView imageView = (ImageView) findViewById(R.id.uploadedImage);\n\n\n assert _bitmap != null;\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(\n _mImageUri, filePathColumn, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n String filePath = cursor.getString(columnIndex);\n cursor.close();\n rotateImage(filePath);\n imageView.setImageBitmap(scaleBitmap(_bitmap, 350));\n _uploadButton.setEnabled(true);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n\n\n }", "private Bitmap decodeFile(File f){\n try {\n //decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n FileInputStream stream1=new FileInputStream(f);\n BitmapFactory.decodeStream(stream1,null,o);\n stream1.close();\n \n //Find the correct scale value. It should be the power of 2.\n final int REQUIRED_SIZE=70;\n int width_tmp=o.outWidth, height_tmp=o.outHeight;\n int scale=1;\n while(true){\n if(width_tmp/2<REQUIRED_SIZE || height_tmp/2<REQUIRED_SIZE)\n break;\n width_tmp/=2;\n height_tmp/=2;\n scale*=2;\n }\n \n //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize=scale;\n FileInputStream stream2=new FileInputStream(f);\n Bitmap bitmap=BitmapFactory.decodeStream(stream2, null, o2);\n stream2.close();\n return bitmap;\n } catch (FileNotFoundException e) {\n } \n catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK && data.getData()!=null) {\n if (requestCode == 2) {\n Uri selectedImage = data.getData();\n String[] filePath = { MediaStore.Images.Media.DATA };\n Cursor c = getContentResolver().query(selectedImage,filePath, null, null, null);\n c.moveToFirst();\n int columnIndex = c.getColumnIndex(filePath[0]);\n String picturePath = c.getString(columnIndex);\n c.close();\n Bitmap thumbnail = (BitmapFactory.decodeFile(picturePath));\n thumbnail= AppUtils.getResizedBitmap(thumbnail, 400);\n ivPic.setImageBitmap(thumbnail);\n\n //either update existing thumbnail\n if(thumbnailImage != null){\n thumbnailImage.setImage(thumbnail);\n viewModel.updateThumbnail(thumbnailImage);\n }\n //or create a new thumbnail\n else{\n contactGroup.setThumbnailId((int) viewModel.addThumbnailGetId(new ThumbnailImage(thumbnail)));\n viewModel.updateGroup(contactGroup);\n }\n }\n }\n }", "private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }", "private Bitmap decodeFileFromPath(String path) {\n Uri uri = getImageUri(path);\n InputStream in = null;\n try {\n in = getContentResolver().openInputStream(uri);\n\n //Decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n\n BitmapFactory.decodeStream(in, null, o);\n in.close();\n\n int scale = 1;\n int inSampleSize = 1024;\n if (o.outHeight > inSampleSize || o.outWidth > inSampleSize) {\n scale = (int) Math.pow(2, (int) Math.round(Math.log(inSampleSize / (double) Math.max(o.outHeight, o.outWidth)) / Math.log(0.5)));\n }\n\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize = scale;\n in = getContentResolver().openInputStream(uri);\n // Bitmap b = BitmapFactory.decodeStream(in, null, o2);\n int MAXCAP_SIZE = 512;\n Bitmap b = getResizedBitmap(BitmapFactory.decodeStream(in, null, o2), MAXCAP_SIZE);\n in.close();\n\n return b;\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n // Tamaño original de la imagen\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "protected Bitmap decodeUri(Uri selectedImage, int REQUIRED_SIZE) {\n\n try {\n\n // Decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o);\n\n // The new size we want to scale to\n // final int REQUIRED_SIZE = size;\n\n // Find the correct scale value. It should be the power of 2.\n int width_tmp = o.outWidth, height_tmp = o.outHeight;\n int scale = 1;\n while (true) {\n if (width_tmp / 2 < REQUIRED_SIZE\n || height_tmp / 2 < REQUIRED_SIZE) {\n break;\n }\n width_tmp /= 2;\n height_tmp /= 2;\n scale *= 2;\n }\n\n // Decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize = scale;\n return BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o2);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return null;\n }", "private int calculateInSampleSize(BitmapFactory.Options options, int reqWidth) {\n // Get the raw width of image.\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n // Calculate the best inSampleSize.\n if (width > reqWidth) {\n final int halfWidth = width / 2;\n while ((halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n return inSampleSize;\n }", "private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n\t\tfinal int height = options.outHeight;\r\n\t\tfinal int width = options.outWidth;\r\n\t\tint inSampleSize = 1;\r\n\r\n\t\tif (height > reqHeight || width > reqWidth) {\r\n\t\t\tfinal int halfHeight = height / 2;\r\n\t\t\tfinal int halfWidth = width / 2;\r\n\r\n\t\t\t// Calculate the largest inSampleSize value that is a power of 2 and\r\n\t\t\t// keeps both\r\n\t\t\t// height and width larger than the requested height and width.\r\n\t\t\twhile ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) {\r\n\t\t\t\tinSampleSize *= 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inSampleSize;\r\n\t}", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "private Bitmap decodeUri(Uri selectedImage, int size) throws FileNotFoundException {\n // Decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o);\n\n // Find the correct scale value. It should be the power of 2.\n int width_tmp = o.outWidth, height_tmp = o.outHeight;\n int scale = 1;\n while (true) {\n if (width_tmp / 2 < size\n || height_tmp / 2 < size) {\n break;\n }\n width_tmp /= 2;\n height_tmp /= 2;\n scale *= 2;\n }\n\n // Decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize = scale;\n return BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o2);\n }", "public int calculateInSampleSize(\n\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n if (width > height) {\n inSampleSize = Math.round((float)height / (float)reqHeight);\n } else {\n inSampleSize = Math.round((float)width / (float)reqWidth);\n }\n }\n\n return inSampleSize;\n }", "private int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n return inSampleSize;\n }", "private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Intent intent = getIntent();\n if (intent == null || intent.getExtras() == null) {\n// HcAppState.getInstance().removeActivity(this);\n finish();\n return;\n }\n mIconUri = intent.getStringExtra(\"uri\");\n if (TextUtils.isEmpty(mIconUri)) {\n// HcAppState.getInstance().removeActivity(this);\n finish();\n return;\n }\n mWidth = (int) (360 * Util.getScreenDensity());\n mHeight = (int) (640 * Util.getScreenDensity());\n\n mWidth = intent.getIntExtra(\"width\", mWidth);\n mHeight = intent.getIntExtra(\"height\", mHeight);\n\n setContentView(R.layout.activity_big_image);\n mPhotoView = (PhotoView) findViewById(R.id.image_photo);\n mOptions = new DisplayImageOptions.Builder()\n .imageScaleType(ImageScaleType.EXACTLY)\n .cacheInMemory(false).cacheOnDisk(false)\n .considerExifParams(true)\n .bitmapConfig(Bitmap.Config.ARGB_8888).build();\n ImageLoader.getInstance().loadImage(mIconUri, new ImageSize(mWidth, mHeight), mOptions, new ImageLoadingListener() {\n\n @Override\n public void onLoadingStarted(String imageUri, View view) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"#onLoadingStarted imageUri = \"+imageUri);\n\n }\n\n @Override\n public void onLoadingFailed(String imageUri, View view,\n FailReason failReason) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"#onLoadingFailed imageUri = \" + imageUri + \" failReason = \" + failReason);\n// HcAppState.getInstance().removeActivity(BigImageActivity.this);\n finish();\n overridePendingTransition(0, 0);\n }\n\n @Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"#onLoadingComplete imageUri = \"+imageUri + \" loadedImage = \"+loadedImage + \" width = \"+loadedImage.getWidth() + \" height = \"+loadedImage.getHeight());\n if (mPhotoView != null)\n mPhotoView.setImageBitmap(loadedImage);\n }\n\n @Override\n public void onLoadingCancelled(String imageUri, View view) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"#onLoadingCancelled imageUri = \"+imageUri);\n// HcAppState.getInstance().removeActivity(BigImageActivity.this);\n finish();\n overridePendingTransition(0, 0);\n }\n });\n\n mPhotoView.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {\n\n @Override\n public void onPhotoTap(View view, float x, float y) {\n // TODO Auto-generated method stub\n// HcAppState.getInstance().removeActivity(BigImageActivity.this);\n finish();\n overridePendingTransition(0, 0);\n }\n });\n }", "public Bitmap getBitmap(int targetW, int targetH, String filename) {\r\n\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG, \"External storage is not usable\");\r\n\t\t}\r\n\t\tFile fCurrentPhotoPath = new File(directory,filename);\r\n\t\tString mCurrentPhotoPath = fCurrentPhotoPath.getAbsolutePath();\r\n\t\t/* There isn't enough memory to open up more than a couple camera photos */\r\n\t\t/* So pre-scale the target bitmap into which the file is decoded */\r\n\r\n\t\t/* Get the size of the image */\r\n\t\tBitmapFactory.Options bmOptions = new BitmapFactory.Options();\r\n\t\tbmOptions.inJustDecodeBounds = true;\r\n\t\tBitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\r\n\t\tint photoW = bmOptions.outWidth;\r\n\t\tint photoH = bmOptions.outHeight;\r\n\t\t\r\n\t\t/* Figure out which way needs to be reduced less */\r\n\t\tint scaleFactor = 1;\r\n\t\tif ((targetW > 0) || (targetH > 0)) {\r\n\t\t\tscaleFactor = Math.min(photoW/targetW, photoH/targetH);\t\r\n\t\t}\r\n\r\n\t\t/* Set bitmap options to scale the image decode target */\r\n\t\tbmOptions.inJustDecodeBounds = false;\r\n\t\tbmOptions.inSampleSize = scaleFactor;\r\n\t\tbmOptions.inPurgeable = true;\r\n\r\n\t\t/* Decode the JPEG file into a Bitmap */\r\n\t\tBitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\r\n\t\treturn bitmap;\r\n\t\t\r\n\t}", "private boolean isImageSizeLegal(Uri uri) {\n //Get dimensions of image to check for size\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n ParcelFileDescriptor fd = null;\n try {\n fd = getContentResolver().openFileDescriptor(uri, \"r\");\n }\n catch (FileNotFoundException e) {\n // If the file doesn't exist just return false, shouldn't ever happen though\n return false;\n }\n // Loads file data into options\n BitmapFactory.decodeFileDescriptor(fd.getFileDescriptor(), null, options);\n int scale = BitmapConverter.calculateInSampleSize(options, MAX_IMAGE_UPLOAD_WIDTH,\n MAX_IMAGE_UPLOAD_HEIGHT);\n\n int width = options.outWidth / scale;\n int height = options.outHeight / scale;\n\n // If the image is too short\n if (height < MIN_IMAGE_UPLOAD_HEIGHT) {\n Toast.makeText(CreateGameActivity.this,\n String.format(getString(R.string.image_min_height), MIN_IMAGE_UPLOAD_HEIGHT),\n Toast.LENGTH_LONG).show();\n return false;\n }\n // If the image is too skinny\n else if (width < MIN_IMAGE_UPLOAD_WIDTH) {\n Toast.makeText(CreateGameActivity.this,\n String.format(getString(R.string.image_min_width), MIN_IMAGE_UPLOAD_WIDTH),\n Toast.LENGTH_LONG).show();\n return false;\n }\n // Otherwise the image is okay\n return true;\n }", "public void onPostExecute(byte[] originalJpegData) {\n PhotoModule.this.mInHdrProcess = false;\n ExifInterface exif = Exif.getExif(originalJpegData);\n final NamedEntity name = PhotoModule.this.mNamedImages.getNextNameEntity();\n if (PhotoModule.this.mShouldResizeTo16x9) {\n ResizeBundle dataBundle = new ResizeBundle();\n dataBundle.jpegData = originalJpegData;\n dataBundle.targetAspectRatio = 1.7777778f;\n dataBundle.exif = exif;\n new AsyncTask<ResizeBundle, Void, ResizeBundle>() {\n /* Access modifiers changed, original: protected|varargs */\n public ResizeBundle doInBackground(ResizeBundle... resizeBundles) {\n return PhotoModule.this.cropJpegDataToAspectRatio(resizeBundles[0]);\n }\n\n /* Access modifiers changed, original: protected */\n public void onPostExecute(ResizeBundle result) {\n JpegPictureCallback.this.saveFinalPhoto(result.jpegData, name, result.exif, cameraProxy);\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new ResizeBundle[]{dataBundle});\n } else {\n JpegPictureCallback.this.saveFinalPhoto(originalJpegData, name, exif, cameraProxy);\n }\n if (PhotoModule.this.isOptimizeCapture && exif.hasThumbnail()) {\n PhotoModule.this.updateThumbnail(exif);\n }\n }", "public int compressPhoto(int photoID) {\n // This method compresses a photo to a suitable size to be displayed on cards.\n\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeResource(getResources(), photoID, options);\n int imageHeight = options.outHeight;\n int imageWidth = options.outWidth;\n String imageType = options.outMimeType;\n\n // Load a Scaled Down Version into Memory\n options.inSampleSize = calculateInSampleSize(options, 1000, 750);\n\n // Decode bitmap with inSampleSize set\n options.inJustDecodeBounds = false;\n return photoID;\n\n\n }", "public int getImageFileSize(int resolution)\n {\n if (resolution == 1000)\n return 35000;\n else\n return 120000;\n }", "private Bitmap decodeBitmapFromUri(Context context, Uri uri) { //, int viewWidth, int viewHeight\n try {\n InputStream inputStream = context.getContentResolver().openInputStream(uri);\n Bitmap decodedBm = BitmapFactory.decodeStream(inputStream);\n Bitmap formatedBm = decodedBm.copy(Bitmap.Config.ARGB_8888, false);\n decodedBm.recycle();\n\n\n// ImageUtils imageUtils = new ImageUtils();\n\n// Bitmap orientedBitmap = setOrientation(uri, formatedBm);\n\n Log.i(\"aaa\", \"Uri: \" + uri + \" Bitmap: \" + formatedBm);\n\n// return orientedBitmap;//scaledBitmap(formatedBm, viewWidth, viewHight);\n return formatedBm;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tLog.e(\"on success\", \"on success\");\n\t\tBitmap s = null;\n\n\t\tif (resultCode == getActivity().RESULT_OK) {\n\t\t\t// user is returning from capturing an image using the camera\n\t\t\tif (requestCode == CAMERA_CAPTURE) {\n\t\t\t\tLog.e(\"camera\", \"camera\");\n\t\t\t\tpicUri = data.getData();\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\t// get the cropped bitmap\n\t\t\t\tBitmap thePic = extras.getParcelable(\"data\");\n\t\t\t\tsavetoaFileLocation(thePic);\n\t\t\t\tthePic = getResizedBitmap(thePic, 200, 200);\n\t\t\t\tcameraBitmap = thePic;\n\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t// display the returned cropped image\n\t\t\t\tprofileimageeditflag=\"true\";\n\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\n\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(thePic, 16));\n\t\t\t\t//picview1.setImageBitmap(cameraBitmap);\n\t\t\t} else if (requestCode == GALLERY_CAPTURE) {\n\n\n\n\n\t\t\t\tUri selectedImage = data.getData();\n\n\t\t\t\tString stringUri;\n\t\t\t\tstringUri = selectedImage.toString();\n\t\t\t\tif ((stringUri != \"\") || stringUri != null) {\n\n\t\t\t\t\tString selectedImagePath = getPath(selectedImage);\ntry {\n\tExifInterface exifInterface = new ExifInterface(selectedImagePath);\n\torientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n}\ncatch (Exception e){}\n\n\n\n\t\t\t\t\tString[] filePathColumn = { MediaStore.Images.Media.DATA };\n\t\t\t\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\t\t\t\tselectedImage, filePathColumn, null, null, null);\n\t\t\t\t\tcursor.moveToFirst();\n\t\t\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t\t\t\t\tString selectedimage_path = cursor.getString(columnIndex);\n\t\t\t\t\tLog.e(\"selected path\",selectedimage_path);\n\t\t\t\t\tcursor.close();\n\t\t\t\t\tif (selectedimage_path.startsWith(\"https://\")) {\n\t\t\t\t\t\tgetBiymapFromGoogleLocation(selectedimage_path);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = getBitmapFromFile(selectedimage_path);\n\t\t\t\t\t}\n\t\t\t\t\ts = getResizedBitmap(s, 200, 200);\n\t\t\t\t\tcameraBitmap = s;\n\n\t\t\t\t\tswitch(orientation) {\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_90:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 90);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_180:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 180);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_270:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 270);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcorrectedBitMap=cameraBitmap;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t\t// display the returned cropped image\nprofileimageeditflag=\"true\";\n\t\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\n\n\t/*\t\t\t\tif(correctedBitMap!= null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcorrectedBitMap, 16));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcameraBitmap, 16));\n\t\t\t\t\t}\n\n*/\n\n\t\t\t\t\tif (correctedBitMap != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(correctedBitMap, 16));\n\t\t\t\t\t\tsavetoaFileLocation(correctedBitMap);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t\t\tsavetoaFileLocation(s);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\n\t\t\t\t//\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t//\tpicview1.setImageBitmap(cameraBitmap);\n\t\t\t\t//\tsavetoaFileLocation(s);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n if(bitmap.getHeight()>bitmap.getWidth()){\n\n progressBar.setVisibility(View.INVISIBLE);\n //load to imageview and set scale type to center crop\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageView.setImageBitmap(bitmap);\n\n }else {\n\n progressBar.setVisibility(View.INVISIBLE);\n //load to imageview and set scale type to fitxy\n imageView.setScaleType(ImageView.ScaleType.FIT_XY);\n imageView.setImageBitmap(bitmap);\n\n }\n\n }", "private long countPanBytes(int maxRes) {\n\t\tlong numPixels = 0;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry panEntry = panImageList[n];\n\t\t\tif (panEntry.imageListEntry.enabled) {\n\t\t\t\tint width = panEntry.imageListEntry.getImageMetadataEntry().n_line_samples;\n\t\t\t\tint height = panEntry.imageListEntry.getImageMetadataEntry().n_lines;\n\t\t\t\twidth = PanImageLoader.fixDimension(width);\n\t\t\t\theight = PanImageLoader.fixDimension(height);\n\t\t while ((width > maxRes) || (height > maxRes)) {\n\t\t \twidth = width >> 1;\n\t\t \theight = height >> 1;\n\t\t }\n\t\t if (mipmap) {\n\t\t \twhile ((width>4) || (height>4)) {\n\t\t\t\t\t\tnumPixels = numPixels + width * height * 4;\n\t\t\t \twidth = width >> 1;\n\t\t\t \theight = height >> 1;\n\t\t \t}\n\t\t }\n\t\t else {\n\t\t\t\t\tnumPixels = numPixels + width * height * 4;\n\t\t }\n\t\t\t}\n\t\t}\n\t\treturn numPixels;\t\t\n\t}", "public byte[] doInBackground(byte[]... data) {\n byte[] originalJpegData;\n byte[] originalJpegData2 = data[0];\n if (PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() > 0.0f && PhotoModule.this.isSupportBeauty() && (PhotoModule.this.mCameraId == 0 || PhotoModule.this.mCameraId == 1)) {\n Size size = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n float seek = PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f;\n int angle = PhotoModule.this.mCameraId == 1 ? MediaProviderUtils.ROTATION_270 : 90;\n if (originalJpegData2 != null) {\n originalJpegData2 = BeautifyHandler.processImageNV21(PhotoModule.this.mActivity, originalJpegData2, size.width(), size.height(), seek, angle);\n }\n }\n PhotoModule.this.mActivity.getButtonManager().mBeautyEnable = true;\n Size size2 = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n PhotoModule.this.mIsAddWaterMark = PhotoModule.this.mCameraSettings.isAddWaterMarkEnabled();\n if (PhotoModule.this.mFinalDrCheckResult.size() <= 1) {\n Log.d(PhotoModule.TAG, \"start to jpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(originalJpegData2, size2.width(), size2.height());\n Log.d(PhotoModule.TAG, \"end to jpeg\");\n } else {\n int result = PhotoModule.this.mImageRefiner.processImage();\n Tag access$500 = PhotoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"processImage result = \");\n stringBuilder.append(result);\n Log.d(access$500, stringBuilder.toString());\n byte[] output = new byte[originalJpegData2.length];\n if (result < 0) {\n output = (byte[]) PhotoModule.this.mAddedImages.get(0);\n } else {\n int getOutputResult = PhotoModule.this.mImageRefiner.getOutputImageRaw(output);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"getOutputResult = \");\n stringBuilder2.append(getOutputResult);\n Log.d(access$5002, stringBuilder2.toString());\n }\n PhotoModule.this.mImageRefiner.finish();\n PhotoModule.this.mImageRefiner = null;\n Log.d(PhotoModule.TAG, \"mImageRefiner = null\");\n Log.d(PhotoModule.TAG, \"compressToJpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(output, size2.width(), size2.height());\n }\n if (cameraProxy.getCharacteristics().isFacingFront() && PhotoModule.this.isNeedMirrorSelfie()) {\n originalJpegData = PhotoModule.this.aftMirrorJpeg(originalJpegData);\n }\n if (!Keys.isAlgorithmsOn(PhotoModule.this.mActivity.getSettingsManager()) || PhotoModule.this.isDepthEnabled() || PhotoModule.this.mBurstResultQueue.isEmpty()) {\n return originalJpegData;\n }\n TotalCaptureResult totalCaptureResult = (TotalCaptureResult) PhotoModule.this.mBurstResultQueue.removeFirst();\n if (PhotoModule.this.mInHdrProcess) {\n PhotoModule.this.mBurstResultQueue.clear();\n }\n return PhotoModule.this.addExifTags(originalJpegData, totalCaptureResult, cameraProxy.getCharacteristics().isFacingFront(), PhotoModule.this.mJpegRotation);\n }", "private int computeInSmallSize(Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n // Calculate ratios of height and width to requested height and\n // width\n final int heightRatio = Math.round((float) height / (float) reqHeight);\n final int widthRatio = Math.round((float) width / (float) reqWidth);\n\n // Choose the smallest ratio as inSampleSize value,\n // this will guarantee a final image\n // with both dimensions larger than or equal to the requested\n // height and width.\n inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;\n\n // This offers some additional logic in case the image has a strange\n // aspect ratio. For example, a panorama may have a much larger\n // width than height. In these cases the total pixels might still\n // end up being too large to fit comfortably in memory, so we should\n // be more aggressive with sample down the image (=larger\n // inSampleSize).\n\n final float totalPixels = width * height;\n\n // Anything more than 2x the requested pixels we'll sample down\n // further\n final float totalReqPixelsCap = reqWidth * reqHeight * 2;\n\n while (totalPixels / (inSampleSize * inSampleSize) > totalReqPixelsCap) {\n inSampleSize++;\n }\n }\n return inSampleSize;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case 3: {\n if (resultCode == Activity.RESULT_OK && data != null) {\n Uri image = data.getData();\n try {\n Bitmap temp = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), image);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n temp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n int num = 50;\n while (byteArray.length > 10000 && num > 0) { // compress image to not more than 10 kb\n byteArrayOutputStream.flush();\n byteArrayOutputStream.reset();\n\n temp.compress(Bitmap.CompressFormat.JPEG, num, byteArrayOutputStream);\n num = num / 2;\n byteArray = byteArrayOutputStream.toByteArray();\n }\n this.profilePic = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT);\n profilePicChanged = true;\n Toast.makeText(dialog.getContext(), \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n decodeImage(profilePic, editImage);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch (requestCode) {\n case REQUEST_SELECT_IMAGE_1:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri1 = null;\n mBitmap1 = null;\n mImageUri1 = data.getData();\n mBitmap1 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri1, getContentResolver());\n if (mBitmap1 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(mBitmap1);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n case REQUEST_SELECT_IMAGE_2:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri2 = null;\n mBitmap2 = null;\n mImageUri2 = data.getData();\n mBitmap2 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri2, getContentResolver());\n if (mBitmap2 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(mBitmap2);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n default:\n break;\n }\n }", "private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }", "@Override\n public int getCount() {\n return bitmaplist.size();\n }", "private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n if (width > height) {\n inSampleSize = Math.round((float) height / (float) reqHeight);\n } else {\n inSampleSize = Math.round((float) width / (float) reqWidth);\n }\n\n return inSampleSize;\n }\n return 1;\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 7 && resultCode == RESULT_OK) {\n\n Bitmap bitmap = (Bitmap) data.getExtras().get(\"data\");\n currentBitMap = bitmap;\n imageView.setImageBitmap(bitmap);\n }\n\n try {\n if (requestCode == IMG_RESULT && resultCode == RESULT_OK && data != null) {\n Uri URI = data.getData();\n String[] FILE = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(URI, FILE, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(FILE[0]);\n String ImageDecode = cursor.getString(columnIndex);\n cursor.close();\n\n currentBitMap = BitmapFactory.decodeFile(ImageDecode);\n imageView.setImageBitmap(currentBitMap);\n }\n } catch (Exception e) {\n Toast.makeText(this, \"Please try again\", Toast.LENGTH_LONG)\n .show();\n }\n }", "public int calculateInSampleSize(\n\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n if (width > height) {\n inSampleSize = Math.round((float) height\n / (float) reqHeight);\n } else {\n inSampleSize = Math.round((float) width / (float) reqWidth);\n }\n }\n\n return inSampleSize;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tsuper.onActivityResult(requestCode, resultCode, data);\n \t\n \tif(requestCode == RESPONSE_TAKE_PHOTO && resultCode == Activity.RESULT_OK){\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t options.inSampleSize = 4;\n\n \t Bitmap thumbnail = (Bitmap) data.getExtras().get(\"data\"); \n \t mImage.setImageBitmap(thumbnail);\n\n \t}\n }", "public int[] getFitSize() {\n int[] fitSize = new int[2];\n\n float ratio = originalImage.getWidth() / (float)originalImage.getHeight();\n float viewRatio = viewWidth / (float)viewHeight;\n\n //width dominate, fit w\n if(ratio > viewRatio) {\n float factor = viewWidth / (float)originalImage.getWidth();\n fitSize[0] = viewWidth;\n fitSize[1] = (int)(originalImage.getHeight() * factor);\n\n } else {\n //height dominate, fit h\n float factor = viewHeight / (float)originalImage.getHeight();\n fitSize[0] = (int)(originalImage.getWidth() * factor);\n fitSize[1] = viewHeight;\n }\n\n return fitSize;\n }", "private static Bitmap readImageWithSampling(String imagePath, int targetWidth, int targetHeight,\n Bitmap.Config bmConfig) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imagePath, bmOptions);\n\n int photoWidth = bmOptions.outWidth;\n int photoHeight = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoWidth / targetWidth, photoHeight / targetHeight);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inPreferredConfig = bmConfig;\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bmOptions.inDither = false;\n\n Bitmap orgImage = BitmapFactory.decodeFile(imagePath, bmOptions);\n\n return orgImage;\n\n }", "private static int calculateInSampleSize(BitmapFactory.Options options,\n\t\t\tint reqWidth, int reqHeight) {\n\t\tfinal int height = options.outHeight;\n\t\tfinal int width = options.outWidth;\n\t\tint inSampleSize = 1;\n\n\t\tif (height > reqHeight || width > reqWidth) {\n\n\t\t\t// Calculate ratios of height and width to requested height and\n\t\t\t// width\n\t\t\tfinal int heightRatio = Math.round((float) height\n\t\t\t\t\t/ (float) reqHeight);\n\t\t\tfinal int widthRatio = Math.round((float) width / (float) reqWidth);\n\n\t\t\t// Choose the smallest ratio as inSampleSize value, this will\n\t\t\t// guarantee a final image\n\t\t\t// with both dimensions larger than or equal to the requested height\n\t\t\t// and width.\n\t\t\tinSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;\n\n\t\t\t// This offers some additional logic in case the image has a strange\n\t\t\t// aspect ratio. For example, a panorama may have a much larger\n\t\t\t// width than height. In these cases the total pixels might still\n\t\t\t// end up being too large to fit comfortably in memory, so we should\n\t\t\t// be more aggressive with sample down the image (=larger\n\t\t\t// inSampleSize).\n\n\t\t\tfinal float totalPixels = width * height;\n\n\t\t\t// Anything more than 2x the requested pixels we'll sample down\n\t\t\t// further\n\t\t\tfinal float totalReqPixelsCap = reqWidth * reqHeight * 2;\n\n\t\t\twhile (totalPixels / (inSampleSize * inSampleSize) > totalReqPixelsCap) {\n\t\t\t\tinSampleSize++;\n\t\t\t}\n\t\t}\n\t\treturn inSampleSize;\n\t}", "public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\r\n final int width = options.outWidth;\r\n int inSampleSize = Math.max(height / reqHeight, width / reqWidth);\r\n int inWidthSampleSize = width / reqWidth;\r\n int inHeightSampleSize = height / reqHeight;\r\n if (inWidthSampleSize * reqWidth < width) {\r\n inWidthSampleSize++;\r\n }\r\n if (inHeightSampleSize * reqHeight < height) {\r\n inHeightSampleSize++;\r\n }\r\n\r\n return Math.max(inWidthSampleSize, inHeightSampleSize);\r\n }", "public static int calculateInSampleSize(BitmapFactory.Options options,\n int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n // Calculate ratios of height and width to requested height and\n // width\n final int heightRatio = Math.round((float) height\n / (float) reqHeight);\n final int widthRatio = Math.round((float) width / (float) reqWidth);\n\n // Choose the smallest ratio as inSampleSize value, this will\n // guarantee\n // a final image with both dimensions larger than or equal to the\n // requested height and width.\n inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;\n }\n\n return inSampleSize;\n\n\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImageURI = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n\r\n Cursor cursor = getContentResolver().query(selectedImageURI,\r\n filePathColumn, null, null, null);\r\n cursor.moveToFirst();\r\n\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n String picturePath = cursor.getString(columnIndex);\r\n cursor.close();\r\n\r\n selectedImage.setVisibility(View.VISIBLE);\r\n selectedImage.setImageBitmap(BitmapFactory.decodeFile(picturePath));\r\n\r\n //get the bytes from image that will be uploaded\r\n selectedImage.setDrawingCacheEnabled(true);\r\n selectedImage.buildDrawingCache();\r\n Bitmap bitmap = ((BitmapDrawable) selectedImage.getDrawable()).getBitmap();\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\r\n imageBytes = baos.toByteArray();\r\n }\r\n }" ]
[ "0.6816721", "0.67899907", "0.65001935", "0.64407754", "0.6421931", "0.64055586", "0.6348242", "0.6343722", "0.6343722", "0.6343722", "0.62985146", "0.62778157", "0.6246052", "0.6229092", "0.6183319", "0.61674", "0.61474013", "0.61389965", "0.6126405", "0.6110839", "0.61076045", "0.60961634", "0.60715455", "0.6056507", "0.6049593", "0.60234815", "0.6023321", "0.60129756", "0.60021555", "0.6001945", "0.5985349", "0.59511286", "0.59437674", "0.59391", "0.592358", "0.59209406", "0.5898696", "0.58934903", "0.5888291", "0.58795655", "0.5878768", "0.5869317", "0.5862352", "0.58542603", "0.58461654", "0.58427644", "0.5830773", "0.5825798", "0.58005744", "0.5796199", "0.57814115", "0.5780568", "0.5776883", "0.5773982", "0.57725686", "0.57721883", "0.575518", "0.57513994", "0.5746485", "0.5739936", "0.5739795", "0.57292765", "0.5728851", "0.5725584", "0.57164663", "0.571475", "0.5710846", "0.5705862", "0.5705862", "0.5705587", "0.57039416", "0.5702196", "0.5701858", "0.56918544", "0.568664", "0.5667728", "0.56648153", "0.564395", "0.5637829", "0.5635975", "0.5635078", "0.5628558", "0.5628364", "0.56245905", "0.56224465", "0.56195414", "0.5619356", "0.5610816", "0.5608073", "0.5593389", "0.5592061", "0.55907", "0.55847764", "0.5582301", "0.5580133", "0.55763626", "0.5572615", "0.5562221", "0.55573004", "0.55448" ]
0.5631242
81
/ Intent mediaScanIntent = new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE"); File f = new File(mCurrentPhotoPath); Uri contentUri = Uri.fromFile(f); mediaScanIntent.setData(contentUri); this.sendBroadcast(mediaScanIntent);
private void galleryAddPic() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scanPhoto(File imageFile)\n {\n Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n Uri contentUri = Uri.fromFile(imageFile);\n mediaScanIntent.setData(contentUri); \n cordova.getActivity().sendBroadcast(mediaScanIntent);\n }", "private void galleryAddPic() {\n Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n mediaScanIntent.setData(currentImageUri);\n this.sendBroadcast(mediaScanIntent);\n }", "public void scanSD(File file) {\n Intent mediaScan = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n Uri contentUri = Uri.fromFile(file);\n mediaScan.setData(contentUri);\n context.getApplicationContext().sendBroadcast(mediaScan);\n }", "private static void galleryAddPic(File file, Context context) {\n Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n Uri contentUri = Uri.fromFile(file);\n mediaScanIntent.setData(contentUri);\n context.sendBroadcast(mediaScanIntent);\n }", "public static void addPictureToGallery(Context mContext, String realFilePathFromMedia) {\n Intent mIntentMediaScan = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n File mFile = new File(realFilePathFromMedia);\n Uri mUriContent = Uri.fromFile(mFile);\n mIntentMediaScan.setData(mUriContent);\n ((Activity) mContext).sendBroadcast(mIntentMediaScan);\n }", "private void performFileSearch() {\n Intent intent = new Intent();\n intent.setType(\"*/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n\n }", "private void galleryIntent() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//\n startActivityForResult(Intent.createChooser(intent, \"Select Photo\"), SELECT_PHOTO);\n }", "public void openIntentGetContent(){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\n //have to use this instead of startActivity if you want to store the image in imageView\n //cause if you use this method, only then, can you use the method onActivityResult (defined below this method)\n //otherwise the execution won't go there\n startActivityForResult(intent, WRITE_REQUEST_CODE);\n\n }", "private void galleryIntent() {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n ((MessageActivity) context).startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n\n }", "public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }", "private void dispatchGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickPhoto.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(pickPhoto, REQUEST_CHOOSE_PHOTO_NUM);\n }", "private void galleryIntent()\r\n {\r\nIntent gallery=new Intent();\r\ngallery.setType(\"image/*\");\r\ngallery.setAction(Intent.ACTION_GET_CONTENT);\r\n\r\nstartActivityForResult(Intent.createChooser(gallery,\"Select Picture \"),PICK_IMAGE );\r\n }", "@Override\n public void startDeviceImageIntent() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, PICK_FROM_GALLERY_REQUEST_CODE);\n }", "private void addPicureToGallery(File imageFile){\n Intent mediaScanIntent = new\n Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n Uri contentUri = Uri.fromFile(imageFile);\n mediaScanIntent.setData(contentUri);\n TripitApplication.getContext().sendBroadcast(mediaScanIntent);\n }", "private void captureImage() {\n String imagename = \"urPics.jpg\";\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + imagename);\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n FileUri = Uri.fromFile(file);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);\n // start the image capture Intent\n startActivityForResult(intent, REQUEST_CODE_CAMERA);\n }", "public void openGallery(){\n Intent intentImg=new Intent(Intent.ACTION_GET_CONTENT);\n intentImg.setType(\"image/*\");\n startActivityForResult(intentImg,200);\n }", "private void dispatchLoadPhotoIntent() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Choose Picture\"), REQUEST_LOAD_PHOTO);\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "public void onImageGalleryClicked(View v){\n //invoke the image gallery using an implicit intent\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n\n //decides where to store pictures\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n String pictureDirectoryPath = pictureDirectory.getPath();\n\n //gets URI representation\n Uri data = Uri.parse(pictureDirectoryPath);\n\n //sets the data and type of media to look for\n photoPickerIntent.setDataAndType(data,\"image/*\");\n startActivityForResult(photoPickerIntent, Image_Gallery_Request);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n //Where do we want to find the data\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n //Get the name of the directory\n String pictureDirectoryPath = pictureDirectory.getPath();\n //Get a URI representation of the Path because this is what android needs to deal with\n Uri data = Uri.parse(pictureDirectoryPath);\n //Set the data (where we want to look for this media) and the type (what media do we want to look for).Get all image types\n photoPickerIntent.setDataAndType(data, \"image/*\");\n //We invoke the image gallery and receive something from it\n if (photoPickerIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);\n }\n\n }", "public void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent ( MediaStore.ACTION_IMAGE_CAPTURE );\n //dam bao chi co mot hoat dodng camera\n if (takePictureIntent.resolveActivity ( getPackageManager () ) != null) {\n // tao file ma anh gui den\n File photoFile = null;\n try {\n photoFile = createImageFile ();\n } catch (IOException ex) {\n //ERROR\n }\n // neu co file gui anh vao photoFIle\n if (photoFile != null) {\n pathToFile = photoFile.getAbsolutePath ();\n Uri photoURI = FileProvider.getUriForFile ( this ,\n \"com.example.diem_danh_sv.fileprovider\" ,\n photoFile );\n takePictureIntent.putExtra ( MediaStore.EXTRA_OUTPUT , photoURI );\n startActivityForResult ( takePictureIntent , REQUEST_ID_IMAGE_CAPTURE );\n }\n }\n }", "public static Intent getIntent(){\n Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n\tpickIntent.setType(\"image/*\");\n\tpickIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n\tpickIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\t\n\treturn pickIntent;\n }", "public void onScanCompleted(String path, Uri uri) {\n }", "private void takePhoto() {\n Intent cameraIntent = new Intent(Intent.ACTION_PICK);\n cameraIntent.setType(\"image/*\");\n //startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);\n startActivityForResult(cameraIntent, GALLERY_PIC_REQUEST);\n }", "private void openGallery() {\n\n Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT);\n galleryIntent.setType(\"image/*\");\n startActivityForResult(galleryIntent, REQUESCODE);\n }", "public void takePhoto(){\n // We create the intent and the file\n Intent intent = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n File path = new File(Environment.getExternalStorageDirectory().toString() + PATH);\n if (!path.exists()) {\n path.mkdir();\n }\n File picture = new File(path.getAbsolutePath(),\"Foto.jpg\");\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(picture));\n // We have the path for the photo\n this.pictureId = Uri.fromFile(picture);\n // Begin the camera activity\n startActivityForResult(intent, CAMERA_APP);\n }", "private void saveImage(Bitmap bitmap, String fileName) {\n File createFolder = new File(Environment.getExternalStorageDirectory(), FILEPATH);\n if (!createFolder.exists())\n createFolder.mkdir();\n\n File output = new File(Environment.getExternalStorageDirectory(),\n FILEPATH + \"/\" + fileName + \".jpg\");\n if (output.exists()) {\n output.delete();\n\n /*Whenever you delete a file, let MediaStore Content Provider knows about it*/\n// getContentResolver().delete(Uri.fromFile(output), null, null);\n }\n\n// System.currentTimeMillis()\n File saveImage = new File(createFolder, fileName + \".jpg\");\n try {\n OutputStream outputStream = new FileOutputStream(saveImage);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n if (saveImage.exists()) {\n /*Whenever you add a file, let MediaStore Content Provider knows about it using*/\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(saveImage)));\n\n\n publishResults(fileName, result);//output.getAbsolutePath()\n Log.v(TAG, fileName + \", size : \" + saveImage.getAbsoluteFile().length());\n }\n } catch (FileNotFoundException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n }\n }", "private void openGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }", "public void OpenGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }", "private void openImageIntent() {\n\t\tfinal File root = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t+ File.separator + \"MyDir\" + File.separator);\n\t\troot.mkdirs();\n\n\t\tfinal File sdImageMainDirectory = new File(root, getUniquePhotoName());\n\t\toutputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n\t\t// Camera.\n\t\tfinal List<Intent> cameraIntents = new ArrayList<Intent>();\n\t\tfinal Intent captureIntent = new Intent(\n\t\t\t\tandroid.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tfinal PackageManager packageManager = source.getPackageManager();\n\t\tfinal List<ResolveInfo> listCam = packageManager.queryIntentActivities(\n\t\t\t\tcaptureIntent, 0);\n\t\tfor (ResolveInfo res : listCam) {\n\t\t\tfinal String packageName = res.activityInfo.packageName;\n\t\t\tfinal Intent intent = new Intent(captureIntent);\n\t\t\tintent.setComponent(new ComponentName(res.activityInfo.packageName,\n\t\t\t\t\tres.activityInfo.name));\n\t\t\tintent.setPackage(packageName);\n\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n\t\t\tcameraIntents.add(intent);\n\t\t}\n\n\t\t// Filesystem.\n\t\tfinal Intent galleryIntent = new Intent();\n\t\tgalleryIntent.setType(\"*/*\");\n\t\tgalleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n\t\t// Chooser of filesystem options.\n\t\tIntent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n\t\t// Add the camera options.\n\t\t//chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,\n\t\t//\t\tcameraIntents.toArray(new Parcelable[] {}));\n\t\t\n\t\tIntent getContentIntent = FileUtils.createGetContentIntent();\n\n\t chooserIntent = Intent.createChooser(getContentIntent, \"Select a file\");\n\n\t\tsource.startActivityForResult(chooserIntent, Constants.QUIZSHOW_DATA);\n\t\t\n\t}", "private void openFileChooser() {\n Intent imageIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n imageIntent.setType(\"image/*\");\n startActivityForResult(imageIntent, GALLERY_REQUEST);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == 1) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n String txt = getTextFromImage(bitmap);\n searchByPhoto(txt);\n }else if(requestCode == 2){\n Bitmap bm=null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String txt = getTextFromImage(bm);\n searchByPhoto(txt);\n }\n }\n }", "protected void startGallery() {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, GALLERY_REQUEST);\n\n }", "public void uploadPhoto(View view) {\n Intent i = new Intent(\n Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n startActivityForResult(i, GET_FROM_GALLERY);\n\n }", "public void onScanCompleted(String path, Uri uri) {\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(Driver_License_Scan.this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }", "public void uploadPic(View view) {\n Intent si=new Intent();\n si.setType(\"image/*\");\n si.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(si,1);\n\n\n }", "private void openGallery() {\n\n Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT);\n galleryIntent.setType(\"image/*\");\n startActivityForResult(galleryIntent, REQUESCODE);\n }", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }", "private void openImageIntent() {\n final File root = new File(Environment.getExternalStorageDirectory() + File.separator + \"MyDir\" + File.separator);\n root.mkdirs();\n final String fname = UUID.randomUUID().toString();\n final File sdImageMainDirectory = new File(root, fname);\n outputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n // Camera.\n final List<Intent> cameraIntents = new ArrayList<Intent>();\n final Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n final PackageManager packageManager = getPackageManager();\n final List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for(ResolveInfo res : listCam) {\n final String packageName = res.activityInfo.packageName;\n final Intent intent = new Intent(captureIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(packageName);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n cameraIntents.add(intent);\n }\n\n // Filesystem.\n final Intent galleryIntent = new Intent();\n galleryIntent.setType(\"image/*\");\n galleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n // Chooser of filesystem options.\n final Intent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n // Add the camera options.\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[]{}));\n\n startActivityForResult(chooserIntent, SELECT_PICTURE);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void onScanCompleted(String path, Uri uri) {\n }", "private void takePicture() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // check if there is a camera app installed\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // build the photo file\n mPhotoFile = new File(getExternalFilesDir(null), code + \".jpg\");\n // get URI using a file provider\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.martindisch.fileprovider\",\n mPhotoFile);\n // put URI into Intent\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n // send Intent\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, R.string.no_camera, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n b = (Button)findViewById(R.id.btn1);\n\n b.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent intent = new Intent(\n MediaStore.Audio.Media.RECORD_SOUND_ACTION);\n startActivityForResult(intent, RQS_RECORDING);\n // Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n // intent.setType(\"image/*\");\n // startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), REQUEST_PICKER);\n\n }\n });\n }", "private void dispatchTakePictureIntent() { // to camera\n\n // must be\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n\n //stworzenie nazwy pliku dla nowego zdjęcia, bedzie nadpisywana za każdym razem\n File outFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"example.jpg\");\n\n //zapisanie ścieżki do nowego zdjęcia z aparatu\n mCameraFileName = outFile.toString();\n Uri outUri = Uri.fromFile(outFile);\n Intent intent = new Intent();\n intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outUri);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, \"External storage not available\", Toast.LENGTH_SHORT).show();\n }\n }", "private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }", "@Override\n public void onClick(View view) {\n Intent implicitIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\n // Define the file type\n implicitIntent.setType(\"image/*\");\n\n // start this intent\n startActivityForResult(implicitIntent,REQUEST_CODE);\n }", "public void sendIntentToGallery() {\n\t\tIntent i = new Intent(\n\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t// Send the intent with id 1\n\t\tstartActivityForResult(i, 1);\n\t}", "private void pickFromGallery() {\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n intent.setType(\"image/*\");\n\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\",\"image/jpg\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }", "@Override\n public void onClick(View v) {\n Intent intent_upload = new Intent();\n intent_upload.setType(\"audio/*\");\n intent_upload.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent_upload, 1);\n }", "private void takePhoto() {\n Uri fileUri = FileProvider.getUriForFile(Mic.getmCtx(), \"com.jay.appdemo1.fileProvider\", getOutputMediaFile());\n Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 10); //限制的录制时长 以秒为单位\n// intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, 1024); //限制视频文件大小 以字节为单位\n// intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); //设置拍摄的质量0~1\n// intent.putExtra(MediaStore.EXTRA_FULL_SCREEN, false); // 全屏设置\n startActivityForResult(intent, RECORD_SYSTEM_VIDEO);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n // Start the Intent\n startActivityForResult(galleryIntent, RESULT_LOAD_IMG);\n return false;\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n startActivityForResult(i, RESULT_LOAD_IMAGE);\n }", "private void dispatchTakePhotoIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n Log.e(TAG, \"dispatchTakePhotoIntent: \" + \"Error Creating file\");\n }\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n mImageURI = FileProvider.getUriForFile(this,\n \"com.davidhaas.mazeways.fileprovider\",\n photoFile);\n\n // Takes the picture\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageURI);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n }", "public void cargarGaleriaImgs(View view) {\n//Comprobamos el estado de la memoria externa (tarjeta SD)\n String estado = Environment.getExternalStorageState();\n//indica que la memoria externa está disponible y podemos tanto leer como escribir en ella.\n if (estado.equals(Environment.MEDIA_MOUNTED))\n {\n System.out.println(\"Podemos leer y escribir\");\n sdDisponible = true;\n sdAccesoEscritura = true;\n crearIntentGallery();\n }\n else if (estado.equals(Environment.MEDIA_MOUNTED_READ_ONLY))\n {\n System.out.println(\"Podemos SOLO leer\");\n sdDisponible = true;\n sdAccesoEscritura = false;\n }\n else\n {\n System.out.println(\"No Podemos hacer nada\");\n sdDisponible = false;\n sdAccesoEscritura = false;\n }\n }", "@Override\n public void onClick(View v) {\n Intent camIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n camIntent.setType(\"image/*\");\n startActivityForResult(camIntent,CAMERA_REQUEST);\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent();\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(photoPickerIntent, GALLERY_REQUEST);\n }", "public void onLaunchSelect() {\n Intent intent = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Bring up gallery to select a photo\n startActivityForResult(intent, SELECT_IMAGE_REQUEST_CODE);\n }\n }", "public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, RESULT_LOAD_IMAGE);\n }", "@Override\n public void imageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select picture\"), PICK_IMAGE);\n }", "public void onLaunchCamera() {\n takePic.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // create Intent to take a picture and return control to the calling application\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(Driver_License_Scan.this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n\n switch (requestCode) {\n case 100:\n Bundle extras = data.getExtras();\n Bitmap imageBitmap = (Bitmap) extras.get(\"data\");\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n Media media = new Media();\n media.setType(Media.TYPE.IMAGE_JPG);\n media.setBytes(byteArray);\n if (recyclerView.getVisibility() == View.GONE)\n recyclerView.setVisibility(View.VISIBLE);\n medias.add(media);\n ((PicturesRecyclerAdapter) recyclerView.getAdapter()).updateContent(medias);\n break;\n default:\n Toast.makeText(this, \"Something went wrong...\", Toast.LENGTH_SHORT).show();\n break;\n }\n\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }", "public void escolherImagem(int requestCode) {\n\n Intent i = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, requestCode);\n\n }", "public void gallery(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE_GALLERY);\n\n\n }", "private void openImageIntent() {\n File pictureFolder = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES\n );\n final File root = new File(pictureFolder, \"SkilExImages\");\n// final File root = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"MyDir\");\n\n if (!root.exists()) {\n if (!root.mkdirs()) {\n Log.d(TAG, \"Failed to create directory for storing images\");\n return;\n }\n }\n Calendar newCalendar = Calendar.getInstance();\n int month = newCalendar.get(Calendar.MONTH) + 1;\n int day = newCalendar.get(Calendar.DAY_OF_MONTH);\n int year = newCalendar.get(Calendar.YEAR);\n int hours = newCalendar.get(Calendar.HOUR_OF_DAY);\n int minutes = newCalendar.get(Calendar.MINUTE);\n int seconds = newCalendar.get(Calendar.SECOND);\n final String fname = PreferenceStorage.getUserMasterId(this) + \"_\" + day + \"_\" + month + \"_\" + year + \"_\" + hours + \"_\" + minutes + \"_\" + seconds + \".png\";\n final File sdImageMainDirectory = new File(root.getPath() + File.separator + fname);\n destFile = sdImageMainDirectory;\n outputFileUri = Uri.fromFile(sdImageMainDirectory);\n Log.d(TAG, \"camera output Uri\" + outputFileUri);\n\n // Camera.\n file = new File(Environment.getExternalStorageDirectory()\n + \"/\" + IMAGE_DIRECTORY);\n if (!file.exists()) {\n file.mkdirs();\n }\n final List<Intent> cameraIntents = new ArrayList<Intent>();\n final Intent captureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n final PackageManager packageManager = getPackageManager();\n final List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for (ResolveInfo res : listCam) {\n final String packageName = res.activityInfo.packageName;\n final Intent intent = new Intent(captureIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(packageName);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n cameraIntents.add(intent);\n }\n\n // Filesystem.\n final Intent galleryIntent = new Intent();\n galleryIntent.setType(\"image/*\");\n galleryIntent.setAction(Intent.ACTION_PICK);\n\n // Chooser of filesystem options.\n final Intent chooserIntent = Intent.createChooser(galleryIntent, \"Select Profile Photo\");\n\n // Add the camera options.\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[cameraIntents.size()]));\n\n startActivityForResult(chooserIntent, REQUEST_IMAGE_GET);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "public void saveImageToExternal(String imgName, Bitmap bm) throws IOException {\n String appFolder = \" MashCam\";\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES + appFolder); //Creates app specific folder\n path.mkdirs();\n File imageFile = new File(path, imgName + \".png\"); // Imagename.png\n FileOutputStream out = new FileOutputStream(imageFile);\n try {\n bm.compress(Bitmap.CompressFormat.PNG, 100, out); // Compress Image\n out.flush();\n out.close();\n\n // Tell the media scanner about the new file so that it is\n // immediately available to the user.\n MediaScannerConnection.scanFile(getWindow().getContext(), new String[]{imageFile.getAbsolutePath()}, null, new MediaScannerConnection.OnScanCompletedListener() {\n public void onScanCompleted(String path, Uri uri) {\n Log.i(\"ExternalStorage\", \"Scanned \" + path + \":\");\n Log.i(\"ExternalStorage\", \"-> uri=\" + uri);\n }\n });\n } catch (Exception e) {\n throw new IOException();\n }\n }", "@Override\n public void onClick(View view) {\n Intent gallery_intent=new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery_intent,RESULT_LOAD_IMAGE);//Paasing intentobject and an integer value\n\n }", "public void onLaunchCamera(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n /*photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);*/\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif(intent.getAction().equals(\"android.intent.action.MEDIA_MOUNTED\")){\r\n\t\t\tLog.i(\"MediaMountedReceiver\", \"onReceive\");\r\n\t\t\t\r\n\t\t\tUtil.initiateAlarmManager(context);\r\n\t\t}\r\n\t}", "public void performFileSearch() {\n\n // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be \"*/*\".\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public void importImageFromGallery(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(mActivity, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) {\n mActivity.requestPermissions(new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, NoteConstants.WRITE_EXTERNAL_STORAGE_PERMISSION_REQUESTCODE);\n }\n else {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n mActivity.startActivityForResult(pickPhoto, NoteConstants.GALLERY_IMPORT_ACTIVITY_REQUESTCODE);\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "private void openCamera() {\n Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // intent.setAction(Intent.ACTION_PICK);\n // intent.putExtra(MediaStore.EXTRA_OUTPUT,Image_uri);\n startActivityForResult(intent, camera_image_code);\n\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tmediaManager.onActivityResult(requestCode, resultCode, data);\n\t}", "private void cameraIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((MessageActivity) context).startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }", "public void takePictureByCamera(Context context){\n\n String state = Environment.getExternalStorageState();\n if (state.equals(Environment.MEDIA_MOUNTED)) {\n Intent getImageByCamera = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n ((Activity)context).startActivityForResult(getImageByCamera, TAG_takepicture);\n }\n else {\n MyToast.showToast(context,\"please install SDcard\");\n }\n }", "private void openGallery() {\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(gallery, REQUEST_IMAGE_SELECT);\n }", "private void dispatchGetPictureFromGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n if (pickPhoto.resolveActivity(getContext().getPackageManager()) != null) {\n this.startActivityForResult(pickPhoto, PICK_IMAGE);\n }\n }", "private void OpenGallery() {\n Intent pickImage = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickImage, RequestCode);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (data != null && data.getData() != null && resultCode == RESULT_OK) {\n ParcelFileDescriptor pfd;\n try {\n ImageView image=(ImageView)findViewById(R.id.imgView);\n pfd = getContentResolver().openFileDescriptor(data.getData(), \"r\");\n FileDescriptor fd = pfd.getFileDescriptor();\n Bitmap img = BitmapFactory.decodeFileDescriptor(fd);\n pfd.close();\n image.setImageBitmap(img); //image represent ImageVIew to display picked image\n\n if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {\n int flags = data.getFlags()&(Intent.FLAG_GRANT_READ_URI_PERMISSION|Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n Uri u = data.getData();\n getContentResolver().takePersistableUriPermission(u,flags);\n String id = u.getLastPathSegment().split(\":\")[1];\n final String[] imageColumns = {MediaStore.Images.Media.DATA};\n final String imageOrderBy = null;\n Uri u1 =Uri.EMPTY;\n String state = Environment.getExternalStorageState();\n if (!state.equalsIgnoreCase(Environment.MEDIA_MOUNTED))\n u1 = MediaStore.Images.Media.INTERNAL_CONTENT_URI;\n else\n u1 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n Cursor c = managedQuery(u1, imageColumns, MediaStore.Images.Media._ID + \"=\" + id, null, imageOrderBy);\n if (c.moveToFirst()) {\n imgPath = c.getString(c.getColumnIndex(MediaStore.Images.Media.DATA)); //imgPath represents string variable to hold the path of image\n }\n } else {\n Uri imgUri = data.getData();\n Cursor c1 = getContentResolver().query(imgUri, null, null, null, null);\n if (c1 == null) {\n imgPath = imgUri.getPath(); //imgPath represents string variable to hold the path of image\n } else {\n c1.moveToFirst();\n int idx = c1.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n imgPath = c1.getString(idx); //imgPath represents string variable to hold the path of image\n c1.close();\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }catch(Exception ea)\n {}\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void sharePic(View view) {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);\n } else {\n // Permission has already been granted\n Intent intent1 = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent1.putExtra(\"sender\", \"share_pic\");\n if (intent1.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.classup.provider\",\n photoFile);\n intent1.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent1, ACTIVITY_SELECT_IMAGE);\n }\n }\n }\n }", "public void openImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, IMAGE_REQUEST);\n }", "private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }", "private void openImageIntent() {\n File pictureFolder = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES\n );\n final File root = new File(pictureFolder, \"SkilExImages\");\n// final File root = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"MyDir\");\n\n if (!root.exists()) {\n if (!root.mkdirs()) {\n d(TAG, \"Failed to create directory for storing images\");\n return;\n }\n }\n Calendar newCalendar = Calendar.getInstance();\n int month = newCalendar.get(Calendar.MONTH) + 1;\n int day = newCalendar.get(Calendar.DAY_OF_MONTH);\n int year = newCalendar.get(Calendar.YEAR);\n int hours = newCalendar.get(Calendar.HOUR_OF_DAY);\n int minutes = newCalendar.get(Calendar.MINUTE);\n int seconds = newCalendar.get(Calendar.SECOND);\n final String fname = PreferenceStorage.getUserMasterId(this) + \"_\" + day + \"_\" + month + \"_\" + year + \"_\" + hours + \"_\" + minutes + \"_\" + seconds + \".png\";\n final File sdImageMainDirectory = new File(root.getPath() + File.separator + fname);\n destFile = sdImageMainDirectory;\n outputFileUri = Uri.fromFile(sdImageMainDirectory);\n d(TAG, \"camera output Uri\" + outputFileUri);\n\n // Camera.\n file = new File(Environment.getExternalStorageDirectory()\n + \"/\" + IMAGE_DIRECTORY);\n if (!file.exists()) {\n file.mkdirs();\n }\n final List<Intent> cameraIntents = new ArrayList<Intent>();\n final Intent captureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n final PackageManager packageManager = getPackageManager();\n final List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for (ResolveInfo res : listCam) {\n final String packageName = res.activityInfo.packageName;\n final Intent intent = new Intent(captureIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(packageName);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n cameraIntents.add(intent);\n }\n\n // Filesystem.\n final Intent galleryIntent = new Intent();\n galleryIntent.setType(\"image/*\");\n galleryIntent.setAction(Intent.ACTION_PICK);\n\n // Chooser of filesystem options.\n final Intent chooserIntent = Intent.createChooser(galleryIntent, \"Select Profile Photo\");\n\n // Add the camera options.\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[cameraIntents.size()]));\n\n startActivityForResult(chooserIntent, REQUEST_IMAGE_GET);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data){\n if (resultCode == Activity.RESULT_OK){\n if (requestCode == SELECT_FILE){\n selectedImageUri = data.getData();\n String[] projection = {MediaStore.MediaColumns.DATA};\n CursorLoader cursorLoader = new CursorLoader(mActivity, selectedImageUri, projection, null, null,\n null);\n Cursor cursor = cursorLoader.loadInBackground();\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);\n cursor.moveToFirst();\n String selectedImagePath = cursor.getString(column_index);\n Bitmap bm;\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n// BitmapFactory.decodeFile(selectedImagePath, options);\n final int REQUIRED_SIZE = 200;\n int scale = 1;\n while (options.outWidth / scale / 2 >= REQUIRED_SIZE\n && options.outHeight / scale / 2 >= REQUIRED_SIZE)\n scale *= 2;\n options.inSampleSize = scale;\n options.inJustDecodeBounds = false;\n bm = BitmapFactory.decodeFile(selectedImagePath, options);\n emailIntent.setType(\"image/jpeg\");\n emailIntent.putExtra(Intent.EXTRA_STREAM,selectedImageUri);\n Log.i(\"EasyFeedback\", \"Image selected and intent is ready to use!\");\n models.setImage(bm);\n onImageSelectedListener.onImageSelected(bm);\n\n }\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there is a camera activity to handle the intent\n if(takePictureIntent.resolveActivity(getPackageManager()) != null) {\n //Create file where photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n }catch (IOException e){\n //Error occured while creating the file\n System.out.println(\"Exception in dispatch: \" + e.toString());\n }\n //continue only if the file was created correctly\n if(photoFile != null){\n photoUri = FileProvider.getUriForFile(\n this, \"com.example.android.fileprovider\", photoFile\n );\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);\n startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_IMAGE && resultCode == RESULT_OK) {\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n saveImage(bitmap);\n imageView.setImageBitmap(bitmap);\n } else if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_LONG).show();\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == TAKE_IMAGE && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n imageView.setImageBitmap(bitmap);\n }\n else {\n if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_SHORT).show();\n //textTargetUri.setText(targetUri.toString());\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n }\n /*String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n\t\t\tCursor cursor = getContentResolver().query(data.getData(), filePathColumn, null, null, null);\n\t\t\tcursor.moveToFirst();\n\n\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\n\t\t\tString filePath = cursor.getString(columnIndex);\n\t\t\tcursor.close();\n\n\t\t\tBitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\t\t\tToast.makeText(getApplicationContext(), filePath, 1000).show();\n\t\t\timageView.setImageBitmap(yourSelectedImage);\n*/\n }\n }\n if(requestCode == 0 && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n // imageView.setImageBitmap(bitmap);\n\n\n File root = Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath()+\"/DCIM/Camera/img.jpg\");\n try\n {\n file.createNewFile();\n FileOutputStream ostream = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, ostream);\n ostream.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n Toast.makeText(this,\"Failed to save image, try again\",Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n ((MainActivity) getActivity()).startActivityForResult(\n Intent.createChooser(intent, \"Select Picture\"),\n MainActivity.GALLERY_CODE);\n\n }", "private void captureImages() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n imageFileUri = FileUtil.getOutputMediaFileUri(FileUtil.MEDIA_TYPE_IMAGE); // create a file to save the image\n intent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri); // set the image file name\n\n // start the image capture Intent\n startActivityForResult(intent, FileUtil.CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }", "public void onCreateActivity(){\n\t\tlist_v = (ListView) findViewById(R.id.list_v);\n\t\tappInst = (App) getApplicationContext();\n// File dir = new File(appInst.MUSIC_PATH);\n// String[] files = dir.list();\n\t\tString textSt = \"\";\n// for(String file : files){\n// \ttextSt += (file+\"\\r\\n\");\n// }\n// text.setText(textSt);\n// text.setText(appInst.MUSIC_PATH);\n// text.setText(FileUtils.walk(appInst.MUSIC_PATH));\n// getContentResolver().query(appInst.MUSIC_PATH, projection, selection, selectionArgs, sortOrder)\n\t\tString[] proj = new String[] {\n\t\t\t\tMediaStore.Audio.Media._ID,\n\t\t\t\tMediaStore.Audio.Media.DATA,\n\t\t\t\tMediaStore.Audio.Media.DISPLAY_NAME,\n\t\t\t\tMediaStore.Audio.Media.DURATION,\n\t\t\t\tMediaStore.Audio.Media.ALBUM_ID\n\n\t\t};\n// Log.i(\">>uri\",Uri.fromParts(\"content\", appInst.MUSIC_PATH, null).toString());\n// Log.i(\">>uri\",Uri.parse(appInst.MUSIC_PATH).toString());\n// String where = MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\" + \" AND \"+\n// \t\tMediaStore.Audio.Artists._ID +\" IN (\" +\n// \t\t\t\t\"SELECT \"+MediaStore.Audio.Media.ARTIST_ID+\" FROM AUDIO \"+\n// \t\t\t\t\"WHERE \"+MediaStore.Audio.Media.DATA +\" LIKE ?\" +\n// \t\t\")\";\n\t\tString where = MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\" + \" AND \" +\n\t\t\t\tMediaStore.Audio.Media.DATA + \" LIKE ?\";\n\t\tString[] whereArgs = new String[]{appInst.MUSIC_PATH + \"%\"};\n\t\tCursor curs = appInst.getContentResolver().query(\n\t\t\t\tMediaStore.Audio.Media.EXTERNAL_CONTENT_URI,\n// \t\tMediaStore.Audio.Artists.EXTERNAL_CONTENT_URI,\n// \t\tUri.parse(appInst.MUSIC_PATH),\n// \t\tUri.fromParts(\"content\", appInst.MUSIC_PATH, null),\n\t\t\t\tproj,\n// \t\tnull,\n// MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\",\n\t\t\t\twhere,\n\t\t\t\twhereArgs,\n\t\t\t\tMediaStore.Audio.Media._ID);\n\t\tfinal List<Song> songs = new ArrayList<>();\n\t\tif (curs == null) {\n\t\t\tToast.makeText(getApplicationContext(), \"query failed, handle error\", Toast.LENGTH_LONG).show();\n// Log.e(\"Cursor\", \"query failed, handle error\");\n\t\t} else if (!curs.moveToFirst()) {\n\t\t\tToast.makeText(getApplicationContext(), \"no media on the device\", Toast.LENGTH_LONG).show();\n// \tLog.e(\"Cursor\", \"no media on the device\");\n\t\t} else {\n\t\t\tdo {\n// \t\tlong id = curs.getLong(0);\n// \t\tString data = curs.getString(1);\n// \t\tString name = curs.getString(2);\n// \t\tString duration = curs.getString(3);\n// \t\ttextSt += Long.toString(id)+\";\"+data+\";\"+name+\";\"+duration+\"\\r\\n\\r\\n\";\n\t\t\t\tSong s = new Song(curs.getLong(0),curs.getString(1),curs.getString(2),curs.getString(3),curs.getLong(4));\n\t\t\t\tsongs.add(s);\n\t\t\t\tLog.i(\"song\"+s.getId(),\"data:\"+s.getData()+\";name:\"+s.getName()+\";duration:\"+s.getDuration());\n\t\t\t}while(curs.moveToNext());\n\t\t}\n\n\t\tLog.i(\"info\",\"size:\"+songs.size());\n\n\n// text.setText(textSt);\n// final AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs);\n\t\tfinal AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs);\n\t\tlist_v.setAdapter(adapter);\n\t\tlist_v.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, final View view, final int position, long id) {\n//\t\t\t\tSong s = songs.get(position);\n//\t\t\t\tToast.makeText(appInst,\n//\t\t\t\t\t \"Click ListItem path \" + s.getData()+\"; duration:\"+s.getDuration(), Toast.LENGTH_LONG)\n//\t\t\t\t\t .show();\n\t\t\t\tfinal Song item = (Song)parent.getItemAtPosition(position);\n\t\t\t\tview.animate()\n\t\t\t\t\t\t.setDuration(2000)\n\t\t\t\t\t\t.alpha(0)\n\t\t\t\t\t\t.withEndAction(new Runnable() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tsongs.remove(position);\n\t\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\tview.setAlpha(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\tInteger.parseInt(\"adb\");\n\t\t\t}\n\n\t\t});\n\t}" ]
[ "0.838517", "0.7437373", "0.74005795", "0.736612", "0.7130314", "0.7110328", "0.68654466", "0.6830617", "0.67516", "0.6687384", "0.6673233", "0.6647163", "0.6632568", "0.66263866", "0.6610477", "0.65426826", "0.6510989", "0.6510073", "0.64754647", "0.64627403", "0.6460569", "0.64457107", "0.6436722", "0.6435364", "0.6426498", "0.64015543", "0.63900906", "0.63808256", "0.63617134", "0.6337868", "0.63336384", "0.6310885", "0.6310402", "0.63084835", "0.6297174", "0.62948126", "0.6288041", "0.62865347", "0.6285152", "0.62845004", "0.62647086", "0.6259468", "0.6254807", "0.6251073", "0.62412673", "0.6231265", "0.623039", "0.6229773", "0.6228565", "0.6223557", "0.6222206", "0.62130386", "0.62123615", "0.6199932", "0.6194149", "0.6192469", "0.6191819", "0.6177386", "0.61746573", "0.6167249", "0.6165226", "0.61618495", "0.61605257", "0.6146893", "0.61366737", "0.6134254", "0.61298853", "0.6124228", "0.61110926", "0.61099404", "0.60990155", "0.6098775", "0.6094021", "0.60919935", "0.6087056", "0.60851574", "0.6083283", "0.6081147", "0.6079709", "0.6076437", "0.607639", "0.607639", "0.60763085", "0.6072441", "0.6061931", "0.6061102", "0.6047582", "0.60473293", "0.6038891", "0.60384446", "0.6038162", "0.6036393", "0.6035411", "0.6031976", "0.6022126", "0.6002826", "0.6000255", "0.5998154", "0.5992954", "0.59916687", "0.59903264" ]
0.0
-1
width 0f 16 (2 bytes)
public static void main(String[] args) { char myChar = '\u00Ae'; //registered symbol unicode System.out.println("Unicode output was : " + myChar); boolean myBoolean = true; System.out.println("Boolean is = " + myBoolean); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getWidth();", "Length getWidth();", "int getWidth() {return width;}", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public Integer getWidth(){return this.width;}", "public int getWidth()\n {return width;}", "long getWidth();", "public double width() { return _width; }", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "public int grWidth() { return width; }", "@DISPID(100) //= 0x64. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n float width();", "public int width();", "String getWidth();", "String getWidth();", "public int getWidth(){\n \treturn width;\n }", "public int getWidth(){\n return width;\n }", "@Override\n int width();", "public double getWidth() {\n return this.size * 2.0; \n }", "BigInteger getWidth();", "public float getWidth();", "public int getWidth()\n {\n return width;\n }", "public int getHexWidth() {\n return this.hexWidth;\n }", "@Override\n public double getWidth() {\n return width;\n }", "public int getWidth(){\n return width;\n }", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public int getWidth()\n {\n\treturn width;\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "private int getBufferWidth() {\n\t\treturn this.f2[0].length;\n\t}", "public int getWidth(){\n\t\treturn width;\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public abstract int getWidth();", "@Override\n public int getWidth() {\n return width;\n }", "@Override\n public int getWidth() {\n return width;\n }", "public final int getWidth(){\n return width_;\n }", "double getWidth();", "double getWidth();", "public double getWidth();", "public double getWidth();", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "public int getWidth() {\r\n return width;\r\n }", "public double getWidth() {\n\treturn width;\n }", "int getWidth()\n {\n return width;\n }", "public int getIconWidth()\r\n/* 154: */ {\r\n/* 155:194 */ return SIZE;\r\n/* 156: */ }", "public int width() {\n \treturn width;\n }", "public int getIconWidth()\r\n/* 50: */ {\r\n/* 51: 99 */ return SIZE;\r\n/* 52: */ }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public int width()\n {\n return width;\n }", "public int getWidthNumOfBytes() {\n return widthNumOfBytes;\n }", "protected int getWidth()\n\t{\n\t\treturn 0;\n\t}", "public int width() {\n return width;\n }", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth(){\n return this.width;\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "private double getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\r\n\treturn this.width;\r\n}", "@Override\r\n\tpublic int getWidth() {\n\t\treturn 0;\r\n\t}", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "@java.lang.Override\n public long getWidth() {\n return width_;\n }", "int width();", "public double getWidth()\n {\n return width;\n }", "public int getWidth() {\r\n return width;\r\n }", "public double getWidth()\r\n {\r\n return width;\r\n }", "public abstract double getBaseWidth();", "public String getWidth() {\n return width;\n }", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }" ]
[ "0.74336636", "0.71855056", "0.7125993", "0.7076838", "0.7076838", "0.70425385", "0.6993731", "0.69882244", "0.6986043", "0.6964965", "0.69249135", "0.6907562", "0.6884475", "0.68752706", "0.68752706", "0.6837581", "0.682606", "0.6779396", "0.67770386", "0.67643195", "0.6757879", "0.67533", "0.67492765", "0.6727886", "0.6725919", "0.6694795", "0.6694795", "0.6694795", "0.6693218", "0.66908026", "0.6664368", "0.6664368", "0.6650523", "0.66502506", "0.6643097", "0.6640338", "0.6620445", "0.6620445", "0.66146404", "0.65882796", "0.65882796", "0.65870184", "0.65870184", "0.6584859", "0.6584859", "0.6584859", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.6581819", "0.65616137", "0.6560799", "0.6553414", "0.65423626", "0.6541073", "0.65137994", "0.65010285", "0.65010285", "0.64986473", "0.6498484", "0.64979666", "0.6488468", "0.64807564", "0.64793855", "0.64755917", "0.64701307", "0.64621437", "0.64500374", "0.64491487", "0.64437354", "0.64382267", "0.64337087", "0.64325833", "0.64324856", "0.64324594", "0.6427804", "0.6422283", "0.6422283", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916", "0.64162916" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_mygroup, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Registers the calling thread with a session that is internally created using the passed in factory.
public static Session register(SessionFactory factory) throws IllegalStateException { if(_sessionRef.get() != null) { throw new IllegalStateException( "Thread already registered with a session"); } Session s = factory.openSession(); _sessionRef.set(s); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startFactory() {\n if (!isStarted) {\n logger.info(\"Starting SessionListenerFactory.\");\n APIEventBus.getInstance().subscribe(this);\n isStarted = true;\n }\n }", "public abstract Thread startSession();", "protected AbstractDecorator(DecoratorFactory factory, Session session) {\n this.factory = factory;\n this.session = session;\n }", "public static Session createSession(SessionFactory factory){\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = factory.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s; \n }", "public interface SessionFactory {\n /**\n * Retrieves a new session. If the session isn't closed, second call from the same thread would\n * result in retrieving the same session\n *\n * @return\n */\n Session getSession();\n\n /**\n * Closes the current session associated with this transaction if present\n */\n void closeSession();\n\n /**\n * Returns true if we have connected the factory to redis\n *\n * @return\n */\n boolean isConnected();\n\n /**\n * Closes the session factory which disposes of the underlying redis pool\n */\n void close();\n}", "public ThreadFactory threadFactory() {\n return threadFactory_;\n }", "void setFactoryBean( FactoryBean factory );", "public CompletableFuture<Void> registerEventProcessorFactory(IEventProcessorFactory<?> factory) {\n return registerEventProcessorFactory(factory, EventProcessorOptions.getDefaultOptions());\n }", "public void createSession(int uid);", "public static synchronized void setFactory(final ANSSRegionsFactory factory) {\n if (SINGLETON != null) {\n SINGLETON.shutdown();\n }\n SINGLETON = factory;\n }", "public ClientWorkspace(\n Session session, RemoteWorkspace remote,\n LocalAdapterFactory factory) {\n super(factory);\n this.session = session;\n this.remote = remote;\n }", "protected void setFactory(HttpClientFactory factory) {\n\t\tthis.factory = factory;\n\t}", "public void setFactory(ValueFactory<K, V> factory)\n {\n this.factory = factory;\n }", "@Override\n\tpublic void insert(Factory factory) {\n\t\tfactory.setId(UUID.randomUUID().toString());\n\t\tfactory.setState(\"1\");\n\t\tmapper.insert(factory);\n\t}", "@Autowired\n\tpublic void setFactory(SessionFactory factory) {\n\t\tthis.factory = factory;\n\t}", "public abstract AbstractSctlThreadEntry addThread();", "public void sessionCreated(IoSession session) { }", "public JdbcShardedWorkRegistry(JdbcStorageFactory storageFactory) {\n super();\n checkNotNull(storageFactory);\n this.storage = storageFactory.createSessionStorage();\n }", "@Resource\n public void setSessionFactory(SessionFactory factory) {\n this.sessionFactory = factory;\n }", "public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);", "public void setObjectFactory(PoolObjectFactory factory) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n this.factory = factory;\n }", "public void setServerSocketFactory(ServerSocketFactory factory){\n this.factory = factory;\n }", "public interface CallMultiplexerFactory {\n <T> T createCallMultiplexer(Class<T> clazz, DispatchExceptionHandler h, T[] delegates) throws Exception;\n}", "@Override\n public void postInit(KeycloakSessionFactory factory) {\n if (singleUseObjectCache == null) {\n this.singleUseObjectCache = getSingleUseObjectCache(factory.create());\n }\n }", "private ThreadLocalSSLSocketFactory(SocketFactory socketFactory) {\n this.socketFactory = socketFactory;\n }", "void sessionCreated(SessionEvent se);", "public WildflyHystrixConcurrencyStrategy(final ManagedThreadFactory threadFactory) {\n\t\t//\n\t\t// Used by CDI provider.\n\t\t\n\t\tthis.threadFactory = threadFactory;\n\t}", "void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }", "public void add() {\n\t\tthis.inferior.addThread(this);\n\t\tthis.manager.addThread(this);\n\t\tstate.addChangeListener((oldState, newState, pair) -> {\n\t\t\tmanager.event(() -> manager.listenersEvent.fire.threadStateChanged(this, newState,\n\t\t\t\tpair.cause, pair.reason), \"threadState\");\n\t\t});\n\t}", "@Override\n public ExecutorService newThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory) {\n if (profile.isDefaultProfile()) {\n return vertxExecutorService;\n } else {\n return super.newThreadPool(profile, threadFactory);\n }\n }", "void add(InternalSession session);", "public void registerCurrentThread() {\n // Remember this stage in TLS so that rendering thread can get it later.\n THREAD_LOCAL_STAGE.set(this);\n }", "@Reference(type = '*', target = \"(component.factory=com.vaadin.Component/contribution)\")\n\tprotected void setContribution(ComponentFactory factory) {\n\t\tComponentInstance ci = factory.newInstance(null);\n\t\tComponent c = (Component) ci.getInstance();\n\t\tsynchronized (this) {\n\t\t\ttabs.addTab(c);\n\t\t\tmapping.put(factory, ci);\n\t\t}\n\t}", "LuaScriptEngine(LuaScriptEngineFactory factory) {\n\t\tsuper();\n\t\tthis.factory = factory;\n\t\tluaState = new LuaState();\n\n\t\t// Configuration\n\t\tcontext.setBindings(createBindings(), ScriptContext.ENGINE_SCOPE);\n\t\tluaState.openLibs();\n\t\tluaState.load(\"io.stdout:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t\tluaState.load(\"io.stderr:setvbuf(\\\"no\\\")\", \"setvbuf\");\n\t\tluaState.call(0, 0);\n\t}", "protected EventExecutor newChild(ThreadFactory threadFactory, Object... args) throws Exception {\n/* 57 */ return (EventExecutor)new LocalEventLoop(this, threadFactory);\n/* */ }", "public void setFeatureFactory(FeatureFactory featureFactory) {\n factory = featureFactory;\n }", "public static void setPostProcessTaskFactory(final IPostProcessTaskFactory factory) {\n\n m_PostProcessTaskFactory = factory;\n\n }", "void startSession(@Nullable Callback<Session> callback);", "public interface RunnableFactory {\n\n\t/**\n\t * Yields a new instance of the runnable.\n\t */\n\n Runnable mk();\n}", "@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }", "public void setSSRCFactory(SSRCFactory ssrcFactory) {\n\t\tif (translator == null) {\n\t\t\tRTPManager m = this.manager;\n\n\t\t\tif (m instanceof org.jitsi.impl.neomedia.jmfext.media.rtp.RTPSessionMgr) {\n\t\t\t\torg.jitsi.impl.neomedia.jmfext.media.rtp.RTPSessionMgr sm = (org.jitsi.impl.neomedia.jmfext.media.rtp.RTPSessionMgr) m;\n\n\t\t\t\tsm.setSSRCFactory(ssrcFactory);\n\t\t\t}\n\t\t} else {\n\t\t\ttranslator.setSSRCFactory(ssrcFactory);\n\t\t}\n\n\t}", "private void initThread(String user, String pass){\n AutomatedClient c = new AutomatedClient(user, pass);\n Thread t = new Thread(c);\n threads.put(user, t);\n clients.put(user, c);\n t.start();\n }", "public void setSocketMessageListenerFactory(final ComponentFactory factory)\n {\n m_SocketMessageListenerFactory = factory;\n }", "public final void SetEntryFactory(IEntryFactory factory)\n\t{\n\t\tentryFactory = factory;\n\t}", "public ETLLogDAOImpl(SessionFactory factory) {\r\n this.factory = factory;\r\n }", "public void createThread() {\n }", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "private FactoryTransformer(Factory factory) {\n super();\n iFactory = factory;\n }", "public Builder setThreadFactory(ThreadFactory threadFactory) {\n threadFactory_ = (threadFactory != null) ? threadFactory : Executors.defaultThreadFactory();\n return this;\n }", "InternalSession createSession(String sessionId);", "@Override\n\tpublic Object get(String name, ObjectFactory<?> objectFactory) {\n\t\tMap<String, Object> scope = threadLocal.get();\n\t\tObject obj = scope.get(name);\n\t\tif(Objects.isNull(obj)) {\n\t\t\tobj = objectFactory.getObject();\n\t\t\tscope.put(name, obj);\n\t\t\tSystem.out.println(\"Not exists \" + name + \"; hashCode: \" + obj.hashCode() +\"; threadName:\" + Thread.currentThread().getName() );\n\t\t}else {\n\t\t\tSystem.out.println(\"Exists \" + name + \"; hashCode: \" + obj.hashCode());\n\t\t}\n\t\treturn obj;\n\t\t\n\t}", "protected PacketFactory put(Integer protocol, PacketFactory factory) {\n return this.packetFactories.put(protocol, factory);\n }", "@Override\n\tpublic void createSession(String customer) {\n\t\t\n\t}", "public HttpUrlFetcher(Call.Factory factory) {\n super(factory);\n Intrinsics.checkParameterIsNotNull(factory, \"callFactory\");\n }", "@OnOpen\n\tpublic void onOpen(Session session) {\n\t\tSystem.out.println(session);\n\t\tclients.add(session);\n\t\tsendMessage(\"입장함\");\n\t\t//======\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t\t\tsendMessage(\"welcome~~~\");\n\t\t\t\t\t}catch(InterruptedException 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\tthread.start();\n\t\t//======\n\t}", "public Session createSession(String sessionId);", "public TestOrchestrator(final NativeTest testTask, TestOrchestratorFactory factory) {\n if (testTask == null) {\n throw new IllegalArgumentException(\"testTask == null!\");\n }\n if (factory == null) {\n throw new IllegalArgumentException(\"factory == null!\");\n }\n\n this.testTask = testTask;\n this.factory = factory;\n }", "public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }", "public void setThread(Thread t);", "@Nonnull\r\n\tpublic static <T> Observable<T> defer(\r\n\t\t\t@Nonnull final Func0<? extends Observable<? extends T>> observableFactory) {\r\n\t\treturn new Observable<T>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull Observer<? super T> observer) {\r\n\t\t\t\treturn observableFactory.invoke().register(observer);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "private void registerClient() throws IOException {\n\t\tString instanceID = UUID.randomUUID().toString();\r\n\t\tString registerName = fromClient.readLine();\r\n\t\tString passwordInput = fromClient.readLine();\r\n\t\t\r\n\t\tif (!clientTable.has(registerName)) {\r\n\t\t\tReport.behaviour(registerName + \" has registered and connected\");\r\n\t\t\t\r\n\t\t\t//Adds the new user to the client table and adds a running queue\r\n\t\t\tclientTable.add(registerName, new Password(passwordInput, false));\r\n\t\t\tclientTable.addQueue(registerName, instanceID);\r\n\t\t\t\r\n\t\t\t//tell the client that the connection was a success\r\n\t\t\ttoClient.println(Commands.CONNECTION_SUCCESS);\r\n\t\t\t\r\n\t\t\t//create threads\r\n\t\t\tmakeThreads(registerName, instanceID);\r\n\t\t} else toClient.println(Commands.USER_ALREADY_EXISTS);\r\n\t}", "public StatementRegistrationPass(StatementFactory factory, boolean useSingleAllocForGenEx,\n boolean useSingleAllocForThrowable, boolean useSingleAllocForPrimitiveArrays,\n boolean useSingleAllocForStrings, boolean useSingleAllocForImmutableWrappers) {\n registrar = new StatementRegistrar(factory,\n useSingleAllocForGenEx,\n useSingleAllocForThrowable,\n useSingleAllocForPrimitiveArrays,\n useSingleAllocForStrings,\n useSingleAllocForImmutableWrappers);\n }", "@Override\n public void sessionCreated(IoSession session) {\n }", "public void setNodeFactory(NodeFactory nodeFactory)\n {\n this.nodeFactory = nodeFactory;\n }", "public static void setActionFactory(AnnotatedActionFactory factory) {\n/* 92 */ Objects.requireNonNull(factory);\n/* 93 */ actionFactory = factory;\n/* */ }", "public default void sessionCreated(HttpSessionEvent se) {\n }", "private void regOnlineUser(LfwSessionBean sb, HttpServletRequest request)\n/* */ throws BusinessException\n/* */ {\n/* 522 */ String clientIP = HttpUtil.getIp();\n/* 523 */ String sessionid = request.getSession().getId();\n/* 524 */ getUserBill().regOnlineUser(sb, sessionid, clientIP);\n/* */ }", "public FuncCallExecutor(ThreadRuntime rt) {\r\n\t\tthis.rt = rt;\r\n\t}", "public static void setInputFactory(final IInputFactory inputFactory) {\n\n m_InputFactory = inputFactory;\n\n }", "@Reference\n public void setServerSocketFactory(final ServerSocketFactory factory)\n {\n m_ServerSocketFactory = factory;\n }", "@Override\n\tpublic void call(Session session, SessionState state, Exception exception) {\n\t\tMylog.i(TAG, \"session call start\");\n\t\tonSessionStateChange(session, state, exception);\n\t}", "public IThread createThread() throws IllegalWriteException, BBException;", "void setJNPServerSocketFactory(String factoryClassName) \n throws ClassNotFoundException, InstantiationException, IllegalAccessException;", "private void setLambdaInvokeFactory(Context context) {\n factory = new LambdaInvokerFactory(\n context,\n Regions.US_EAST_1,\n this.credentialsProvider);\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\n\t\tthis.sessionFactory = sessionFactory;\n\t}", "public void setSessionFactory(SessionFactory sessionFactory) {\n\t\tthis.sessionFactory = sessionFactory;\n\t}", "public void setSessionFactory(SessionFactory sessionFactory) {\n\t\tthis.sessionFactory = sessionFactory;\n\t}", "public void startThread(VirtualThread newThread) {\n\t\tlog.debug(\"**** CREATING A THREAD? ****\");\n\t}", "private void register() {\n Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);\n registrationIntent.setPackage(GSF_PACKAGE);\n registrationIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n registrationIntent.putExtra(EXTRA_SENDER, senderId);\n context.startService(registrationIntent);\n }", "private void registerWithService() {\n\n try {\n\n Message msg = Message.obtain(null, TallyDeviceService.MSG_REGISTER_MESSAGE_ACTIVITY);\n if (msg == null) { return; }\n msg.obj = this;\n msg.replyTo = messenger;\n service.send(msg);\n\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Line 306 :: \" + e.getMessage());\n service = null;\n }\n\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n this.sessionFactory = sessionFactory;\r\n }", "public void put(String uri, FunctionFactory f) { registry.put(uri,f) ; }", "public CompletableFuture<Void> registerEventProcessorFactory(IEventProcessorFactory<?> factory, EventProcessorOptions processorOptions) {\n if (this.unregistered != null) {\n throw new IllegalStateException(\"Register cannot be called on an EventProcessorHost after unregister. Please create a new EventProcessorHost instance.\");\n }\n if (this.hostContext.getEventProcessorFactory() != null) {\n throw new IllegalStateException(\"Register has already been called on this EventProcessorHost\");\n }\n\n this.hostContext.setEventProcessorFactory(factory);\n this.hostContext.setEventProcessorOptions(processorOptions);\n\n if (this.executorService.isShutdown() || this.executorService.isTerminated()) {\n TRACE_LOGGER.warn(this.hostContext.withHost(\"Calling registerEventProcessor/Factory after executor service has been shut down.\"));\n throw new RejectedExecutionException(\"EventProcessorHost executor service has been shut down\");\n }\n\n if (this.initializeLeaseManager) {\n try {\n ((AzureStorageCheckpointLeaseManager) this.hostContext.getLeaseManager()).initialize(this.hostContext);\n } catch (InvalidKeyException | URISyntaxException | StorageException e) {\n TRACE_LOGGER.error(this.hostContext.withHost(\"Failure initializing default lease and checkpoint manager.\"));\n throw new RuntimeException(\"Failure initializing Storage lease manager\", e);\n }\n }\n\n TRACE_LOGGER.info(this.hostContext.withHost(\"Starting event processing.\"));\n\n return this.partitionManager.initialize();\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n\t\tthis.sessionFactory = sessionFactory;\r\n\t}", "public void setBeanFactory(BeanFactory beanFactory)\r\n/* 35: */ {\r\n/* 36: 77 */ this.beanFactory = beanFactory;\r\n/* 37: */ }", "void setSocketFactory(SocketFactory socketFactory);", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n template = new HibernateTemplate(sessionFactory);\r\n }", "DefaultSession createSession(String id);", "public ServerFactory(ServerModelFactory serverModelFactory) throws RemoteException {\n UnicastRemoteObject.exportObject(this, 0);\n this.serverModelFactory = serverModelFactory;\n lock = new ReentrantLock();\n }", "public Thread addPerson(int sourceFloor, int destinationFloor) {\n\t\tPerson person = new Person(this, sourceFloor, destinationFloor);\n\t\tThread personThread = new Thread(person);\n\t\t\n\t\tpersonThread.start();\n\n\t\t//dumb code, replace it!\n\t\tpersonCount.set(sourceFloor, personCount.get(sourceFloor) + 1);\n\t\t\n\t\treturn personThread; //this means that the testSuite will not wait for the threads to finish\n\t}", "@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}", "@Autowired\n\t public FlightSeatRepositoryImpl(EntityManagerFactory factory) {\n\t\t if(factory.unwrap(SessionFactory.class) == null){\n\t\t\t throw new NullPointerException(\"factory is not a hibernate factory\");\n\t\t }\n\t\t this.sessionFactory = factory.unwrap(SessionFactory.class);\n\t }", "public void register(IObserver obj);", "@Override\n public Object get(String name, ObjectFactory<?> objectFactory) {\n Map<String, Object> mapForThisThread = beanMap.get();\n\n Object obj = mapForThisThread.get(name);\n if(obj != null) {\n log.info(\"get {} resolved from scope\", name);\n return obj;\n }\n obj = objectFactory.getObject();\n mapForThisThread.put(name, obj);\n log.info(\"get {} resolved from factory\", name);\n return obj;\n }", "public TTransportFactory wrapTransportFactory(TTransportFactory transFactory) {\n return new TUGIAssumingTransportFactory(transFactory, realUgi);\n }", "public synchronized int registerCall(RegisteredCall call) {\n\t\tint id = idGen.generateAndReserve();\n\t\tcurrentCalls.put(Integer.valueOf(id), call);\n\t\treturn id;\n\t}", "private static void ThreadCreationOldWay() {\r\n\t\tThread t1 = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"This is a runnable method done in old fashion < 1.8\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tt1.start();\r\n\t}", "public SessionFactory getFactory() {\n\t\treturn factory;\n\t}", "public void sessionCreated(IoSession session) {\r\n\t\tServerLogger.log(\"Session created...\" + session, Constants.DEBUG);\r\n\t\tsession.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);\r\n\t}", "public DeviceFamilyImpl(DeviceFactory df){\n\t\tsuper((Class<T>) c);\n\t\tthis.df = df;\n\t}" ]
[ "0.56876016", "0.5331094", "0.5269986", "0.52024347", "0.51255214", "0.5080192", "0.5061709", "0.5018399", "0.5017419", "0.4961972", "0.49565923", "0.4906852", "0.47908145", "0.4790207", "0.4781579", "0.476495", "0.4721929", "0.47138458", "0.47058415", "0.47009587", "0.46523196", "0.4644678", "0.4643061", "0.4632862", "0.45424533", "0.45416227", "0.45310816", "0.4528053", "0.4518601", "0.45085713", "0.4500276", "0.449713", "0.4485654", "0.44739056", "0.44600663", "0.4458326", "0.44287112", "0.44051915", "0.43903157", "0.43899593", "0.43814668", "0.4370828", "0.4365865", "0.43655998", "0.43652636", "0.43651035", "0.43546113", "0.43515924", "0.43472877", "0.43456835", "0.43449917", "0.43447205", "0.43265215", "0.43203887", "0.4306557", "0.43029588", "0.430185", "0.42961976", "0.42951888", "0.42869896", "0.42822295", "0.42798904", "0.42770818", "0.42750746", "0.4273897", "0.42737263", "0.42703596", "0.42664844", "0.42651373", "0.42628163", "0.42550474", "0.42395243", "0.42376798", "0.42374223", "0.42334113", "0.42334113", "0.42334113", "0.42323682", "0.4225939", "0.42240083", "0.42057574", "0.41984403", "0.41978702", "0.41953367", "0.41933662", "0.4185739", "0.41830987", "0.418066", "0.41804996", "0.41743103", "0.4171838", "0.4165435", "0.41634175", "0.41625348", "0.41603017", "0.41547072", "0.41490784", "0.41464055", "0.41416243", "0.41377056" ]
0.6946857
0
Registers the calling thread with the given session. If the calling thread is already registered with a session, that registratrion no longer holds and the thread will be registered with the passed in session from now on.
public static void join(Session session){ _sessionRef.set(session); if(!session.isConnected())session.reconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void reconnect(Session session){\n Session current = (Session)_sessionRef.get();\n if(current != null){\n if(current.equals(session)){\n if(!current.isConnected())current.reconnect();\n }\n else{\n throw new IllegalStateException(\"Thread already registered with \" +\n \"another session; call unregister() or disconnect() prior to \" +\n \"calling this method\");\n }\n }\n else{\n if(!session.isConnected()){\n session.reconnect();\n _sessionRef.set(session);\n }\n else{\n _sessionRef.set(session);\n }\n }\n }", "public abstract Thread startSession();", "public void add(Session session);", "public static void addSession(Session _session) {\r\n\t\tsessions.add(_session);\r\n\t}", "@OnWebSocketConnect\n public void connected(Session session) {\n String id = getSessionID(session);\n if (!sessions.containsKey(id)) {\n sessions.put(id, new ConcurrentLinkedQueue<>());\n }\n sessions.get(id).add(session);\n }", "public static Session register(SessionFactory factory) throws IllegalStateException {\n if(_sessionRef.get() != null) {\n throw new IllegalStateException(\n \"Thread already registered with a session\");\n }\n\n Session s = factory.openSession();\n _sessionRef.set(s);\n return s;\n }", "void add(InternalSession session);", "public void AddSession(String session, Long id){ validSessions.put(session, id); }", "public void setSession(CATermSession session) {\n this.session = session;\n }", "public void setSession(Map<String, Object> session) {\n\t\t\n\t}", "public void setSession(Session value);", "public static void loadSession(Session session){\n currentSession = session;\n }", "public void sessionRequested(final JingleSessionRequest request) {\n incCounter();\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n\n // We accept the request\n try {\n JingleSession session1 = request.accept();\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@OnOpen\n\tpublic void onOpen(Session session) {\n\t\tSystem.out.println(session);\n\t\tclients.add(session);\n\t\tsendMessage(\"입장함\");\n\t\t//======\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t\t\tsendMessage(\"welcome~~~\");\n\t\t\t\t\t}catch(InterruptedException 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\tthread.start();\n\t\t//======\n\t}", "public void setSession(Session session) { this.session = session; }", "public void sessionRequested(final JingleSessionRequest request) {\n incCounter();\n System.out.println(\"Session request detected, from \" + request.getFrom());\n }", "@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}", "@OnOpen\n\tpublic void open(Session session) {\n\t\tsessionHandler.addSession(session);\t\t\n\t}", "public void setSession(Session session) {\r\n this.session = session;\r\n }", "@Override\r\n\tpublic void setSession(Map<String, Object> session) \r\n\t{\n\t\tthis.session = session;\r\n\t}", "public void setSession(Session session)\n\t{\n\t\tm_Session = session;\n\t}", "@Override\n\tpublic void call(Session session, SessionState state, Exception exception) {\n\t\tMylog.i(TAG, \"session call start\");\n\t\tonSessionStateChange(session, state, exception);\n\t}", "public static void register(Thread thread) {\n\t\tregisteredThreads.put(thread, System.currentTimeMillis());\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\r\n\t}", "void markAsUserSession();", "@Override\n\tpublic void setSession(Map<String, Object> session)\n\t{\n\t\tthis.session = session;\n\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\n\t}", "public void addNewSession(Session s)\r\n\t{\r\n\t\tif(activeSessions.size() == 0)\r\n\t\t{\r\n\t\t\tsetFocusOnSession(s);\r\n\t\t}\r\n\t\tactiveSessions.add(s);\r\n\t\t\r\n\t}", "public void setSession(Map<String, Object> session)\r\n\t{\n\t\tthis.session = session;\r\n\t}", "public void sessionStarted() {\n\t\t\r\n\t}", "public void setSession(Session session) {\n\t\tthis.session = session;\n\t}", "public Result withSession(Map<String, String> session) {\n return withSession(new Session(session));\n }", "protected static void addSession (HTTPSession aSession)\n\t{\n\t\tString theSessionID = aSession.getSessionID ();\n\t\tif (!sessionHashtable.containsKey (theSessionID))\n\t\t{\n\t\t\tsessionHashtable.put (theSessionID, aSession);\n\t\t\tnotifySessionListeners (aSession, null, true);\n\t\t}\n\t}", "private void regOnlineUser(LfwSessionBean sb, HttpServletRequest request)\n/* */ throws BusinessException\n/* */ {\n/* 522 */ String clientIP = HttpUtil.getIp();\n/* 523 */ String sessionid = request.getSession().getId();\n/* 524 */ getUserBill().regOnlineUser(sb, sessionid, clientIP);\n/* */ }", "public abstract AbstractSctlThreadEntry addThread();", "public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public FamilyTreeServer setSession(Session s) {\n\t\tsession = s;\n\t\treturn this;\n\t}", "public void sessionCreated(IoSession session) { }", "String registerUserWithGetCurrentSession(User user);", "public static Session currentSession() throws IllegalStateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n throw new IllegalStateException(\"Thread not registered with a session\");\n }\n \n if(!s.isConnected()){\n s.reconnect();\n }\n\n return s;\n }", "public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom());\n\n // We reject the request\n try {\n JingleSession session = request.accept();\n //session.setInitialSessionRequest(request);\n session.startIncoming();\n session.terminate();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }", "public static PlayerSession addSession(CommandSender player) {\r\n \t\tPlayerSession session;\r\n \t\tif (playerSessions.containsKey(player.getName())) {\r\n \t\t\tsession = playerSessions.get(player.getName());\r\n \t\t\tsession.setSender(player);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tsession = new PlayerSession(player);\r\n \t\t\tplayerSessions.put(player.getName(), session);\r\n \t\t}\r\n \t\treturn session;\r\n \t}", "public void setCurrentSession(Session session){\n if(currentSession == null){\n currentSession = new MutableLiveData<>();\n }\n Log.i(\"VIewModelSessions\", \"setting current session\");\n currentSession.setValue(session);\n Log.i(\"ViewModelSessions\", \"current session: \"+session.toString());\n }", "public static void registerRootThread(Thread thr)\n {\n gInstance.doRegisterRootThread(thr);\n }", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "public void setSession (jkt.hms.masters.business.MasSession session) {\n\t\tthis.session = session;\n\t}", "public void changeSessionId(Session session);", "void startSession(@Nullable Callback<Session> callback);", "public void registerCurrentThread() {\n // Remember this stage in TLS so that rendering thread can get it later.\n THREAD_LOCAL_STAGE.set(this);\n }", "public final void addSession(MediaSession2 mediaSession2) {\n if (mediaSession2 == null) {\n throw new IllegalArgumentException(\"session shouldn't be null\");\n }\n if (mediaSession2.isClosed()) {\n throw new IllegalArgumentException(\"session is already closed\");\n }\n Object object = this.mLock;\n synchronized (object) {\n MediaSession2 mediaSession22 = this.mSessions.get(mediaSession2.getId());\n if (mediaSession22 == null) {\n this.mSessions.put(mediaSession2.getId(), mediaSession2);\n mediaSession2.setForegroundServiceEventCallback(this.mForegroundServiceEventCallback);\n return;\n }\n if (mediaSession22 != mediaSession2) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Session ID should be unique, ID=\");\n stringBuilder.append(mediaSession2.getId());\n stringBuilder.append(\", previous=\");\n stringBuilder.append(mediaSession22);\n stringBuilder.append(\", session=\");\n stringBuilder.append(mediaSession2);\n Log.w((String)TAG, (String)stringBuilder.toString());\n }\n return;\n }\n }", "public static void registerInterceptor(Interceptor interceptor) {\r\n\t\tthreadInterceptor.set(interceptor);\r\n\t}", "public static void add(MemberSession ms) {\n//\t\taddMemberSession(ms, GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t\tadd(ms, GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t}", "public Result addingToSession(Http.Request request, String key, String value) {\n Map<String, String> newValues = new HashMap<>(1);\n newValues.put(key, value);\n return addingToSession(request, newValues);\n }", "protected void addSession(ItemSession session, String configurationId) {\r\n synchronized (sessions) {\r\n Vector<ItemSession> configurationSessions = sessions.get(configurationId);\r\n if (configurationSessions == null) {\r\n configurationSessions = new Vector<ItemSession>();\r\n \r\n }\r\n configurationSessions.add(session);\r\n sessions.put(configurationId, configurationSessions);\r\n }\r\n }", "public static void registerInterceptor(Interceptor interceptor) {\n\t\tthreadInterceptor.set(interceptor);\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> s) {\n\t\tsession = s;\n\t}", "public boolean canRegister(Session session);", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tthis.session = arg0;\n\t\t\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tthis.session = arg0;\r\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tthis.session = arg0;\n\t}", "void incrementAccessCounterForSession();", "public void add() {\n\t\tthis.inferior.addThread(this);\n\t\tthis.manager.addThread(this);\n\t\tstate.addChangeListener((oldState, newState, pair) -> {\n\t\t\tmanager.event(() -> manager.listenersEvent.fire.threadStateChanged(this, newState,\n\t\t\t\tpair.cause, pair.reason), \"threadState\");\n\t\t});\n\t}", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "void sessionCreated(SessionEvent se);", "public static void setObject(HttpSession session, String key, Object obj) {\n session.setAttribute(key, obj);\n }", "public void sessionCreated(HttpSessionEvent sessionEvent) {\n HttpSession session = sessionEvent.getSession();\n\n // Store something in the session, and log a message\n try {\n System.out.println(\"[MySessionListener] Session created: \" + session);\n session.setAttribute(\"foo\", \"bar\");\n } catch (Exception e) {\n System.out.println(\"[MySessionListener] Error setting session attribute: \" + e.getMessage());\n }\n }", "public Builder setSession(com.weizhu.proto.WeizhuProtos.Session value) {\n if (sessionBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n session_ = value;\n onChanged();\n } else {\n sessionBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n return this;\n }", "public void setThread(Thread t);", "void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }", "public void sessionCreated(IoSession session) {\r\n\t\tServerLogger.log(\"Session created...\" + session, Constants.DEBUG);\r\n\t\tsession.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);\r\n\t}", "protected void setSession(Session newSession) {\n sessionTracker.setSession(newSession);\n }", "public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);", "public static synchronized void register(Connection connection) {\n if (!activeConnections.contains(connection)) {\n activeConnections.add(connection);\n }\n }", "public Session push(Session session) {\r\n\t\tindex++;\r\n\t\t\r\n\t\tif (index == size) {\r\n\t\t\tint newSize = size + 5;\r\n\t\t\tSession[] expandedStack = new Session[newSize];\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\texpandedStack[i] = stack[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsize = newSize;\r\n\t\t\tstack = expandedStack;\r\n\t\t}\r\n\t\t\r\n\t\tstack[index] = session;\r\n\t\treturn session;\r\n\t}", "void addSessionListener(SessionListener listener);", "public void addNewSession() {\n //Create an explicit intent for RecordingIntentService\n Intent saveSessionIntent = new Intent(this, RecordingIntentService.class);\n //Set the action of the intent to ACTION_SAVE_SESSION\n saveSessionIntent.setAction(RecordLapTasks.ACTION_SAVE_SESSION);\n\n //add the current session object info to the intent so it can be retrieved\n saveSessionIntent.putExtra(\"session_driver\", mySession.getDriver());\n saveSessionIntent.putExtra(\"session_track\", mySession.getTrackName());\n saveSessionIntent.putExtra(\"session_bestLap\", mySession.getBestLapString());\n saveSessionIntent.putExtra(\"session_laptimes\", mySession.getLaptimesAsString());\n saveSessionIntent.putExtra(\"session_numLaps\", mySession.getNumberOfLaps());\n\n //Call startService and pass the explicit intent\n startService(saveSessionIntent);\n }", "public void setSessionCounter(long sessionCounter);", "public void setSessionActivity(PendingIntent param1) {\n }", "public void addEndpointSession(String endpoint, Session session) throws SessionManagerException {\n\t\tif (sessionMap.get(endpoint) == null) {\n\t\t\tthis.addEndpoint(endpoint);\n\t\t}\n\n\t\tif (!sessionMap.get(endpoint).contains(session)) {\n\t\t\tsessionMap.get(endpoint).add(session);\n\t\t\tLOG.info(\"Added Session {} to endpoint {}\", session.getId(), endpoint);\n\t\t} else {\n\t\t\tthrow new SessionManagerException(\"Session \" + session.getId() + \" already exists in endpoint \" + endpoint);\n\t\t}\n\t}", "public void setSession(AbstractSession session) {\n this.session = session;\n }", "public void createSession(int uid);", "void onUserSessionConnected(WebSocketConnection connection, Session session, String accountId);", "void enterSipApp(MobicentsSipApplicationSession sipApplicationSession, MobicentsSipSession sipSession);", "@Override\n public void afterConnectionEstablished(WebSocketSession session) {\n System.out.println(\"SocketController: afterConnectionEstablished rad 75\");\n socketService.addSession(session);\n }", "public MUCTransportSession(TransportSession<B> session, String roomname, String nickname, BaseMUCTransport<B> transport) {\n this.session = session;\n this.roomname = roomname;\n this.nickname = nickname;\n this.transport = transport;\n }", "void setSessionID(java.lang.String sessionID);", "public synchronized int registerCall(RegisteredCall call) {\n\t\tint id = idGen.generateAndReserve();\n\t\tcurrentCalls.put(Integer.valueOf(id), call);\n\t\treturn id;\n\t}", "void onOpenSession(Session session);", "@OnWebSocketConnect\n\tpublic void onConnect(Session session) {\n\t\tthis.session = session;\n\t\tlatch.countDown();\n\t}", "public void addSessionChangeListenObject(SessionListener s)\r\n\t{\r\n\t\tthis.objectsInFocus.add(s);\r\n\t}", "@Nullable\n Long startChatSession(String token, String username);", "@OnOpen\r\n\tpublic void openConnection(Session userSession) {\r\n\t\tallSessions.add(userSession);\r\n\t}", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic void syncCust(HttpSession custSession) {\n\t}", "public synchronized boolean addRequest(Callback<Session> callback) {\n if (callback == null) return false;\n\n // awaitingSession will be true until session restoration completes in the background.\n if (!awaitingSession.get()) {\n final Session session = getValidSession();\n if (session != null) {\n callback.success(new Result<>(session, null));\n } else {\n queue.add(callback);\n awaitingSession.set(true);\n requestAuth();\n }\n } else {\n queue.add(callback);\n }\n return true;\n }", "public void record(RecordingSession pSession) {\r\n\t\tif(pSession==null) {\r\n\t\t\t_supervisor.echo(\"Empty Recording Session at \"\r\n\t\t\t\t\t+ getDefiningClassSignature()) ;\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tpSession.recording() ;\r\n\t\t} catch (ExecutionException ignore) {\r\n\t\t\t_supervisor.echo(\"Error Recording at \"\r\n\t\t\t\t\t+ getDefiningClassSignature()) ;\r\n\t\t}\r\n\t}", "public static void addedThread(ThreadXML threadXML) {\n }" ]
[ "0.5722206", "0.55926836", "0.55423343", "0.55335057", "0.5418575", "0.5396813", "0.53823906", "0.51558", "0.5056138", "0.5054773", "0.49740615", "0.4971971", "0.49682128", "0.49441", "0.49328804", "0.49255204", "0.4911704", "0.4909627", "0.4909627", "0.4902239", "0.4896591", "0.4887029", "0.48737654", "0.48630467", "0.48557156", "0.48536173", "0.48535803", "0.48521996", "0.48513156", "0.48400104", "0.48189893", "0.4818345", "0.48149958", "0.48104122", "0.48013657", "0.4764763", "0.47282603", "0.47238815", "0.47207028", "0.47018504", "0.4688977", "0.46827483", "0.46690166", "0.46652085", "0.46158734", "0.46150124", "0.4609972", "0.46081477", "0.4596547", "0.45908836", "0.45895526", "0.45645383", "0.45433593", "0.45419782", "0.4537192", "0.45302793", "0.45195958", "0.4504566", "0.4504228", "0.44920853", "0.44900066", "0.4478208", "0.4469852", "0.4467167", "0.44654164", "0.44546226", "0.44369113", "0.44349104", "0.44199532", "0.44141355", "0.44106093", "0.44031322", "0.44027674", "0.4396943", "0.43907863", "0.4387891", "0.43751436", "0.43653795", "0.4364084", "0.43620476", "0.43580887", "0.43534392", "0.43521014", "0.43482935", "0.4348234", "0.43462333", "0.43264014", "0.43184486", "0.43179485", "0.43138975", "0.43116418", "0.43097118", "0.42932177", "0.42754808", "0.4263172", "0.42624447", "0.42503768", "0.4250298", "0.42439222", "0.42410815" ]
0.5095356
8
Unregisters the session that is associated to the calling thread.
public static void unregister(boolean close) { Session s = (Session)_sessionRef.get(); if(s != null){ if(close){ if(s.isOpen()){ s.close(); } } else{ if(s.isConnected()){ s.disconnect(); } } _sessionRef.set(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void deRegister()\n {\n // stop the thread running...\n logger.debug(\"deregister called - invalidating session\");\n\n // remove from registered listeners and then invalidate the ScriptSession\n clients.remove(wctx.getScriptSession().getId());\n wctx.getScriptSession().invalidate();\n\n if (clients.size() == 0)\n {\n // might as well stop thread since we have no registered listeners\n this.active = false;\n }\n\n }", "void unsetSessionID();", "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "public static void unjoin(){\n _sessionRef.set(null);\n }", "@CallSuper\n public void clearSession() {\n callback = null;\n }", "synchronized void removeSession(Session session) {\n sessionMap.remove(session.getId());\n }", "public void unregister()\n\t{\n\t\tcancelPrevRegisterTask();\n\n\t\tpushRegistrar.unregisterPW(mContext);\n\t}", "private void ungetSession(final Session session) {\n if (session != null) {\n try {\n session.logout();\n } catch (Throwable t) {\n LOGGER.error(\"Unable to log out of session: \" + t.getMessage(), t);\n }\n }\n }", "@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "void remove(InternalSession session);", "public void remove(Session session);", "public synchronized void unbind()\n\t\t{\n\t\t\tpageStore.folders.remove(sessionIdentifier);\n\n\t\t\tsessionIdentifier = null;\n\t\t}", "public static void unregister(Thread thread) {\n\t\tregisteredThreads.remove(thread);\n\t}", "public void unregister() {\n this.dispatcher.context.unregisterReceiver(this);\n }", "public void stopSync(\r\n\t\t\tObject sessionToken);", "public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}", "void clearSession();", "void clearSession();", "public static void removeSession (HTTPSession aSession)\n\t{\n\t\tString theSessionID = aSession.getSessionID ();\n\t\tif (sessionHashtable.containsKey (theSessionID))\n\t\t{\n\t\t\tHTTPSession theSession = getSession (theSessionID);\n\t\t\tsessionHashtable.remove (theSessionID);\n\t\t\tif (theSession.getCachedMauiApplications ().length > 0)\n\t\t\t{\n\t\t\t\ttheSession.removeApplication (null);\n\t\t\t}\n\t\t\ttheSession.removeCrossReference ();\n\t\t\ttheSession.thread.interrupt ();\n\t\t\tnotifySessionListeners (aSession, null, false);\n\t\t}\n\t}", "@Override\n protected void onUnregister() {\n Core.unregister(this);\n }", "@Override\n public void sessionDestroyed(HttpSessionEvent event) {\n String broadcasterId = event.getSession().getId();\n LOG.debug(\"Removing broadcaster: {}\", broadcasterId);\n BroadcasterFactory.getDefault().remove(broadcasterId);\n }", "private void deauthenticate(Session userSession) {\n\t\t// move this session from authenticated region to unauthenticated\n\t\tString accountId = accountIdsByUserSession.get(userSession);\n\t\tif (accountId != null) {\n\t\t\tUserGroup userGroup = authenticatedUserGroupsByAccountId.get(accountId);\n\t\t\tif (userGroup != null) {\n\t\t\t\tuserGroup.userSessions.remove(userSession);\n\t\t\t}\n\n\t\t\tfor (OnUserSessionStatusChangeListener listener : userSessionStatusChangeListeners) {\n\t\t\t\tlistener.onUserSessionDisconnected(this, userSession, accountId);\n\t\t\t}\n\t\t}\n\n\t\taccountIdsByUserSession.remove(userSession);\n\t}", "private void doUnsubscribe(IoSession session, MessageProtocol request) throws Exception {\n \t\n \tdoExit(session);\n }", "void exitSession()\n\t{\n\t\t// clear out our watchpoint list and displays\n\t\t// keep breakpoints around so that we can try to reapply them if we reconnect\n\t\tm_displays.clear();\n\t\tm_watchpoints.clear();\n\n\t\tif (m_fileInfo != null)\n\t\t\tm_fileInfo.unbind();\n\n\t\tif (m_session != null)\n\t\t\tm_session.terminate();\n\n\t\tm_session = null;\n\t\tm_fileInfo = null;\n\t}", "public void deleteSession(int uid);", "void sessionDestroyed(SessionEvent se);", "void unregister(String uuid);", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "void removeSessionListener(SessionListener listener);", "private void destroySession(Session session) {\n\r\n\t}", "@Override\n\tpublic void clearSession() throws Exception {\n\t\t\n\t}", "public final void unsubscribe() throws InvalidSubscriptionException {\r\n WritableSession session = (WritableSession) WebsocketActionSupport.getInstance().getSession();\r\n if (!sessions.contains(session)) {\r\n throw new InvalidSubscriptionException(\"Current session is not subscribed to this topic\");\r\n }\r\n sessions.remove(session);\r\n afterUnsubscribe(session);\r\n }", "public void onSessionDestroyed() {\n }", "public void unregister() {\n unregistered = true;\n }", "@Override\n public void valueUnbound(HttpSessionBindingEvent arg0) {\n System.out.println(\"在session中移除LoginUser对象(name = \"+ this.getName() +\"), sessionid = \" + arg0.getSession().getId());\n }", "public void removeCredentialsFromCurrentThread() {\n\t\tthis.threadBoundCredentials.set(null);\n\t}", "@Override\n public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n sessionMap.remove(session.getId());\n }", "public default void sessionDestroyed(HttpSessionEvent se) {\n }", "void clearSessionListeners();", "public void disconnect() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mApplicationContext);\n prefs.edit().putBoolean(\"xmpp_logged_in\", false).commit();\n\n if (mConnection != null) {\n mConnection.disconnect();\n }\n\n mConnection = null;\n // Unregister the message broadcast receiver.\n if (uiThreadMessageReceiver != null) {\n mApplicationContext.unregisterReceiver(uiThreadMessageReceiver);\n uiThreadMessageReceiver = null;\n }\n }", "private void unregister()\n {\n\tLog.d(Globals.TAG, \"UNREGISTER USERID: \" + regid);\n\tnew AsyncTask<Void, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(Void... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.UNREGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent unregistration\";\n\t\t gcm.unregister();\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tremoveRegistrationId(getApplicationContext());\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t\t((TextView)findViewById(R.id.gcm_userid_textview)).setText(regid);\n\t }\n\t}.execute();\n }", "public void endSession(){\n currentUser = null;\n ui.returnCard();\n }", "void deregister() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(false));\n patientLoaderThread.start();\n }", "void closeSession();", "void closeSession();", "void unsubscribe();", "void destroyForCurrentThread() {\n holderInstance.remove();\n parentHolderInstanceStack.remove();\n }", "public void uninitialize()\n {\n System.out.println(\"Real time session unitializing...\");\n for (ChannelSession channelSession : channelSessions)\n {\n if (channelSession.channel() == null)\n {\n if (channelSession.channel() == null)\n {\n channelSession.uninit(error);\n System.exit(TransportReturnCodes.SUCCESS);\n }\n \n closeDictAndItemStreams();\n }\n closeDictAndItemStreams();\n }\n\n // flush before exiting\n flushChannel();\n\n closeChannel();\n }", "public void stop() {\n session.close(false);\n }", "protected void closeSession(SessionImpl session) {\n sessions.remove(session);\n sessionCount.dec();\n }", "public void destroySession() {\n existingSession().ifPresent(session -> {\n session.clear();\n context().session().clear();\n });\n }", "private void unsubscribe() {\n subscriber=null;\n }", "DefaultSession removeSession(String id, boolean invalidate);", "protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }", "public void unRegister(Context context) {\n context.unregisterReceiver(this);\n Log.d(TAG, \"ConnectionReceiver unregistered!\");\n }", "void unsubscribe(Subscription subscription);", "public static void logout(HttpSession session) {\n session.invalidate();\n }", "@Override\n public void handle(Session session, Player player, LogoutMessage message) {\n player.setLoggedIn(false);\n World.getInstance().unregisterPlayer(player);\n Server.getInstance().unregisterSession(session);\n session.close();\n }", "public void sessionDestroyed(HttpSessionEvent se) {\r\n }", "public static synchronized void unregister(Connection connection) {\n connection.close();\n activeConnections.remove(connection);\n }", "public void sessionDestroyed(HttpSessionEvent se) {\n }", "public void sessionDestroyed(HttpSessionEvent se) {\n }", "void unsubscribe(){}", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "public void endSession(WebSocket conn) {\n String token = reverseMap.get(conn);\n \n // Token can be null if user connected but never logged in\n if (token == null) {\n return;\n }\n \n activeSessions.remove(token);\n reverseMap.remove(conn);\n }", "public void clearSession(){\n mIsLoggedIn = false;\n mUser = null;\n clearSharedPreference();\n }", "public abstract void unregister();", "public void endSession(){\n\t\t//remove this session from the server's list of sessions\n\t\tgameServer.removeSession(this.sessionID); \t\t\t\t\n\t\tbroadCastMessage(\"@quitGame\"); //remove all clients from the session\n\t\tconnectedClientSockets.clear();\n\t}", "public void sessionDestroyed(HttpSessionEvent hse) {\n\t\tHttpSession s=hse.getSession();\n\t\tString ip=(String)s.getAttribute(Authenticated.REMOTE_IP);\n\t\t\n\t\tlog.debug(\"Session before destroyed:\"+sessions.size());\n\t\t\n\t\tsessions.remove(s);\t\t\n\n\t\tlog.debug(\"Session after destroyed:\"+sessions.size());\n\t\t\n\t}", "void onReleased(Session session);", "public void removeUserFromSession(String token){\n\t\tfor(Session s: getSessionSet()){\n\t\t\tif(s.getToken().equals(token))\n\t\t\t\ts.delete();\t\t\t\t\t//Deletes user session.\n\t\t}\t\n\t}", "public void disconnect() {\n try {\n theCoorInt.unregisterForCallback(this);\n theCoorInt = null;\n }\n catch (Exception e) {\n simManagerLogger.logp(Level.SEVERE, \"SimulationManagerModel\", \n \"closeSimManager\", \"Exception in unregistering Simulation\" +\n \"Manager from the CAD Simulator.\", e);\n }\n }", "public void endSession() {\n //match = null;\n }", "public void removeSession(Session s)\r\n\t{\r\n\t\tfor(int i = 0; i < activeSessions.size(); i++)\r\n\t\t{\r\n\t\t\tif(activeSessions.get(i) == s)\r\n\t\t\t{\r\n\t\t\t\tactiveSessions.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void onServiceUnregistered() {\r\n \t// Update the list of sessions\r\n\t\tupdateList();\r\n }", "public void logout() {\n getRequest().getSession().invalidate();\n }", "public void unregisterState(IState state) {\n moduleCSM.unregisterState(state);\n threadPool.unregisterState(state);\n }", "@Override\n public synchronized void removeSession(Session session) {\n Set<Entry<String, HashSet<Session>>> entries = sessionsMap.entrySet();\n for (Entry<String, HashSet<Session>> entry : entries) {\n if (entry.getValue().remove(session)) {\n log.trace(\"Mapping of session {} has been removed\", session.getId());\n if (entry.getValue().isEmpty()) {\n sessionsMap.remove(entry.getKey());\n }\n return;\n }\n }\n }", "private String PerformLogout(String token){\n next_online.remove(token);\n current_online.remove(token);\n\n // rimuovo anche la callback dalla Hashtable\n cr.RemoveClient(token);\n return \"ok\";\n }", "public final void unPause(){\n sessionStartTime = System.currentTimeMillis();\n synchronized (this) {\n this.resume();\n }\n }", "void wipeSubscriptions(String sessionID);", "private void unregister() {\n Intent regIntent = new Intent(REQUEST_UNREGISTRATION_INTENT);\n regIntent.setPackage(GSF_PACKAGE);\n regIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n setUnregisteringInProcess(true);\n context.startService(regIntent);\n }", "public void onDestroy() {\n super.onDestroy();\n Object object = this.mLock;\n synchronized (object) {\n Iterator<MediaSession2> iterator = this.getSessions().iterator();\n do {\n if (!iterator.hasNext()) {\n this.mSessions.clear();\n this.mNotifications.clear();\n // MONITOREXIT [2, 3, 4] lbl9 : MonitorExitStatement: MONITOREXIT : var1_1\n this.mStub.close();\n return;\n }\n this.removeSession(iterator.next());\n } while (true);\n }\n }", "public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }", "public synchronized void logout(String session_id){\r\n try {\r\n dao.deleteUserBySession(session_id);\r\n }catch(Exception e) {\r\n ExceptionBroadcast.print(e);\r\n }\r\n }", "public void finishSession() {\n \t\trunning = false;\n \t}", "public static SessionListener removeGlobalSessionListener(SessionListener sessionListener) {\n return VolleyRequest.removeGlobalSessionListener(sessionListener);\n }", "public void sessionDestroyed(HttpSessionEvent se) {\n }", "public void removeSession(String endpoint, Session session) {\n\t\tif (sessionMap.get(endpoint).remove(session))\n\t\t\tLOG.info(\"Session {} removed from endpoint {}\", session.getId(), endpoint);\n\t\telse\n\t\t\tLOG.warn(\"Can not remove session {}, because it does not exist in endpoint {}\", session, endpoint);\n\t}", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "@Override\n public void unregister(Object subscriber) {\n }", "public void logout(int sessionId);", "void flushAndClearSession();", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "public void unregisterReceiver() {\n try {\n mContext.unregisterReceiver(mReceiver);\n } catch (IllegalArgumentException e) {\n }\n }", "@Override\n\tpublic Boolean logout()\n\t\t\tthrows UnknownException {\n HttpSession sesion = this.getThreadLocalRequest().getSession();\n sesion.removeAttribute(\"beanusuario\");\n sesion.removeAttribute(\"idsession\"); \n sesion.invalidate(); \n return true;\n\t}", "public void unload() {\n plugin.getEngine().getWorldProvider().getHeartbeat().unsubscribe(WIND);\n plugin.getRootConfig().unsubscribe(TEMPERATURES);\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "public native boolean leaveSession(int sessionId);", "void dissociate(RTMPConnection rtmpConn);" ]
[ "0.7232932", "0.6494761", "0.6424823", "0.63850164", "0.62834513", "0.6235085", "0.6218645", "0.61669946", "0.61312", "0.6105534", "0.605154", "0.60216165", "0.6015975", "0.5967885", "0.5947572", "0.5942717", "0.5916621", "0.59091634", "0.59091634", "0.58820367", "0.58781403", "0.5850193", "0.58401215", "0.5826234", "0.58209807", "0.58182365", "0.578456", "0.57801384", "0.5759052", "0.57541645", "0.5748157", "0.5705957", "0.5699691", "0.56976247", "0.569596", "0.5671354", "0.56588966", "0.56466335", "0.5634333", "0.5630548", "0.5612921", "0.55833983", "0.55832636", "0.557921", "0.5573564", "0.5573564", "0.5549609", "0.554722", "0.5518076", "0.55017716", "0.5492137", "0.54860216", "0.5483372", "0.54813445", "0.5466477", "0.5456095", "0.5438343", "0.5433183", "0.54193103", "0.541592", "0.541345", "0.5412276", "0.5412276", "0.54043305", "0.53827685", "0.53699785", "0.5354823", "0.53501314", "0.53450143", "0.53415734", "0.53402424", "0.5333542", "0.53319746", "0.5329809", "0.5327919", "0.53278184", "0.532401", "0.5320484", "0.5317447", "0.53136635", "0.5313532", "0.5313029", "0.5310753", "0.5306246", "0.5303341", "0.528277", "0.52819157", "0.5280915", "0.52746415", "0.52692384", "0.5267975", "0.52625173", "0.52587664", "0.5256664", "0.5255694", "0.5254173", "0.52467203", "0.52412045", "0.5240601", "0.522889", "0.52177083" ]
0.0
-1
Unjoins the calling thread from the session to which it is currently joined.
public static void unjoin(){ _sessionRef.set(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public void unpark() {\n Thread w = this.thread;\n if (w != null) {\n this.thread = null;\n LockSupport.unpark(w);\n }\n }", "public void unlock() {\n int id = ThreadID.get();\n \n this.levels[id].set(0);\n\n }", "public void unlockThreadForClient()\n {\n masterThread.unlockThreadForClient();\n }", "public void remove() {\n\t\tthis.inferior.removeThread(id);\n\t\tthis.manager.removeThread(id);\n\t}", "public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}", "public void removeCredentialsFromCurrentThread() {\n\t\tthis.threadBoundCredentials.set(null);\n\t}", "void unsetCurrentrun();", "public synchronized void quit() {\n\t\tif(alive) {\n\t\t\talive = false;\n\t\t\t// thread might be waiting for commands so give it an interrupt.\n\t\t\tthread.interrupt();\n\t\t}\n\t}", "public void stop() {\n thread = null;\n }", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "public void stopRunnerThread() {\r\n\t\ttry {\r\n\t\t\tif (runnerThread != null)\r\n\t\t\t\trunnerThread.join();\r\n\t\t} catch (InterruptedException ex) {\r\n\t\t\tassert(false) : \"Unit stopRunnerThread was interrupted\";\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "void disjoinJob(long jobId, long joinedJobId);", "void stopAndJoinReplyThread();", "@Override\n public void stopThread() {\n Log.d(TAG, \"Stopping \" + getName() + \" thread!\");\n running = false;\n doStopAction();\n boolean retry = true;\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stopBackgroundThread() {\n if (this.backgroundThread != null) {\n this.backgroundThread.quitSafely();\n try {\n this.backgroundThread.join();\n this.backgroundThread = null;\n this.backgroundHandler = null;\n } catch (InterruptedException e) {\n Log.e(\"RTABMapActivity\", \"Interrupted while trying to join depth background handler thread\", e);\n }\n }\n }", "public void shutdown() {\n /**\n * Make this thread instance null.\n */\n THREAD_INSTANCE = null;\n\n /**\n * Destroy Keep Alive Thread.\n */\n KEEP_ALIVE_THREAD.pause();\n KEEP_ALIVE_THREAD.stop();\n KEEP_ALIVE_THREAD = null;\n }", "public void reset() {\r\n\t\tif (null!=threadTransaction)\r\n\t\t\tthreadTransaction.remove();\r\n\t}", "public final void unPause(){\n sessionStartTime = System.currentTimeMillis();\n synchronized (this) {\n this.resume();\n }\n }", "public void unlock() {\n setLock.unlock(this);\n }", "void shutdown() {\n this.shutdown.set(true);\n Thread currentThread = this.currentThread.get();\n if (currentThread != null) {\n currentThread.interrupt();\n }\n\n }", "void destroyForCurrentThread() {\n holderInstance.remove();\n parentHolderInstanceStack.remove();\n }", "public synchronized void unblock() {\n\t\tsetBlocked(false);\n\t}", "protected void killUselessThread() {\n if (!System.getProperty(\"os.name\").contains(\"Windows\")) {\n killAllChildrenProcess();\n for (Thread thread : Thread.getAllStackTraces().keySet()) {\n if (!threadSet.contains(thread)) {\n thread.interrupt();\n }\n }\n }\n }", "protected void stopBackgroundThread() {\n mBackgroundThread.quitSafely();\n try {\n mBackgroundThread.join();\n mBackgroundThread = null;\n mBackgroundHandler = null;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "public void leaveBridge() {\n lock.unlock();\n }", "void threadRemoved(String threadId);", "public void onUnblock();", "public void destroy() {\n this.running = false;\n\n try {\n this.join();\n } catch (InterruptedException e) {\n RayonCore.LOGGER.error(\"Error joining \" + getName());\n e.printStackTrace();\n }\n }", "public void remove(Env env) {\n\t\tT obj = objs.remove(Thread.currentThread());\n\t\tif(obj!=null)\n\t\t\tobj.destroy(env);\n\t}", "public static void ThreadStop()\r\n\t{\r\n\t\tthread_running=false;\r\n\t}", "public synchronized void shutdown() {\n if (mThread != null) {\n mThread.shutdown();\n }\n }", "public void subDeactivate() throws InterruptedException\n {\n m_ListenerInstance.dispose();\n \n final int ThreadWaitMs = 1000;\n m_ListenerThread.join(ThreadWaitMs);\n assert !m_ListenerThread.isAlive();\n \n cleanupMessageSender();\n \n try\n {\n m_Socket.getOutputStream().close();\n }\n catch (final IOException e)\n {\n m_Logging.warning(\"Failed to close socket output stream (%s)\", m_Socket.getRemoteSocketAddress());\n }\n\n try\n {\n m_Socket.close();\n }\n catch (final IOException e)\n {\n m_Logging.debug(\"Unable to close socket (%s), already closed? %b\", m_Socket.getRemoteSocketAddress(), \n m_Socket.isClosed());\n }\n finally\n {\n m_WakeLock.delete();\n }\n }", "public void stop() {\n if (this.thread != null) {\n Thread thre = this.thread;\n this.thread = null;\n thre.interrupt();\n }\n }", "private void dispose() {\n\t\t\t\r\n\t\t\tif (TRACE) {\r\n\t\t\t\tSystem.out.println(\"Disposing thread \" + workerNo);\r\n\t\t\t}\r\n\t\t\tcontrolLock.lock();\r\n\t\t\ttry {\r\n\t\t\t\tthreads.remove(thread.getId());\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcontrolLock.unlock();\r\n\t\t\t}\r\n\t\t}", "public synchronized void shutDown() {\n if (this.wakeLock != null) {\n /* Wakelock are ref counted by default. We disable this feature here to ensure that\n * the power lock is released upon shutdown.\n */ \n wakeLock.setReferenceCounted(false);\n wakeLock.release();\n }\n context.unregisterReceiver(broadcastReceiver);\n releaseGlobalContext();\n }", "@Override\n public void unlock() {\n Preconditions.checkState(connection != null);\n checkThread();\n unlockLatency.record(() -> {\n if (locked) {\n try {\n Transaction tnx = session.beginTransaction();\n try {\n DbLockRecord record = fetch(session, false, true);\n if (record == null) {\n throw new LockException(\n String.format(\"[%s][%s][%s] Lock record not found.\",\n id().getNamespace(), id().getName(), threadId()));\n }\n if (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0) {\n record.setLocked(false);\n record.setInstanceId(null);\n record.setTimestamp(-1);\n\n session.save(record);\n } else {\n long delta = System.currentTimeMillis() - lockedTime;\n if (delta > lockExpiryTimeout()) {\n throw new LockException(\n String.format(\"[%s][%s] Lock expired. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n locked = false;\n tnx.commit();\n } catch (Throwable t) {\n tnx.rollback();\n throw new LockException(t);\n } finally {\n locked = false;\n lockedTime = 0;\n session.clear();\n super.unlock();\n }\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n } else {\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n });\n }", "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "public void shutDown()\n\t{\n\t\tthis.threadPool.shutdown();\n\t}", "@Override\n\tpublic void uncaughtException(Thread t, Throwable e) {\n\t\tif(t.isInterrupted()){\n\t\t\tSystem.out.println(t.getName()+\"finished\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void stopThreadByInterrupt() {\n if (customThread != null) {\n try {\n customThread.join();\n customThread.interrupt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "@Override\n public void uncaughtException( final Thread t, final Throwable e ) {\n\n LOG.error( LU.msg( \"Thread \\\"{0}\\\" terminated unexpectedly because of this exception:\", t.getName() ), e );\n }", "public static void clear() {\n\t\tThreadContext.clear();\n\t}", "public void join();", "public synchronized void stop() {\n\t\tif(!isRunning) return; //If the game is stopped, exit method\n\t\tisRunning = false; //Set boolean to false to show that the game is no longer running\n\t\t//Attempt to join thread (close the threads, prevent memory leaks)\n\t\ttry {\n\t\t\tthread.join();\n\t\t}\n\t\t//If there is an error, print the stack trace for debugging\n\t\tcatch(InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private synchronized void stopEventThread() {\n if (eventThread != null) {\n eventThread.abort();\n try {\n eventThread.join();\n } catch (InterruptedException e) {\n System.err.println(\"Interrupted waiting for event handling thread to abort.\");\n }\n eventThread = null;\n }\n }", "void detachCurrent();", "public static void join(Session session){\n _sessionRef.set(session); \n if(!session.isConnected())session.reconnect();\n }", "public static void removeCurrentThreadLib() {\n\t\tcommonLibs.remove();\n\t}", "private void stopThreadByRunnable() {\n if (customRunnable != null) {\n customRunnable.killRunnable();\n }\n }", "protected void cleanup() {\n finished = true;\n thread = null;\n }", "void rejoin()\n {\n this.suspended = false;\n this.game.notifyPlayerRejoined(this);\n }", "synchronized void detachSimulationThread() {\n\t\tthis.eventQueue = null;\n\t\tthis.simulationThread = null;\n\t\tthis.state = SimulationState.STOPPED;\n\t}", "public void quit() {\n Looper looper = this.mLooper;\n if (looper != null) {\n looper.quitSafely();\n this.mLooper = null;\n }\n }", "public void shutdown() {\n this.runnable.stop = true;\n LockSupport.unpark(this);\n }", "public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public final void uncaughtException(Thread thread, Throwable throwable) {\n Thread.UncaughtExceptionHandler uncaughtExceptionHandler;\n tx8640.b((Object)thread, \"thread\");\n tx8640.b((Object)throwable, \"exception\");\n try {\n this.b.a(throwable);\n uncaughtExceptionHandler = this.c;\n if (uncaughtExceptionHandler == null) return;\n }\n catch (Exception exception) {\n f0.a(exception);\n return;\n }\n uncaughtExceptionHandler.uncaughtException(thread, throwable);\n }", "public Builder clearThreadId() {\n bitField0_ = (bitField0_ & ~0x00000001);\n threadId_ = 0L;\n onChanged();\n return this;\n }", "public void removeWakeLock() {\r\n\t\twakelock.release();\r\n\t}", "static final int detachThread0X(Object throwableObj)\n {\n VMThread vt = null;\n try\n {\n Thread thread = currentThread();\n VMThread vmt;\n if (thread != null && (vmt = thread.vmThread) != null &&\n vmt.threadStatus != STATE_TERMINATED)\n {\n vt = vmt;\n if (throwableObj != null && !(throwableObj instanceof ThreadDeath))\n {\n printUncaughtException(thread, (Throwable) throwableObj);\n }\n }\n }\n finally\n {\n if (vt != null)\n vt.detachInner();\n }\n return 0;\n }", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "@Override\r\n\tpublic void uncaughtException(Thread thread, Throwable ex) {\n\r\n\t}", "@Override\n\tpublic void destroy() {\n\t\tif( null != mLooper ) {\n\t\t\tmLooper.quit();\n\t\t\tmLooper = null;\n\t\t\tmThread = null;\n\t\t}\n\t}", "private void doUnsubscribe(IoSession session, MessageProtocol request) throws Exception {\n \t\n \tdoExit(session);\n }", "public Thread unsubscribeWithThread(Integer busLineID, ConfigurationActivity configurationActivity) { // subscribe se ena buslineID\n Thread t = new UnsubscribeThread(busLineID, configurationActivity);\n t.start();\n return t;\n }", "private void kickControlThread() {\r\n\t\tcontrolSignal.release();\r\n\t}", "@Override\r\n\tpublic void join() {\n\r\n\t}", "private void stopThread()\n {\n if (workerThread != null && workerThread.isAlive())\n {\n workerThread.stopLoop();\n }\n stopSelf();\n }", "private void stop(){\n isRunning = false;\n try{\n thread.join();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"deprecation\")\n private void tryToTerminate(Thread t) {\n if (!t.isAlive()) return;\n \n String tname = t.getName() + \"(#\" + System.identityHashCode(t) + \")\";\n \n // We mark the thread as being killed because once we start calling\n // interrupt or stop weird things can happen. Any logged exceptions should\n // make it clear the thread is being killed.\n runnerThreadGroup.markAsBeingTerminated(t);\n \n logger.warning(\"Attempting to terminate thread: \" + tname + \", currently at:\\n\"\n + traces.formatStackTrace(t.getStackTrace()));\n \n // Try to interrupt first.\n int interruptAttempts = this.killAttempts;\n int interruptWait = this.killWait;\n do {\n try {\n t.interrupt();\n t.join(interruptWait);\n } catch (InterruptedException e) { /* ignore */ }\n \n if (!t.isAlive()) break;\n logger.fine(\"Trying to interrupt thread: \" + tname \n + \", retries: \" + interruptAttempts + \", currently at: \"\n + traces.formatStackTrace(t.getStackTrace()));\n } while (--interruptAttempts >= 0);\n \n if (!t.isAlive()) {\n logger.warning(\"Interrupted a runaway thread: \" + tname);\n }\n \n if (t.isAlive()) {\n logger.warning(\"Does not respond to interrupt(), trying to stop(): \" + tname);\n \n // Try to sent ThreadDeath up its stack if interrupt is not working.\n int killAttempts = this.killAttempts;\n int killWait = this.killWait;\n do {\n try {\n t.stop();\n t.join(killWait);\n } catch (InterruptedException e) { /* ignore */ }\n if (!t.isAlive()) break;\n logger.fine(\"Trying to stop a runaway thread: \" + tname \n + \", retries: \" + killAttempts + \", currently at: \"\n + traces.formatStackTrace(t.getStackTrace()));\n } while (--killAttempts >= 0);\n \n if (!t.isAlive()) {\n logger.warning(\"Stopped a runaway thread: \" + tname);\n } \n }\n \n if (t.isAlive()) {\n logger.severe(\"Could not interrupt or stop thread: \" + tname);\n }\n }", "public void killThread(String threadName) {\n\t\tthis.toSlave.println(MasterProcessInterface.KILL_THREAD_COMMAND + ((threadName == null) ? \"\" : (\":\" + threadName)));\n\t\tif (threadName == null)\n\t\t\tthis.slave.destroy();\n\t}", "public void quit() {\r\n\t\trunning = false;\r\n\t\tt= null;\r\n\t}", "private void quit() {\n\t\t\tArrayList<ClientThread> delList = new ArrayList<ClientThread>();\n\t\t\tdelList.add(this);\n\t\t\tplayers.removeAll(delList);\n\t\t\twaitingPlayers.removeAll(delList);\n\t\t\tview.changeInAndWait(players.size(),waitingPlayers.size());\t\t\n\t\t\tif(dealer == this) {\n\t\t\t\tdealer = null;\n\t\t\t\tview.writeLog(\"Dealer: \" + name + \" has quited. NO DEALER NOW.\");\n\t\t\t}else view.writeLog(\"Player: \" + name + \" has quited.\");\n\t\t\tstatusCheck();\n\t\t}", "public void stopPlayThread() {\n ms.stop();\n }", "public static void clearThreadLocalTransaction() {\n threadlocal.set(null);\n }", "public void stop(Thread arg0) {\n\t\t\n\t}", "public void stop() {\n stopped.set(true);\n if (this.currentThread != null) {\n this.currentThread.interrupt();\n this.currentThread = null;\n }\n }", "public void deselect() {\n if (selection != null) {\n \t\tworld.destroyJoint(mouseJoint);\n \t selection = null;\n \t mouseJoint = null;\n\t }\n }", "public void deselect() {\n\t\tmSecureChannel.resetSecurity();\r\n\t}", "public void stopCurrentConnection() {\n if(mCurrentProfile!=null) {\n LogUtil.i(\"startConnection \" + mCurrentProfile.getName());\n mCurrentProfile = null;\n mWorkHandler.post(new DisConnectJob());\n }\n }", "@Override\n protected void onStop() {\n \tsuper.onStop();\n \tthread.setThreadExit(true);\n \tthread = null;\n \t\n }", "public synchronized void stop() {\n\t\tif (!isStart) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (LoopThread l : thread) {\n\t\t\tl.finnish();\n\t\t}\n\t\tint activeCount;\n\t\tdo{\n\t\t\tactiveCount = 0;\n\t\t\tfor(LoopThread l : thread){\n\t\t\t\tif(l.isAlive()){\n\t\t\t\t\tactiveCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (activeCount > 0);\n\t\t\n\t}", "public void join() {\n try {\n thread.join();\n } catch(Exception e) {}\n }", "protected void unlock() {\n synchronized ( lock )\n {\n lock.notify();\n }\n }", "public abstract void stopThreadsAtSafePoint();", "public void stopThread() \n {\n \tthis.exit = true;\n \t//ctr.getMemory().programmcounter = 65536;\n }", "public void stopThread(View view) {\n //stopThreadByInterrupt();\n //stopThreadByBoolean();\n stopThreadByRunnable();\n\n\n }", "public void stop() {\n thread.interrupt();\n }", "public synchronized void deRegister()\n {\n // stop the thread running...\n logger.debug(\"deregister called - invalidating session\");\n\n // remove from registered listeners and then invalidate the ScriptSession\n clients.remove(wctx.getScriptSession().getId());\n wctx.getScriptSession().invalidate();\n\n if (clients.size() == 0)\n {\n // might as well stop thread since we have no registered listeners\n this.active = false;\n }\n\n }", "private void closeThread() {\n running = false;\n }", "public void turnOff(){\n\t\t//**************************************************\n\t\t// Verifica se não foi finalizada ou mesmo não foi inicializada\n\t\tif (!this.isInitialized)\n\t\t\treturn;\n\t\t\n\t\t//**************************************************\n\t\t// Seta a flag para não inicializado para evitar null exception\n\t\tthis.isInitialized = false;\n\t\t\n\t\t//**************************************************\n\t\t// Controle para Terminar as Threads\n\t\tboolean retry = true;\n\t\t//**************************************************\n\t\t// Termina os loopings das Threads\n\t\tthis.datagramSocketClientReceiverWorker.turnOff();\n\t\tthis.datagramSocketClientSenderWorker.turnOff();\n\t\t//**************************************************\n\t\t// Tenta matar a Thread de recebimento na FACA!!!\n\t\twhile(retry){\n\t\t\ttry {\n\t\t\t\tthis.datagramSocketClientReceiverThread.join();\n\t\t\t\tretry = false;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t//**************************************************\n\t\t// Reutilizando a Flag-- Isso é errado... mas fazer o que?\n\t\tretry = true;\n\t\t//**************************************************\n\t\t// Tenta matar a Thread de envio na BALA!!!!\n\t\twhile(retry){\n\t\t\ttry {\n\t\t\t\tthis.datagramSocketClientSenderThread.join();\n\t\t\t\tretry = false;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t}", "public void unlock() {\n islandLocked = false;\n }", "public void shutdown() {\n\t\tthreadPool.shutdown();\n\t}", "private void unsubscribe() {\n subscriber=null;\n }" ]
[ "0.66037977", "0.65117586", "0.61009943", "0.59745413", "0.5702451", "0.5701098", "0.56398106", "0.554041", "0.54749566", "0.54734933", "0.5470359", "0.54476017", "0.5432448", "0.53846264", "0.53772694", "0.5373479", "0.534674", "0.53278905", "0.5321487", "0.53036606", "0.5299616", "0.52870494", "0.5264769", "0.5256777", "0.5237173", "0.52304596", "0.5215531", "0.5187261", "0.517537", "0.5153756", "0.51400536", "0.5137173", "0.5134621", "0.51256937", "0.5103531", "0.51021326", "0.5093875", "0.5081995", "0.5073342", "0.50684184", "0.50675625", "0.5065994", "0.50550574", "0.50160646", "0.5014529", "0.50068957", "0.4970621", "0.49696922", "0.49654347", "0.49632", "0.49593347", "0.49533945", "0.49502766", "0.4948615", "0.49435702", "0.4939396", "0.4937661", "0.49320385", "0.4927977", "0.49272", "0.49154332", "0.48987082", "0.4898449", "0.48897576", "0.4884059", "0.48815423", "0.48739934", "0.48636863", "0.4857812", "0.48564133", "0.48552004", "0.48535693", "0.484559", "0.48404402", "0.4835883", "0.48219678", "0.4809255", "0.4799761", "0.47889277", "0.47804677", "0.47789356", "0.47767535", "0.4774239", "0.47673288", "0.47591552", "0.4749755", "0.47472396", "0.47454166", "0.47447488", "0.47434017", "0.47338232", "0.47315124", "0.4729728", "0.4728819", "0.47264403", "0.47220042", "0.47206295", "0.4716013", "0.47156978", "0.4711094" ]
0.742277
0
Unjoins the calling thread from the session to which it is currently joined, and closes that session.
public static void unjoinAndClose(){ Session s = (Session)_sessionRef.get(); if(s != null){ s.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void unjoin(){\n _sessionRef.set(null);\n }", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "public void unlockThreadForClient()\n {\n masterThread.unlockThreadForClient();\n }", "@Override\n public void closeSession() throws HibernateException {\n Session session = threadLocal.get();\n threadLocal.set(null);\n\n if (session != null) {\n session.close();\n }\n }", "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "public synchronized void quit() {\n\t\tif(alive) {\n\t\t\talive = false;\n\t\t\t// thread might be waiting for commands so give it an interrupt.\n\t\t\tthread.interrupt();\n\t\t}\n\t}", "private void closeThread() {\n running = false;\n }", "public void subDeactivate() throws InterruptedException\n {\n m_ListenerInstance.dispose();\n \n final int ThreadWaitMs = 1000;\n m_ListenerThread.join(ThreadWaitMs);\n assert !m_ListenerThread.isAlive();\n \n cleanupMessageSender();\n \n try\n {\n m_Socket.getOutputStream().close();\n }\n catch (final IOException e)\n {\n m_Logging.warning(\"Failed to close socket output stream (%s)\", m_Socket.getRemoteSocketAddress());\n }\n\n try\n {\n m_Socket.close();\n }\n catch (final IOException e)\n {\n m_Logging.debug(\"Unable to close socket (%s), already closed? %b\", m_Socket.getRemoteSocketAddress(), \n m_Socket.isClosed());\n }\n finally\n {\n m_WakeLock.delete();\n }\n }", "public void unlock() {\n int id = ThreadID.get();\n \n this.levels[id].set(0);\n\n }", "public void unpark() {\n Thread w = this.thread;\n if (w != null) {\n this.thread = null;\n LockSupport.unpark(w);\n }\n }", "public void close() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n synchronized (globalLock) {\n isRunning = false;\n\n if (reconnectionThread != null) {\n reconnectionThread.interrupt();\n }\n\n webSocketConnection.closeInternal();\n }\n }\n }).start();\n }", "public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "void shutdown() {\n this.shutdown.set(true);\n Thread currentThread = this.currentThread.get();\n if (currentThread != null) {\n currentThread.interrupt();\n }\n\n }", "private void dispose() {\n\t\t\t\r\n\t\t\tif (TRACE) {\r\n\t\t\t\tSystem.out.println(\"Disposing thread \" + workerNo);\r\n\t\t\t}\r\n\t\t\tcontrolLock.lock();\r\n\t\t\ttry {\r\n\t\t\t\tthreads.remove(thread.getId());\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcontrolLock.unlock();\r\n\t\t\t}\r\n\t\t}", "public static void closeSession() throws HException {\r\n\t\ttry {\r\n\t\t\tcommitTransaction();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\trollbackTransaction();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tSession s = (Session) threadSession.get();\r\n\t\t\tthreadSession.set(null);\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t\tif (s != null && s.isOpen()) {\r\n\t\t\t\ts.close();\r\n\t\t\t\tsetConnections(-1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void closeSession() throws HibernateException {\n\t\tSession session = (Session) threadLocal.get();\n threadLocal.set(null);\n\n if (session != null && session.isOpen()) {\n session.close();\n }\n }", "public void stop() {\n session.close(false);\n }", "void stopAndJoinReplyThread();", "void exitSession()\n\t{\n\t\t// clear out our watchpoint list and displays\n\t\t// keep breakpoints around so that we can try to reapply them if we reconnect\n\t\tm_displays.clear();\n\t\tm_watchpoints.clear();\n\n\t\tif (m_fileInfo != null)\n\t\t\tm_fileInfo.unbind();\n\n\t\tif (m_session != null)\n\t\t\tm_session.terminate();\n\n\t\tm_session = null;\n\t\tm_fileInfo = null;\n\t}", "public void shutDown()\n\t{\n\t\tthis.threadPool.shutdown();\n\t}", "public static void join(Session session){\n _sessionRef.set(session); \n if(!session.isConnected())session.reconnect();\n }", "public void leaveBridge() {\n lock.unlock();\n }", "public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}", "public void shutdown() {\n /**\n * Make this thread instance null.\n */\n THREAD_INSTANCE = null;\n\n /**\n * Destroy Keep Alive Thread.\n */\n KEEP_ALIVE_THREAD.pause();\n KEEP_ALIVE_THREAD.stop();\n KEEP_ALIVE_THREAD = null;\n }", "@Override\n\tpublic void finish() {\n\t\ttry {\n\t\t\tif(muc!=null){\n\t\t\t\t\n\t\t\t\tmuc.leave();\n\t\t\t}\n\t\t\tif(connection!=null){\n\t\t\t\t\n\t\t\t\tconnection.disconnect();\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\n\t\tsuper.finish();\n\t}", "public void finishSession() {\n \t\trunning = false;\n \t}", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "public synchronized void shutdown() {\n if (mThread != null) {\n mThread.shutdown();\n }\n }", "public void quit() {\n Looper looper = this.mLooper;\n if (looper != null) {\n looper.quitSafely();\n this.mLooper = null;\n }\n }", "public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}", "@Override\r\n\tpublic void shutDown() {\r\n\t\tdown.set(true);\r\n\t\tif (shutDownImmediatelly) {\r\n\t\t\ttry {\r\n\t\t\t\tsuper.shutDown();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tThread thread = new Thread(new Runnable() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSessionForUI.super.shutDown();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthread.setDaemon(true);\r\n\t\t\tthread.start();\r\n\t\t}\r\n\t}", "public void stop() {\n thread = null;\n }", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "public static void closeSession() {\n Session session = (Session) sessionThreadLocal.get();\n sessionThreadLocal.set(null);\n try {\n if (session != null)\n session.close();\n } catch (HibernateException e) {\n logger.error(\"Close current session error: \" + e.getMessage());\n }\n }", "protected void stopBackgroundThread() {\n mBackgroundThread.quitSafely();\n try {\n mBackgroundThread.join();\n mBackgroundThread = null;\n mBackgroundHandler = null;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void destroy() {\n this.running = false;\n\n try {\n this.join();\n } catch (InterruptedException e) {\n RayonCore.LOGGER.error(\"Error joining \" + getName());\n e.printStackTrace();\n }\n }", "void closeSession();", "void closeSession();", "public synchronized void close() {\n \t\trecallThreads();\n \n \t\tsetSize(0, 0);\n \t\t/* Notify everyone waiting for a thread */\n \t\tnotifyAll();\n \n \t\t// destroy the threadgroup, will never go away otherwise\n \t\ttry {\n \t\t\t// Need to set it to a daemon first otherwise it will not be destroyed\n \t\t\tsetDaemon(true);\n \t\t\tdestroy();\n \t\t} catch (Exception e) {\n \t\t\t// TODO: consider logging\n \t\t}\n \t}", "public void remove() {\n\t\tthis.inferior.removeThread(id);\n\t\tthis.manager.removeThread(id);\n\t}", "private void disconnect() {\n if (readerThread != null)\n readerThread.kill();\n if (writerThread != null)\n writerThread.kill();\n if (nonblockReader != null) {\n nonblockReader.close();\n }\n isConnected = false;\n }", "public synchronized void join() {\n try {\n connection.close();\n listener.join();\n } catch (Exception io) {\n System.err.println(io.getMessage());\n io.printStackTrace();\n } \n }", "@Override\n\tpublic void destroy() {\n\t\tif( null != mLooper ) {\n\t\t\tmLooper.quit();\n\t\t\tmLooper = null;\n\t\t\tmThread = null;\n\t\t}\n\t}", "public synchronized void stop() {\n\t\tif(!isRunning) return; //If the game is stopped, exit method\n\t\tisRunning = false; //Set boolean to false to show that the game is no longer running\n\t\t//Attempt to join thread (close the threads, prevent memory leaks)\n\t\ttry {\n\t\t\tthread.join();\n\t\t}\n\t\t//If there is an error, print the stack trace for debugging\n\t\tcatch(InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void unlock() {\n Preconditions.checkState(connection != null);\n checkThread();\n unlockLatency.record(() -> {\n if (locked) {\n try {\n Transaction tnx = session.beginTransaction();\n try {\n DbLockRecord record = fetch(session, false, true);\n if (record == null) {\n throw new LockException(\n String.format(\"[%s][%s][%s] Lock record not found.\",\n id().getNamespace(), id().getName(), threadId()));\n }\n if (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0) {\n record.setLocked(false);\n record.setInstanceId(null);\n record.setTimestamp(-1);\n\n session.save(record);\n } else {\n long delta = System.currentTimeMillis() - lockedTime;\n if (delta > lockExpiryTimeout()) {\n throw new LockException(\n String.format(\"[%s][%s] Lock expired. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n locked = false;\n tnx.commit();\n } catch (Throwable t) {\n tnx.rollback();\n throw new LockException(t);\n } finally {\n locked = false;\n lockedTime = 0;\n session.clear();\n super.unlock();\n }\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n } else {\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n });\n }", "public void stopBackgroundThread() {\n if (this.backgroundThread != null) {\n this.backgroundThread.quitSafely();\n try {\n this.backgroundThread.join();\n this.backgroundThread = null;\n this.backgroundHandler = null;\n } catch (InterruptedException e) {\n Log.e(\"RTABMapActivity\", \"Interrupted while trying to join depth background handler thread\", e);\n }\n }\n }", "public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }", "public void stopThread() {\n\t\talive = false;\n\t\t\n\t\ttry {\n\t\t\tif(oos != null) {\n\t\t\t\toos.close();\n\t\t\t}\n\t\t\tif(ois != null) {\n\t\t\t\tois.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// Why the hell is that being thrown here? Doesn't matter.\n\t\t}\n\t}", "@Deactivate\n public void deactivate()\n {\n try\n {\n m_ServerSocket.close();\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to close server socket\");\n }\n \n try\n {\n m_ServerSocketThread.join(THREAD_JOIN_TIMEOUT);\n }\n catch (final InterruptedException e)\n { \n m_Logging.info(\"Server socket interrupted while joining thread\");\n }\n }", "protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }", "@Override\n public void stopThread() {\n Log.d(TAG, \"Stopping \" + getName() + \" thread!\");\n running = false;\n doStopAction();\n boolean retry = true;\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "void destroyForCurrentThread() {\n holderInstance.remove();\n parentHolderInstanceStack.remove();\n }", "public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }", "public void exit() {\n\t\tJWebSocketTokenClient lClient;\n\t\tfor (int lIdx = 0; lIdx < mFinished; lIdx++) {\n\t\t\tlClient = mClients[lIdx];\n\t\t\tlClient.removeTokenClientListener(this);\n\t\t\ttry {\n\t\t\t\tmLog(\"Closing client #\" + lIdx + \" on thread: \" + Thread.currentThread().hashCode() + \"...\");\n\t\t\t\tlClient.close();\n\t\t\t\tThread.sleep(20);\n\t\t\t} catch (Exception lEx) {\n\t\t\t\tmLog(\"Exception: \" + lEx.getMessage() + \". Closing client #\" + lIdx + \"...\");\n\t\t\t}\n\t\t}\n\t}", "public void unlock() {\n setLock.unlock(this);\n }", "public void shutdown() {\n\t\tthreadPool.shutdown();\n\t}", "public void stopRunnerThread() {\r\n\t\ttry {\r\n\t\t\tif (runnerThread != null)\r\n\t\t\t\trunnerThread.join();\r\n\t\t} catch (InterruptedException ex) {\r\n\t\t\tassert(false) : \"Unit stopRunnerThread was interrupted\";\r\n\t\t}\r\n\t\t\r\n\t}", "public synchronized void shutDown() {\n if (this.wakeLock != null) {\n /* Wakelock are ref counted by default. We disable this feature here to ensure that\n * the power lock is released upon shutdown.\n */ \n wakeLock.setReferenceCounted(false);\n wakeLock.release();\n }\n context.unregisterReceiver(broadcastReceiver);\n releaseGlobalContext();\n }", "public void close() {\n\t\tif (this.luaState != 0) {\n\t\t\tLuaStateManager.removeState(stateId);\n\t\t\t_close(luaState);\n\t\t\tthis.luaState = 0;\n\t\t}\n\t}", "public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }", "public static void disconnect() {\n \t\tconnPool.stop();\n \t}", "@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}", "private static void closeSession() {\n isSessionOpen = false;\n }", "public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}", "public void removeCredentialsFromCurrentThread() {\n\t\tthis.threadBoundCredentials.set(null);\n\t}", "public void stop() {\n if (this.thread != null) {\n Thread thre = this.thread;\n this.thread = null;\n thre.interrupt();\n }\n }", "private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }", "public void shutdown() {\n Log.info(Log.FAC_NETMANAGER, formatMessage(\"Shutdown requested\"));\n _run = false;\n if (_periodicTimer != null) _periodicTimer.cancel();\n if (_thread != null) _thread.interrupt();\n if (null != _channel) {\n try {\n setTap(null);\n } catch (IOException io) {\n }\n try {\n _channel.close();\n } catch (IOException io) {\n }\n }\n }", "public void endSession(){\n\t\t//remove this session from the server's list of sessions\n\t\tgameServer.removeSession(this.sessionID); \t\t\t\t\n\t\tbroadCastMessage(\"@quitGame\"); //remove all clients from the session\n\t\tconnectedClientSockets.clear();\n\t}", "protected void killUselessThread() {\n if (!System.getProperty(\"os.name\").contains(\"Windows\")) {\n killAllChildrenProcess();\n for (Thread thread : Thread.getAllStackTraces().keySet()) {\n if (!threadSet.contains(thread)) {\n thread.interrupt();\n }\n }\n }\n }", "public void disconnect()\n\t{\n\t\t_active = false;\n\t\t_leader.setObjectHandler(null);\n\t\t_leader.close();\n\t\ttry\n\t\t{\n\t\t\t_pos.close();\n\t\t}\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t// nothing to do here, doesn't matter\n\t\t}\n\t}", "public void quit() {\r\n\t\trunning = false;\r\n\t\tt= null;\r\n\t}", "void disjoinJob(long jobId, long joinedJobId);", "private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}", "void closeSocket() {\n\t\tint size = threads.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (threads.get(i) == this) {\n\t\t\t\tthreads.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tprintActiveClients();\n\n\t\ttry {\n\t\t\tmessageBuffer.add(name + \" has just left the chatroom...\");\n\t\t\tinputStream.close();\n\t\t\toutputStream.close();\n\t\t\tclientSocket.close();\n\t\t\treturn;\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} catch (InterruptedException ine) {\n\t\t\treturn;\n\t\t}\n\t}", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "public void dispose() {\n thread.interrupt();\n }", "public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }", "public void shutdown() {\n this.runnable.stop = true;\n LockSupport.unpark(this);\n }", "public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }", "public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void disconnect() {\n watchDog.terminate();\n synchronized (sync) {\n if (!connections.isEmpty()) {\n while (connections.size() > 0) {\n ThreadConnection tconn = connections.pop();\n try {\n tconn.conn.rollback();\n tconn.conn.close();\n } catch (SQLException e) {\n }\n }\n }\n }\n this.setChanged();\n this.notifyObservers(\"disconnect\");\n }", "public void end()\n {\n keepingAlive = false;\n if (channel == null)\n {\n channel = connectFuture.getChannel();\n connectFuture.cancel();\n }\n if (channel != null)\n {\n channel.close();\n }\n }", "protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}", "private void shutdownCreateConnThread() {\r\n int curSts;\r\n do {\r\n curSts = createConnThreadState.get();\r\n if ((curSts == THREAD_WORKING || curSts == THREAD_WAITING) && createConnThreadState.compareAndSet(curSts, THREAD_DEAD)) {\r\n if (curSts == THREAD_WAITING) unpark(this);\r\n break;\r\n }\r\n } while (true);\r\n }", "public synchronized void stop() {\r\n\t\t//TODO read why stop is deprecated http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html\r\n\t\tif (udplistener != null) {\r\n\t\t\tudplistener.datagramSocket.close();\r\n\t\t\tudpthread.stop();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (tcplistener != null) {\r\n\t\t\t\ttcplistener.serverSocket.close();\r\n\t\t\t\ttcpthread.stop();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {e.printStackTrace();}\t\t\r\n\t}", "@SuppressWarnings(\"deprecation\")\n private void tryToTerminate(Thread t) {\n if (!t.isAlive()) return;\n \n String tname = t.getName() + \"(#\" + System.identityHashCode(t) + \")\";\n \n // We mark the thread as being killed because once we start calling\n // interrupt or stop weird things can happen. Any logged exceptions should\n // make it clear the thread is being killed.\n runnerThreadGroup.markAsBeingTerminated(t);\n \n logger.warning(\"Attempting to terminate thread: \" + tname + \", currently at:\\n\"\n + traces.formatStackTrace(t.getStackTrace()));\n \n // Try to interrupt first.\n int interruptAttempts = this.killAttempts;\n int interruptWait = this.killWait;\n do {\n try {\n t.interrupt();\n t.join(interruptWait);\n } catch (InterruptedException e) { /* ignore */ }\n \n if (!t.isAlive()) break;\n logger.fine(\"Trying to interrupt thread: \" + tname \n + \", retries: \" + interruptAttempts + \", currently at: \"\n + traces.formatStackTrace(t.getStackTrace()));\n } while (--interruptAttempts >= 0);\n \n if (!t.isAlive()) {\n logger.warning(\"Interrupted a runaway thread: \" + tname);\n }\n \n if (t.isAlive()) {\n logger.warning(\"Does not respond to interrupt(), trying to stop(): \" + tname);\n \n // Try to sent ThreadDeath up its stack if interrupt is not working.\n int killAttempts = this.killAttempts;\n int killWait = this.killWait;\n do {\n try {\n t.stop();\n t.join(killWait);\n } catch (InterruptedException e) { /* ignore */ }\n if (!t.isAlive()) break;\n logger.fine(\"Trying to stop a runaway thread: \" + tname \n + \", retries: \" + killAttempts + \", currently at: \"\n + traces.formatStackTrace(t.getStackTrace()));\n } while (--killAttempts >= 0);\n \n if (!t.isAlive()) {\n logger.warning(\"Stopped a runaway thread: \" + tname);\n } \n }\n \n if (t.isAlive()) {\n logger.severe(\"Could not interrupt or stop thread: \" + tname);\n }\n }", "public void shutDown ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"shutDown\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n shutDown ( );\n } finally {\n _releaseReply ($in);\n }\n }", "public synchronized void shutDown() {\n\t state.shutDown();\n\t}", "private void shutDown() {\n this.setState(State.SHUTTING);\n // clean all msg queues\n if (isRoot()) {\n System.out.println(String.format(\"%s: shutdown\", Thread.currentThread().getName()));\n Neighbor pseudoParent = null;\n ArrayList<Neighbor> children = node.getChildren();\n if (children.isEmpty()) {\n // shutDown fast\n } else {\n System.out.println(String.format(\"%s: looking for next root\", Thread.currentThread().getName()));\n for (Neighbor child : node.getChildren()) {\n try {\n child.sendMessage(\n new RootMessage(),\n child::detach\n ).get();\n pseudoParent = child;\n break;\n } catch (InterruptedException | CancellationException | ExecutionException e) {\n e.printStackTrace();\n System.err.println(Thread.currentThread().getName() + \": child not available\");\n }\n }\n\n if (pseudoParent != null) {\n System.out.println(String.format(\"%s: found next root\", Thread.currentThread().getName()));\n broadcastRejoin(pseudoParent);\n } else {\n // shutdown fast\n System.out.println(String.format(\"%s: didn't find next root\", Thread.currentThread().getName()));\n }\n }\n } else {\n try {\n Neighbor parent = node.parent;\n broadcastRejoin(parent);\n parent.sendMessage(new LeaveMessage(), this::detachParent).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n setState(State.TERMINATED);\n }", "public void disconnect() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mApplicationContext);\n prefs.edit().putBoolean(\"xmpp_logged_in\", false).commit();\n\n if (mConnection != null) {\n mConnection.disconnect();\n }\n\n mConnection = null;\n // Unregister the message broadcast receiver.\n if (uiThreadMessageReceiver != null) {\n mApplicationContext.unregisterReceiver(uiThreadMessageReceiver);\n uiThreadMessageReceiver = null;\n }\n }", "public void ShutDown()\n {\n bRunning = false;\n \n LaunchLog.Log(COMMS, LOG_NAME, \"Shut down instruction received...\");\n\n for(LaunchServerSession session : Sessions.values())\n {\n LaunchLog.Log(COMMS, LOG_NAME, \"Closing session...\");\n session.Close();\n }\n \n LaunchLog.Log(COMMS, LOG_NAME, \"...All sessions are closed.\");\n }", "public void exit(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(10, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "private void stopThreadByInterrupt() {\n if (customThread != null) {\n try {\n customThread.join();\n customThread.interrupt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }", "private static void j_unlock() {\r\n\t\tFileChannel channel = globalFileChannel;\r\n\t\tFileLock lock = globalFileLock;\r\n\t\tglobalFileChannel = null;\r\n\t\tglobalFileLock = null;\r\n\t\ttry {\r\n\t\t\tlock.release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tchannel.close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t}", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void stopCurrentConnection() {\n if(mCurrentProfile!=null) {\n LogUtil.i(\"startConnection \" + mCurrentProfile.getName());\n mCurrentProfile = null;\n mWorkHandler.post(new DisConnectJob());\n }\n }", "private void shutDown() {\r\n\t\t\r\n\t\t// send shutdown to children\r\n\t\tlogger.debug(\"BagCheck \"+ this.lineNumber+\" has sent an EndOfDay message to it's Security.\");\r\n\t\tthis.securityActor.tell(new EndOfDay(1));\r\n\r\n\t\t// clear all references\r\n\t\tthis.securityActor = null;\r\n\t}" ]
[ "0.7260896", "0.6842732", "0.6035267", "0.5975705", "0.59368646", "0.58719766", "0.5814754", "0.5780242", "0.5751151", "0.5731497", "0.5705615", "0.5699232", "0.5690072", "0.5689392", "0.56547016", "0.5635149", "0.5632411", "0.5591962", "0.55419755", "0.55387735", "0.5528711", "0.5518794", "0.5497392", "0.54923826", "0.5477778", "0.5463874", "0.5460007", "0.54583794", "0.54529977", "0.54443425", "0.54381436", "0.54237026", "0.54095274", "0.53912616", "0.53865236", "0.53846014", "0.5380839", "0.5372322", "0.5372322", "0.5372017", "0.5361158", "0.5353648", "0.5345889", "0.5329968", "0.53253275", "0.5312269", "0.5306388", "0.5301631", "0.52989507", "0.52860755", "0.5283328", "0.52807766", "0.52698886", "0.526512", "0.5253653", "0.5245464", "0.5243178", "0.5239989", "0.5234621", "0.52335304", "0.52333105", "0.5226036", "0.5215861", "0.5210058", "0.52050865", "0.52047867", "0.5196622", "0.5184589", "0.518443", "0.51782334", "0.5177165", "0.5170475", "0.5167455", "0.516278", "0.51602733", "0.515651", "0.5153082", "0.51529455", "0.51434386", "0.5125097", "0.5100751", "0.5096783", "0.50955325", "0.5093992", "0.50919735", "0.50668746", "0.5065363", "0.5062905", "0.505952", "0.50573885", "0.5052253", "0.50507164", "0.50493854", "0.5047217", "0.5046347", "0.50416017", "0.50404555", "0.5031976", "0.5025679", "0.5022554" ]
0.7941233
0
Returns the session that is registered with the calling thread.
public static Session currentSession() throws IllegalStateException { Session s; if((s = (Session) _sessionRef.get()) == null) { throw new IllegalStateException("Thread not registered with a session"); } if(!s.isConnected()){ s.reconnect(); } return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "Object getNativeSession();", "public static Session getSession() {\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "String getAssociatedSession();", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "protected abstract SESSION getThisAsSession();", "public LocalSession session() { return session; }", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "public String getSession() {\n return session;\n }", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "public String getSession() {\n return this.session;\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session session() {\n return session;\n }", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public TrackSession getTrackSession() {\n if (mTrackSession == null && mTrackSessionId != 0)\r\n mTrackSession = TrackSession.read(Position.context, mTrackSessionId);\r\n return mTrackSession;\r\n }", "public Session getSession() {\n return session;\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "@Override // com.android.server.wm.WindowContainer\n public SurfaceSession getSession() {\n return this.mSession;\n }", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "public AbstractSession getSession() {\n return session;\n }", "public FlexSession getFlexSession()\n {\n synchronized (lock)\n {\n return flexSession;\n }\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "private TwitterSession getTwitterSession() {\n TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n\n return session;\n }", "public IoSession getChatSession() {\n\t\treturn m_chatSession;\n\t}", "@Override // java.util.concurrent.Callable\n public AppRaterSession call() {\n return this.a.a.getLastSession();\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "public SessionService session() {\n return service;\n }", "public Session getSession()\n {\n return session;\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "public java.lang.String getSessionToken() {\r\n return sessionToken;\r\n }", "public JavabotSession getQuickStartSession()\n {\n return (JavabotSession)getSession();\n }", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "public String getSessionContext() {\n return this.SessionContext;\n }", "public Integer getActiveTestRunSession() {\n return activeTestRunSession;\n }", "public Session getSession() { return session; }", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.getAuthToken() != null &&\n !session.getAuthToken().isExpired()) {\n return session;\n } else {\n return null;\n }\n }", "public Object getDelegateSession() throws UMOException\n {\n return null;\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public PSUserSession getSession();", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public HttpSession getHttpSession() {\n return servletRequest.getSession();\n }", "public IoSession getTcpSession() {\n\t\treturn m_tcpSession;\n\t}", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public Session getSession() {\n return session;\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "public PortletSession getPortletSession() {\r\n\t\tif (_preq != null)\r\n\t\t\treturn _preq.getPortletSession();\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public GameSession getGameSession()\n {\n return gameSession;\n }", "public ClusterSession getClusterSession() {\n return cl;\n }", "private TunaFacadeRemote getRemoteSession() {\n TunaFacadeRemote session = null;\n \n // CORBA properties and values and lookup taken after earlier work provided by\n // Todd Kelley (2016) Personal Communication\n System.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"127.0.0.1\");\n System.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n try {\n JOptionPane.showMessageDialog(this, \"Trying for a session...\");\n InitialContext ic = new InitialContext();\n session = (TunaFacadeRemote) ic.lookup(\"java:global/Assignment4/Assignment4-ejb/TunaFacade\");\n JOptionPane.showMessageDialog(this, \"Got a session :) \");\n\n } catch (NamingException e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n }\n return session;\n }", "public String getSessionId() {\n\t\treturn this.traceInformation.getSessionId();\n\t}", "public String getSessionId() {\n return super.getSessionId();\n }", "public Session getSessionInFocus()\r\n\t{\r\n\t\treturn sessionInFocus;\r\n\t}", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "public abstract Thread startSession();", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "com.weizhu.proto.WeizhuProtos.Session getSession();", "public Session getSession();", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public String getSessionId() {\n// synchronized (mSessionObj) {\n// return mSessionId;\n// }\n return \"\";\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "private TwitterSession getTwitterSession() {\n TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n\n //NOTE : if you want to get token and secret too use uncomment the below code\n /*TwitterAuthToken authToken = session.getAuthToken();\n String token = authToken.token;\n String secret = authToken.secret;*/\n\n return session;\n }", "public String getSessionId() {\n return this.sessionid;\n }", "public static PlayerSession getSession(CommandSender player) {\r\n \t\tPlayerSession session = playerSessions.get(player.getName());\r\n \t\tif (session == null)\r\n \t\t\tsession = addSession(player);\r\n \t\tsession.setSender(player);\r\n \t\treturn session;\r\n \t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "public String getThread()\n\t{\n\t\treturn this.thread;\n\t}", "protected Session getSession() { return session; }", "public synchronized Thread getThread() {\n return thread;\n }", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public MessageSession getSession(MessageExchange exchange) {\n\t\t// logger.info(\"The target session: \" + exchange.getExchangeId());\n\t\tfor (MessageSession s : sessions) {\n\t\t\tif (s.isBelongs(exchange)) {\n\t\t\t\t// logger.info(\"The Unit's session: \" + s.getSessionID());\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.69342136", "0.6845705", "0.68354595", "0.68283415", "0.6774873", "0.6774873", "0.6719191", "0.6625134", "0.6618828", "0.66082567", "0.66081923", "0.66036874", "0.6602485", "0.6588429", "0.65738976", "0.6565161", "0.6517206", "0.6505868", "0.65013736", "0.6472408", "0.6461985", "0.6450808", "0.6437594", "0.6409786", "0.6409786", "0.6409786", "0.6404113", "0.6312307", "0.6311708", "0.6296839", "0.62954867", "0.62688947", "0.6263767", "0.625633", "0.6250088", "0.62376213", "0.6233042", "0.62286735", "0.6226645", "0.62226975", "0.6216744", "0.6216701", "0.62132764", "0.61808896", "0.61679727", "0.6167423", "0.61492133", "0.61412", "0.61394936", "0.6137512", "0.6136757", "0.6136624", "0.61287874", "0.61228925", "0.60971135", "0.60925144", "0.6082386", "0.60744536", "0.60711503", "0.60669875", "0.605985", "0.60528654", "0.6044816", "0.6039481", "0.6015806", "0.6013926", "0.60084736", "0.5983872", "0.5976406", "0.5957824", "0.59559786", "0.59555036", "0.5950186", "0.59396815", "0.5917292", "0.59126383", "0.59111524", "0.5901839", "0.5900854", "0.5898442", "0.58983594", "0.58942765", "0.5890848", "0.58890045", "0.58890045", "0.5878628", "0.5861089", "0.5848178", "0.58430386", "0.58231914", "0.58137053", "0.58076096", "0.58044827", "0.5799943", "0.5794461", "0.57913166", "0.578198", "0.57781315", "0.5773788", "0.57731515" ]
0.66073626
11
Returns the current session, or internally creates one if none is registered with the current thread that new session is registered with the current thread prior to being returned.
public static Session createSession(SessionFactory factory){ Session s; if((s = (Session) _sessionRef.get()) == null) { s = factory.openSession(); _sessionRef.set(s); } else{ if(!s.isConnected())s.reconnect(); } return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }", "public static Session currentSession() throws IllegalStateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n throw new IllegalStateException(\"Thread not registered with a session\");\n }\n \n if(!s.isConnected()){\n s.reconnect();\n }\n\n return s;\n }", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected abstract SESSION getThisAsSession();", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.getAuthToken() != null &&\n !session.getAuthToken().isExpired()) {\n return session;\n } else {\n return null;\n }\n }", "public static Session getSession() {\n return session;\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public Session getSysSession() {\n\n sysSession.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n sysSession.isProcessingScript = false;\n sysSession.isProcessingLog = false;\n\n sysSession.setUser(sysSession.database.getUserManager().getSysUser());\n\n return sysSession;\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public LocalSession session() { return session; }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "Object getNativeSession();", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "public static Session getSessionWithKeyspace() {\n\n if (serverRunning.get() && keyspaceCreated.get() && !sessionWithKeyspace.isClosed()) {\n return sessionWithKeyspace;\n } else {\n if (sessionWithKeyspace.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running or keyspace has not been created\");\n }\n }\n }", "private TwitterSession getTwitterSession() {\n TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n\n return session;\n }", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "public AbstractSession getSession() {\n return session;\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public Session getSession() {\n return session;\n }", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "protected synchronized static HTTPSession retrieveSession (HTTPRequest request)\n\t\tthrows SessionMaximumException\n\t{\n\t\t\n\t HTTPSession session = null;\n\t int theReference = Profiler.start (MauiRuntimeEngine.SOURCE_SESSION,\n\t \t\t\t\t\t\t\t\t\t MauiRuntimeEngine.ACTION_GET);\n\t boolean theHasCookie = false;\n\t boolean theGet = true;\n\t String sessionID = HTTPSession.getSessionIDFromRequest (request);\n\t if (sessionID != null && sessionID.startsWith (\"MA_\"))\n\t {\n\t \tsessionID = sessionID.substring (3);\n\t }\n\n\t String theSessionCookie = request.cookieMonster ();\n\t if ((theHasCookie = (theSessionCookie != null)))\n\t {\n\t \tsessionID = theSessionCookie;\n\t }\n\t \n\t if ((session = retrieveSessionFromTable (sessionID)) == null)\n\t {\n\t \t if (sessionMaximum != -1 &&\n\t \t \t getSessionCount () >= sessionMaximum)\n\t \t {\n\t \t \tthrow new SessionMaximumException (sessionMaximum);\n\t \t }\n\t \t \n\t session = new HTTPSession( request.getClientName (),\n\t \t\t\t\t\t\t\t request.isServletBased (),\n\t \t\t\t\t\t\t\t request.getServletURL ());\n\t if (sessionID != null)\n\t {\n\t \tcrossReferences.put (sessionID, session);\n\t \tsession.setCrossReference (sessionID);\n\t }\n\t theGet = false;\n\t addSession (session);\n\t // System.out.println(\"[HTTPSession] - Created new HTTPSession with ID '\" + session.sessionID + \"'.\");\n\t }\n\n \t session.touchTimeoutCounter();\n \t session.setHasCookie (theHasCookie);\n Profiler.finish (theReference,\n \t\t\t\t MauiRuntimeEngine.SOURCE_SESSION,\n \t\t\t\t (theGet ? MauiRuntimeEngine.ACTION_GET :\n \t\t\t\t\t \t\t MauiRuntimeEngine.ACTION_CREATE),\n \t\t\t\t \"Session: \" + sessionID);\n\t return session;\n\t}", "DefaultSession createSession(String id);", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "public Session getSession()\n {\n return session;\n }", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "@java.lang.Deprecated\n public final com.facebook.Session getSession() {\n /*\n r7 = this;\n r1 = 0;\n r2 = 0;\n L_0x0002:\n r3 = r7.lock;\n monitor-enter(r3);\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n if (r0 == 0) goto L_0x000d;\n L_0x0009:\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0015;\n L_0x0011:\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x001c;\n L_0x0015:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n goto L_0x000c;\n L_0x0019:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n throw r0;\n L_0x001c:\n r0 = r7.accessToken;\t Catch:{ all -> 0x0019 }\n r4 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0025;\n L_0x0023:\n r0 = r2;\n goto L_0x000c;\n L_0x0025:\n if (r4 == 0) goto L_0x004e;\n L_0x0027:\n r0 = r4.getPermissions();\n L_0x002b:\n r3 = new com.facebook.Session$Builder;\n r4 = r7.pendingAuthorizationActivity;\n r3.<init>(r4);\n r4 = r7.mAppId;\n r3 = r3.setApplicationId(r4);\n r4 = r7.getTokenCache();\n r3 = r3.setTokenCachingStrategy(r4);\n r3 = r3.build();\n r4 = r3.getState();\n r5 = com.facebook.SessionState.CREATED_TOKEN_LOADED;\n if (r4 == r5) goto L_0x005e;\n L_0x004c:\n r0 = r2;\n goto L_0x000c;\n L_0x004e:\n r0 = r7.pendingAuthorizationPermissions;\n if (r0 == 0) goto L_0x0059;\n L_0x0052:\n r0 = r7.pendingAuthorizationPermissions;\n r0 = java.util.Arrays.asList(r0);\n goto L_0x002b;\n L_0x0059:\n r0 = java.util.Collections.emptyList();\n goto L_0x002b;\n L_0x005e:\n r4 = new com.facebook.Session$OpenRequest;\n r5 = r7.pendingAuthorizationActivity;\n r4.<init>(r5);\n r4 = r4.setPermissions(r0);\n r0 = r0.isEmpty();\n if (r0 != 0) goto L_0x0092;\n L_0x006f:\n r0 = 1;\n L_0x0070:\n r7.openSession(r3, r4, r0);\n r4 = r7.lock;\n monitor-enter(r4);\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x007e;\n L_0x007a:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x0097;\n L_0x007e:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n r7.session = r3;\t Catch:{ all -> 0x0094 }\n r5 = 0;\n r7.sessionInvalidated = r5;\t Catch:{ all -> 0x0094 }\n r6 = r3;\n r3 = r0;\n r0 = r6;\n L_0x0088:\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n if (r3 == 0) goto L_0x008e;\n L_0x008b:\n r3.close();\n L_0x008e:\n if (r0 == 0) goto L_0x0002;\n L_0x0090:\n goto L_0x000c;\n L_0x0092:\n r0 = r1;\n goto L_0x0070;\n L_0x0094:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n throw r0;\n L_0x0097:\n r0 = r2;\n r3 = r2;\n goto L_0x0088;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.android.Facebook.getSession():com.facebook.Session\");\n }", "public static SessionManager get(Context context) {\n \tif (self == null) {\n \t\tself = new SessionManager(context);\n \t}\n \treturn self;\n }", "public static SessionKeeper getInstance(){\r\n if (sessionKeeperInstance == null) sessionKeeperInstance = new SessionKeeper();\r\n return sessionKeeperInstance;\r\n }", "public PSUserSession getSession();", "public FlexSession getFlexSession()\n {\n synchronized (lock)\n {\n return flexSession;\n }\n }", "public Session session() {\n return session;\n }", "DefaultSession getSession(String id);", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "public String getSession() {\n return session;\n }", "public Session getSession() { return session; }", "public User getSession(){\n\t\treturn this.session;\n\t}", "protected Session buildOrObtainSession() {\r\n\t\tLOGGER.fine(\"Opening a new Session\");\r\n\t\tSession s = super.buildOrObtainSession();\r\n\r\n\t\tLOGGER.fine(\"Disabling automatic flushing of the Session\");\r\n\t\ts.setFlushMode(FlushMode.MANUAL);\r\n\r\n\t\treturn s;\r\n\t}", "public static Session currentSession(SessionFactory fac)\n throws HibernateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = fac.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s;\n }", "public HttpSession getHttpSession() {\n return servletRequest.getSession();\n }", "@Override\n\t\tpublic HttpSession getSession() {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "public static PlayerSession getSession(CommandSender player) {\r\n \t\tPlayerSession session = playerSessions.get(player.getName());\r\n \t\tif (session == null)\r\n \t\t\tsession = addSession(player);\r\n \t\tsession.setSender(player);\r\n \t\treturn session;\r\n \t}", "public Session getSession(@NotNull Http.Request request) {\n Session session;\n String sessionKey = request.getHeader(SESSION_FIELD_NAME);\n\n // Check Session Key\n if (sessionKey == null || sessionKey.isEmpty()) {\n return null;\n }\n\n // Get Session by Key & check a session was found\n session = this.sessionRepository.getById(sessionKey);\n if (session == null || !session.isValid()) {\n return null;\n }\n\n return session;\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "public Session getSession();", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public TrackSession getTrackSession() {\n if (mTrackSession == null && mTrackSessionId != 0)\r\n mTrackSession = TrackSession.read(Position.context, mTrackSessionId);\r\n return mTrackSession;\r\n }", "public static MemberSession getMemberSession() {\n//\t\treturn getMemberSessionDo2(GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t//\tGPortalExecutionContext.getRequest().getSessionContext().invalidate();\n\t\treturn getMemberSession(GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t}", "protected Session getSession() { return session; }", "public Session getSession() {\n return session;\n }", "@Override\n\tpublic HttpSession getSession(boolean flag) {\n\t\tboolean sessionInStock = false;\n if (flag) {\n if (!hasSession()) {\n for (Cookie c : cookieList) {\n if (c.getName().equalsIgnoreCase(\"JSESSIONID\")) {\n if (SessionContainer.getSession(c.getValue()) != null) {\n sessionInStock = true;\n m_session = SessionContainer.getSession(c.getValue());\n return m_session;\n }\n }\n }\n if (!sessionInStock) {\n m_session = new MyHttpSession();\n Cookie sessionCookie = new Cookie(\"JSESSIONID\",\n m_session.getSessoinId());\n buffer.addCookie(sessionCookie);\n SessionContainer.addSession(m_session);\n }\n }\n } else {\n if (!hasSession()) {\n m_session = null;\n }\n }\n return m_session;\n\t}", "private TunaFacadeRemote getRemoteSession() {\n TunaFacadeRemote session = null;\n \n // CORBA properties and values and lookup taken after earlier work provided by\n // Todd Kelley (2016) Personal Communication\n System.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"127.0.0.1\");\n System.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n try {\n JOptionPane.showMessageDialog(this, \"Trying for a session...\");\n InitialContext ic = new InitialContext();\n session = (TunaFacadeRemote) ic.lookup(\"java:global/Assignment4/Assignment4-ejb/TunaFacade\");\n JOptionPane.showMessageDialog(this, \"Got a session :) \");\n\n } catch (NamingException e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n }\n return session;\n }", "public String getSession() {\n return this.session;\n }", "public SessionService session() {\n return service;\n }", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}" ]
[ "0.81960994", "0.8006164", "0.77685666", "0.75284797", "0.7441985", "0.73645854", "0.7340176", "0.72418165", "0.7100811", "0.7082696", "0.70751166", "0.70751166", "0.6995112", "0.6993369", "0.6989256", "0.6987784", "0.69509405", "0.6916473", "0.6889823", "0.6889823", "0.68767446", "0.6852604", "0.68266296", "0.6812296", "0.6807581", "0.6799174", "0.6790695", "0.6780517", "0.6780206", "0.67753816", "0.67742157", "0.67608505", "0.67379445", "0.67040974", "0.66981643", "0.6681477", "0.66791517", "0.6662578", "0.66503257", "0.6646213", "0.66318583", "0.6624077", "0.66146255", "0.66121906", "0.6606114", "0.65543336", "0.65212065", "0.65212065", "0.65212065", "0.6513625", "0.6488691", "0.6486557", "0.6484607", "0.6461781", "0.64411104", "0.6432276", "0.64257795", "0.6396036", "0.63809514", "0.6345665", "0.63408387", "0.6321803", "0.6268148", "0.6265654", "0.62555116", "0.62405306", "0.6212992", "0.62117", "0.6204315", "0.6204141", "0.6182205", "0.6179001", "0.61671", "0.61668885", "0.6157989", "0.61569136", "0.6141251", "0.6137411", "0.61372167", "0.6133529", "0.6122269", "0.6112006", "0.6111122", "0.6107754", "0.60978377", "0.60946375", "0.609353", "0.60767317", "0.6066857", "0.6058702", "0.60502285", "0.60475016", "0.6044868", "0.60352254", "0.6019652", "0.59915483", "0.5987947", "0.5980921", "0.59786844", "0.5977668", "0.5977131" ]
0.0
-1